0xray 3.5.5 → 4.0.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.
Files changed (233) hide show
  1. package/.mcp.json +18 -14
  2. package/.opencode/skills/api-design/SKILL.md +1 -1
  3. package/.opencode/skills/architect-tools/SKILL.md +1 -1
  4. package/.opencode/skills/architecture-patterns/SKILL.md +1 -1
  5. package/.opencode/skills/auto-format/SKILL.md +1 -1
  6. package/.opencode/skills/boot-orchestrator/SKILL.md +2 -6
  7. package/.opencode/skills/bug-triage/SKILL.md +1 -1
  8. package/.opencode/skills/code-analyzer/SKILL.md +1 -1
  9. package/.opencode/skills/code-review/SKILL.md +1 -1
  10. package/.opencode/skills/enforcer/SKILL.md +1 -1
  11. package/.opencode/skills/framework-compliance-audit/SKILL.md +1 -1
  12. package/.opencode/skills/git-workflow/SKILL.md +1 -1
  13. package/.opencode/skills/hermes-agent/SKILL.md +36 -36
  14. package/.opencode/skills/inference-improve/SKILL.md +1 -1
  15. package/.opencode/skills/lint/SKILL.md +1 -1
  16. package/.opencode/skills/log-monitor/SKILL.md +1 -1
  17. package/.opencode/skills/model-health-check/SKILL.md +1 -1
  18. package/.opencode/skills/multimodal-looker/SKILL.md +1 -1
  19. package/.opencode/skills/orchestrator/SKILL.md +38 -14
  20. package/.opencode/skills/performance-analysis/SKILL.md +1 -1
  21. package/.opencode/skills/performance-optimization/SKILL.md +1 -1
  22. package/.opencode/skills/processor-pipeline/SKILL.md +1 -1
  23. package/.opencode/skills/project-analysis/SKILL.md +1 -1
  24. package/.opencode/skills/refactoring-strategies/SKILL.md +1 -1
  25. package/.opencode/skills/registry.json +65 -0
  26. package/.opencode/skills/researcher/SKILL.md +18 -5
  27. package/.opencode/skills/security-audit/SKILL.md +1 -1
  28. package/.opencode/skills/security-scan/SKILL.md +1 -1
  29. package/.opencode/skills/session-management/SKILL.md +1 -1
  30. package/.opencode/skills/state-manager/SKILL.md +1 -1
  31. package/.opencode/skills/storyteller/SKILL.md +1 -1
  32. package/.opencode/skills/strategist/SKILL.md +12 -0
  33. package/.opencode/skills/testing-best-practices/SKILL.md +37 -0
  34. package/.opencode/skills/testing-strategy/SKILL.md +14 -3
  35. package/.opencode/skills/ui-ux-design/SKILL.md +1 -1
  36. package/.opencode/skills/xray-orchestrator/index.ts +267 -0
  37. package/.xray/codex.json +12 -3
  38. package/.xray/features.json +28 -6
  39. package/.xray/features.schema.json +31 -0
  40. package/AGENTS-consumer.md +17 -7
  41. package/AGENTS.md +18 -10
  42. package/README.md +30 -27
  43. package/SKILLS.md +2 -2
  44. package/dist/AGENTS.md +18 -10
  45. package/dist/CHANGELOG.md +81 -11
  46. package/dist/README.md +30 -27
  47. package/dist/SKILLS.md +2 -2
  48. package/dist/cli/commands/hermes-install.js +3 -0
  49. package/dist/cli/commands/openclaw-install.js +14 -0
  50. package/dist/cli/index.js +10 -1
  51. package/dist/core/features-config.d.ts +15 -2
  52. package/dist/infrastructure/schemas/cloud-schemas.d.ts +1 -1
  53. package/dist/integrations/grok/grok-cli.d.ts +3 -0
  54. package/dist/integrations/grok/grok-cli.js +92 -4
  55. package/dist/integrations/grok/hooks/grok-hook-utils.js +53 -7
  56. package/dist/integrations/grok/hooks/post-tool-use.js +68 -46
  57. package/dist/integrations/grok/hooks/pre-tool-use.js +14 -31
  58. package/dist/integrations/grok/hooks/session-start.js +86 -4
  59. package/dist/integrations/grok/plugin/0xray/hooks/hooks.json +31 -24
  60. package/dist/integrations/hermes-agent/bridge.mjs +26 -1
  61. package/dist/integrations/hooks/delegation-gate-runtime.mjs +32 -3
  62. package/dist/integrations/hooks/pipeline-hook-runtime.mjs +1 -1
  63. package/dist/integrations/hooks/station-hook-runtime.cjs +421 -0
  64. package/dist/integrations/hooks/station-hook-runtime.mjs +24 -0
  65. package/dist/integrations/hooks/station-memory-ingest.mjs +45 -0
  66. package/dist/integrations/hooks/station-memory-match.mjs +47 -0
  67. package/dist/integrations/openclaw/client.d.ts +5 -1
  68. package/dist/integrations/openclaw/client.js +17 -9
  69. package/dist/integrations/openclaw/config.js +0 -1
  70. package/dist/integrations/openclaw/hooks/pre-tool-gate-runtime.mjs +102 -0
  71. package/dist/integrations/openclaw/index.js +17 -0
  72. package/dist/integrations/openclaw/plugin/xray-pre-tool/index.js +75 -0
  73. package/dist/integrations/openclaw/plugin/xray-pre-tool/openclaw.plugin.json +10 -0
  74. package/dist/integrations/openclaw/plugin/xray-pre-tool/package.json +12 -0
  75. package/dist/integrations/openclaw/pre-tool-gate.d.ts +19 -0
  76. package/dist/integrations/openclaw/pre-tool-gate.js +39 -0
  77. package/dist/mcps/orchestrator/handlers/complexity-handler.js +2 -2
  78. package/dist/memory-routing/index.d.ts +1 -1
  79. package/dist/memory-routing/index.js +1 -1
  80. package/dist/memory-routing/provider-loader.d.ts +4 -0
  81. package/dist/memory-routing/provider-loader.js +44 -2
  82. package/dist/memory-routing/provider-registry.js +3 -2
  83. package/dist/nucleus/autonomy-kernel.d.ts +2 -2
  84. package/dist/nucleus/autonomy-kernel.js +17 -6
  85. package/dist/nucleus/confer.js +17 -3
  86. package/dist/nucleus/delegation-gate.d.ts +14 -8
  87. package/dist/nucleus/delegation-gate.js +151 -16
  88. package/dist/nucleus/suit-temperament.d.ts +40 -0
  89. package/dist/nucleus/suit-temperament.js +157 -0
  90. package/dist/nucleus/user-aside.js +1 -1
  91. package/dist/plugin/xray-codex-injection.js +14 -3
  92. package/dist/postprocessor/triggers/GitHookTrigger.js +11 -5
  93. package/opencode.json +80 -0
  94. package/package.json +15 -5
  95. package/scripts/hooks/install-hooks.cjs +18 -3
  96. package/scripts/hooks/run-hook.js +67 -3
  97. package/scripts/mjs/run-repertoire-mcp.mjs +39 -0
  98. package/scripts/mjs/verify-confer-core.mjs +1 -1
  99. package/scripts/mjs/verify-delegation-gate-core.mjs +29 -2
  100. package/scripts/mjs/verify-four-floor-compact.mjs +524 -0
  101. package/scripts/mjs/verify-pipeline-facets.mjs +215 -0
  102. package/scripts/mjs/verify-temperament-live.mjs +261 -0
  103. package/scripts/node/bridge-mcp-wiring.cjs +277 -29
  104. package/scripts/node/consumer-install-smoke.mjs +55 -2
  105. package/scripts/node/install-bridges.cjs +195 -33
  106. package/scripts/node/postinstall.cjs +50 -27
  107. package/scripts/node/reconcile-version.mjs +0 -4
  108. package/scripts/node/release-gate.mjs +1 -1
  109. package/scripts/node/release.mjs +2 -2
  110. package/scripts/node/universal-version-manager.js +1 -1
  111. package/scripts/node/validate-release-docs.mjs +20 -33
  112. package/scripts/node/version-manager.mjs +63 -18
  113. package/src/integrations/grok/plugin/0xray/hooks/hooks.json +31 -24
  114. package/src/integrations/openclaw/README.md +134 -0
  115. package/src/integrations/openclaw/plugin/xray-pre-tool/index.js +75 -0
  116. package/src/integrations/openclaw/plugin/xray-pre-tool/openclaw.plugin.json +10 -0
  117. package/src/integrations/openclaw/plugin/xray-pre-tool/package.json +12 -0
  118. package/src/mcps/orchestrator/handlers/complexity-handler.ts +2 -1
  119. package/vendor/@0xray/repertoire/AGENTS.md +163 -0
  120. package/vendor/@0xray/repertoire/LICENSE +21 -0
  121. package/vendor/@0xray/repertoire/README.md +120 -0
  122. package/vendor/@0xray/repertoire/data/curated_signals.json +208 -0
  123. package/vendor/@0xray/repertoire/dist/RepertoireService.d.ts +78 -0
  124. package/vendor/@0xray/repertoire/dist/RepertoireService.d.ts.map +1 -0
  125. package/vendor/@0xray/repertoire/dist/RepertoireService.js +153 -0
  126. package/vendor/@0xray/repertoire/dist/RepertoireService.js.map +1 -0
  127. package/vendor/@0xray/repertoire/dist/governance/ontological-trap-enforcer.d.ts +39 -0
  128. package/vendor/@0xray/repertoire/dist/governance/ontological-trap-enforcer.d.ts.map +1 -0
  129. package/vendor/@0xray/repertoire/dist/governance/ontological-trap-enforcer.js +60 -0
  130. package/vendor/@0xray/repertoire/dist/governance/ontological-trap-enforcer.js.map +1 -0
  131. package/vendor/@0xray/repertoire/dist/index.d.ts +14 -0
  132. package/vendor/@0xray/repertoire/dist/index.d.ts.map +1 -0
  133. package/vendor/@0xray/repertoire/dist/index.js +14 -0
  134. package/vendor/@0xray/repertoire/dist/index.js.map +1 -0
  135. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-ingester.d.ts +26 -0
  136. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-ingester.d.ts.map +1 -0
  137. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-ingester.js +109 -0
  138. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-ingester.js.map +1 -0
  139. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-parser.d.ts +18 -0
  140. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-parser.d.ts.map +1 -0
  141. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-parser.js +94 -0
  142. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-parser.js.map +1 -0
  143. package/vendor/@0xray/repertoire/dist/ingestion/orchestrator-feedback-ingester.d.ts +7 -0
  144. package/vendor/@0xray/repertoire/dist/ingestion/orchestrator-feedback-ingester.d.ts.map +1 -0
  145. package/vendor/@0xray/repertoire/dist/ingestion/orchestrator-feedback-ingester.js +18 -0
  146. package/vendor/@0xray/repertoire/dist/ingestion/orchestrator-feedback-ingester.js.map +1 -0
  147. package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.d.ts +31 -0
  148. package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.d.ts.map +1 -0
  149. package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.js +83 -0
  150. package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.js.map +1 -0
  151. package/vendor/@0xray/repertoire/dist/mcp/server.d.ts +6 -0
  152. package/vendor/@0xray/repertoire/dist/mcp/server.d.ts.map +1 -0
  153. package/vendor/@0xray/repertoire/dist/mcp/server.js +173 -0
  154. package/vendor/@0xray/repertoire/dist/mcp/server.js.map +1 -0
  155. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/RepertoireOrchestratorBridge.d.ts +27 -0
  156. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/RepertoireOrchestratorBridge.d.ts.map +1 -0
  157. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/RepertoireOrchestratorBridge.js +107 -0
  158. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/RepertoireOrchestratorBridge.js.map +1 -0
  159. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/capability-enhancer.d.ts +11 -0
  160. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/capability-enhancer.d.ts.map +1 -0
  161. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/capability-enhancer.js +32 -0
  162. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/capability-enhancer.js.map +1 -0
  163. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.d.ts +9 -0
  164. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.d.ts.map +1 -0
  165. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.js +72 -0
  166. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.js.map +1 -0
  167. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-agent-affinity.d.ts +5 -0
  168. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-agent-affinity.d.ts.map +1 -0
  169. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-agent-affinity.js +18 -0
  170. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-agent-affinity.js.map +1 -0
  171. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.d.ts +31 -0
  172. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.d.ts.map +1 -0
  173. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.js +218 -0
  174. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.js.map +1 -0
  175. package/vendor/@0xray/repertoire/dist/paths.d.ts +24 -0
  176. package/vendor/@0xray/repertoire/dist/paths.d.ts.map +1 -0
  177. package/vendor/@0xray/repertoire/dist/paths.js +74 -0
  178. package/vendor/@0xray/repertoire/dist/paths.js.map +1 -0
  179. package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.d.ts +141 -0
  180. package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.d.ts.map +1 -0
  181. package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.js +210 -0
  182. package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.js.map +1 -0
  183. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.d.ts +48 -0
  184. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.d.ts.map +1 -0
  185. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.js +221 -0
  186. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.js.map +1 -0
  187. package/vendor/@0xray/repertoire/dist/registry/InferenceStateManager.d.ts +11 -0
  188. package/vendor/@0xray/repertoire/dist/registry/InferenceStateManager.d.ts.map +1 -0
  189. package/vendor/@0xray/repertoire/dist/registry/InferenceStateManager.js +43 -0
  190. package/vendor/@0xray/repertoire/dist/registry/InferenceStateManager.js.map +1 -0
  191. package/vendor/@0xray/repertoire/dist/registry/signal-prune.d.ts +15 -0
  192. package/vendor/@0xray/repertoire/dist/registry/signal-prune.d.ts.map +1 -0
  193. package/vendor/@0xray/repertoire/dist/registry/signal-prune.js +35 -0
  194. package/vendor/@0xray/repertoire/dist/registry/signal-prune.js.map +1 -0
  195. package/vendor/@0xray/repertoire/dist/synthesis/concrete-sections.d.ts +3 -0
  196. package/vendor/@0xray/repertoire/dist/synthesis/concrete-sections.d.ts.map +1 -0
  197. package/vendor/@0xray/repertoire/dist/synthesis/concrete-sections.js +24 -0
  198. package/vendor/@0xray/repertoire/dist/synthesis/concrete-sections.js.map +1 -0
  199. package/vendor/@0xray/repertoire/dist/synthesis/meta-inference-engine.d.ts +24 -0
  200. package/vendor/@0xray/repertoire/dist/synthesis/meta-inference-engine.d.ts.map +1 -0
  201. package/vendor/@0xray/repertoire/dist/synthesis/meta-inference-engine.js +148 -0
  202. package/vendor/@0xray/repertoire/dist/synthesis/meta-inference-engine.js.map +1 -0
  203. package/vendor/@0xray/repertoire/dist/synthesis/primitive-confidence-aggregator.d.ts +4 -0
  204. package/vendor/@0xray/repertoire/dist/synthesis/primitive-confidence-aggregator.d.ts.map +1 -0
  205. package/vendor/@0xray/repertoire/dist/synthesis/primitive-confidence-aggregator.js +44 -0
  206. package/vendor/@0xray/repertoire/dist/synthesis/primitive-confidence-aggregator.js.map +1 -0
  207. package/vendor/@0xray/repertoire/dist/synthesis/synthesis-prompt-builder.d.ts +22 -0
  208. package/vendor/@0xray/repertoire/dist/synthesis/synthesis-prompt-builder.d.ts.map +1 -0
  209. package/vendor/@0xray/repertoire/dist/synthesis/synthesis-prompt-builder.js +66 -0
  210. package/vendor/@0xray/repertoire/dist/synthesis/synthesis-prompt-builder.js.map +1 -0
  211. package/vendor/@0xray/repertoire/dist/types.d.ts +210 -0
  212. package/vendor/@0xray/repertoire/dist/types.d.ts.map +1 -0
  213. package/vendor/@0xray/repertoire/dist/types.js +2 -0
  214. package/vendor/@0xray/repertoire/dist/types.js.map +1 -0
  215. package/vendor/@0xray/repertoire/docs/MEMORY-ROUTING-PROVIDER.md +54 -0
  216. package/vendor/@0xray/repertoire/hermes-mcp.example.json +20 -0
  217. package/vendor/@0xray/repertoire/mcp-config.example.json +11 -0
  218. package/vendor/@0xray/repertoire/package.json +124 -0
  219. package/vendor/@0xray/repertoire/schemas/curated-signal.schema.json +68 -0
  220. package/vendor/@0xray/repertoire/schemas/inference-log.schema.json +82 -0
  221. package/vendor/@0xray/repertoire/scripts/confirm-suit-all.mjs +253 -0
  222. package/vendor/@0xray/repertoire/scripts/confirm-suit-harness.mjs +220 -0
  223. package/vendor/@0xray/repertoire/scripts/run-live-synthesis-checkpoint.mjs +215 -0
  224. package/vendor/@0xray/repertoire/scripts/suit-bridge-shared.mjs +139 -0
  225. package/vendor/@0xray/repertoire/scripts/verify-grok-suit.mjs +304 -0
  226. package/vendor/@0xray/repertoire/scripts/verify-hermes-suit.mjs +163 -0
  227. package/vendor/@0xray/repertoire/scripts/verify-openclaw-suit.mjs +125 -0
  228. package/vendor/@0xray/repertoire/scripts/verify-opencode-suit.mjs +127 -0
  229. package/vendor/@0xray/repertoire/scripts/verify-synthesis-dogfood.mjs +207 -0
  230. package/vendor/@0xray/repertoire/skills/repertoire-trap-handling/SKILL.md +206 -0
  231. package/xray/codex.json +12 -3
  232. package/xray/features.json +28 -6
  233. package/xray/features.schema.json +31 -0
