0xray 4.0.36 → 4.0.38
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/.grok-plugin/plugin.json +1 -1
- package/.xray/features.json +1 -1
- package/dist/CHANGELOG.md +28 -0
- package/dist/analytics/emerging-pattern-detector.d.ts +12 -1
- package/dist/analytics/emerging-pattern-detector.js +37 -12
- package/dist/analytics/pattern-learning-engine.js +1 -9
- package/dist/analytics/predictive-analytics.js +51 -33
- package/dist/analytics/prompt-pattern-analyzer.d.ts +1 -0
- package/dist/analytics/prompt-pattern-analyzer.js +39 -20
- package/dist/analytics/routing-performance-analyzer.d.ts +2 -0
- package/dist/analytics/routing-performance-analyzer.js +89 -37
- package/dist/analytics/simple-pattern-analyzer.d.ts +4 -0
- package/dist/analytics/simple-pattern-analyzer.js +66 -28
- package/dist/architect/architect-tools.d.ts +3 -0
- package/dist/architect/architect-tools.js +22 -0
- package/dist/cli/commands/grok-install.js +1 -1
- package/dist/cli/commands/hermes-install.js +11 -5
- package/dist/cli/commands/openclaw-install.js +13 -7
- package/dist/cli/commands/opencode-install.js +7 -4
- package/dist/cli/commands/suit-monitor.d.ts +30 -0
- package/dist/cli/commands/suit-monitor.js +128 -0
- package/dist/cli/index.js +52 -15
- package/dist/cli/suit-pulse.d.ts +29 -0
- package/dist/cli/suit-pulse.js +270 -0
- package/dist/delegation/agent-delegator.d.ts +4 -2
- package/dist/delegation/agent-delegator.js +46 -27
- package/dist/delegation/agent-expertise.js +2 -1
- package/dist/delegation/analytics/outcome-tracker.d.ts +6 -0
- package/dist/delegation/analytics/outcome-tracker.js +17 -3
- package/dist/delegation/ast-code-parser.d.ts +5 -0
- package/dist/delegation/ast-code-parser.js +53 -48
- package/dist/delegation/codebase-context-analyzer.d.ts +3 -7
- package/dist/delegation/codebase-context-analyzer.js +188 -159
- package/dist/delegation/session-coordinator.js +3 -2
- package/dist/enforcement/loaders/codex-loader.js +18 -14
- package/dist/enforcement/validators/architecture-validators.js +115 -9
- package/dist/governance/codex-policy.service.d.ts +12 -2
- package/dist/governance/codex-policy.service.js +91 -16
- package/dist/integrations/grok/hooks/session-start.js +6 -6
- package/dist/integrations/hooks/goggles-pipeline.mjs +169 -28
- package/dist/integrations/hooks/goggles-planes.json +172 -8
- package/dist/integrations/hooks/plates.cjs +138 -0
- package/dist/integrations/hooks/station-hook-runtime.cjs +63 -5
- package/dist/integrations/hooks/write-home.cjs +59 -0
- package/dist/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
- package/dist/mcps/architect-tools.server.d.ts +6 -0
- package/dist/mcps/architect-tools.server.js +19 -18
- package/dist/mcps/orchestrator/server.d.ts +4 -3
- package/dist/mcps/orchestrator/server.js +29 -17
- package/dist/memory-routing/lookup-cache.d.ts +8 -0
- package/dist/memory-routing/lookup-cache.js +72 -0
- package/dist/memory-routing/plates.d.ts +1 -1
- package/dist/memory-routing/plates.js +26 -0
- package/dist/memory-routing/provider-loader.js +3 -0
- package/dist/metrics/agent-metrics.d.ts +14 -5
- package/dist/metrics/agent-metrics.js +362 -224
- package/dist/nucleus/synthesis-consult-receipt.js +38 -16
- package/dist/orchestrator/enhanced-multi-agent-orchestrator.d.ts +5 -0
- package/dist/orchestrator/enhanced-multi-agent-orchestrator.js +9 -0
- package/dist/orchestrator/multi-agent-orchestration-coordinator.js +1 -2
- package/dist/orchestrator/orchestrator.js +1 -2
- package/dist/processors/implementations/agents-md-validation-processor.d.ts +0 -1
- package/dist/processors/implementations/agents-md-validation-processor.js +0 -11
- package/dist/processors/implementations/console-log-guard-processor.js +39 -50
- package/dist/processors/implementations/performance-budget-processor.d.ts +0 -5
- package/dist/processors/implementations/performance-budget-processor.js +29 -38
- package/dist/processors/implementations/storytelling-trigger-processor.d.ts +5 -0
- package/dist/processors/implementations/storytelling-trigger-processor.js +69 -16
- package/dist/processors/implementations/test-auto-creation-processor.js +39 -36
- package/dist/reporting/framework-reporting-system.d.ts +3 -0
- package/dist/reporting/framework-reporting-system.js +61 -8
- package/dist/reporting/log-parser.js +188 -105
- package/dist/reporting/metrics.js +42 -18
- package/dist/security/prompt-security-validator.js +8 -7
- package/dist/security/security-auditor.d.ts +4 -0
- package/dist/security/security-auditor.js +132 -57
- package/dist/security/security-hardener.d.ts +2 -0
- package/dist/security/security-hardener.js +31 -6
- package/dist/security/security-headers.d.ts +2 -0
- package/dist/security/security-headers.js +23 -21
- package/dist/security/security-scanner.js +18 -4
- package/dist/session/session-cleanup-manager.d.ts +2 -0
- package/dist/session/session-cleanup-manager.js +29 -8
- package/dist/session/session-monitor.d.ts +14 -4
- package/dist/session/session-monitor.js +208 -106
- package/dist/session/session-state-manager.d.ts +11 -0
- package/dist/session/session-state-manager.js +90 -8
- package/docs-site/docs/plates/activity-log.md +38 -0
- package/docs-site/docs/plates/cursor-compact.md +35 -0
- package/docs-site/docs/plates/grok-compact.md +35 -0
- package/docs-site/docs/plates/index.md +25 -3
- package/docs-site/docs/plates/inference-files.md +35 -0
- package/docs-site/docs/plates/kept-line.md +35 -0
- package/docs-site/docs/plates/lens-gate.md +35 -0
- package/docs-site/docs/plates/lens-page.md +35 -0
- package/docs-site/docs/plates/notes-page.md +35 -0
- package/docs-site/docs/plates/package-face.md +35 -0
- package/docs-site/docs/plates/payload-heat.md +35 -0
- package/docs-site/docs/plates/pickup-stamp.md +35 -0
- package/docs-site/docs/plates/pre-tool.md +35 -0
- package/docs-site/docs/plates/record-map.md +41 -0
- package/docs-site/docs/plates/reflection-page.md +35 -0
- package/docs-site/docs/plates/review.md +57 -0
- package/docs-site/docs/plates/session-capture.md +38 -0
- package/docs-site/docs/plates/site-manual.md +35 -0
- package/docs-site/docs/plates/stamp-plate.md +35 -0
- package/docs-site/docs/plates/station-card.md +35 -0
- package/docs-site/docs/plates/station-heat.md +35 -0
- package/docs-site/docs/plates/suit-organs.md +38 -0
- package/docs-site/docs/plates/suit-settings.md +35 -0
- package/docs-site/docs/plates/suit-wear.md +37 -0
- package/docs-site/docs/plates/trail-state.md +35 -0
- package/docs-site/docs/plates/work-fresh.md +35 -0
- package/docs-site/docs/plates/write-home.md +38 -0
- package/package.json +3 -2
- package/scripts/node/install-bridges.cjs +302 -78
- package/scripts/node/postinstall.cjs +14 -3
- package/src/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
- package/src/mcps/architect-tools.server.ts +25 -20
- package/src/mcps/orchestrator/server.ts +33 -19
- package/xray/features.json +1 -1
- package/vendor/@0xray/repertoire/dist/RepertoireService.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/RepertoireService.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/governance/ontological-trap-enforcer.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/governance/ontological-trap-enforcer.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/index.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/index.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/ingestion/groover-log-ingester.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/ingestion/groover-log-ingester.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/ingestion/groover-log-parser.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/ingestion/groover-log-parser.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/ingestion/orchestrator-feedback-ingester.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/ingestion/orchestrator-feedback-ingester.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/mcp/server.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/mcp/server.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/RepertoireOrchestratorBridge.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/RepertoireOrchestratorBridge.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/capability-enhancer.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/capability-enhancer.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-agent-affinity.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-agent-affinity.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/paths.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/paths.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/registry/InferenceStateManager.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/registry/InferenceStateManager.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/registry/confidence-decay.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/registry/confidence-decay.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/registry/signal-prune.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/registry/signal-prune.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/synthesis/concrete-sections.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/synthesis/concrete-sections.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/synthesis/meta-inference-engine.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/synthesis/meta-inference-engine.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/synthesis/primitive-confidence-aggregator.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/synthesis/primitive-confidence-aggregator.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/synthesis/synthesis-prompt-builder.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/synthesis/synthesis-prompt-builder.js.map +0 -1
- package/vendor/@0xray/repertoire/dist/types.d.ts.map +0 -1
- package/vendor/@0xray/repertoire/dist/types.js.map +0 -1
|
@@ -23,29 +23,193 @@
|
|
|
23
23
|
"worn": "dist/nucleus/thin-dispatch.js",
|
|
24
24
|
"mark": "export function scoreAndRoute",
|
|
25
25
|
"wornMark": "function scoreAndRoute",
|
|
26
|
-
"pick": "resolveThinDispatch"
|
|
26
|
+
"pick": "resolveThinDispatch",
|
|
27
|
+
"skills": ".agents/skills/routing/SKILL.md",
|
|
28
|
+
"plates": ["orchestration", "processor"]
|
|
27
29
|
},
|
|
28
30
|
"house": {
|
|
29
|
-
"files": ["grok-bot/lib/seat-doctor.cjs"]
|
|
31
|
+
"files": ["grok-bot/lib/seat-doctor.cjs"],
|
|
32
|
+
"skills": ".agents/skills/house/SKILL.md",
|
|
33
|
+
"plates": ["suit-wear"]
|
|
30
34
|
},
|
|
31
35
|
"boot": {
|
|
32
36
|
"files": ["src/core/boot-orchestrator.ts"],
|
|
33
|
-
"skills": "src/skills/boot-orchestrator/SKILL.md"
|
|
37
|
+
"skills": "src/skills/boot-orchestrator/SKILL.md",
|
|
38
|
+
"plates": ["suit-wear"]
|
|
34
39
|
},
|
|
35
40
|
"governance": {
|
|
36
|
-
"files": ["src/governance/governance-service.ts"]
|
|
41
|
+
"files": ["src/governance/governance-service.ts"],
|
|
42
|
+
"skills": ".agents/skills/governance/SKILL.md"
|
|
37
43
|
},
|
|
38
44
|
"memory-recall": {
|
|
39
|
-
"files": ["src/integrations/hooks/plates.cjs"]
|
|
45
|
+
"files": ["src/integrations/hooks/plates.cjs"],
|
|
46
|
+
"skills": ".agents/skills/memory-recall/SKILL.md",
|
|
47
|
+
"plates": ["record-map"]
|
|
40
48
|
},
|
|
41
49
|
"orchestration": {
|
|
42
|
-
"files": ["src/mcps/orchestrator/server.ts"]
|
|
50
|
+
"files": ["src/mcps/orchestrator/server.ts"],
|
|
51
|
+
"skills": ".agents/skills/orchestration/SKILL.md",
|
|
52
|
+
"plates": ["routing", "processor"]
|
|
43
53
|
},
|
|
44
54
|
"processor": {
|
|
45
55
|
"files": ["src/processors/processor-manager.ts"],
|
|
46
|
-
"skills": "src/skills/processor-pipeline/SKILL.md"
|
|
56
|
+
"skills": "src/skills/processor-pipeline/SKILL.md",
|
|
57
|
+
"plates": ["orchestration"]
|
|
47
58
|
},
|
|
48
59
|
"reporting": {
|
|
49
|
-
"files": ["src/reporting/framework-reporting-system.ts"]
|
|
60
|
+
"files": ["src/reporting/framework-reporting-system.ts"],
|
|
61
|
+
"skills": ".agents/skills/reporting/SKILL.md",
|
|
62
|
+
"plates": ["activity-log", "suit-organs"]
|
|
63
|
+
},
|
|
64
|
+
"stamp-plate": {
|
|
65
|
+
"files": [".agents/skills/stamp-plate/SKILL.md"],
|
|
66
|
+
"mark": "Stamp a plate or a lens",
|
|
67
|
+
"skills": ".agents/skills/stamp-plate/SKILL.md",
|
|
68
|
+
"plates": ["review"]
|
|
69
|
+
},
|
|
70
|
+
"record-map": {
|
|
71
|
+
"files": ["docs-site/docs/plates/record-map.md"],
|
|
72
|
+
"skills": ".agents/skills/record-map/SKILL.md",
|
|
73
|
+
"plates": ["station-card", "notes-page", "reflection-page", "site-manual", "package-face", "write-home", "activity-log", "session-capture", "lens-page"]
|
|
74
|
+
},
|
|
75
|
+
"write-home": {
|
|
76
|
+
"files": ["src/integrations/hooks/write-home.cjs"],
|
|
77
|
+
"mark": "function activityLog",
|
|
78
|
+
"skills": ".agents/skills/write-home/SKILL.md",
|
|
79
|
+
"plates": ["activity-log", "session-capture", "inference-files", "trail-state", "suit-wear"]
|
|
80
|
+
},
|
|
81
|
+
"activity-log": {
|
|
82
|
+
"files": ["src/core/activity-logger.ts"],
|
|
83
|
+
"mark": "activity.log",
|
|
84
|
+
"skills": ".agents/skills/activity-log/SKILL.md",
|
|
85
|
+
"plates": ["write-home", "reporting", "suit-organs"]
|
|
86
|
+
},
|
|
87
|
+
"session-capture": {
|
|
88
|
+
"files": ["src/inference/session-capture.ts"],
|
|
89
|
+
"mark": "saveSessionInference",
|
|
90
|
+
"skills": ".agents/skills/session-capture/SKILL.md",
|
|
91
|
+
"plates": ["write-home", "inference-files", "suit-organs"]
|
|
92
|
+
},
|
|
93
|
+
"suit-wear": {
|
|
94
|
+
"files": ["src/core/features-config.ts"],
|
|
95
|
+
"mark": "log_path",
|
|
96
|
+
"skills": ".agents/skills/suit-wear/SKILL.md",
|
|
97
|
+
"plates": ["suit-settings", "write-home", "package-face"]
|
|
98
|
+
},
|
|
99
|
+
"suit-organs": {
|
|
100
|
+
"files": ["src/reporting/framework-reporting-system.ts"],
|
|
101
|
+
"mark": "activity.log",
|
|
102
|
+
"skills": ".agents/skills/suit-organs/SKILL.md",
|
|
103
|
+
"plates": ["activity-log", "session-capture", "inference-files", "trail-state"]
|
|
104
|
+
},
|
|
105
|
+
"station-card": {
|
|
106
|
+
"files": ["src/integrations/hooks/station-hook-runtime.cjs"],
|
|
107
|
+
"mark": "formatStationMarkdown",
|
|
108
|
+
"skills": ".agents/skills/station-card/SKILL.md",
|
|
109
|
+
"plates": ["notes-page", "record-map", "kept-line"]
|
|
110
|
+
},
|
|
111
|
+
"notes-page": {
|
|
112
|
+
"files": ["src/integrations/hooks/station-hook-runtime.cjs"],
|
|
113
|
+
"mark": "stampNotesPickup",
|
|
114
|
+
"skills": ".agents/skills/notes-page/SKILL.md",
|
|
115
|
+
"plates": ["station-card", "record-map"]
|
|
116
|
+
},
|
|
117
|
+
"reflection-page": {
|
|
118
|
+
"files": ["src/inference/inference-accumulator.ts"],
|
|
119
|
+
"mark": "loadReflectionInferences",
|
|
120
|
+
"skills": ".agents/skills/reflection-page/SKILL.md",
|
|
121
|
+
"plates": ["record-map"]
|
|
122
|
+
},
|
|
123
|
+
"site-manual": {
|
|
124
|
+
"files": ["docs-site/docs/introduction.md"],
|
|
125
|
+
"mark": "survives the context window",
|
|
126
|
+
"skills": ".agents/skills/site-manual/SKILL.md",
|
|
127
|
+
"plates": ["record-map"]
|
|
128
|
+
},
|
|
129
|
+
"package-face": {
|
|
130
|
+
"files": ["package.json"],
|
|
131
|
+
"mark": "\"name\": \"0xray\"",
|
|
132
|
+
"skills": ".agents/skills/package-face/SKILL.md",
|
|
133
|
+
"plates": ["record-map", "suit-wear"]
|
|
134
|
+
},
|
|
135
|
+
"suit-settings": {
|
|
136
|
+
"files": ["xray/features.json"],
|
|
137
|
+
"mark": "log_path",
|
|
138
|
+
"skills": ".agents/skills/suit-settings/SKILL.md",
|
|
139
|
+
"plates": ["suit-wear", "record-map"]
|
|
140
|
+
},
|
|
141
|
+
"trail-state": {
|
|
142
|
+
"files": ["src/integrations/hooks/station-hook-runtime.cjs"],
|
|
143
|
+
"mark": "session-boot.json",
|
|
144
|
+
"skills": ".agents/skills/trail-state/SKILL.md",
|
|
145
|
+
"plates": ["write-home", "suit-organs"]
|
|
146
|
+
},
|
|
147
|
+
"inference-files": {
|
|
148
|
+
"files": ["src/inference/inference-accumulator.ts"],
|
|
149
|
+
"mark": "loadSessionInferences",
|
|
150
|
+
"skills": ".agents/skills/inference-files/SKILL.md",
|
|
151
|
+
"plates": ["session-capture", "write-home", "suit-organs"]
|
|
152
|
+
},
|
|
153
|
+
"grok-compact": {
|
|
154
|
+
"files": ["src/integrations/grok/hooks/session-start.js"],
|
|
155
|
+
"mark": "pre_compact",
|
|
156
|
+
"skills": ".agents/skills/grok-compact/SKILL.md",
|
|
157
|
+
"plates": ["payload-heat", "cursor-compact", "work-fresh"]
|
|
158
|
+
},
|
|
159
|
+
"payload-heat": {
|
|
160
|
+
"files": ["src/integrations/grok/hooks/grok-hook-utils.js"],
|
|
161
|
+
"mark": "function buildSessionBootPayload",
|
|
162
|
+
"skills": ".agents/skills/payload-heat/SKILL.md",
|
|
163
|
+
"plates": ["station-heat", "pickup-stamp"]
|
|
164
|
+
},
|
|
165
|
+
"station-heat": {
|
|
166
|
+
"files": ["src/integrations/hooks/station-hook-runtime.cjs"],
|
|
167
|
+
"mark": "function applyStationHeat",
|
|
168
|
+
"skills": ".agents/skills/station-heat/SKILL.md",
|
|
169
|
+
"plates": ["pickup-stamp", "notes-page"]
|
|
170
|
+
},
|
|
171
|
+
"pickup-stamp": {
|
|
172
|
+
"files": ["src/integrations/hooks/station-hook-runtime.cjs"],
|
|
173
|
+
"mark": "One pickup line",
|
|
174
|
+
"skills": ".agents/skills/pickup-stamp/SKILL.md",
|
|
175
|
+
"plates": ["notes-page"]
|
|
176
|
+
},
|
|
177
|
+
"cursor-compact": {
|
|
178
|
+
"files": ["src/integrations/cursor/hooks/pre-compact.js"],
|
|
179
|
+
"mark": "cannot block",
|
|
180
|
+
"skills": ".agents/skills/cursor-compact/SKILL.md",
|
|
181
|
+
"plates": ["payload-heat", "station-heat"]
|
|
182
|
+
}
|
|
183
|
+
,
|
|
184
|
+
"work-fresh": {
|
|
185
|
+
"files": ["src/nucleus/work-freshness.mjs"],
|
|
186
|
+
"mark": "export function refreshFreshness",
|
|
187
|
+
"skills": ".agents/skills/work-fresh/SKILL.md",
|
|
188
|
+
"plates": ["station-card", "grok-compact"]
|
|
189
|
+
},
|
|
190
|
+
"kept-line": {
|
|
191
|
+
"files": ["src/integrations/hooks/station-hook-runtime.cjs"],
|
|
192
|
+
"mark": "function withOneFreshLine",
|
|
193
|
+
"skills": ".agents/skills/kept-line/SKILL.md",
|
|
194
|
+
"plates": ["station-card", "work-fresh"]
|
|
195
|
+
},
|
|
196
|
+
"lens-gate": {
|
|
197
|
+
"files": ["src/integrations/hooks/goggles-pipeline.mjs"],
|
|
198
|
+
"mark": "export function lensBeforeResearch",
|
|
199
|
+
"skills": ".agents/skills/lens-gate/SKILL.md",
|
|
200
|
+
"plates": ["pre-tool"]
|
|
201
|
+
},
|
|
202
|
+
"pre-tool": {
|
|
203
|
+
"files": ["src/integrations/grok/hooks/pre-tool-use.js"],
|
|
204
|
+
"mark": "function extractFromEvent",
|
|
205
|
+
"skills": ".agents/skills/pre-tool/SKILL.md",
|
|
206
|
+
"plates": ["lens-gate"]
|
|
207
|
+
},
|
|
208
|
+
"lens-page": {
|
|
209
|
+
"files": ["src/integrations/hooks/goggles-pipeline.mjs"],
|
|
210
|
+
"mark": "export function formatCardPane",
|
|
211
|
+
"skills": ".agents/skills/lens-page/SKILL.md",
|
|
212
|
+
"plates": ["record-map", "lens-gate"]
|
|
50
213
|
}
|
|
51
214
|
}
|
|
215
|
+
|
|
@@ -14,12 +14,38 @@ const PLATE_IDS = Object.freeze([
|
|
|
14
14
|
"processor",
|
|
15
15
|
"reporting",
|
|
16
16
|
"memory-recall",
|
|
17
|
+
"stamp-plate",
|
|
17
18
|
"house",
|
|
19
|
+
"review",
|
|
18
20
|
"goggles",
|
|
19
21
|
"suit",
|
|
20
22
|
"kits",
|
|
21
23
|
"host-pack",
|
|
22
24
|
"glossary",
|
|
25
|
+
"record-map",
|
|
26
|
+
"write-home",
|
|
27
|
+
"activity-log",
|
|
28
|
+
"session-capture",
|
|
29
|
+
"suit-wear",
|
|
30
|
+
"suit-organs",
|
|
31
|
+
"station-card",
|
|
32
|
+
"notes-page",
|
|
33
|
+
"reflection-page",
|
|
34
|
+
"site-manual",
|
|
35
|
+
"package-face",
|
|
36
|
+
"suit-settings",
|
|
37
|
+
"trail-state",
|
|
38
|
+
"inference-files",
|
|
39
|
+
"grok-compact",
|
|
40
|
+
"payload-heat",
|
|
41
|
+
"station-heat",
|
|
42
|
+
"pickup-stamp",
|
|
43
|
+
"cursor-compact",
|
|
44
|
+
"work-fresh",
|
|
45
|
+
"kept-line",
|
|
46
|
+
"lens-gate",
|
|
47
|
+
"pre-tool",
|
|
48
|
+
"lens-page",
|
|
23
49
|
]);
|
|
24
50
|
|
|
25
51
|
/** Id token, then extra phrases. Equal top scores recall nothing. */
|
|
@@ -73,6 +99,13 @@ const CUES = {
|
|
|
73
99
|
[/GROK_BOT_HOUSE/i, 4],
|
|
74
100
|
[/setup-house/i, 4],
|
|
75
101
|
],
|
|
102
|
+
review: [
|
|
103
|
+
[/review plate/i, 6],
|
|
104
|
+
[/plates\/review\b/i, 6],
|
|
105
|
+
[/re-review/i, 5],
|
|
106
|
+
[/critic\s+FAIL/i, 5],
|
|
107
|
+
[/critic\s+PASS/i, 5],
|
|
108
|
+
],
|
|
76
109
|
goggles: [
|
|
77
110
|
[/\bgoggles\b/i, 6],
|
|
78
111
|
],
|
|
@@ -91,6 +124,111 @@ const CUES = {
|
|
|
91
124
|
glossary: [
|
|
92
125
|
[/\bglossary\b/i, 6],
|
|
93
126
|
],
|
|
127
|
+
"stamp-plate": [
|
|
128
|
+
[/stamp plate/i, 6],
|
|
129
|
+
[/plates\/stamp-plate/i, 6],
|
|
130
|
+
],
|
|
131
|
+
"record-map": [
|
|
132
|
+
[/record map/i, 6],
|
|
133
|
+
[/five pages the agent/i, 6],
|
|
134
|
+
[/plates\/record-map/i, 6],
|
|
135
|
+
],
|
|
136
|
+
"write-home": [
|
|
137
|
+
[/write home/i, 6],
|
|
138
|
+
[/\.xray\/logs/i, 6],
|
|
139
|
+
[/plates\/write-home/i, 6],
|
|
140
|
+
],
|
|
141
|
+
"activity-log": [
|
|
142
|
+
[/activity log pipeline/i, 6],
|
|
143
|
+
[/plates\/activity-log/i, 6],
|
|
144
|
+
],
|
|
145
|
+
"session-capture": [
|
|
146
|
+
[/session capture/i, 6],
|
|
147
|
+
[/latest-session\.json/i, 5],
|
|
148
|
+
[/plates\/session-capture/i, 6],
|
|
149
|
+
],
|
|
150
|
+
"suit-wear": [
|
|
151
|
+
[/suit wear/i, 6],
|
|
152
|
+
[/consumer gitignore/i, 5],
|
|
153
|
+
[/plates\/suit-wear/i, 6],
|
|
154
|
+
],
|
|
155
|
+
"suit-organs": [
|
|
156
|
+
[/suit organs/i, 6],
|
|
157
|
+
[/plates\/suit-organs/i, 6],
|
|
158
|
+
],
|
|
159
|
+
"station-card": [
|
|
160
|
+
[/station card/i, 6],
|
|
161
|
+
[/plates\/station-card/i, 6],
|
|
162
|
+
],
|
|
163
|
+
"notes-page": [
|
|
164
|
+
[/notes page/i, 6],
|
|
165
|
+
[/plates\/notes-page/i, 6],
|
|
166
|
+
],
|
|
167
|
+
"reflection-page": [
|
|
168
|
+
[/reflection page/i, 6],
|
|
169
|
+
[/plates\/reflection-page/i, 6],
|
|
170
|
+
],
|
|
171
|
+
"site-manual": [
|
|
172
|
+
[/site manual/i, 6],
|
|
173
|
+
[/plates\/site-manual/i, 6],
|
|
174
|
+
],
|
|
175
|
+
"package-face": [
|
|
176
|
+
[/package face/i, 6],
|
|
177
|
+
[/plates\/package-face/i, 6],
|
|
178
|
+
],
|
|
179
|
+
"suit-settings": [
|
|
180
|
+
[/suit settings/i, 6],
|
|
181
|
+
[/plates\/suit-settings/i, 6],
|
|
182
|
+
],
|
|
183
|
+
"trail-state": [
|
|
184
|
+
[/trail state/i, 6],
|
|
185
|
+
[/plates\/trail-state/i, 6],
|
|
186
|
+
],
|
|
187
|
+
"inference-files": [
|
|
188
|
+
[/inference files/i, 6],
|
|
189
|
+
[/plates\/inference-files/i, 6],
|
|
190
|
+
],
|
|
191
|
+
"grok-compact": [
|
|
192
|
+
[/grok compact/i, 6],
|
|
193
|
+
[/plates\/grok-compact/i, 6],
|
|
194
|
+
],
|
|
195
|
+
"payload-heat": [
|
|
196
|
+
[/payload heat/i, 6],
|
|
197
|
+
[/plates\/payload-heat/i, 6],
|
|
198
|
+
],
|
|
199
|
+
"station-heat": [
|
|
200
|
+
[/station heat/i, 6],
|
|
201
|
+
[/plates\/station-heat/i, 6],
|
|
202
|
+
],
|
|
203
|
+
"pickup-stamp": [
|
|
204
|
+
[/pickup stamp/i, 6],
|
|
205
|
+
[/plates\/pickup-stamp/i, 6],
|
|
206
|
+
],
|
|
207
|
+
"cursor-compact": [
|
|
208
|
+
[/cursor compact/i, 6],
|
|
209
|
+
[/plates\/cursor-compact/i, 6],
|
|
210
|
+
],
|
|
211
|
+
"work-fresh": [
|
|
212
|
+
[/work fresh/i, 6],
|
|
213
|
+
[/freshness line/i, 6],
|
|
214
|
+
[/plates\/work-fresh/i, 6],
|
|
215
|
+
],
|
|
216
|
+
"kept-line": [
|
|
217
|
+
[/kept line/i, 6],
|
|
218
|
+
[/plates\/kept-line/i, 6],
|
|
219
|
+
],
|
|
220
|
+
"lens-gate": [
|
|
221
|
+
[/lens gate/i, 6],
|
|
222
|
+
[/plates\/lens-gate/i, 6],
|
|
223
|
+
],
|
|
224
|
+
"pre-tool": [
|
|
225
|
+
[/pre tool/i, 6],
|
|
226
|
+
[/plates\/pre-tool/i, 6],
|
|
227
|
+
],
|
|
228
|
+
"lens-page": [
|
|
229
|
+
[/lens page/i, 6],
|
|
230
|
+
[/plates\/lens-page/i, 6],
|
|
231
|
+
],
|
|
94
232
|
};
|
|
95
233
|
|
|
96
234
|
function platesDir() {
|
|
@@ -526,6 +526,19 @@ function stampNotesPickup(root, line) {
|
|
|
526
526
|
return text;
|
|
527
527
|
}
|
|
528
528
|
|
|
529
|
+
function notesMark(root) {
|
|
530
|
+
let body = "";
|
|
531
|
+
const dest = notesPath(root);
|
|
532
|
+
if (existsSync(dest)) {
|
|
533
|
+
try {
|
|
534
|
+
body = readFileSync(dest, "utf8");
|
|
535
|
+
} catch {
|
|
536
|
+
body = "";
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
return /^## Working notes\b/m.test(body) ? "Notes: present" : "Notes: THIN";
|
|
540
|
+
}
|
|
541
|
+
|
|
529
542
|
function readLatestSessionApproaches(root) {
|
|
530
543
|
const latest = join(root, "docs", "inference", "latest-session.json");
|
|
531
544
|
if (!existsSync(latest)) return null;
|
|
@@ -995,9 +1008,13 @@ function applyStationHeat(root, host, extra = {}, existing = {}) {
|
|
|
995
1008
|
const resolved = resolveHeatIntent(root, extra, existing);
|
|
996
1009
|
const intent = resolved.intent;
|
|
997
1010
|
const rematch = resolved.rematch;
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
if (
|
|
1011
|
+
let notesLine = null;
|
|
1012
|
+
if (isCompactHook(extra)) {
|
|
1013
|
+
if (intent && (readStationTicketField(root, "Intent") || pickup || clipIntent(extra.intent))) {
|
|
1014
|
+
const stamped = stampNotesPickup(root, intent);
|
|
1015
|
+
if (stamped) pickup = stamped;
|
|
1016
|
+
}
|
|
1017
|
+
notesLine = notesMark(root);
|
|
1001
1018
|
}
|
|
1002
1019
|
const matchText = clipIntent([intent, pickup, approaches].filter(Boolean).join(" "));
|
|
1003
1020
|
const git = readGitBrief(root);
|
|
@@ -1089,6 +1106,7 @@ function applyStationHeat(root, host, extra = {}, existing = {}) {
|
|
|
1089
1106
|
repertoireResume,
|
|
1090
1107
|
workingLine,
|
|
1091
1108
|
stationLine,
|
|
1109
|
+
...(notesLine ? { notesLine } : {}),
|
|
1092
1110
|
...compactHold,
|
|
1093
1111
|
};
|
|
1094
1112
|
}
|
|
@@ -1099,9 +1117,12 @@ const STOCK_STATION_PREFIXES = [
|
|
|
1099
1117
|
"intent:",
|
|
1100
1118
|
"plan:",
|
|
1101
1119
|
"git:",
|
|
1120
|
+
"fresh:",
|
|
1102
1121
|
"repertoire:",
|
|
1103
1122
|
"working:",
|
|
1104
1123
|
"plate:",
|
|
1124
|
+
"library:",
|
|
1125
|
+
"notes:",
|
|
1105
1126
|
];
|
|
1106
1127
|
|
|
1107
1128
|
/** Stock design map. Exact lines so a later heat does not preserve a second copy. */
|
|
@@ -1222,10 +1243,45 @@ function extractPreservedStationLines(existing) {
|
|
|
1222
1243
|
return preserved;
|
|
1223
1244
|
}
|
|
1224
1245
|
|
|
1246
|
+
function latestFreshLine(existingMd) {
|
|
1247
|
+
const lines = String(existingMd || "").split(/\r?\n/).map((line) => line.trim()).filter((line) => /^Fresh:/.test(line));
|
|
1248
|
+
return lines.length ? lines[lines.length - 1] : "";
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
function withOneFreshLine(stockMd, existingMd) {
|
|
1252
|
+
const stock = String(stockMd || "");
|
|
1253
|
+
if (/^Fresh:/m.test(stock)) return stock;
|
|
1254
|
+
const fresh = latestFreshLine(existingMd);
|
|
1255
|
+
if (!fresh) return stock;
|
|
1256
|
+
const rows = stock.split(/\r?\n/);
|
|
1257
|
+
const at = rows.findIndex((row) => row.startsWith("Repertoire:"));
|
|
1258
|
+
if (at >= 0) rows.splice(at, 0, fresh);
|
|
1259
|
+
else rows.splice(Math.min(rows.length, 6), 0, fresh);
|
|
1260
|
+
return rows.join("\n");
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
function latestNotesLine(existingMd) {
|
|
1264
|
+
const lines = String(existingMd || "").split(/\r?\n/).map((line) => line.trim()).filter((line) => /^Notes:/.test(line));
|
|
1265
|
+
return lines.length ? lines[lines.length - 1] : "";
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
function withOneNotesLine(stockMd, existingMd) {
|
|
1269
|
+
const stock = String(stockMd || "");
|
|
1270
|
+
if (/^Notes:/m.test(stock)) return stock;
|
|
1271
|
+
const notes = latestNotesLine(existingMd);
|
|
1272
|
+
if (!notes) return stock;
|
|
1273
|
+
const rows = stock.split(/\r?\n/);
|
|
1274
|
+
const at = rows.findIndex((row) => row.startsWith("Library:"));
|
|
1275
|
+
if (at >= 0) rows.splice(at + 1, 0, notes);
|
|
1276
|
+
else rows.splice(Math.min(rows.length, 8), 0, notes);
|
|
1277
|
+
return rows.join("\n");
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1225
1280
|
function mergeStationMarkdown(stockMd, existingMd) {
|
|
1281
|
+
const stockWithFresh = withOneNotesLine(withOneFreshLine(stockMd, existingMd), existingMd);
|
|
1226
1282
|
const preserved = extractPreservedStationLines(existingMd);
|
|
1227
|
-
if (!preserved.length) return
|
|
1228
|
-
const stock =
|
|
1283
|
+
if (!preserved.length) return stockWithFresh;
|
|
1284
|
+
const stock = stockWithFresh;
|
|
1229
1285
|
const block = preserved.join("\n");
|
|
1230
1286
|
const marker = "Continue this card.";
|
|
1231
1287
|
const idx = stock.indexOf(marker);
|
|
@@ -1261,6 +1317,8 @@ function formatStationMarkdown(fields) {
|
|
|
1261
1317
|
}
|
|
1262
1318
|
const plateLine = plateStockLine(fields.intent);
|
|
1263
1319
|
if (plateLine) lines.push(plateLine);
|
|
1320
|
+
lines.push("Library: record-map — .agents/skills/record-map/SKILL.md");
|
|
1321
|
+
if (fields.notesLine) lines.push(fields.notesLine);
|
|
1264
1322
|
lines.push("");
|
|
1265
1323
|
lines.push(...DESIGN_MAP_LINES);
|
|
1266
1324
|
lines.push("");
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the suit writes. One home, under .xray.
|
|
3
|
+
* Readers still open the old path when the new file is not there yet.
|
|
4
|
+
*/
|
|
5
|
+
const { existsSync } = require("fs");
|
|
6
|
+
const { join } = require("path");
|
|
7
|
+
|
|
8
|
+
function logsDir(root) {
|
|
9
|
+
return join(root, ".xray", "logs");
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function activityLog(root) {
|
|
13
|
+
return join(logsDir(root), "activity.log");
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function inferenceDir(root) {
|
|
17
|
+
return join(root, ".xray", "inference");
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function latestSession(root) {
|
|
21
|
+
return join(inferenceDir(root), "latest-session.json");
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function activityLogForRead(root) {
|
|
25
|
+
const next = activityLog(root);
|
|
26
|
+
const prev = join(root, "logs", "framework", "activity.log");
|
|
27
|
+
if (existsSync(next) || !existsSync(prev)) return next;
|
|
28
|
+
return prev;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function latestSessionForRead(root) {
|
|
32
|
+
const next = latestSession(root);
|
|
33
|
+
const prev = join(root, "docs", "inference", "latest-session.json");
|
|
34
|
+
if (existsSync(next) || !existsSync(prev)) return next;
|
|
35
|
+
return prev;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Old feature values that used to scatter writes. */
|
|
39
|
+
function isLegacyLogPath(logPath) {
|
|
40
|
+
if (!logPath) return true;
|
|
41
|
+
const normalized = String(logPath).replace(/\\/g, "/").replace(/\/$/, "");
|
|
42
|
+
return (
|
|
43
|
+
normalized === ".opencode/logs" ||
|
|
44
|
+
normalized === ".opencode" ||
|
|
45
|
+
normalized === "logs" ||
|
|
46
|
+
normalized === "logs/framework" ||
|
|
47
|
+
normalized.endsWith("/logs/framework")
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
module.exports = {
|
|
52
|
+
logsDir,
|
|
53
|
+
activityLog,
|
|
54
|
+
inferenceDir,
|
|
55
|
+
latestSession,
|
|
56
|
+
activityLogForRead,
|
|
57
|
+
latestSessionForRead,
|
|
58
|
+
isLegacyLogPath,
|
|
59
|
+
};
|
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
* Provides contextual analysis capabilities via MCP protocol
|
|
6
6
|
*/
|
|
7
7
|
import { XrayKnowledgeSkillBase } from "./shared/knowledge-skill-base.js";
|
|
8
|
+
export declare function renderArchitectureAssessment(args: Record<string, unknown> | undefined): Promise<{
|
|
9
|
+
content: Array<{
|
|
10
|
+
type: "text";
|
|
11
|
+
text: string;
|
|
12
|
+
}>;
|
|
13
|
+
}>;
|
|
8
14
|
declare class XrayArchitectToolsServer extends XrayKnowledgeSkillBase {
|
|
9
15
|
constructor();
|
|
10
16
|
setupToolHandlers(): void;
|
|
@@ -8,7 +8,24 @@ import { CallToolRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
|
8
8
|
import { XrayKnowledgeSkillBase } from "./shared/knowledge-skill-base.js";
|
|
9
9
|
import * as fs from "fs";
|
|
10
10
|
import { frameworkLogger } from "../core/framework-logger.js";
|
|
11
|
-
import { contextAnalysis as architectContextAnalysis, codebaseStructure as architectCodebaseStructure, dependencyAnalysis as architectDependencyAnalysis, architectureAssessment as architectArchitectureAssessment, } from "../architect/architect-tools.js";
|
|
11
|
+
import { contextAnalysis as architectContextAnalysis, codebaseStructure as architectCodebaseStructure, dependencyAnalysis as architectDependencyAnalysis, architectureAssessment as architectArchitectureAssessment, formatConferArchitectureText, } from "../architect/architect-tools.js";
|
|
12
|
+
export async function renderArchitectureAssessment(args) {
|
|
13
|
+
const projectRoot = typeof args?.projectRoot === "string" ? args.projectRoot : "";
|
|
14
|
+
const assessmentType = args?.assessmentType === "quick" || args?.assessmentType === "comprehensive"
|
|
15
|
+
? args.assessmentType
|
|
16
|
+
: "comprehensive";
|
|
17
|
+
const conferPrompt = typeof args?.conferPrompt === "string" ? args.conferPrompt : "";
|
|
18
|
+
frameworkLogger.log("mcps/architect-tools", "architecture-assessment", "info", { projectRoot });
|
|
19
|
+
const result = await architectArchitectureAssessment(projectRoot, assessmentType);
|
|
20
|
+
return {
|
|
21
|
+
content: [
|
|
22
|
+
{
|
|
23
|
+
type: "text",
|
|
24
|
+
text: formatConferArchitectureText(conferPrompt, result),
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
};
|
|
28
|
+
}
|
|
12
29
|
class XrayArchitectToolsServer extends XrayKnowledgeSkillBase {
|
|
13
30
|
constructor() {
|
|
14
31
|
super("architect-tools", "3.1.0");
|
|
@@ -191,23 +208,7 @@ class XrayArchitectToolsServer extends XrayKnowledgeSkillBase {
|
|
|
191
208
|
};
|
|
192
209
|
}
|
|
193
210
|
async architectureAssessment(args) {
|
|
194
|
-
|
|
195
|
-
const assessmentType = args?.assessmentType || "comprehensive";
|
|
196
|
-
const conferPrompt = typeof args?.conferPrompt === "string" ? args.conferPrompt : "";
|
|
197
|
-
frameworkLogger.log("mcps/architect-tools", "architecture-assessment", "info", { projectRoot });
|
|
198
|
-
const result = await architectArchitectureAssessment(projectRoot, assessmentType);
|
|
199
|
-
const assessmentJson = JSON.stringify(result, null, 2);
|
|
200
|
-
const text = conferPrompt.trim()
|
|
201
|
-
? `${conferPrompt.trim()}\n\n## Architecture assessment\n${assessmentJson}\n\nVerdict: CONDITIONAL\nTop risks: review assessment metrics above\nHardening: address high-complexity or coupling findings before resuming`
|
|
202
|
-
: assessmentJson;
|
|
203
|
-
return {
|
|
204
|
-
content: [
|
|
205
|
-
{
|
|
206
|
-
type: "text",
|
|
207
|
-
text,
|
|
208
|
-
},
|
|
209
|
-
],
|
|
210
|
-
};
|
|
211
|
+
return renderArchitectureAssessment(args);
|
|
211
212
|
}
|
|
212
213
|
}
|
|
213
214
|
if (import.meta.url === `file://${fs.realpathSync(process.argv[1])}`) {
|
|
@@ -12,11 +12,12 @@ export declare class OrchestratorServer {
|
|
|
12
12
|
private server;
|
|
13
13
|
private activeTasks;
|
|
14
14
|
private taskHistory;
|
|
15
|
-
private
|
|
16
|
-
private
|
|
15
|
+
private taskHandlerPromise;
|
|
16
|
+
private complexityHandlerPromise;
|
|
17
17
|
private statusHandler;
|
|
18
|
-
private coordinator;
|
|
19
18
|
constructor();
|
|
19
|
+
private loadTaskHandler;
|
|
20
|
+
private loadComplexityHandler;
|
|
20
21
|
/**
|
|
21
22
|
* Initialize tool definitions
|
|
22
23
|
*/
|