0xray 3.5.4 → 4.0.0
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/.mcp.json +51 -7
- package/.opencode/skills/api-design/SKILL.md +1 -1
- package/.opencode/skills/architect-tools/SKILL.md +1 -1
- package/.opencode/skills/architecture-patterns/SKILL.md +1 -1
- package/.opencode/skills/auto-format/SKILL.md +1 -1
- package/.opencode/skills/boot-orchestrator/SKILL.md +2 -6
- package/.opencode/skills/bug-triage/SKILL.md +1 -1
- package/.opencode/skills/code-analyzer/SKILL.md +1 -1
- package/.opencode/skills/code-review/SKILL.md +1 -1
- package/.opencode/skills/enforcer/SKILL.md +1 -1
- package/.opencode/skills/framework-compliance-audit/SKILL.md +1 -1
- package/.opencode/skills/git-workflow/SKILL.md +1 -1
- package/.opencode/skills/hermes-agent/SKILL.md +36 -36
- package/.opencode/skills/inference-improve/SKILL.md +1 -1
- package/.opencode/skills/lint/SKILL.md +1 -1
- package/.opencode/skills/log-monitor/SKILL.md +1 -1
- package/.opencode/skills/model-health-check/SKILL.md +1 -1
- package/.opencode/skills/multimodal-looker/SKILL.md +1 -1
- package/.opencode/skills/orchestrator/SKILL.md +38 -14
- package/.opencode/skills/performance-analysis/SKILL.md +1 -1
- package/.opencode/skills/performance-optimization/SKILL.md +1 -1
- package/.opencode/skills/processor-pipeline/SKILL.md +1 -1
- package/.opencode/skills/project-analysis/SKILL.md +1 -1
- package/.opencode/skills/refactoring-strategies/SKILL.md +1 -1
- package/.opencode/skills/registry.json +65 -0
- package/.opencode/skills/researcher/SKILL.md +18 -5
- package/.opencode/skills/security-audit/SKILL.md +1 -1
- package/.opencode/skills/security-scan/SKILL.md +1 -1
- package/.opencode/skills/session-management/SKILL.md +1 -1
- package/.opencode/skills/state-manager/SKILL.md +1 -1
- package/.opencode/skills/storyteller/SKILL.md +1 -1
- package/.opencode/skills/strategist/SKILL.md +12 -0
- package/.opencode/skills/testing-best-practices/SKILL.md +37 -0
- package/.opencode/skills/testing-strategy/SKILL.md +14 -3
- package/.opencode/skills/ui-ux-design/SKILL.md +1 -1
- package/.opencode/skills/xray-orchestrator/index.ts +267 -0
- package/.xray/codex.json +12 -3
- package/.xray/features.json +32 -6
- package/.xray/features.schema.json +87 -0
- package/AGENTS-consumer.md +16 -6
- package/AGENTS.md +21 -3
- package/README.md +13 -10
- package/SKILLS.md +1 -1
- package/dist/AGENTS.md +21 -3
- package/dist/CHANGELOG.md +98 -0
- package/dist/README.md +13 -10
- package/dist/SKILLS.md +1 -1
- package/dist/cli/commands/hermes-install.js +6 -1
- package/dist/cli/commands/openclaw-install.js +14 -0
- package/dist/cli/index.js +0 -0
- package/dist/core/features-config.d.ts +30 -2
- package/dist/governance/governance-service.d.ts +1 -0
- package/dist/governance/governance-service.js +81 -6
- package/dist/infrastructure/schemas/cloud-schemas.d.ts +1 -1
- package/dist/integrations/enforcement-gate.js +15 -5
- package/dist/integrations/grok/grok-cli.d.ts +3 -0
- package/dist/integrations/grok/grok-cli.js +92 -13
- package/dist/integrations/grok/hooks/grok-hook-utils.js +99 -9
- package/dist/integrations/grok/hooks/post-tool-use.js +68 -25
- package/dist/integrations/grok/hooks/pre-tool-use.js +17 -14
- package/dist/integrations/grok/hooks/session-start.js +114 -4
- package/dist/integrations/grok/plugin/0xray/hooks/hooks.json +31 -24
- package/dist/integrations/hermes-agent/__init__.py +11 -1
- package/dist/integrations/hermes-agent/__pycache__/__init__.cpython-313.pyc +0 -0
- package/dist/integrations/hermes-agent/__pycache__/schemas.cpython-313.pyc +0 -0
- package/dist/integrations/hermes-agent/__pycache__/tools.cpython-313.pyc +0 -0
- package/dist/integrations/hermes-agent/bridge.mjs +92 -11
- package/dist/integrations/hooks/confer-hook-runtime.mjs +49 -0
- package/dist/integrations/hooks/delegation-gate-runtime.mjs +32 -3
- package/dist/integrations/hooks/pipeline-hook-runtime.mjs +211 -0
- package/dist/integrations/hooks/plan-hook-runtime.mjs +68 -0
- package/dist/integrations/hooks/station-hook-runtime.cjs +421 -0
- package/dist/integrations/hooks/station-hook-runtime.mjs +24 -0
- package/dist/integrations/hooks/station-memory-ingest.mjs +45 -0
- package/dist/integrations/hooks/station-memory-match.mjs +47 -0
- package/dist/integrations/hooks/user-aside-hook-runtime.mjs +49 -0
- package/dist/integrations/openclaw/client.d.ts +5 -1
- package/dist/integrations/openclaw/client.js +17 -9
- package/dist/integrations/openclaw/config.js +0 -1
- package/dist/integrations/openclaw/hooks/pre-tool-gate-runtime.mjs +102 -0
- package/dist/integrations/openclaw/index.js +17 -0
- package/dist/integrations/openclaw/plugin/xray-pre-tool/index.js +75 -0
- package/dist/integrations/openclaw/plugin/xray-pre-tool/openclaw.plugin.json +10 -0
- package/dist/integrations/openclaw/plugin/xray-pre-tool/package.json +10 -0
- package/dist/integrations/openclaw/pre-tool-gate.d.ts +19 -0
- package/dist/integrations/openclaw/pre-tool-gate.js +39 -0
- package/dist/mcps/architect-tools.server.js +6 -1
- package/dist/mcps/orchestrator/handlers/complexity-handler.d.ts +7 -0
- package/dist/mcps/orchestrator/handlers/complexity-handler.js +107 -8
- package/dist/mcps/orchestrator/handlers/task-handler.d.ts +6 -0
- package/dist/mcps/orchestrator/handlers/task-handler.js +75 -0
- package/dist/mcps/orchestrator/server.js +54 -5
- package/dist/memory-routing/index.d.ts +1 -1
- package/dist/memory-routing/index.js +1 -1
- package/dist/memory-routing/provider-loader.d.ts +4 -0
- package/dist/memory-routing/provider-loader.js +74 -4
- package/dist/memory-routing/provider-registry.js +3 -2
- package/dist/nucleus/aside-worktree.d.ts +41 -0
- package/dist/nucleus/aside-worktree.js +164 -0
- package/dist/nucleus/autonomy-kernel.d.ts +2 -2
- package/dist/nucleus/autonomy-kernel.js +17 -6
- package/dist/nucleus/confer.d.ts +57 -0
- package/dist/nucleus/confer.js +322 -0
- package/dist/nucleus/delegation-gate.d.ts +18 -8
- package/dist/nucleus/delegation-gate.js +234 -20
- package/dist/nucleus/lead-dev-plan-persistence.d.ts +27 -3
- package/dist/nucleus/lead-dev-plan-persistence.js +201 -19
- package/dist/nucleus/spawn-plan-resolution.d.ts +20 -0
- package/dist/nucleus/spawn-plan-resolution.js +42 -0
- package/dist/nucleus/suit-temperament.d.ts +40 -0
- package/dist/nucleus/suit-temperament.js +157 -0
- package/dist/nucleus/synthesis-consult-receipt.js +18 -2
- package/dist/nucleus/synthesis-context.js +1 -1
- package/dist/nucleus/user-aside.d.ts +70 -0
- package/dist/nucleus/user-aside.js +393 -0
- package/dist/plugin/xray-codex-injection.js +14 -3
- package/dist/postprocessor/PostProcessor.d.ts +1 -0
- package/dist/postprocessor/PostProcessor.js +11 -0
- package/dist/postprocessor/triggers/GitHookTrigger.js +11 -5
- package/dist/processors/implementations/session-summary-processor.d.ts +1 -1
- package/dist/processors/implementations/session-summary-processor.js +9 -6
- package/opencode.json +88 -0
- package/package.json +25 -6
- package/scripts/hooks/install-hooks.cjs +21 -6
- package/scripts/hooks/run-hook.js +237 -88
- package/scripts/mjs/run-repertoire-mcp.mjs +39 -0
- package/scripts/mjs/verify-confer-core.mjs +103 -0
- package/scripts/mjs/verify-delegation-gate-core.mjs +76 -3
- package/scripts/mjs/verify-four-floor-compact.mjs +524 -0
- package/scripts/mjs/verify-hermes-session-start.mjs +137 -0
- package/scripts/mjs/verify-pipeline-facets.mjs +215 -0
- package/scripts/mjs/verify-pre-push-diff-core.mjs +87 -0
- package/scripts/mjs/verify-temperament-live.mjs +261 -0
- package/scripts/mjs/verify-user-aside-core.mjs +137 -0
- package/scripts/node/bridge-mcp-wiring.cjs +287 -29
- package/scripts/node/install-bridges.cjs +198 -44
- package/scripts/node/load-reflection-config.mjs +2 -2
- package/scripts/node/postinstall.cjs +50 -27
- package/scripts/node/release-gate.mjs +8 -4
- package/scripts/node/release.mjs +2 -2
- package/scripts/node/validate-release-docs.mjs +20 -33
- package/scripts/node/version-manager.mjs +25 -10
- package/src/integrations/grok/plugin/0xray/hooks/hooks.json +31 -24
- package/src/integrations/openclaw/README.md +134 -0
- package/src/integrations/openclaw/plugin/xray-pre-tool/index.js +75 -0
- package/src/integrations/openclaw/plugin/xray-pre-tool/openclaw.plugin.json +10 -0
- package/src/integrations/openclaw/plugin/xray-pre-tool/package.json +10 -0
- package/src/mcps/architect-tools.server.ts +6 -1
- package/src/mcps/orchestrator/handlers/complexity-handler.ts +180 -21
- package/src/mcps/orchestrator/handlers/task-handler.ts +99 -0
- package/src/mcps/orchestrator/server.ts +56 -5
- package/vendor/@0xray/repertoire/AGENTS.md +163 -0
- package/vendor/@0xray/repertoire/LICENSE +21 -0
- package/vendor/@0xray/repertoire/README.md +120 -0
- package/vendor/@0xray/repertoire/data/curated_signals.json +208 -0
- package/vendor/@0xray/repertoire/dist/RepertoireService.d.ts +78 -0
- package/vendor/@0xray/repertoire/dist/RepertoireService.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/RepertoireService.js +153 -0
- package/vendor/@0xray/repertoire/dist/RepertoireService.js.map +1 -0
- package/vendor/@0xray/repertoire/dist/governance/ontological-trap-enforcer.d.ts +39 -0
- package/vendor/@0xray/repertoire/dist/governance/ontological-trap-enforcer.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/governance/ontological-trap-enforcer.js +60 -0
- package/vendor/@0xray/repertoire/dist/governance/ontological-trap-enforcer.js.map +1 -0
- package/vendor/@0xray/repertoire/dist/index.d.ts +14 -0
- package/vendor/@0xray/repertoire/dist/index.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/index.js +14 -0
- package/vendor/@0xray/repertoire/dist/index.js.map +1 -0
- package/vendor/@0xray/repertoire/dist/ingestion/groover-log-ingester.d.ts +26 -0
- package/vendor/@0xray/repertoire/dist/ingestion/groover-log-ingester.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/ingestion/groover-log-ingester.js +109 -0
- package/vendor/@0xray/repertoire/dist/ingestion/groover-log-ingester.js.map +1 -0
- package/vendor/@0xray/repertoire/dist/ingestion/groover-log-parser.d.ts +18 -0
- package/vendor/@0xray/repertoire/dist/ingestion/groover-log-parser.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/ingestion/groover-log-parser.js +94 -0
- package/vendor/@0xray/repertoire/dist/ingestion/groover-log-parser.js.map +1 -0
- package/vendor/@0xray/repertoire/dist/ingestion/orchestrator-feedback-ingester.d.ts +7 -0
- package/vendor/@0xray/repertoire/dist/ingestion/orchestrator-feedback-ingester.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/ingestion/orchestrator-feedback-ingester.js +18 -0
- package/vendor/@0xray/repertoire/dist/ingestion/orchestrator-feedback-ingester.js.map +1 -0
- package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.d.ts +31 -0
- package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.js +83 -0
- package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.js.map +1 -0
- package/vendor/@0xray/repertoire/dist/mcp/server.d.ts +6 -0
- package/vendor/@0xray/repertoire/dist/mcp/server.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/mcp/server.js +173 -0
- package/vendor/@0xray/repertoire/dist/mcp/server.js.map +1 -0
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/RepertoireOrchestratorBridge.d.ts +27 -0
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/RepertoireOrchestratorBridge.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/RepertoireOrchestratorBridge.js +107 -0
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/RepertoireOrchestratorBridge.js.map +1 -0
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/capability-enhancer.d.ts +11 -0
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/capability-enhancer.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/capability-enhancer.js +32 -0
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/capability-enhancer.js.map +1 -0
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.d.ts +9 -0
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.js +72 -0
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.js.map +1 -0
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-agent-affinity.d.ts +5 -0
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-agent-affinity.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-agent-affinity.js +18 -0
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-agent-affinity.js.map +1 -0
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.d.ts +31 -0
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.js +218 -0
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.js.map +1 -0
- package/vendor/@0xray/repertoire/dist/paths.d.ts +24 -0
- package/vendor/@0xray/repertoire/dist/paths.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/paths.js +74 -0
- package/vendor/@0xray/repertoire/dist/paths.js.map +1 -0
- package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.d.ts +141 -0
- package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.js +210 -0
- package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.js.map +1 -0
- package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.d.ts +48 -0
- package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.js +221 -0
- package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.js.map +1 -0
- package/vendor/@0xray/repertoire/dist/registry/InferenceStateManager.d.ts +11 -0
- package/vendor/@0xray/repertoire/dist/registry/InferenceStateManager.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/registry/InferenceStateManager.js +43 -0
- package/vendor/@0xray/repertoire/dist/registry/InferenceStateManager.js.map +1 -0
- package/vendor/@0xray/repertoire/dist/registry/signal-prune.d.ts +15 -0
- package/vendor/@0xray/repertoire/dist/registry/signal-prune.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/registry/signal-prune.js +35 -0
- package/vendor/@0xray/repertoire/dist/registry/signal-prune.js.map +1 -0
- package/vendor/@0xray/repertoire/dist/synthesis/concrete-sections.d.ts +3 -0
- package/vendor/@0xray/repertoire/dist/synthesis/concrete-sections.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/synthesis/concrete-sections.js +24 -0
- package/vendor/@0xray/repertoire/dist/synthesis/concrete-sections.js.map +1 -0
- package/vendor/@0xray/repertoire/dist/synthesis/meta-inference-engine.d.ts +24 -0
- package/vendor/@0xray/repertoire/dist/synthesis/meta-inference-engine.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/synthesis/meta-inference-engine.js +148 -0
- package/vendor/@0xray/repertoire/dist/synthesis/meta-inference-engine.js.map +1 -0
- package/vendor/@0xray/repertoire/dist/synthesis/primitive-confidence-aggregator.d.ts +4 -0
- package/vendor/@0xray/repertoire/dist/synthesis/primitive-confidence-aggregator.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/synthesis/primitive-confidence-aggregator.js +44 -0
- package/vendor/@0xray/repertoire/dist/synthesis/primitive-confidence-aggregator.js.map +1 -0
- package/vendor/@0xray/repertoire/dist/synthesis/synthesis-prompt-builder.d.ts +22 -0
- package/vendor/@0xray/repertoire/dist/synthesis/synthesis-prompt-builder.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/synthesis/synthesis-prompt-builder.js +66 -0
- package/vendor/@0xray/repertoire/dist/synthesis/synthesis-prompt-builder.js.map +1 -0
- package/vendor/@0xray/repertoire/dist/types.d.ts +210 -0
- package/vendor/@0xray/repertoire/dist/types.d.ts.map +1 -0
- package/vendor/@0xray/repertoire/dist/types.js +2 -0
- package/vendor/@0xray/repertoire/dist/types.js.map +1 -0
- package/vendor/@0xray/repertoire/docs/MEMORY-ROUTING-PROVIDER.md +54 -0
- package/vendor/@0xray/repertoire/hermes-mcp.example.json +20 -0
- package/vendor/@0xray/repertoire/mcp-config.example.json +11 -0
- package/vendor/@0xray/repertoire/package.json +124 -0
- package/vendor/@0xray/repertoire/schemas/curated-signal.schema.json +68 -0
- package/vendor/@0xray/repertoire/schemas/inference-log.schema.json +82 -0
- package/vendor/@0xray/repertoire/scripts/confirm-suit-all.mjs +253 -0
- package/vendor/@0xray/repertoire/scripts/confirm-suit-harness.mjs +220 -0
- package/vendor/@0xray/repertoire/scripts/run-live-synthesis-checkpoint.mjs +215 -0
- package/vendor/@0xray/repertoire/scripts/suit-bridge-shared.mjs +139 -0
- package/vendor/@0xray/repertoire/scripts/verify-grok-suit.mjs +304 -0
- package/vendor/@0xray/repertoire/scripts/verify-hermes-suit.mjs +163 -0
- package/vendor/@0xray/repertoire/scripts/verify-openclaw-suit.mjs +125 -0
- package/vendor/@0xray/repertoire/scripts/verify-opencode-suit.mjs +127 -0
- package/vendor/@0xray/repertoire/scripts/verify-synthesis-dogfood.mjs +207 -0
- package/vendor/@0xray/repertoire/skills/repertoire-trap-handling/SKILL.md +206 -0
- package/xray/codex.json +12 -3
- package/xray/features.json +32 -6
- package/xray/features.schema.json +87 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://repertoire.0xray.ai/schemas/inference-log.schema.json",
|
|
4
|
+
"title": "InferenceLogEntry",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["timestamp", "source", "inference"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"timestamp": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"format": "date-time"
|
|
11
|
+
},
|
|
12
|
+
"source": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"enum": ["groover", "xray", "dynamo", "orchestrator"]
|
|
15
|
+
},
|
|
16
|
+
"post_id": { "type": "string" },
|
|
17
|
+
"post_title": { "type": "string" },
|
|
18
|
+
"comment_id": { "type": "string" },
|
|
19
|
+
"session_id": { "type": "string" },
|
|
20
|
+
"inference": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"minLength": 1
|
|
23
|
+
},
|
|
24
|
+
"public_reply": { "type": "string" },
|
|
25
|
+
"inference_type": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"enum": [
|
|
28
|
+
"theoretical",
|
|
29
|
+
"temporal-drift",
|
|
30
|
+
"practical-workflow",
|
|
31
|
+
"ontological-trap",
|
|
32
|
+
"provenance-failure"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"matched_primitives": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": { "type": "string" }
|
|
38
|
+
},
|
|
39
|
+
"match_confidence": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"additionalProperties": {
|
|
42
|
+
"type": "number",
|
|
43
|
+
"minimum": 0,
|
|
44
|
+
"maximum": 1
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"governance_forced": {
|
|
48
|
+
"type": "boolean"
|
|
49
|
+
},
|
|
50
|
+
"dynamo_result": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"properties": {
|
|
53
|
+
"result": {
|
|
54
|
+
"oneOf": [
|
|
55
|
+
{ "type": "null" },
|
|
56
|
+
{
|
|
57
|
+
"type": "object",
|
|
58
|
+
"properties": {
|
|
59
|
+
"recommendation": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"enum": ["PASS", "NEEDS_REVISION", "REJECT"]
|
|
62
|
+
},
|
|
63
|
+
"resonanceScore": { "type": "number", "minimum": 0, "maximum": 1 }
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"matchedPrimitives": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": { "type": "string" }
|
|
71
|
+
},
|
|
72
|
+
"error": { "type": "string" },
|
|
73
|
+
"status": { "type": "integer" }
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"repertoire_signals": {
|
|
77
|
+
"type": "array",
|
|
78
|
+
"items": { "type": "string" }
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"additionalProperties": true
|
|
82
|
+
}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Unified 0xRay suit wear matrix — all 4 plugin environments.
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* node scripts/confirm-suit-all.mjs # verify all bridges (no install)
|
|
7
|
+
* node scripts/confirm-suit-all.mjs --install # native 0xray install + verify
|
|
8
|
+
* node scripts/confirm-suit-all.mjs --grok-harness # include Grok Layer 2a/2c harness
|
|
9
|
+
* node scripts/confirm-suit-all.mjs --only=hermes,opencode
|
|
10
|
+
*
|
|
11
|
+
* npm scripts:
|
|
12
|
+
* verify:suit:all — matrix verify only
|
|
13
|
+
* confirm:suit:all — build + install all + verify + Grok harness + trap-routing test
|
|
14
|
+
*/
|
|
15
|
+
import { execSync, spawnSync } from 'node:child_process';
|
|
16
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
17
|
+
import { resolve, join } from 'node:path';
|
|
18
|
+
import { HERMES_PLUGIN_DIR, readInstalledXrayVersion } from './suit-bridge-shared.mjs';
|
|
19
|
+
|
|
20
|
+
const root = resolve(import.meta.dirname, '..');
|
|
21
|
+
const args = process.argv.slice(2);
|
|
22
|
+
|
|
23
|
+
const flags = {
|
|
24
|
+
install: args.includes('--install'),
|
|
25
|
+
grokHarness: args.includes('--grok-harness'),
|
|
26
|
+
verifyOnly: args.includes('--verify-only'),
|
|
27
|
+
pipelineAudit: args.includes('--pipeline-audit'),
|
|
28
|
+
};
|
|
29
|
+
const onlyArg = args.find((a) => a.startsWith('--only='));
|
|
30
|
+
const onlySet = onlyArg
|
|
31
|
+
? new Set(onlyArg.slice('--only='.length).split(',').map((s) => s.trim().toLowerCase()))
|
|
32
|
+
: null;
|
|
33
|
+
|
|
34
|
+
/** Hermes last — consumer root marker must win over any stale npx-cache path. */
|
|
35
|
+
const BRIDGES = [
|
|
36
|
+
{
|
|
37
|
+
id: 'grok',
|
|
38
|
+
label: 'Grok Build',
|
|
39
|
+
cli: null,
|
|
40
|
+
installCmd: 'npx 0xray grok install --force',
|
|
41
|
+
verifyScript: 'verify-grok-suit.mjs',
|
|
42
|
+
harnessScript: 'confirm-suit-harness.mjs',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: 'opencode',
|
|
46
|
+
label: 'OpenCode',
|
|
47
|
+
cli: 'opencode',
|
|
48
|
+
installCmd: 'npx 0xray opencode install --force',
|
|
49
|
+
verifyScript: 'verify-opencode-suit.mjs',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: 'openclaw',
|
|
53
|
+
label: 'OpenClaw',
|
|
54
|
+
cli: 'openclaw',
|
|
55
|
+
installCmd: 'npx 0xray openclaw install --force',
|
|
56
|
+
verifyScript: 'verify-openclaw-suit.mjs',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: 'hermes',
|
|
60
|
+
label: 'Hermes',
|
|
61
|
+
cli: 'hermes',
|
|
62
|
+
installCmd: 'npx 0xray hermes install --force',
|
|
63
|
+
verifyScript: 'verify-hermes-suit.mjs',
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
|
|
67
|
+
function ensureHermesConsumerRoot() {
|
|
68
|
+
const markerPath = join(HERMES_PLUGIN_DIR, 'xray-consumer-root.txt');
|
|
69
|
+
if (!existsSync(markerPath)) return;
|
|
70
|
+
const marked = readFileSync(markerPath, 'utf8').trim();
|
|
71
|
+
if (marked === root) return;
|
|
72
|
+
if (!cliAvailable('hermes')) return;
|
|
73
|
+
console.log(`⚠ Hermes consumer root drift (${marked}) — re-running hermes install\n`);
|
|
74
|
+
runInstall('npx 0xray hermes install --force');
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function bridgeEnabled(bridge) {
|
|
78
|
+
return !onlySet || onlySet.has(bridge.id);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function cliAvailable(cmd) {
|
|
82
|
+
if (!cmd) return true;
|
|
83
|
+
try {
|
|
84
|
+
execSync(`which ${cmd}`, { encoding: 'utf8', stdio: 'pipe' });
|
|
85
|
+
return true;
|
|
86
|
+
} catch {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function runScript(scriptName, { inheritOutput = true } = {}) {
|
|
92
|
+
const scriptPath = join(root, 'scripts', scriptName);
|
|
93
|
+
if (!existsSync(scriptPath)) {
|
|
94
|
+
return { ok: false, status: 'error', detail: `${scriptName} missing` };
|
|
95
|
+
}
|
|
96
|
+
const result = spawnSync('node', [scriptPath], {
|
|
97
|
+
cwd: root,
|
|
98
|
+
encoding: 'utf8',
|
|
99
|
+
stdio: inheritOutput ? 'inherit' : ['inherit', 'pipe', 'pipe'],
|
|
100
|
+
});
|
|
101
|
+
const combined = `${result.stdout ?? ''}${result.stderr ?? ''}`;
|
|
102
|
+
const failCount = (combined.match(/❌/g) ?? []).length;
|
|
103
|
+
return {
|
|
104
|
+
ok: result.status === 0,
|
|
105
|
+
status: result.status === 0 ? 'green' : 'red',
|
|
106
|
+
detail: result.status === 0 ? 'wearable' : `${failCount || 1} check(s) failed`,
|
|
107
|
+
exitCode: result.status ?? 1,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function runInstall(cmd) {
|
|
112
|
+
try {
|
|
113
|
+
execSync(cmd, { cwd: root, stdio: 'inherit' });
|
|
114
|
+
return { ok: true };
|
|
115
|
+
} catch (e) {
|
|
116
|
+
return { ok: false, detail: e.message?.slice(0, 120) ?? 'install failed' };
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
console.log('═══ 0xRay Suit Wear Matrix (4 plugin environments) ═══\n');
|
|
121
|
+
console.log(`0xray@${readInstalledXrayVersion()} · consumer ${root}\n`);
|
|
122
|
+
|
|
123
|
+
if (flags.install) {
|
|
124
|
+
console.log('Phase 0 — Native bridge install (--install)\n');
|
|
125
|
+
for (const bridge of BRIDGES) {
|
|
126
|
+
if (!bridgeEnabled(bridge)) continue;
|
|
127
|
+
if (bridge.cli && !cliAvailable(bridge.cli)) {
|
|
128
|
+
console.log(`⏭ ${bridge.label} install skipped — ${bridge.cli} not on PATH`);
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
console.log(`→ ${bridge.installCmd}`);
|
|
132
|
+
const install = runInstall(bridge.installCmd);
|
|
133
|
+
if (!install.ok) {
|
|
134
|
+
console.error(`❌ ${bridge.label} install failed — ${install.detail}`);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
ensureHermesConsumerRoot();
|
|
138
|
+
console.log('');
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const matrix = [];
|
|
142
|
+
|
|
143
|
+
console.log('Phase 1 — Per-bridge verification\n');
|
|
144
|
+
for (const bridge of BRIDGES) {
|
|
145
|
+
if (!bridgeEnabled(bridge)) continue;
|
|
146
|
+
|
|
147
|
+
if (bridge.cli && !cliAvailable(bridge.cli)) {
|
|
148
|
+
matrix.push({
|
|
149
|
+
id: bridge.id,
|
|
150
|
+
label: bridge.label,
|
|
151
|
+
status: 'skip',
|
|
152
|
+
detail: `${bridge.cli} not on PATH`,
|
|
153
|
+
});
|
|
154
|
+
console.log(`⏭ ${bridge.label} — skipped (${bridge.cli} not installed)\n`);
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
console.log(`── ${bridge.label} (${bridge.verifyScript}) ──\n`);
|
|
159
|
+
const verify = runScript(bridge.verifyScript);
|
|
160
|
+
matrix.push({
|
|
161
|
+
id: bridge.id,
|
|
162
|
+
label: bridge.label,
|
|
163
|
+
status: verify.status,
|
|
164
|
+
detail: verify.detail,
|
|
165
|
+
});
|
|
166
|
+
console.log('');
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
let grokHarnessOk = null;
|
|
170
|
+
if (flags.grokHarness && bridgeEnabled(BRIDGES[0])) {
|
|
171
|
+
console.log('Phase 2 — Grok harness (Layer 2a + 2c stdio probes)\n');
|
|
172
|
+
const harnessResult = spawnSync(
|
|
173
|
+
'node',
|
|
174
|
+
[join(root, 'scripts', 'confirm-suit-harness.mjs'), '--skip-layer1'],
|
|
175
|
+
{ cwd: root, encoding: 'utf8', stdio: 'inherit' },
|
|
176
|
+
);
|
|
177
|
+
const harness = {
|
|
178
|
+
ok: harnessResult.status === 0,
|
|
179
|
+
detail: harnessResult.status === 0 ? 'automated probes pass' : 'harness probe(s) failed',
|
|
180
|
+
};
|
|
181
|
+
grokHarnessOk = harness.ok;
|
|
182
|
+
if (!harness.ok) {
|
|
183
|
+
matrix.push({
|
|
184
|
+
id: 'grok-harness',
|
|
185
|
+
label: 'Grok harness (2a/2c)',
|
|
186
|
+
status: 'red',
|
|
187
|
+
detail: harness.detail,
|
|
188
|
+
});
|
|
189
|
+
} else {
|
|
190
|
+
matrix.push({
|
|
191
|
+
id: 'grok-harness',
|
|
192
|
+
label: 'Grok harness (2a/2c)',
|
|
193
|
+
status: 'green',
|
|
194
|
+
detail: 'automated probes pass',
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
console.log('');
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// ── Wear matrix verdict ─────────────────────────────────────────────────────
|
|
201
|
+
console.log('Suit wear matrix\n');
|
|
202
|
+
const statusIcon = { green: '✅', red: '❌', skip: '⏭ ' };
|
|
203
|
+
for (const row of matrix) {
|
|
204
|
+
const icon = statusIcon[row.status] ?? '?';
|
|
205
|
+
console.log(` ${icon} ${row.label.padEnd(22)} ${row.detail}`);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
const verified = matrix.filter((r) => r.status !== 'skip');
|
|
209
|
+
const allGreen = verified.length > 0 && verified.every((r) => r.status === 'green');
|
|
210
|
+
const anyRed = verified.some((r) => r.status === 'red');
|
|
211
|
+
const skipped = matrix.filter((r) => r.status === 'skip').length;
|
|
212
|
+
|
|
213
|
+
console.log(`
|
|
214
|
+
Summary
|
|
215
|
+
Green: ${verified.filter((r) => r.status === 'green').length}/${verified.length}
|
|
216
|
+
Skipped: ${skipped} (CLI not on PATH)
|
|
217
|
+
0xray: ${readInstalledXrayVersion()}
|
|
218
|
+
|
|
219
|
+
Verdict
|
|
220
|
+
FULL = all enabled bridges green${flags.grokHarness ? ' + Grok harness green' : ''}
|
|
221
|
+
PARTIAL = Grok green + ≥1 other bridge red/skipped
|
|
222
|
+
BROKEN = Grok red OR core MCP surface unreachable
|
|
223
|
+
|
|
224
|
+
Grok Layer 2b (harness CallMcpTool) is agent-verified after reboot — see confirm-suit-harness.mjs.
|
|
225
|
+
`);
|
|
226
|
+
|
|
227
|
+
if (anyRed) {
|
|
228
|
+
console.error('❌ Suit wear matrix FAILED — fix red bridges before operating.');
|
|
229
|
+
process.exit(1);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
if (flags.grokHarness && grokHarnessOk === false) {
|
|
233
|
+
console.error('❌ Grok harness FAILED — memory routing / stdio probes not ready.');
|
|
234
|
+
process.exit(1);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
if (flags.pipelineAudit) {
|
|
238
|
+
console.log('Phase 3 — Pipeline facet verify\n');
|
|
239
|
+
const pipelineScript = join(root, 'node_modules', '0xray', 'scripts', 'mjs', 'verify-pipeline-facets.mjs');
|
|
240
|
+
const pipelineResult = spawnSync('node', [pipelineScript], {
|
|
241
|
+
cwd: root,
|
|
242
|
+
encoding: 'utf8',
|
|
243
|
+
stdio: 'inherit',
|
|
244
|
+
});
|
|
245
|
+
if (pipelineResult.status !== 0) {
|
|
246
|
+
console.error('❌ Pipeline facet verify FAILED');
|
|
247
|
+
process.exit(1);
|
|
248
|
+
}
|
|
249
|
+
console.log('');
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
console.log('✅ Suit wear matrix PASS — all verified bridges wearable.');
|
|
253
|
+
process.exit(0);
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Grok Build harness confirmation protocol (Layers 2a/2c + 2b checklist).
|
|
4
|
+
*
|
|
5
|
+
* Invoked by:
|
|
6
|
+
* npm run confirm:suit — full Grok confirm (Layer 1 via verify:suit + this harness + trap test)
|
|
7
|
+
* npm run confirm:suit:all — all 4 bridges + this harness for Grok deep probes
|
|
8
|
+
*
|
|
9
|
+
* Layer 1: filesystem + CLI (verify-grok-suit.mjs) — run separately or via confirm:suit
|
|
10
|
+
* Layer 2a: stdio MCP probes (repertoire memory routing — bypasses harness prefix bug)
|
|
11
|
+
* Layer 2b: harness MCP probes (agent runs CallMcpTool live — documented below)
|
|
12
|
+
*/
|
|
13
|
+
import { spawn } from 'node:child_process';
|
|
14
|
+
import { execSync } from 'node:child_process';
|
|
15
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
16
|
+
import { resolve, join } from 'node:path';
|
|
17
|
+
import { readInstalledXrayVersion } from './suit-bridge-shared.mjs';
|
|
18
|
+
|
|
19
|
+
const root = resolve(import.meta.dirname, '..');
|
|
20
|
+
const skipLayer1 = process.argv.includes('--skip-layer1');
|
|
21
|
+
|
|
22
|
+
function resolveResearcherServerPath() {
|
|
23
|
+
const sibling = resolve(root, '../xray/dist/mcps/researcher.server.js');
|
|
24
|
+
if (existsSync(sibling)) return sibling;
|
|
25
|
+
return resolve(root, 'node_modules/0xray/dist/mcps/researcher.server.js');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const TRAP_PROBE_DESCRIPTION =
|
|
29
|
+
'TYPE: ontological-trap attestation-as-map consumer-boundary revalidation required';
|
|
30
|
+
|
|
31
|
+
function mcpStdioProbe({ serverPath, toolName, args, timeoutMs = 4000 }) {
|
|
32
|
+
return new Promise((resolveProbe, rejectProbe) => {
|
|
33
|
+
const messages = [
|
|
34
|
+
{
|
|
35
|
+
jsonrpc: '2.0',
|
|
36
|
+
id: 1,
|
|
37
|
+
method: 'initialize',
|
|
38
|
+
params: {
|
|
39
|
+
protocolVersion: '2024-11-05',
|
|
40
|
+
capabilities: {},
|
|
41
|
+
clientInfo: { name: 'confirm-suit-harness', version: '1.0' },
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
jsonrpc: '2.0',
|
|
46
|
+
id: 2,
|
|
47
|
+
method: 'tools/call',
|
|
48
|
+
params: { name: toolName, arguments: args },
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
const proc = spawn('node', [serverPath], { cwd: root, stdio: ['pipe', 'pipe', 'pipe'] });
|
|
53
|
+
let out = '';
|
|
54
|
+
proc.stdout.on('data', (chunk) => {
|
|
55
|
+
out += chunk.toString();
|
|
56
|
+
});
|
|
57
|
+
proc.stderr.on('data', (chunk) => {
|
|
58
|
+
out += chunk.toString();
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
const timer = setTimeout(() => {
|
|
62
|
+
proc.kill();
|
|
63
|
+
rejectProbe(new Error(`timeout after ${timeoutMs}ms`));
|
|
64
|
+
}, timeoutMs);
|
|
65
|
+
|
|
66
|
+
proc.on('close', (code) => {
|
|
67
|
+
clearTimeout(timer);
|
|
68
|
+
if (code !== null && code !== 0 && !out.includes('"result"')) {
|
|
69
|
+
rejectProbe(new Error(`exit ${code}: ${out.slice(0, 200)}`));
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
resolveProbe(out);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
for (const msg of messages) {
|
|
76
|
+
proc.stdin.write(`${JSON.stringify(msg)}\n`);
|
|
77
|
+
}
|
|
78
|
+
setTimeout(() => proc.kill('SIGTERM'), timeoutMs - 200);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
console.log('═══ 0xRay Suit Confirmation Protocol ═══\n');
|
|
83
|
+
|
|
84
|
+
// ── Layer 1 ──────────────────────────────────────────────────────────────────
|
|
85
|
+
let layer1Ok = skipLayer1;
|
|
86
|
+
if (skipLayer1) {
|
|
87
|
+
console.log('Layer 1 — Skipped (--skip-layer1; already verified by confirm-suit-all)\n');
|
|
88
|
+
} else {
|
|
89
|
+
console.log('Layer 1 — Local install (automated)\n');
|
|
90
|
+
try {
|
|
91
|
+
execSync('node scripts/verify-grok-suit.mjs', { cwd: root, stdio: 'inherit' });
|
|
92
|
+
layer1Ok = true;
|
|
93
|
+
} catch {
|
|
94
|
+
console.error('\n❌ Layer 1 FAILED — fix before harness probes\n');
|
|
95
|
+
process.exit(1);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// ── Layer 2a — stdio probes ──────────────────────────────────────────────────
|
|
100
|
+
console.log('\nLayer 2a — Stdio MCP probes (automated)\n');
|
|
101
|
+
const layer2a = [];
|
|
102
|
+
|
|
103
|
+
const repertoireServer = resolve(root, 'dist/mcp/server.js');
|
|
104
|
+
if (!existsSync(repertoireServer)) {
|
|
105
|
+
console.error('❌ repertoire stdio — dist/mcp/server.js missing (run npm run build)');
|
|
106
|
+
layer2a.push({ name: 'repertoire stdio', ok: false });
|
|
107
|
+
} else {
|
|
108
|
+
try {
|
|
109
|
+
const out = await mcpStdioProbe({
|
|
110
|
+
serverPath: repertoireServer,
|
|
111
|
+
toolName: 'get_task_confidence',
|
|
112
|
+
args: { description: 'Confirm 0xRay suit worn after reboot' },
|
|
113
|
+
});
|
|
114
|
+
const ok =
|
|
115
|
+
out.includes('repertoire__get_task_confidence') ||
|
|
116
|
+
out.includes('recommendedAgent') ||
|
|
117
|
+
out.includes('highConfidenceTrapPresent');
|
|
118
|
+
layer2a.push({ name: 'repertoire__get_task_confidence (stdio)', ok });
|
|
119
|
+
console.log(ok ? '✅ repertoire__get_task_confidence (stdio)' : '❌ repertoire stdio — unexpected response');
|
|
120
|
+
} catch (e) {
|
|
121
|
+
layer2a.push({ name: 'repertoire stdio', ok: false });
|
|
122
|
+
console.error(`❌ repertoire stdio — ${e.message}`);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// ── Layer 2c — researcher trap routing (MCP subprocess) ───────────────────
|
|
127
|
+
console.log('\nLayer 2c — Researcher trap routing e2e (automated)\n');
|
|
128
|
+
const layer2c = [];
|
|
129
|
+
|
|
130
|
+
const researcherServer = resolveResearcherServerPath();
|
|
131
|
+
if (!existsSync(researcherServer)) {
|
|
132
|
+
console.error('❌ researcher stdio — server missing');
|
|
133
|
+
layer2c.push({ name: 'researcher trap routing', ok: false });
|
|
134
|
+
} else {
|
|
135
|
+
try {
|
|
136
|
+
let ok = false;
|
|
137
|
+
let lastOut = '';
|
|
138
|
+
for (let attempt = 0; attempt < 6 && !ok; attempt++) {
|
|
139
|
+
if (attempt > 0) await new Promise((r) => setTimeout(r, 500));
|
|
140
|
+
lastOut = await mcpStdioProbe({
|
|
141
|
+
serverPath: researcherServer,
|
|
142
|
+
toolName: 'analyze_proposal',
|
|
143
|
+
args: {
|
|
144
|
+
proposalTitle: 'Trap governance review',
|
|
145
|
+
proposalDescription: TRAP_PROBE_DESCRIPTION,
|
|
146
|
+
proposalType: 'governance',
|
|
147
|
+
},
|
|
148
|
+
timeoutMs: 8000,
|
|
149
|
+
});
|
|
150
|
+
ok =
|
|
151
|
+
lastOut.includes('MEMORY_ROUTING:') &&
|
|
152
|
+
lastOut.includes('recommendedAgent: architect') &&
|
|
153
|
+
lastOut.includes('attestation-as-map');
|
|
154
|
+
}
|
|
155
|
+
layer2c.push({ name: 'analyze_proposal trap routing (stdio)', ok });
|
|
156
|
+
console.log(
|
|
157
|
+
ok
|
|
158
|
+
? '✅ analyze_proposal trap routing (stdio)'
|
|
159
|
+
: '❌ researcher trap routing — silent no-op (MEMORY_ROUTING missing)',
|
|
160
|
+
);
|
|
161
|
+
if (!ok) {
|
|
162
|
+
console.error(` Response snippet: ${lastOut.slice(0, 240)}`);
|
|
163
|
+
}
|
|
164
|
+
} catch (e) {
|
|
165
|
+
layer2c.push({ name: 'researcher trap routing', ok: false });
|
|
166
|
+
console.error(`❌ researcher trap routing — ${e.message}`);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// ── Layer 2b — harness checklist (agent-verified) ──────────────────────────
|
|
171
|
+
console.log('\nLayer 2b — Harness MCP probes (agent CallMcpTool after reboot)\n');
|
|
172
|
+
const harnessProbes = [
|
|
173
|
+
{ server: 'xray-enforcer', tool: 'get-enforcement-status', key: 'totalRules' },
|
|
174
|
+
{ server: 'xray-enforcer', tool: 'codex-enforcement', key: 'termsValidated', args: { operation: 'suit-probe' } },
|
|
175
|
+
{ server: 'xray-skills', tool: 'list-skills', key: 'Skills' },
|
|
176
|
+
{ server: 'xray-orchestrator', tool: 'analyze-complexity', key: 'Complexity', args: { tasks: [{ description: 'suit probe', type: 'verification' }] } },
|
|
177
|
+
{ server: 'xray-governance', tool: 'get_active_codex', key: 'term_count' },
|
|
178
|
+
{ server: 'xray-researcher', tool: 'get_documentation', key: 'Documentation', args: { target: 'RepertoireService' } },
|
|
179
|
+
{ server: 'xray-architect-tools', tool: 'context-analysis', key: 'codebaseStructure', args: { query: 'suit probe' } },
|
|
180
|
+
{ server: 'xray-code-review', tool: 'check_best_practices', key: 'Compliance', args: { filePath: `${root}/src/mcp/server.ts`, language: 'typescript' } },
|
|
181
|
+
{ server: 'Dynamo', tool: 'get_docs', key: 'docs' },
|
|
182
|
+
{
|
|
183
|
+
server: 'repertoire',
|
|
184
|
+
tool: 'get_task_confidence',
|
|
185
|
+
key: 'harness-broken',
|
|
186
|
+
note: 'harness double-prefixes repertoire__ — use Layer 2a stdio instead',
|
|
187
|
+
},
|
|
188
|
+
];
|
|
189
|
+
|
|
190
|
+
for (const p of harnessProbes) {
|
|
191
|
+
const note = p.note ? ` (${p.note})` : '';
|
|
192
|
+
console.log(` □ ${p.server} → ${p.tool}${note}`);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// ── Layer 3 — verdict ────────────────────────────────────────────────────────
|
|
196
|
+
const layer2aOk = layer2a.every((c) => c.ok);
|
|
197
|
+
const layer2cOk = layer2c.every((c) => c.ok);
|
|
198
|
+
console.log(`
|
|
199
|
+
Layer 3 — Suit worn verdict (automated portion)
|
|
200
|
+
Layer 1: ${layer1Ok ? 'GREEN' : 'RED'}
|
|
201
|
+
Layer 2a repertoire stdio: ${layer2aOk ? 'GREEN' : 'RED'}
|
|
202
|
+
Layer 2c researcher trap routing: ${layer2cOk ? 'GREEN' : 'RED'}
|
|
203
|
+
|
|
204
|
+
FULL = Layer 1 + 2a + 2c green + all Layer 2b harness probes respond
|
|
205
|
+
PARTIAL = Layer 1 green + core harness MCPs live (enforcer, skills, orchestrator, governance, Dynamo)
|
|
206
|
+
BROKEN = Layer 1 fails OR core MCPs unreachable
|
|
207
|
+
|
|
208
|
+
Harness note: repertoire tools are registered as repertoire__* — Grok harness prepends
|
|
209
|
+
server name again (repertoire__repertoire__*). Memory routing works via stdio (Layer 2a/2c).
|
|
210
|
+
|
|
211
|
+
Version: npm 0xray@${readInstalledXrayVersion()} from node_modules (no npm link)
|
|
212
|
+
`);
|
|
213
|
+
|
|
214
|
+
if (layer1Ok && layer2aOk && layer2cOk) {
|
|
215
|
+
console.log('✅ Automated checks PASS — agent should confirm Layer 2b harness probes for FULL verdict.');
|
|
216
|
+
process.exit(0);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
console.error('❌ Automated checks FAILED — suit not ready.');
|
|
220
|
+
process.exit(1);
|