@@ -0,0 +1,127 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Verify OpenCode suit bridge for this consumer repo.
4
+ * Run: node scripts/verify-opencode-suit.mjs
5
+ */
6
+ import { execSync } from 'node:child_process';
7
+ import { existsSync, readFileSync } from 'node:fs';
8
+ import { join, resolve } from 'node:path';
9
+ import { REPERTOIRE_MCP, XRAY_MCP_SERVERS } from './suit-bridge-shared.mjs';
10
+
11
+ const root = resolve(import.meta.dirname, '..');
12
+ let failed = 0;
13
+
14
+ function pass(name, detail = '') {
15
+ console.log(`✅ ${name}${detail ? ` — ${detail}` : ''}`);
16
+ }
17
+
18
+ function fail(name, detail = '') {
19
+ failed++;
20
+ console.error(`❌ ${name}${detail ? ` — ${detail}` : ''}`);
21
+ }
22
+
23
+ // 1. OpenCode CLI
24
+ try {
25
+ const opencodePath = execSync('which opencode', { encoding: 'utf8' }).trim();
26
+ pass('opencode cli', opencodePath);
27
+ } catch {
28
+ fail('opencode cli', 'not on PATH');
29
+ }
30
+
31
+ // 2. Bridge artifacts
32
+ const pluginPath = join(root, '.opencode', 'plugin', 'xray-codex-injection.js');
33
+ existsSync(pluginPath) ? pass('codex injection plugin', pluginPath) : fail('codex injection plugin', 'run: npx 0xray opencode install --force');
34
+
35
+ const skillsDir = join(root, '.opencode', 'skills', 'orchestrator', 'SKILL.md');
36
+ existsSync(skillsDir) ? pass('orchestrator skill synced') : fail('orchestrator skill synced', 'missing');
37
+
38
+ // 3. opencode.json MCP entries
39
+ try {
40
+ const config = JSON.parse(readFileSync(join(root, 'opencode.json'), 'utf8'));
41
+ const mcp = config.mcp ?? {};
42
+ const xrayEntries = XRAY_MCP_SERVERS.filter((s) => {
43
+ const entry = mcp[s.name];
44
+ return entry?.type === 'local' && entry?.enabled === true && Array.isArray(entry.command);
45
+ });
46
+ if (xrayEntries.length === 7) pass('opencode.json xray mcp', '7/7 enabled local');
47
+ else fail('opencode.json xray mcp', `${xrayEntries.length}/7`);
48
+
49
+ const rep = mcp[REPERTOIRE_MCP.name];
50
+ if (rep?.enabled === true && rep?.type === 'local') pass('opencode.json repertoire mcp');
51
+ else fail('opencode.json repertoire mcp', 'missing or disabled');
52
+ } catch (e) {
53
+ fail('opencode.json mcp', e.message);
54
+ }
55
+
56
+ // 4. Plugin loaded in resolved config
57
+ try {
58
+ const debug = execSync('opencode debug config 2>&1', { cwd: root, encoding: 'utf8', timeout: 15000 });
59
+ if (debug.includes('xray-codex-injection.js')) pass('plugin in resolved config');
60
+ else fail('plugin in resolved config', 'xray-codex-injection.js not found');
61
+ } catch (e) {
62
+ fail('opencode debug config', e.message?.slice(0, 160));
63
+ }
64
+
65
+ // 5. opencode mcp list (runtime registry)
66
+ try {
67
+ const listed = execSync('opencode mcp list 2>&1', { cwd: root, encoding: 'utf8', timeout: 20000 });
68
+ const xrayListed = XRAY_MCP_SERVERS.filter((s) => listed.includes(s.name));
69
+ if (xrayListed.length === 7) pass('opencode mcp list xray', '7/7');
70
+ else fail('opencode mcp list xray', `${xrayListed.length}/7 — ${listed.slice(0, 200)}`);
71
+ listed.includes(REPERTOIRE_MCP.name)
72
+ ? pass('opencode mcp list repertoire')
73
+ : fail('opencode mcp list repertoire', 'not listed');
74
+ } catch (e) {
75
+ fail('opencode mcp list', e.message?.slice(0, 160));
76
+ }
77
+
78
+ // 6. Skills discoverable via OpenCode CLI (output can exceed 64KB — pipe to rg)
79
+ try {
80
+ execSync('opencode debug skill 2>&1 | rg -q "orchestrator/SKILL.md"', {
81
+ cwd: root,
82
+ encoding: 'utf8',
83
+ timeout: 20000,
84
+ shell: '/bin/bash',
85
+ });
86
+ pass('opencode skills', 'orchestrator present');
87
+ } catch (e) {
88
+ fail('opencode skills', e.message?.slice(0, 160));
89
+ }
90
+
91
+ // 7. .xray contract
92
+ for (const f of ['codex.json', 'features.json', 'config.json']) {
93
+ existsSync(join(root, '.xray', f)) ? pass(`.xray/${f}`) : fail(`.xray/${f}`, 'missing');
94
+ }
95
+
96
+ // 8. MCP stdio probe
97
+ try {
98
+ const init = JSON.stringify({
99
+ jsonrpc: '2.0',
100
+ id: 1,
101
+ method: 'initialize',
102
+ params: {
103
+ protocolVersion: '2024-11-05',
104
+ capabilities: {},
105
+ clientInfo: { name: 'verify-opencode-suit', version: '1.0' },
106
+ },
107
+ });
108
+ const out = execSync(
109
+ `printf '%s\\n' '${init.replace(/'/g, "'\\''")}' | timeout 12 npx 0xray mcp skills 2>/dev/null | head -1`,
110
+ { cwd: root, encoding: 'utf8', shell: '/bin/bash' },
111
+ );
112
+ if (out.includes('serverInfo')) pass('MCP skills stdio probe');
113
+ else fail('MCP skills stdio probe', out.slice(0, 120));
114
+ } catch (e) {
115
+ fail('MCP skills stdio probe', e.message?.slice(0, 160));
116
+ }
117
+
118
+ // 9. npx 0xray health from consumer
119
+ try {
120
+ execSync('npx 0xray health', { cwd: root, stdio: 'pipe', encoding: 'utf8' });
121
+ pass('npx 0xray health');
122
+ } catch {
123
+ fail('npx 0xray health');
124
+ }
125
+
126
+ console.log('\n' + (failed === 0 ? '🎉 OpenCode suit wearable.' : `⚠️ ${failed} OpenCode check(s) failed.`));
127
+ process.exit(failed === 0 ? 0 : 1);
@@ -0,0 +1,207 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Dogfood synthesis on repertoire core — provider + xray nucleus + live Grok hook.
4
+ * Run: npm run build && node scripts/verify-synthesis-dogfood.mjs
5
+ */
6
+ import { execSync } from 'node:child_process';
7
+ import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
8
+ import { tmpdir } from 'node:os';
9
+ import { dirname, join } from 'node:path';
10
+ import { fileURLToPath } from 'node:url';
11
+
12
+ const __dirname = dirname(fileURLToPath(import.meta.url));
13
+ const root = join(__dirname, '..');
14
+ const xrayRoot = join(root, 'node_modules/0xray');
15
+
16
+ let failed = 0;
17
+ function pass(n, d = '') {
18
+ console.log(`✅ ${n}${d ? ` — ${d}` : ''}`);
19
+ }
20
+ function fail(n, d = '') {
21
+ failed++;
22
+ console.error(`❌ ${n}${d ? ` — ${d}` : ''}`);
23
+ }
24
+
25
+ const sessionId = 'repertoire-dogfood';
26
+
27
+ async function main() {
28
+ if (!existsSync(join(root, 'dist/provider/memory-routing-provider.js'))) {
29
+ fail('build', 'run npm run build first');
30
+ process.exit(1);
31
+ }
32
+
33
+ try {
34
+ execSync('npm run health:repertoire', { cwd: root, stdio: 'pipe', env: { ...process.env, REPERTOIRE_EXPECTED_SIGNALS: '145' } });
35
+ pass('health:repertoire', '145 signals drift gate');
36
+ } catch (e) {
37
+ fail('health:repertoire', e.stderr?.toString() || e.message);
38
+ }
39
+
40
+ const features = JSON.parse(readFileSync(join(root, '.xray/features.json'), 'utf8'));
41
+ if (!features.synthesis?.enabled) fail('synthesis.enabled in features.json');
42
+ else pass('synthesis.enabled in features.json');
43
+ if (!features.memory_routing?.enabled) fail('memory_routing.enabled');
44
+ else pass('memory_routing.enabled', features.memory_routing.provider);
45
+
46
+ const { createMemoryRoutingProvider } = await import(
47
+ join(root, 'dist/provider/memory-routing-provider.js')
48
+ );
49
+ const provider = createMemoryRoutingProvider(features.memory_routing.config ?? {});
50
+ if (typeof provider.buildSynthesisContext !== 'function') {
51
+ fail('provider.buildSynthesisContext');
52
+ } else {
53
+ const ctx = provider.buildSynthesisContext({
54
+ projectRoot: root,
55
+ dueReason: 'gate_threshold',
56
+ });
57
+ if (ctx && typeof ctx === 'object') pass('provider.buildSynthesisContext', 'non-null');
58
+ else fail('provider.buildSynthesisContext', 'null');
59
+ }
60
+
61
+ if (typeof provider.refreshMetaInference === 'function') {
62
+ try {
63
+ const { refreshed } = await provider.refreshMetaInference();
64
+ pass('provider.refreshMetaInference', String(refreshed));
65
+ } catch (e) {
66
+ fail('provider.refreshMetaInference', e.message);
67
+ }
68
+ } else {
69
+ fail('provider.refreshMetaInference missing');
70
+ }
71
+
72
+ if (typeof provider.ingestFeedback === 'function') {
73
+ try {
74
+ const result = provider.ingestFeedback({
75
+ timestamp: new Date().toISOString(),
76
+ sessionId,
77
+ taskId: 'dogfood-1',
78
+ assignedAgent: 'researcher',
79
+ memorySignals: ['synthesis-checkpoint'],
80
+ complexity: 20,
81
+ success: true,
82
+ durationMs: 1200,
83
+ });
84
+ if (result?.logPath) pass('provider.ingestFeedback', result.logPath);
85
+ else fail('provider.ingestFeedback', 'no logPath');
86
+ } catch (e) {
87
+ fail('provider.ingestFeedback', e.message);
88
+ }
89
+ }
90
+
91
+ const { recordExecutionSlice, isSynthesisCheckpointDue, loadSynthesisCheckpointState } =
92
+ await import(join(xrayRoot, 'dist/nucleus/synthesis.js'));
93
+ const { evaluatePreToolGate, loadDelegationGateFeatures } = await import(
94
+ join(xrayRoot, 'dist/integrations/hooks/delegation-gate-runtime.mjs'),
95
+ );
96
+ const { prepareSynthesisCollocatedContext } = await import(
97
+ join(xrayRoot, 'dist/nucleus/synthesis-context.js'),
98
+ );
99
+
100
+ const tmp = mkdtempSync(join(tmpdir(), 'repertoire-synth-dogfood-'));
101
+ mkdirSync(join(tmp, '.xray', 'state'), { recursive: true });
102
+ const dogFeatures = {
103
+ ...features,
104
+ synthesis: { ...features.synthesis, every_n_gates: 1, every_n_turns: 0, every_n_todos_completed: 0 },
105
+ memory_routing: {
106
+ ...features.memory_routing,
107
+ module_path: join(root, 'dist/provider/memory-routing-provider.js'),
108
+ },
109
+ };
110
+ writeFileSync(join(tmp, '.xray/features.json'), JSON.stringify(dogFeatures, null, 2));
111
+
112
+ try {
113
+ recordExecutionSlice('gate', { projectRoot: tmp, sessionId });
114
+ if (isSynthesisCheckpointDue(tmp, sessionId)) pass('nucleus gate slice → synthesis due');
115
+ else fail('nucleus synthesis due');
116
+
117
+ const gateFeatures = loadDelegationGateFeatures(tmp);
118
+ const deny = evaluatePreToolGate(
119
+ 'search_replace',
120
+ { path: 'src/a.ts', new_string: 'x' },
121
+ { projectRoot: tmp, sessionId, features: gateFeatures, host: 'grok' },
122
+ );
123
+ if (!deny.allow && deny.gate === 'synthesis-checkpoint') {
124
+ pass('evaluatePreToolGate denies write when due');
125
+ } else {
126
+ fail('evaluatePreToolGate deny', JSON.stringify(deny));
127
+ }
128
+
129
+ const collation = await prepareSynthesisCollocatedContext(root, 'gate_threshold');
130
+ if (
131
+ collation?.collatedText &&
132
+ !collation.collatedText.includes('Enable memory_routing with Repertoire')
133
+ ) {
134
+ pass('prepareSynthesisCollocatedContext', 'repertoire collation');
135
+ } else {
136
+ fail('prepareSynthesisCollocatedContext', JSON.stringify(collation));
137
+ }
138
+
139
+ const cleared = loadSynthesisCheckpointState(tmp);
140
+ if (cleared?.synthesisDue) pass('checkpoint still due before consult completion');
141
+ else fail('checkpoint state');
142
+ } finally {
143
+ rmSync(tmp, { recursive: true, force: true });
144
+ }
145
+
146
+ const preToolHook = join(xrayRoot, 'dist/integrations/grok/hooks/pre-tool-use.js');
147
+ const hookTmp = mkdtempSync(join(tmpdir(), 'repertoire-grok-hook-'));
148
+ mkdirSync(join(hookTmp, '.xray', 'state'), { recursive: true });
149
+ writeFileSync(
150
+ join(hookTmp, '.xray', 'features.json'),
151
+ JSON.stringify({
152
+ synthesis: { enabled: true, every_n_gates: 12, every_n_turns: 0, every_n_todos_completed: 0 },
153
+ multi_agent_orchestration: { enabled: true, lead_dev_mode: true },
154
+ }),
155
+ );
156
+ const now = new Date().toISOString();
157
+ writeFileSync(
158
+ join(hookTmp, '.xray', 'state', 'synthesis-checkpoint.json'),
159
+ JSON.stringify({
160
+ version: 1,
161
+ sessionId,
162
+ slicesSinceLastSynthesis: { gates: 12, turns: 0, todosCompleted: 0 },
163
+ lifetimeSlices: { gates: 12, turns: 0, todosCompleted: 0 },
164
+ synthesisDue: true,
165
+ dueReason: 'gate_threshold',
166
+ lastSynthesisAt: null,
167
+ lastSliceAt: now,
168
+ synthesisCount: 0,
169
+ }),
170
+ );
171
+ try {
172
+ const payload = JSON.stringify({
173
+ toolName: 'search_replace',
174
+ workspaceRoot: hookTmp,
175
+ sessionId,
176
+ toolInput: { path: 'src/a.ts', new_string: 'x' },
177
+ });
178
+ const out = execSync(
179
+ `printf '%s' '${payload.replace(/'/g, "'\\''")}' | node "${preToolHook}"`,
180
+ {
181
+ encoding: 'utf8',
182
+ env: { ...process.env, GROK_WORKSPACE_ROOT: hookTmp, GROK_SESSION_ID: sessionId },
183
+ },
184
+ );
185
+ const parsed = JSON.parse(out.trim());
186
+ if (parsed.decision === 'deny' && parsed.gate === 'synthesis-checkpoint') {
187
+ pass('live Grok pre-tool-use denies write when due');
188
+ } else {
189
+ fail('live Grok hook', JSON.stringify(parsed));
190
+ }
191
+ } finally {
192
+ rmSync(hookTmp, { recursive: true, force: true });
193
+ }
194
+
195
+ console.log(
196
+ '\n' +
197
+ (failed === 0
198
+ ? '🎉 Synthesis dogfood passed on repertoire core.'
199
+ : `⚠️ ${failed} dogfood check(s) failed.`),
200
+ );
201
+ process.exit(failed === 0 ? 0 : 1);
202
+ }
203
+
204
+ main().catch((e) => {
205
+ console.error(e);
206
+ process.exit(1);
207
+ });
@@ -0,0 +1,206 @@
1
+ ---
2
+ name: repertoire-trap-handling
3
+ description: Query Repertoire MCP tools before governance on ontological-trap tasks. Routes high-confidence traps to architect and injects matched signals as evidence.
4
+ author: 0xRay / Repertoire
5
+ version: 1.0.0
6
+ schema_version: "1.0"
7
+ tags: [repertoire, ontological-trap, governance, memory-routing, architect]
8
+ capabilities:
9
+ - evaluate_trap_confidence
10
+ - search_primitives
11
+ - route_trap_tasks
12
+ dependencies:
13
+ - repertoire-mcp
14
+
15
+ metadata:
16
+ hermes:
17
+ tags: [Repertoire, OntologicalTrap, Governance, MCP, Architect]
18
+ related_skills: [researcher, security-audit, architect-tools]
19
+ opencode:
20
+ tags: [repertoire, trap, governance]
21
+ ---
22
+
23
+ # Repertoire Trap Handling
24
+
25
+ Use this skill when a task or proposal may involve an **ontological trap** — cases where attestation, closure, or verdict language masks an ongoing validation obligation at a trust boundary.
26
+
27
+ Repertoire maintains a curated primitive registry (`curated_signals.json`) fed by **enriched Groover logs** (`matched_primitives` + `match_confidence`). The MCP surface is the **primary contract** for LLM agents running in Hermes, OpenCode, Claude Code, or similar hosts.
28
+
29
+ ## When to Activate
30
+
31
+ Trigger this skill when **any** of the following are true:
32
+
33
+ - Task or proposal text contains `TYPE: ontological-trap`
34
+ - Description mentions ontological-trap primitives (e.g. `attestation-as-map`, consumer-boundary revalidation)
35
+ - User asks for governance, architecture review, or researcher analysis on attestation / closure / verdict semantics
36
+ - You are about to call `analyze_proposal` on a trap-adjacent inference
37
+
38
+ Do **not** skip Repertoire on trap-classified work. In-process 0xRay routing may not be available in your host process.
39
+
40
+ ## Required MCP Server
41
+
42
+ Register `repertoire-mcp` in your host config (see `mcp-config.example.json` in the repertoire repo):
43
+
44
+ ```json
45
+ {
46
+ "mcpServers": {
47
+ "repertoire": {
48
+ "command": "node",
49
+ "args": ["/absolute/path/to/repertoire/dist/mcp/server.js"],
50
+ "env": {
51
+ "CURATED_SIGNALS_PATH": "/absolute/path/to/repertoire/data/curated_signals.json"
52
+ }
53
+ }
54
+ }
55
+ }
56
+ ```
57
+
58
+ Build first: `cd repertoire && npm run build`
59
+
60
+ Optional companion servers for governance follow-through:
61
+
62
+ - `xray-researcher` — `analyze_proposal` from a codebase/history perspective
63
+ - `xray-architect-tools` — architecture-level trap remediation
64
+ - `xray-code-review` / `xray-governance` — committee votes
65
+
66
+ ## Workflow
67
+
68
+ ### Step 1 — Evaluate task confidence
69
+
70
+ Call `repertoire__get_task_confidence` with the full task or proposal text.
71
+
72
+ ```
73
+ repertoire__get_task_confidence({
74
+ description: "<title + description + relevant context>",
75
+ type: "governance",
76
+ taskId: "<optional-id>"
77
+ })
78
+ ```
79
+
80
+ **Example description:**
81
+
82
+ ```
83
+ TYPE: ontological-trap
84
+ Attestation-as-map requires consumer-side revalidation at the trust boundary.
85
+ ```
86
+
87
+ ### Step 2 — Interpret the response
88
+
89
+ The tool returns JSON `TaskConfidenceContext`. Key fields:
90
+
91
+ | Field | Meaning |
92
+ |-------|---------|
93
+ | `highConfidenceTrapPresent` | Trap detected **and** at least one trap signal has confidence ≥ 0.55 |
94
+ | `ontologicalTrapDetected` | Trap language or tags matched (may be true without high confidence) |
95
+ | `matchedSignals` | Primitive names that passed the confidence gate |
96
+ | `signals` | `{ name, confidence, source }` details |
97
+ | `complexityBoost` | Suggested complexity increase for routing (orchestrator use) |
98
+ | `recommendedAgent` | `"architect"` when `highConfidenceTrapPresent`; otherwise `null` |
99
+ | `minConfidenceGate` | Threshold used (default `0.55`) |
100
+
101
+ ### Step 3 — Act on high-confidence traps
102
+
103
+ If `highConfidenceTrapPresent === true`:
104
+
105
+ 1. **Route preference:** Prefer `architect` (or `recommendedAgent` if set). Trap-capable agents: `architect`, `security-auditor`, `researcher`.
106
+ 2. **Evidence:** Include `matchedSignals` and per-signal confidences in your reasoning and any governance evidence array.
107
+ 3. **Complexity:** Treat the task as elevated complexity (`complexityBoost` is advisory for orchestrator routing).
108
+ 4. **Do not flatten the trap:** Avoid approving language that treats attestation as a terminating verdict when the registry says consumer revalidation is required.
109
+
110
+ If `ontologicalTrapDetected === true` but `highConfidenceTrapPresent === false`:
111
+
112
+ - Proceed with caution; registry may lack enriched observations yet.
113
+ - Note that confidence is below the promotion gate — do not treat as validated memory.
114
+
115
+ ### Step 4 — Optional primitive search
116
+
117
+ For additional registry context:
118
+
119
+ ```
120
+ repertoire__search_primitives({
121
+ query: "attestation-as-map ontological-trap",
122
+ minConfidence: 0.55,
123
+ limit: 5
124
+ })
125
+ ```
126
+
127
+ Use results for definitions, tags, `observationCount`, and `confidence` in your analysis. Only signals with `observation_stats` appear — no text-score fallbacks.
128
+
129
+ ### Step 5 — Governance / analysis
130
+
131
+ Proceed with your governance or analysis tools, **referencing Repertoire explicitly**:
132
+
133
+ ```
134
+ repertoire__get_task_confidence → highConfidenceTrapPresent: true
135
+ matchedSignals: attestation-as-map (0.90)
136
+ recommendedAgent: architect
137
+ → calling xray-researcher analyze_proposal with signals as evidence
138
+ ```
139
+
140
+ **Researcher example:**
141
+
142
+ ```
143
+ xray-researcher.analyze_proposal({
144
+ proposalTitle: "Attestation boundary review",
145
+ proposalDescription: "TYPE: ontological-trap ...",
146
+ proposalType: "governance",
147
+ evidence: [
148
+ "Repertoire: attestation-as-map (confidence 0.90)",
149
+ "Repertoire recommendedAgent: architect",
150
+ "Repertoire complexityBoost: 19"
151
+ ]
152
+ })
153
+ ```
154
+
155
+ When the researcher response includes a `MEMORY_ROUTING:` block, preserve it in summaries — it is the auditable signal trail.
156
+
157
+ ### Step 6 — Feedback (orchestrated runs only)
158
+
159
+ After task completion in an orchestrated session, record outcomes:
160
+
161
+ ```
162
+ repertoire__ingest_feedback({
163
+ sessionId: "<session>",
164
+ taskId: "<task>",
165
+ assignedAgent: "architect",
166
+ memorySignals: ["attestation-as-map"],
167
+ complexity: 45,
168
+ success: true,
169
+ durationMs: 12000
170
+ })
171
+ ```
172
+
173
+ ## Decision Checklist
174
+
175
+ Before finalizing a trap-classified governance vote:
176
+
177
+ - [ ] Called `repertoire__get_task_confidence`
178
+ - [ ] Checked `highConfidenceTrapPresent`
179
+ - [ ] If true: noted `matchedSignals`, `recommendedAgent`, `complexityBoost`
180
+ - [ ] Included Repertoire evidence in reasoning
181
+ - [ ] Routed to architect (or trap-capable agent) when recommended
182
+ - [ ] Did not treat low-confidence trap detection as validated memory
183
+
184
+ ## Example: Full trap flow
185
+
186
+ **User task:** Review a proposal that closes an attestation loop without consumer revalidation.
187
+
188
+ **Agent actions:**
189
+
190
+ 1. `repertoire__get_task_confidence({ description: "TYPE: ontological-trap attestation-as-map ...", type: "governance" })`
191
+ 2. Response: `highConfidenceTrapPresent: true`, `matchedSignals: ["attestation-as-map"]`, `recommendedAgent: "architect"`
192
+ 3. `repertoire__search_primitives({ query: "attestation-as-map", minConfidence: 0.55 })` — read definition
193
+ 4. Invoke `architect` or `xray-researcher analyze_proposal` with Repertoire evidence
194
+ 5. Vote/recommend **reject** or **request revision** if proposal treats attestation as final without consumer boundary checks
195
+
196
+ ## What This Skill Does Not Do
197
+
198
+ - **In-process MemoryRoutingProvider** — used by 0xRay `ExecutionPlanner` / `thinDispatch` inside the orchestrator process only. LLM hosts should use MCP tools.
199
+ - **Legacy log ingest** — unstructured Groover logs without `match_confidence` are skipped; empty registry → low confidence is expected until enriched logs land.
200
+ - **Replace architect judgment** — Repertoire supplies signal-backed context; the LLM still reasons and votes.
201
+
202
+ ## Related Documentation
203
+
204
+ - [ARCHITECTURE.md](../../ARCHITECTURE.md) — deployment model, internal vs MCP surfaces
205
+ - [mcp-config.example.json](../../mcp-config.example.json) — MCP server registration
206
+ - [docs/MEMORY-ROUTING-PROVIDER.md](../../docs/MEMORY-ROUTING-PROVIDER.md) — in-process provider (0xRay orchestrator only)
package/xray/codex.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "3.1.0",
3
- "lastUpdated": "2026-06-05",
3
+ "lastUpdated": "2026-08-24",
4
4
  "errorPreventionTarget": 0.998,
