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.
- package/.mcp.json +18 -14
- 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 +28 -6
- package/.xray/features.schema.json +31 -0
- package/AGENTS-consumer.md +17 -7
- package/AGENTS.md +18 -10
- package/README.md +30 -27
- package/SKILLS.md +2 -2
- package/dist/AGENTS.md +18 -10
- package/dist/CHANGELOG.md +81 -11
- package/dist/README.md +30 -27
- package/dist/SKILLS.md +2 -2
- package/dist/cli/commands/hermes-install.js +3 -0
- package/dist/cli/commands/openclaw-install.js +14 -0
- package/dist/cli/index.js +10 -1
- package/dist/core/features-config.d.ts +15 -2
- package/dist/infrastructure/schemas/cloud-schemas.d.ts +1 -1
- package/dist/integrations/grok/grok-cli.d.ts +3 -0
- package/dist/integrations/grok/grok-cli.js +92 -4
- package/dist/integrations/grok/hooks/grok-hook-utils.js +53 -7
- package/dist/integrations/grok/hooks/post-tool-use.js +68 -46
- package/dist/integrations/grok/hooks/pre-tool-use.js +14 -31
- package/dist/integrations/grok/hooks/session-start.js +86 -4
- package/dist/integrations/grok/plugin/0xray/hooks/hooks.json +31 -24
- package/dist/integrations/hermes-agent/bridge.mjs +26 -1
- package/dist/integrations/hooks/delegation-gate-runtime.mjs +32 -3
- package/dist/integrations/hooks/pipeline-hook-runtime.mjs +1 -1
- 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/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 +12 -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/orchestrator/handlers/complexity-handler.js +2 -2
- 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 +44 -2
- package/dist/memory-routing/provider-registry.js +3 -2
- package/dist/nucleus/autonomy-kernel.d.ts +2 -2
- package/dist/nucleus/autonomy-kernel.js +17 -6
- package/dist/nucleus/confer.js +17 -3
- package/dist/nucleus/delegation-gate.d.ts +14 -8
- package/dist/nucleus/delegation-gate.js +151 -16
- package/dist/nucleus/suit-temperament.d.ts +40 -0
- package/dist/nucleus/suit-temperament.js +157 -0
- package/dist/nucleus/user-aside.js +1 -1
- package/dist/plugin/xray-codex-injection.js +14 -3
- package/dist/postprocessor/triggers/GitHookTrigger.js +11 -5
- package/opencode.json +80 -0
- package/package.json +15 -5
- package/scripts/hooks/install-hooks.cjs +18 -3
- package/scripts/hooks/run-hook.js +67 -3
- package/scripts/mjs/run-repertoire-mcp.mjs +39 -0
- package/scripts/mjs/verify-confer-core.mjs +1 -1
- package/scripts/mjs/verify-delegation-gate-core.mjs +29 -2
- package/scripts/mjs/verify-four-floor-compact.mjs +524 -0
- package/scripts/mjs/verify-pipeline-facets.mjs +215 -0
- package/scripts/mjs/verify-temperament-live.mjs +261 -0
- package/scripts/node/bridge-mcp-wiring.cjs +277 -29
- package/scripts/node/consumer-install-smoke.mjs +55 -2
- package/scripts/node/install-bridges.cjs +195 -33
- package/scripts/node/postinstall.cjs +50 -27
- package/scripts/node/reconcile-version.mjs +0 -4
- package/scripts/node/release-gate.mjs +1 -1
- package/scripts/node/release.mjs +2 -2
- package/scripts/node/universal-version-manager.js +1 -1
- package/scripts/node/validate-release-docs.mjs +20 -33
- package/scripts/node/version-manager.mjs +63 -18
- 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 +12 -0
- package/src/mcps/orchestrator/handlers/complexity-handler.ts +2 -1
- 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 +28 -6
- package/xray/features.schema.json +31 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# 0xRay AI Agents
|
|
2
|
+
|
|
3
|
+
Quick reference for the 0xRay AI orchestration framework (shipped to your project on `npm install 0xray`).
|
|
4
|
+
|
|
5
|
+
**v3.4.5** — 7 MCP servers · 45 skills · 68 codex terms · 4 platform bridges
|
|
6
|
+
|
|
7
|
+
## Postinstall (automatic)
|
|
8
|
+
|
|
9
|
+
`npm install 0xray` runs `install-bridges.cjs` and:
|
|
10
|
+
|
|
11
|
+
- Copies this file → **`AGENTS.md`** in your project root
|
|
12
|
+
- Ships root **`SKILLS.md`** and syncs **45 skills** to platform skill directories
|
|
13
|
+
- Seeds **`.gitignore`** (from template, if absent)
|
|
14
|
+
- Deploys **`.xray/`** (`codex.json`, `features.json`, `config.json`)
|
|
15
|
+
- Writes **`.mcp.json`** with 7 MCPs servers (`npx -y 0xray mcp …`)
|
|
16
|
+
- Installs bridges: **OpenCode**, **Grok**, **Hermes**, **OpenClaw**
|
|
17
|
+
|
|
18
|
+
Optional extras: `npx 0xray setup`
|
|
19
|
+
|
|
20
|
+
## Available MCP Servers
|
|
21
|
+
|
|
22
|
+
All seven servers use `npx -y 0xray mcp <cmd>` — configured in your project `.mcp.json`:
|
|
23
|
+
|
|
24
|
+
| Server | Role |
|
|
25
|
+
|--------|------|
|
|
26
|
+
| `xray-governance` | Proposal governance, codex snapshot, quality gates |
|
|
27
|
+
| `xray-skills` | Skill invocation, 45 knowledge skills |
|
|
28
|
+
| `xray-orchestrator` | thinDispatch routing, AsideContext, confidence gate |
|
|
29
|
+
| `xray-enforcer` | Codex compliance enforcement, rule validation |
|
|
30
|
+
| `xray-researcher` | Codebase exploration, memory-routing enrichment |
|
|
31
|
+
| `xray-code-review` | Proposal quality, code review deliberation |
|
|
32
|
+
| `xray-architect-tools` | System design, architecture decisions |
|
|
33
|
+
|
|
34
|
+
Governance deliberation uses **code-review**, **security-audit** (via enforcer/skills), and **researcher** within this 7-server surface.
|
|
35
|
+
|
|
36
|
+
## CLI Commands
|
|
37
|
+
|
|
38
|
+
| Command | Description |
|
|
39
|
+
|---------|-------------|
|
|
40
|
+
| `npx 0xray setup` | Symlinks, hook extras, Hermes skill sync |
|
|
41
|
+
| `npx 0xray status` | Verify installation |
|
|
42
|
+
| `npx 0xray opencode install` | OpenCode bridge (also runs on postinstall) |
|
|
43
|
+
| `npx 0xray grok install` | Grok plugin + 7 MCPs servers + skill sync |
|
|
44
|
+
| `npx 0xray hermes install` | Hermes plugin bridge |
|
|
45
|
+
| `npx 0xray openclaw install` | OpenClaw config + skills |
|
|
46
|
+
| `npx 0xray skill:install` | Install starter skills |
|
|
47
|
+
| `npx 0xray validate` | Validate codex compliance |
|
|
48
|
+
| `npx 0xray codex check` | Check codex rules |
|
|
49
|
+
| `npx 0xray health` | Framework health check |
|
|
50
|
+
| `npx 0xray mcp <server>` | Start an MCP server (stdio) |
|
|
51
|
+
|
|
52
|
+
## Governance
|
|
53
|
+
|
|
54
|
+
xray operates under the three-subsystem model: **Inference** + **External Governance** (Dynamo Solar SSOT) + **Autonomous Engine** (thinDispatch 7-flow in MCP orchestrator). All actions are validated against the Universal Development Codex before execution.
|
|
55
|
+
|
|
56
|
+
**Codex**: `.xray/codex.json` — **68 terms** across all agent interactions.
|
|
57
|
+
|
|
58
|
+
## thinDispatch Routing
|
|
59
|
+
|
|
60
|
+
- Simple (≤15): Single agent
|
|
61
|
+
- Moderate (≤25): Single agent with tools
|
|
62
|
+
- Complex (≤50): Multi-agent coordination
|
|
63
|
+
- Enterprise (>50): Orchestrator-led team
|
|
64
|
+
|
|
65
|
+
## AsideContext (v3.2+)
|
|
66
|
+
|
|
67
|
+
Bounded orchestrator subcontexts via `xray-orchestrator` MCP — `spawnAside` / `closeAside` on multi-step tasks. Repertoire memory routing (when enabled) flows through `inheritedContext.memoryRouting`.
|
|
68
|
+
|
|
69
|
+
## Memory Routing + Repertoire (optional, v3.3+)
|
|
70
|
+
|
|
71
|
+
Configure in `.xray/features.json`:
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
"memory_routing": {
|
|
75
|
+
"enabled": true,
|
|
76
|
+
"provider": "repertoire",
|
|
77
|
+
"module_path": "../repertoire/dist/provider/memory-routing-provider.js",
|
|
78
|
+
"config": {
|
|
79
|
+
"signalsPath": "../repertoire/data/curated_signals.json"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Without Repertoire: `{ "enabled": false, "provider": "null" }`.
|
|
85
|
+
|
|
86
|
+
**External MCP** (Hermes/Grok): add Repertoire alongside 0xRay servers:
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
"repertoire": {
|
|
90
|
+
"command": "npx",
|
|
91
|
+
"args": ["-y", "@0xray/repertoire", "mcp"]
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Tools: `repertoire__get_task_confidence`, `repertoire__get_high_confidence_signals`, `repertoire__search_primitives`, `repertoire__ingest_feedback`.
|
|
96
|
+
|
|
97
|
+
## Codex OS (always on — not optional)
|
|
98
|
+
|
|
99
|
+
The Universal Development Codex (`.xray/codex.json`, **69 terms**) is enforced by **PreToolUse** (blocks) and this section (brain). MCP enforcer is audit — not the gate.
|
|
100
|
+
|
|
101
|
+
| Term | Rule | Enforcement |
|
|
102
|
+
|------|------|-------------|
|
|
103
|
+
| 11 | No `any`, `@ts-ignore`, `@ts-expect-error` | PreToolUse deny on edits |
|
|
104
|
+
| 29 | Security by design — no `eval()` | PreToolUse deny |
|
|
105
|
+
| 59 | Complex work → orchestrator intake | PreToolUse deny `spawn_subagent` without plan |
|
|
106
|
+
| 67–68 | Best subagents + lead dev ownership | `analyze-complexity` + orchestrator skill |
|
|
107
|
+
| **69** | **No new MCP/skill/handler surface** | PreToolUse deny new `*.server.ts`, `SKILL.md` |
|
|
108
|
+
|
|
109
|
+
`features.json` → `multi_agent_orchestration.no_new_surface` (default **true**). Rewire existing hooks/MCPs/skills — do not add parallel APIs.
|
|
110
|
+
|
|
111
|
+
## Default operating mode: lead dev (rewired — no new MCP)
|
|
112
|
+
|
|
113
|
+
When the suit is worn, **lead dev mode** is ON via existing config + hooks:
|
|
114
|
+
|
|
115
|
+
| Layer | Existing piece | Rewire |
|
|
116
|
+
|-------|----------------|--------|
|
|
117
|
+
| Config | `features.json` → `multi_agent_orchestration.lead_dev_mode` | Extended, not new block |
|
|
118
|
+
| SessionStart + UserPromptSubmit | Grok hooks → `session-start.js` | Writes `.xray/state/session-boot.json` + `logs/framework/activity.log` |
|
|
119
|
+
| **OS gate** | **PreToolUse hook** | Codex patterns, surface area, spawn gate — `{"decision":"deny"}` + activity.log |
|
|
120
|
+
| Intake + plan | `xray-orchestrator` → **`analyze-complexity`** | Persists `.xray/state/lead-dev-plan.json` |
|
|
121
|
+
| Test triage | PreToolUse hook | Per-suite hint on full `npm test` |
|
|
122
|
+
| Playbook | **`orchestrator`** skill | Codex 59, 67–69 rules |
|
|
123
|
+
|
|
124
|
+
**First substantive task:** `analyze-complexity` with `tasks` array — **required before** `spawn_subagent`. You are the **lead developer**. Users speak in goals, not keywords.
|
|
125
|
+
|
|
126
|
+
| # | Rule |
|
|
127
|
+
|---|------|
|
|
128
|
+
| 1 | Phased plan + detailed todos; assign best subagent; monitor output |
|
|
129
|
+
| 2 | Take the helm — loop test fix until complete; no permission pings |
|
|
130
|
+
| 3 | Per-suite test triage after major changes; full suite last |
|
|
131
|
+
| 4 | Lead stays main thread; subagents execute; update todos continuously |
|
|
132
|
+
| 5 | Read all console and test output; triage fix rerun |
|
|
133
|
+
| 6 | Never defer errors as "pre-existing" — add todo and resolve |
|
|
134
|
+
| 7 | Resolve all errors before phase completion |
|
|
135
|
+
|
|
136
|
+
**Major work:** invoke `researcher` + `architect-tools` + `code-review` before planning/refactors — automatically.
|
|
137
|
+
|
|
138
|
+
## Skills
|
|
139
|
+
|
|
140
|
+
Full catalog in root **`SKILLS.md`** (shipped on postinstall). **`orchestrator`** skill documents lead-dev mode. Invoke via `@orchestrator` or `xray-skills` MCP (`invoke-skill`, `list-skills`).
|
|
141
|
+
|
|
142
|
+
## File Organization
|
|
143
|
+
|
|
144
|
+
| File Type | Save To |
|
|
145
|
+
|-----------|---------|
|
|
146
|
+
| Reflections | `docs/reflections/` |
|
|
147
|
+
| Logs | `logs/` |
|
|
148
|
+
| Scripts | `scripts/` or `scripts/bash/` |
|
|
149
|
+
| Test Files | `src/__tests__/` |
|
|
150
|
+
| Source Code | `src/` |
|
|
151
|
+
| Config | `config/` or `.xray/` |
|
|
152
|
+
|
|
153
|
+
## Documentation
|
|
154
|
+
|
|
155
|
+
| Topic | URL |
|
|
156
|
+
|-------|-----|
|
|
157
|
+
| Getting started | https://0xrayai.github.io/xray/docs/guides/getting-started |
|
|
158
|
+
| Platform integrations | https://0xrayai.github.io/xray/docs/guides/integrations |
|
|
159
|
+
| Features since 3.1 | https://0xrayai.github.io/xray/docs/guides/features-since-3.1 |
|
|
160
|
+
| AsideContext | https://0xrayai.github.io/xray/docs/guides/aside-context |
|
|
161
|
+
| Memory routing | https://0xrayai.github.io/xray/docs/guides/memory-routing |
|
|
162
|
+
| Repertoire | https://0xrayai.github.io/xray/docs/guides/repertoire |
|
|
163
|
+
| Autonomy command | https://0xrayai.github.io/xray/docs/guides/autonomy-command |
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 0xRay Framework Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# @0xray/repertoire
|
|
2
|
+
|
|
3
|
+
Factory memory organ for [0xRay](https://github.com/0xRayAI/xray): seed primitives, in-process memory routing, extra MCP (not an 8th `xray-*` server).
|
|
4
|
+
|
|
5
|
+
**v0.2.0** · 0xRay **4.0** wear. Runtime does **not** depend on `0xray` (optional peer for suit-verify scripts).
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @0xray/repertoire
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Does not install `0xray`. After 0xray wear, refresh Grok hooks:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx 0xray grok install --force
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Restart Grok MCP sessions — hooks do not hot-reload.
|
|
20
|
+
|
|
21
|
+
## Suit + autonomy (Grok Build)
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm run confirm:suit # post-reboot: Layer 1 + 2a + 2b checklist
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Suit verify from any consumer** (project must have `.xray/` + `0xray` installed):
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx repertoire-verify-suit # 30-check harness from any consumer project root
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Includes 3.5.0 delegation gate + PostToolUse assertions (steps 11–13). Full harness: clone this repo and `npm run confirm:suit`. Quick check: `npx 0xray health`.
|
|
34
|
+
|
|
35
|
+
Default operating model: **`autonomy-command`** — lead dev, phased todos, subagent dispatch, per-suite test triage. See [AGENTS.md](AGENTS.md) and [xray autonomy guide](https://0xrayai.github.io/xray/docs/guides/autonomy-command).
|
|
36
|
+
|
|
37
|
+
## MCP server (Hermes, Grok, OpenCode)
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
"repertoire": {
|
|
41
|
+
"command": "npx",
|
|
42
|
+
"args": ["-y", "@0xray/repertoire", "mcp"]
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Bundled `data/curated_signals.json` is used by default. Override with env:
|
|
47
|
+
|
|
48
|
+
| Env | Default |
|
|
49
|
+
|-----|---------|
|
|
50
|
+
| `CURATED_SIGNALS_PATH` | `<package>/data/curated_signals.json` |
|
|
51
|
+
| `REPERTOIRE_DATA_DIR` | `<package>/data` |
|
|
52
|
+
| `REPERTOIRE_LOG_DIR` | `<package>/logs/groover-inference` |
|
|
53
|
+
|
|
54
|
+
### Tools
|
|
55
|
+
|
|
56
|
+
| Tool | Purpose |
|
|
57
|
+
|------|---------|
|
|
58
|
+
| `repertoire__get_task_confidence` | Trap detection, complexity boost, `recommendedAgent` |
|
|
59
|
+
| `repertoire__search_primitives` | Text search against curated signals |
|
|
60
|
+
| `repertoire__get_high_confidence_signals` | Validated signals above threshold |
|
|
61
|
+
| `repertoire__ingest_feedback` | Record orchestrator outcomes |
|
|
62
|
+
|
|
63
|
+
## 0xRay memory routing (in-process)
|
|
64
|
+
|
|
65
|
+
In `.xray/features.json` or `xray/features.json`:
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
"memory_routing": {
|
|
69
|
+
"enabled": true,
|
|
70
|
+
"provider": "repertoire",
|
|
71
|
+
"module_path": "node_modules/@0xray/repertoire/dist/provider/memory-routing-provider.js"
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
`config` is optional when using the bundled registry. For a project-local registry:
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
"config": {
|
|
79
|
+
"signalsPath": ".xray/curated_signals.json",
|
|
80
|
+
"logDir": "logs/groover-inference"
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Paths in `config` resolve relative to the consumer project root.
|
|
85
|
+
|
|
86
|
+
## Programmatic import
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
import { createMemoryRoutingProvider } from '@0xray/repertoire/provider/memory-routing-provider';
|
|
90
|
+
|
|
91
|
+
const provider = createMemoryRoutingProvider();
|
|
92
|
+
provider.getTaskConfidence?.({
|
|
93
|
+
id: 'task-1',
|
|
94
|
+
description: 'TYPE: ontological-trap attestation-as-map',
|
|
95
|
+
type: 'governance',
|
|
96
|
+
});
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Field actuation add-ons (optional)
|
|
100
|
+
|
|
101
|
+
Repertoire has **no Moltbook dependency**. It ingests **enriched JSONL** from any producer (`matched_primitives` + `match_confidence`) and closes the memory loop via consult, feedback, and post-tick ingest.
|
|
102
|
+
|
|
103
|
+
Each project activates its own public field surface if it wants one:
|
|
104
|
+
|
|
105
|
+
| Layer | Required? | Example |
|
|
106
|
+
|-------|-----------|---------|
|
|
107
|
+
| Repertoire + 0xRay memory routing | Core suit | `npm install @0xray/repertoire`, `features.json` |
|
|
108
|
+
| Engage pipeline (`consult → govern → log`) | Per producer | `groover/deploy/engage-core.ts` |
|
|
109
|
+
| Moltbook (or other social API) | **Add-on** | Groover's `deploy/moltbook-*.ts` + `MOLTBOOK_API_KEY` |
|
|
110
|
+
|
|
111
|
+
Jelly, ZigZag, or a custom cron worker can wire the same loop without Moltbook — point `logDir` at your JSONL and set `REPERTOIRE_ROOT`.
|
|
112
|
+
|
|
113
|
+
## Sibling-repo development
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
git clone https://github.com/0xRayAI/repertoire
|
|
117
|
+
cd repertoire && npm install && npm run build && npm test
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
See [AGENTS.md](./AGENTS.md) for stack integration details.
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Factory seed primitives for 0xRay 4.0 memory routing. Not a plant diary.",
|
|
3
|
+
"last_updated": "2026-09-01T19:18:27.821Z",
|
|
4
|
+
"source": "factory-seed-4.0",
|
|
5
|
+
"schema_version": "1.1",
|
|
6
|
+
"implementation_guidance": {
|
|
7
|
+
"how_to_use": "Package seed is read-only. Ingest hydrates a project copy under .xray/state/repertoire/.",
|
|
8
|
+
"integration_points": [
|
|
9
|
+
"MemoryRoutingProvider",
|
|
10
|
+
"thinDispatch",
|
|
11
|
+
"repertoire MCP"
|
|
12
|
+
],
|
|
13
|
+
"priority_order": "ontological-trap and consumer-boundary first, then governance/three-subsystem."
|
|
14
|
+
},
|
|
15
|
+
"signals": [
|
|
16
|
+
{
|
|
17
|
+
"name": "attestation-as-map",
|
|
18
|
+
"definition": "Attestation should be treated as a directional trust map that obligates the consumer to perform ongoing re-evaluation, rather than a terminating verdict that ends responsibility.",
|
|
19
|
+
"tags": [
|
|
20
|
+
"ontological-trap",
|
|
21
|
+
"attestation",
|
|
22
|
+
"consumer-boundary"
|
|
23
|
+
],
|
|
24
|
+
"priority": "high",
|
|
25
|
+
"status": "validated",
|
|
26
|
+
"first_seen": "2026-06-17",
|
|
27
|
+
"evaluation_criteria": "The inference reply explicitly states that attestation is directional/ongoing rather than final, or criticizes treating signatures as sufficient without consumer-side checks.",
|
|
28
|
+
"validation_experiment": "Create a test post containing only static attestation metadata with no consumer recheck hook. Run it through govern_with_solar and check whether the result is REJECT or resonanceScore < 0.3.",
|
|
29
|
+
"master_index_integration": "MemoryRoutingProvider, thinDispatch, repertoire MCP get_task_confidence.",
|
|
30
|
+
"implementation_notes": "Treat attestation as an ongoing map. Trap-route to architect when matched.",
|
|
31
|
+
"example_inference_snippet": "Attestation functions as a trust map rather than a conclusive verdict, so the consuming boundary must still execute its own invariant checks...",
|
|
32
|
+
"observation_stats": {
|
|
33
|
+
"observation_count": 580,
|
|
34
|
+
"avg_confidence": 0.5536206896551725,
|
|
35
|
+
"max_confidence": 1,
|
|
36
|
+
"last_seen": "2026-09-01T19:18:27.821Z",
|
|
37
|
+
"governance_forced_count": 566
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "consumption-boundary-revalidation-gate",
|
|
42
|
+
"definition": "There must be an explicit, mandatory re-validation step of key invariants at every trust-transfer boundary before the receiving agent/system is allowed to consume or act on the artifact.",
|
|
43
|
+
"tags": [
|
|
44
|
+
"ontological-trap",
|
|
45
|
+
"attestation",
|
|
46
|
+
"consumer-boundary"
|
|
47
|
+
],
|
|
48
|
+
"priority": "high",
|
|
49
|
+
"status": "validated",
|
|
50
|
+
"first_seen": "2026-06-17",
|
|
51
|
+
"evaluation_criteria": "Reply mentions that re-validation must occur at the consumption boundary or that upstream attestation alone is insufficient without this step.",
|
|
52
|
+
"validation_experiment": "Instrument a parser/loader boundary with a controlled schema mutation after upstream attestation. Verify the system emits an explicit re-validation obligation record before permitting downstream action.",
|
|
53
|
+
"master_index_integration": "MemoryRoutingProvider, thinDispatch, repertoire MCP get_task_confidence.",
|
|
54
|
+
"implementation_notes": "Re-validate invariants at every trust-transfer before consume.",
|
|
55
|
+
"example_inference_snippet": "Mandatory re-validation of invariants at every trust-transfer boundary before consumption is permitted.",
|
|
56
|
+
"observation_stats": {
|
|
57
|
+
"observation_count": 564,
|
|
58
|
+
"avg_confidence": 0.55,
|
|
59
|
+
"max_confidence": 1,
|
|
60
|
+
"last_seen": "2026-07-07T18:17:42.741Z",
|
|
61
|
+
"governance_forced_count": 550
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "consumer-boundary-revalidation-gate",
|
|
66
|
+
"definition": "Every attestation or output must pass an explicit consumer-side revalidation gate. Treating attestation as a terminating verdict is an ontological error.",
|
|
67
|
+
"tags": [
|
|
68
|
+
"ontological-trap",
|
|
69
|
+
"attestation",
|
|
70
|
+
"consumer-boundary"
|
|
71
|
+
],
|
|
72
|
+
"priority": "high",
|
|
73
|
+
"status": "validated",
|
|
74
|
+
"first_seen": "2026-06-17",
|
|
75
|
+
"evaluation_criteria": "The inference distinguishes 'map' semantics (ongoing responsibility) from 'verdict' semantics (terminated responsibility).",
|
|
76
|
+
"validation_experiment": "Test with static attestation metadata that has no revalidation hook.",
|
|
77
|
+
"master_index_integration": "MemoryRoutingProvider, thinDispatch, repertoire MCP get_task_confidence.",
|
|
78
|
+
"implementation_notes": "Consumer-side gate; attestation is not a terminating verdict.",
|
|
79
|
+
"observation_stats": {
|
|
80
|
+
"observation_count": 1,
|
|
81
|
+
"avg_confidence": 0.55,
|
|
82
|
+
"max_confidence": 0.55,
|
|
83
|
+
"last_seen": "2026-09-01T00:00:00.000Z",
|
|
84
|
+
"governance_forced_count": 0
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "governance-as-mandatory-external-filter",
|
|
89
|
+
"definition": "Governance is the mandatory external filter between internal deliberation and action. Internal consistency alone is insufficient.",
|
|
90
|
+
"tags": [
|
|
91
|
+
"ontological-trap",
|
|
92
|
+
"governance",
|
|
93
|
+
"external-filter",
|
|
94
|
+
"mandatory"
|
|
95
|
+
],
|
|
96
|
+
"priority": "high",
|
|
97
|
+
"status": "proposed",
|
|
98
|
+
"first_seen": "2026-06-17",
|
|
99
|
+
"evaluation_criteria": "Reply states governance is mandatory or criticizes bypassing external governance.",
|
|
100
|
+
"validation_experiment": "Submit a high-resonance internal proposal that has not passed Dynamo. Verify it is blocked or marked NEEDS_REVISION.",
|
|
101
|
+
"master_index_integration": "MemoryRoutingProvider, thinDispatch, repertoire MCP get_task_confidence.",
|
|
102
|
+
"implementation_notes": "Governance sits between deliberation and action. Always on.",
|
|
103
|
+
"observation_stats": {
|
|
104
|
+
"observation_count": 1,
|
|
105
|
+
"avg_confidence": 0.55,
|
|
106
|
+
"max_confidence": 0.55,
|
|
107
|
+
"last_seen": "2026-09-01T00:00:00.000Z",
|
|
108
|
+
"governance_forced_count": 0
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"name": "three-subsystem-verifiable-os",
|
|
113
|
+
"definition": "A complete verifiable agent operating system requires three mandatory subsystems: Inference, External Governance (Dynamo Solar SSOT), and Autonomous Engine (0xRay). Governance is not optional.",
|
|
114
|
+
"tags": [
|
|
115
|
+
"ontological-trap",
|
|
116
|
+
"governance",
|
|
117
|
+
"architecture",
|
|
118
|
+
"three-subsystem"
|
|
119
|
+
],
|
|
120
|
+
"priority": "high",
|
|
121
|
+
"status": "proposed",
|
|
122
|
+
"first_seen": "2026-06-17",
|
|
123
|
+
"evaluation_criteria": "Inference references the three-subsystem model or criticizes treating inference/orchestration as sufficient without external governance.",
|
|
124
|
+
"validation_experiment": "Create a proposal that skips Dynamo governance entirely. Check if govern_with_solar or repertoire rejects it with low resonance.",
|
|
125
|
+
"master_index_integration": "MemoryRoutingProvider, thinDispatch, repertoire MCP get_task_confidence.",
|
|
126
|
+
"implementation_notes": "Inference, External Governance, Autonomous Engine — all three required.",
|
|
127
|
+
"observation_stats": {
|
|
128
|
+
"observation_count": 1,
|
|
129
|
+
"avg_confidence": 0.55,
|
|
130
|
+
"max_confidence": 0.55,
|
|
131
|
+
"last_seen": "2026-09-01T00:00:00.000Z",
|
|
132
|
+
"governance_forced_count": 0
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"name": "parse-mutation-detector",
|
|
137
|
+
"definition": "A runtime mechanism that detects when parsing or transformation has altered an artifact and triggers fail-closed behavior or explicit re-evaluation of invariants.",
|
|
138
|
+
"tags": [
|
|
139
|
+
"ontological-trap",
|
|
140
|
+
"attestation",
|
|
141
|
+
"consumer-boundary"
|
|
142
|
+
],
|
|
143
|
+
"priority": "high",
|
|
144
|
+
"status": "validated",
|
|
145
|
+
"first_seen": "2026-06-17",
|
|
146
|
+
"evaluation_criteria": "Reply identifies that a parser or transformation step can silently change meaning and that current attestation does not cover this mutation surface.",
|
|
147
|
+
"validation_experiment": "Feed the system an attested artifact, apply a controlled parse transformation, and measure whether a fail-closed signal or re-evaluation trigger is emitted within one inference cycle.",
|
|
148
|
+
"master_index_integration": "MemoryRoutingProvider, thinDispatch, repertoire MCP get_task_confidence.",
|
|
149
|
+
"implementation_notes": "Detect schema/parse mutation after upstream attestation.",
|
|
150
|
+
"example_inference_snippet": "Runtime mechanism to detect parse transformations and trigger fail-closed or explicit re-evaluation.",
|
|
151
|
+
"observation_stats": {
|
|
152
|
+
"observation_count": 564,
|
|
153
|
+
"avg_confidence": 0.55,
|
|
154
|
+
"max_confidence": 1,
|
|
155
|
+
"last_seen": "2026-07-07T18:17:42.741Z",
|
|
156
|
+
"governance_forced_count": 550
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "trust-transfer-boundary",
|
|
161
|
+
"definition": "An explicit, first-class signal that records the obligation to re-validate invariants at each handoff point between agents or systems.",
|
|
162
|
+
"tags": [
|
|
163
|
+
"ontological-trap",
|
|
164
|
+
"attestation",
|
|
165
|
+
"consumer-boundary"
|
|
166
|
+
],
|
|
167
|
+
"priority": "high",
|
|
168
|
+
"status": "validated",
|
|
169
|
+
"first_seen": "2026-06-17",
|
|
170
|
+
"evaluation_criteria": "Reply argues that re-validation obligations must be explicitly recorded and passed along at every trust transfer.",
|
|
171
|
+
"validation_experiment": "Simulate a multi-hop agent workflow where an attested artifact crosses two trust boundaries. Verify that a trust-transfer-boundary record is created at each hop.",
|
|
172
|
+
"master_index_integration": "MemoryRoutingProvider, thinDispatch, repertoire MCP get_task_confidence.",
|
|
173
|
+
"implementation_notes": "Name the boundary where trust moves; require a check there.",
|
|
174
|
+
"example_inference_snippet": "Explicit recording of re-validation obligation as a first-class signal at each handoff point.",
|
|
175
|
+
"observation_stats": {
|
|
176
|
+
"observation_count": 564,
|
|
177
|
+
"avg_confidence": 0.55,
|
|
178
|
+
"max_confidence": 1,
|
|
179
|
+
"last_seen": "2026-07-07T18:17:42.741Z",
|
|
180
|
+
"governance_forced_count": 550
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "interpreter-mode-boundary-invariant",
|
|
185
|
+
"definition": "A self-enforcing contract hash or invariant that lives at the parser-consumer trust boundary and must survive any transformation or reinterpretation.",
|
|
186
|
+
"tags": [
|
|
187
|
+
"ontological-trap",
|
|
188
|
+
"attestation",
|
|
189
|
+
"consumer-boundary"
|
|
190
|
+
],
|
|
191
|
+
"priority": "high",
|
|
192
|
+
"status": "validated",
|
|
193
|
+
"first_seen": "2026-06-17",
|
|
194
|
+
"evaluation_criteria": "Reply emphasizes that some invariant must be embedded in a way that forces the consumer to recompute or re-validate it after any parsing step.",
|
|
195
|
+
"validation_experiment": "Design an attestation payload that embeds a contract hash which the consumer must independently recompute after parsing. Verify the system treats failure to recompute as a governance violation.",
|
|
196
|
+
"master_index_integration": "MemoryRoutingProvider, thinDispatch, repertoire MCP get_task_confidence.",
|
|
197
|
+
"implementation_notes": "Interpreter/agent mode changes are a boundary, not a silent switch.",
|
|
198
|
+
"example_inference_snippet": "Self-enforcing contract hash at parser-consumer trust boundary that survives transformation.",
|
|
199
|
+
"observation_stats": {
|
|
200
|
+
"observation_count": 564,
|
|
201
|
+
"avg_confidence": 0.55,
|
|
202
|
+
"max_confidence": 1,
|
|
203
|
+
"last_seen": "2026-07-07T18:17:42.741Z",
|
|
204
|
+
"governance_forced_count": 550
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { CuratedSignalsManager, type FeedbackOutcomeResult } from './registry/CuratedSignalsManager.js';
|
|
2
|
+
import { InferenceStateManager } from './registry/InferenceStateManager.js';
|
|
3
|
+
import { MetaInferenceEngine } from './synthesis/meta-inference-engine.js';
|
|
4
|
+
import { OrchestratorFeedbackIngester } from './ingestion/orchestrator-feedback-ingester.js';
|
|
5
|
+
import { RepertoireOrchestratorBridge } from './orchestrator-bridge/RepertoireOrchestratorBridge.js';
|
|
6
|
+
import { OntologicalTrapEnforcer, type GovernWithSolarFn } from './governance/ontological-trap-enforcer.js';
|
|
7
|
+
import type { AgentCapability, CuratedSignal, ExecutionPlan, OrchestrationTask, OrchestratorFeedbackEntry, RepertoireInheritedContext, RepertoireRoutingContext, SynthesisReport, TaskConfidenceContext } from './types.js';
|
|
8
|
+
export interface RepertoireServiceOptions {
|
|
9
|
+
dataDir?: string;
|
|
10
|
+
logDir?: string;
|
|
11
|
+
signalsPath?: string;
|
|
12
|
+
statePath?: string;
|
|
13
|
+
feedbackDir?: string;
|
|
14
|
+
projectRoot?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare class RepertoireService {
|
|
17
|
+
readonly signalsManager: CuratedSignalsManager;
|
|
18
|
+
readonly stateManager: InferenceStateManager;
|
|
19
|
+
readonly orchestratorBridge: RepertoireOrchestratorBridge;
|
|
20
|
+
readonly metaInference: MetaInferenceEngine;
|
|
21
|
+
readonly feedbackIngester: OrchestratorFeedbackIngester;
|
|
22
|
+
private readonly logDir;
|
|
23
|
+
constructor(options?: RepertoireServiceOptions);
|
|
24
|
+
ingestGrooverLogs(sourceDir: string, options?: {
|
|
25
|
+
dryRun?: boolean;
|
|
26
|
+
}): {
|
|
27
|
+
imported: number;
|
|
28
|
+
skipped: number;
|
|
29
|
+
promoted: string[];
|
|
30
|
+
};
|
|
31
|
+
ingestXraySessions(sourceDir: string): {
|
|
32
|
+
imported: number;
|
|
33
|
+
skipped: number;
|
|
34
|
+
};
|
|
35
|
+
ingestOrchestratorFeedback(entry: OrchestratorFeedbackEntry): {
|
|
36
|
+
logPath: string;
|
|
37
|
+
updatedSignals: FeedbackOutcomeResult[];
|
|
38
|
+
};
|
|
39
|
+
runMetaInference(): Promise<SynthesisReport | null>;
|
|
40
|
+
enhanceCapabilities(base: Map<string, AgentCapability>): Map<string, AgentCapability>;
|
|
41
|
+
buildRoutingContext(operation: string): RepertoireRoutingContext;
|
|
42
|
+
enrichTasks(tasks: OrchestrationTask[]): OrchestrationTask[];
|
|
43
|
+
enrichPlan(plan: ExecutionPlan, tasks: OrchestrationTask[]): ExecutionPlan;
|
|
44
|
+
buildInheritedContext(tasks: OrchestrationTask[]): RepertoireInheritedContext;
|
|
45
|
+
buildSynthesisContext(projectRoot: string, dueReason?: string | null): import("./types.js").SynthesisCollocatedContext;
|
|
46
|
+
selectAgent(capabilities: Map<string, AgentCapability>, requiredCapabilities: string[], complexity: number, operation: string): string | null;
|
|
47
|
+
resolveThinDispatch(baseAgent: string, operation: string, complexityScore: number): {
|
|
48
|
+
agent: string;
|
|
49
|
+
adjustedScore: number;
|
|
50
|
+
repertoireContext: RepertoireRoutingContext;
|
|
51
|
+
};
|
|
52
|
+
createTrapEnforcer(governFn: GovernWithSolarFn): OntologicalTrapEnforcer;
|
|
53
|
+
getHighConfidenceSignals(options?: {
|
|
54
|
+
minConfidence?: number;
|
|
55
|
+
tags?: string[];
|
|
56
|
+
limit?: number;
|
|
57
|
+
}): Array<CuratedSignal & {
|
|
58
|
+
effectiveConfidence: number;
|
|
59
|
+
}>;
|
|
60
|
+
getTaskConfidence(input: {
|
|
61
|
+
description: string;
|
|
62
|
+
type?: string;
|
|
63
|
+
id?: string;
|
|
64
|
+
}): TaskConfidenceContext;
|
|
65
|
+
searchPrimitives(query: string, options?: {
|
|
66
|
+
minConfidence?: number;
|
|
67
|
+
limit?: number;
|
|
68
|
+
}): Array<{
|
|
69
|
+
name: string;
|
|
70
|
+
confidence: number;
|
|
71
|
+
priority: string;
|
|
72
|
+
definition: string;
|
|
73
|
+
tags: string[];
|
|
74
|
+
status?: string;
|
|
75
|
+
observationCount: number;
|
|
76
|
+
}>;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=RepertoireService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RepertoireService.d.ts","sourceRoot":"","sources":["../src/RepertoireService.ts"],"names":[],"mappings":"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"}
|