5
5
  "terms": {
6
6
  "1": {
@@ -546,6 +546,14 @@
546
546
  "category": "process",
547
547
  "zeroTolerance": false,
548
548
  "enforcementLevel": "high"
549
+ },
550
+ "69": {
551
+ "number": 69,
552
+ "title": "No New MCP, Skill, or Handler Surface",
553
+ "description": "Do not add parallel APIs. Rewire existing MCP servers, skills, and orchestrator handlers. PreToolUse denies creating new src/mcps/*.server.ts, src/skills/*/SKILL.md, or orchestrator *-handler files. Existing files may be rewritten.",
554
+ "category": "process",
555
+ "zeroTolerance": true,
556
+ "enforcementLevel": "blocking"
549
557
  }
550
558
  },
551
559
  "interweaves": [
@@ -589,10 +597,11 @@
589
597
  "No type errors or any usage": true,
590
598
  "Agent spawns go through governor": true,
591
599
  "Subagent spawning prevented": true,
592
- "PostProcessor validation passes": true
600
+ "PostProcessor validation passes": true,
601
+ "No new MCP/skill/handler surface": true
593
602
  },
594
603
  "frameworkAlignment": {
595
604
  "OpenCode": "v1.1.1",
596
- "0xRay": "v2.0.0"
605
+ "0xRay": "v4.0.0"
597
606
  }
598
607
  }
@@ -1,7 +1,17 @@
1
1
  {
2
2
  "$schema": "./features.schema.json",
3
- "version": "3.4.3",
3
+ "version": "4.0.1",
4
4
  "description": "0xRay Framework - Unified Feature Configuration",
5
+ "suit_temperament": {
6
+ "profile": "auto",
7
+ "host_defaults": {
8
+ "grok": "frontier",
9
+ "hermes": "guided",
10
+ "opencode": "guided",
11
+ "openclaw": "guided",
12
+ "generic": "guided"
13
+ }
14
+ },
5
15
  "token_optimization": {
6
16
  "enabled": true,
7
17
  "max_context_tokens": 20000,
@@ -37,11 +47,19 @@
37
47
  "auto_consult_major_work": true,
38
48
  "no_new_surface": true,
39
49
  "auto_chain_delegations": true,
50
+ "plan_stale_hours": 8,
51
+ "plan_archive_marker_hours": 24,
40
52
  "user_asides": {
41
53
  "enabled": true,
42
54
  "auto_provision_worktree": false
43
55
  }
44
56
  },
57
+ "grok_postprocessor_light": true,
58
+ "inference_session_capture": {
59
+ "enabled": true,
60
+ "min_commits": 3,
61
+ "lookback_commits": 20
62
+ },
45
63
  "autonomous_reporting": {
46
64
  "enabled": true,
47
65
  "interval_minutes": 60,
@@ -140,10 +158,14 @@
140
158
  "min_success_rate": 0.7
141
159
  },
142
160
  "memory_routing": {
143
- "enabled": false,
144
- "provider": "null",
145
- "module_path": "",
146
- "config": {}
161
+ "enabled": true,
162
+ "provider": "repertoire",
163
+ "module_path": "node_modules/@0xray/repertoire/dist/provider/memory-routing-provider.js",
164
+ "config": {
165
+ "signalsPath": "node_modules/@0xray/repertoire/data/curated_signals.json",
166
+ "statePath": ".xray/state/repertoire/inference-state.json",
167
+ "feedbackDir": ".xray/state/repertoire/feedback"
168
+ }
147
169
  },
148
170
  "synthesis": {
149
171
  "enabled": false,
@@ -160,4 +182,4 @@
160
182
  "onChain": false
161
183
  }
162
184
  }
163
- }
185
+ }
@@ -84,6 +84,37 @@
84
84
  }
85
85
  }
86
86
  },
87
+ "grok_postprocessor_light": {
88
+ "type": "boolean",
89
+ "description": "Opt-in lightweight postprocessor marker + activity.log on Grok write tools"
90
+ },
91
+ "inference_session_capture": {
92
+ "type": "object",
93
+ "description": "git post-commit → captureSessionInference when commit threshold is met",
94
+ "properties": {
95
+ "enabled": { "type": "boolean" },
96
+ "min_commits": { "type": "integer", "minimum": 1 },
97
+ "lookback_commits": { "type": "integer", "minimum": 1 }
98
+ }
99
+ },
100
+ "suit_temperament": {
101
+ "type": "object",
102
+ "description": "0xRay 4.0 — constitution always on; ceremony scales by host. Missing key = guided (existing consumers unchanged).",
103
+ "properties": {
104
+ "profile": {
105
+ "type": "string",
106
+ "enum": ["auto", "frontier", "guided", "strict"],
107
+ "description": "auto = host_defaults (grok→frontier, hermes/opencode/openclaw→guided)"
108
+ },
109
+ "host_defaults": {
110
+ "type": "object",
111
+ "additionalProperties": {
112
+ "type": "string",
113
+ "enum": ["frontier", "guided", "strict"]
114
+ }
115
+ }
116
+ }
117
+ },
87
118
  "synthesis": {
88
119
  "type": "object",
89
120
  "properties": {