0xray 4.1.0 → 4.1.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/.gitignore.default +4 -1
- package/.grok-plugin/plugin.json +1 -1
- package/.opencode/skills/orchestrator/SKILL.md +1 -7
- package/.xray/features.json +4 -1
- package/.xray/features.schema.json +8 -0
- package/AGENTS-consumer.md +1 -1
- package/AGENTS.md +2 -2
- package/README.md +2 -2
- package/dist/.gitignore.default +4 -1
- package/dist/AGENTS.md +2 -2
- package/dist/CHANGELOG.md +27 -1
- package/dist/README.md +2 -2
- package/dist/cli/commands/opencode-install.js +3 -9
- package/dist/cli/commands/skill-install.js +10 -5
- package/dist/cli/goggles-status.d.ts +2 -5
- package/dist/cli/goggles-status.js +5 -53
- package/dist/cli/index.js +2 -2
- package/dist/enforcement/enforcer-tools.d.ts +1 -1
- package/dist/enforcement/enforcer-tools.js +1 -1
- package/dist/integrations/cursor/README.md +1 -1
- package/dist/integrations/cursor/hooks/pre-tool-use.js +4 -0
- package/dist/integrations/grok/grok-cli.js +5 -7
- package/dist/integrations/grok/hooks/grok-hook-utils.js +4 -1
- package/dist/integrations/grok/hooks/pre-tool-use.js +4 -18
- package/dist/integrations/grok/hooks/session-start.js +4 -2
- package/dist/integrations/hermes-agent/bridge.mjs +4 -1
- package/dist/integrations/hooks/goggles-mcp.mjs +20 -196
- package/dist/integrations/hooks/goggles-pipeline.mjs +606 -616
- package/dist/integrations/hooks/goggles-planes.json +88 -40
- package/dist/integrations/hooks/plates.cjs +84 -0
- package/dist/integrations/hooks/pre-tool-speak.mjs +2 -4
- package/dist/integrations/hooks/skill-seek.mjs +115 -0
- package/dist/integrations/hooks/station-hook-runtime.cjs +4 -1
- package/dist/integrations/openclaw/hooks/pre-tool-gate-runtime.mjs +4 -4
- package/dist/integrations/openclaw/plugin/xray-pre-tool/index.js +10 -1
- package/dist/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
- package/dist/memory-routing/plates.d.ts +1 -1
- package/dist/memory-routing/plates.js +14 -0
- package/dist/nucleus/thin-dispatch.d.ts +1 -1
- package/dist/nucleus/thin-dispatch.js +1 -1
- package/dist/nucleus/work-freshness.mjs +10 -0
- package/dist/plugin/xray-codex-injection.js +3 -1
- package/dist/skills/orchestrator/SKILL.md +1 -7
- package/docs-site/docs/plates/asides.md +35 -0
- package/docs-site/docs/plates/confer.md +35 -0
- package/docs-site/docs/plates/consumer-mcp.md +35 -0
- package/docs-site/docs/plates/delegation-gate.md +35 -0
- package/docs-site/docs/plates/dynamo.md +35 -0
- package/docs-site/docs/plates/foundry.md +35 -0
- package/docs-site/docs/plates/goggles.md +8 -8
- package/docs-site/docs/plates/ground.md +35 -0
- package/docs-site/docs/plates/hermes.md +35 -0
- package/docs-site/docs/plates/index.md +12 -5
- package/docs-site/docs/plates/inference-cycle.md +35 -0
- package/docs-site/docs/plates/lens-gate.md +6 -6
- package/docs-site/docs/plates/openclaw.md +35 -0
- package/docs-site/docs/plates/opencode.md +35 -0
- package/docs-site/docs/plates/repertoire.md +35 -0
- package/docs-site/docs/plates/synthesis.md +35 -0
- package/docs-site/docs/plates/temperament.md +35 -0
- package/docs-site/docs/plates/trail-state.md +1 -1
- package/package.json +1 -1
- package/scripts/foundry/README.md +3 -1
- package/scripts/foundry/mint-suit.cjs +120 -2
- package/scripts/foundry/plant/skills/mill/SKILL.md +1 -1
- package/scripts/foundry/reconcile-version.mjs +10 -3
- package/scripts/foundry/release.mjs +1 -1
- package/scripts/foundry/validate-release-docs.mjs +2 -2
- package/scripts/foundry/version-manager.mjs +12 -4
- package/scripts/node/install-bridges.cjs +63 -34
- package/scripts/node/pack-tmp-suit-proof.mjs +23 -4
- package/src/integrations/openclaw/plugin/xray-pre-tool/index.js +10 -1
- package/src/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
- package/src/skills/orchestrator/SKILL.md +1 -7
- package/xray/features.json +4 -1
- package/xray/features.schema.json +8 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"actuality": "map vs worn",
|
|
3
2
|
"planes": ["dichotomy", "syncopate", "synthesis", "digest", "triage", "loop"],
|
|
4
3
|
"scope": ["ecosystem", "part", "one flow", "one artifact"],
|
|
5
4
|
"ground": {
|
|
@@ -11,13 +10,13 @@
|
|
|
11
10
|
"src/opencode/agents",
|
|
12
11
|
"AGENTS.md",
|
|
13
12
|
"src/integrations",
|
|
14
|
-
"package.json"
|
|
15
|
-
"scripts/foundry"
|
|
13
|
+
"package.json"
|
|
16
14
|
],
|
|
17
|
-
"skills": "
|
|
15
|
+
"skills": "orchestrator, researcher, project-analysis, git-workflow, tech-writer"
|
|
18
16
|
},
|
|
19
17
|
"synthesis": {
|
|
20
|
-
"file": "src/nucleus/synthesis.ts"
|
|
18
|
+
"file": "src/nucleus/synthesis.ts",
|
|
19
|
+
"skills": "synthesis, confer, inference-cycle, temperament"
|
|
21
20
|
},
|
|
22
21
|
"routing": {
|
|
23
22
|
"files": ["src/nucleus/thin-dispatch.ts"],
|
|
@@ -25,17 +24,17 @@
|
|
|
25
24
|
"mark": "export function scoreAndRoute",
|
|
26
25
|
"wornMark": "function scoreAndRoute",
|
|
27
26
|
"pick": "resolveThinDispatch",
|
|
28
|
-
"skills": "
|
|
27
|
+
"skills": "routing, orchestration, processor-pipeline, delegation-gate",
|
|
29
28
|
"plates": ["orchestration", "processor"]
|
|
30
29
|
},
|
|
31
30
|
"house": {
|
|
32
31
|
"files": ["grok-bot/lib/seat-doctor.cjs", "grok-bot/templates/house/fleet/WAKE-ROUTINE.md", "grok-bot/templates/house/HOUSE.md", "src/__tests__/unit/grok-bot-house-template.test.ts", "src/__tests__/unit/grok-bot-house-migrate.test.ts"],
|
|
33
|
-
"skills": "
|
|
32
|
+
"skills": "house, suit-wear, record-map, activity-log",
|
|
34
33
|
"plates": ["suit-wear"]
|
|
35
34
|
},
|
|
36
35
|
"boot": {
|
|
37
36
|
"files": ["src/core/boot-orchestrator.ts"],
|
|
38
|
-
"skills": "
|
|
37
|
+
"skills": "boot-orchestrator, suit-wear, hermes-agent, opencode",
|
|
39
38
|
"plates": ["suit-wear"]
|
|
40
39
|
},
|
|
41
40
|
"governance": {
|
|
@@ -43,183 +42,232 @@
|
|
|
43
42
|
"src/governance/governance-service.ts",
|
|
44
43
|
"src/governance/llm-governance-provider.ts"
|
|
45
44
|
],
|
|
46
|
-
"skills": "
|
|
45
|
+
"skills": "governance, enforcer, dynamo, confer"
|
|
47
46
|
},
|
|
48
47
|
"memory-recall": {
|
|
49
48
|
"files": ["src/integrations/hooks/plates.cjs", "src/__tests__/unit/plates.test.ts"],
|
|
50
|
-
"skills": "
|
|
49
|
+
"skills": "memory-recall, record-map, repertoire, station-card",
|
|
51
50
|
"plates": ["record-map"]
|
|
52
51
|
},
|
|
53
52
|
"orchestration": {
|
|
54
53
|
"files": ["src/mcps/orchestrator/server.ts"],
|
|
55
|
-
"skills": "
|
|
54
|
+
"skills": "orchestration, routing, processor-pipeline, strategist",
|
|
56
55
|
"plates": ["routing", "processor"]
|
|
57
56
|
},
|
|
58
57
|
"processor": {
|
|
59
58
|
"files": ["src/processors/processor-manager.ts"],
|
|
60
|
-
"skills": "
|
|
59
|
+
"skills": "processor-pipeline, orchestration, routing",
|
|
61
60
|
"plates": ["orchestration"]
|
|
62
61
|
},
|
|
63
62
|
"reporting": {
|
|
64
63
|
"files": ["src/reporting/framework-reporting-system.ts"],
|
|
65
|
-
"skills": "
|
|
64
|
+
"skills": "reporting, activity-log, suit-organs, write-home",
|
|
66
65
|
"plates": ["activity-log", "suit-organs"]
|
|
67
66
|
},
|
|
68
67
|
"stamp-plate": {
|
|
69
68
|
"files": [".agents/skills/stamp-plate/SKILL.md"],
|
|
70
69
|
"mark": "Stamp a plate or a lens",
|
|
71
|
-
"skills": "
|
|
70
|
+
"skills": "stamp-plate, lens-gate, record-map, site-manual",
|
|
72
71
|
"plates": ["review"]
|
|
73
72
|
},
|
|
74
73
|
"record-map": {
|
|
75
74
|
"files": ["docs-site/docs/plates/record-map.md", "src/integrations/hooks/wake-cascade.cjs", "src/integrations/hooks/session-note-index.cjs"],
|
|
76
|
-
"skills": "
|
|
75
|
+
"skills": "record-map, station-card, notes-page, reflection-page, site-manual",
|
|
77
76
|
"plates": ["station-card", "notes-page", "reflection-page", "site-manual", "package-face", "write-home", "activity-log", "session-capture", "lens-page"]
|
|
78
77
|
},
|
|
79
78
|
"write-home": {
|
|
80
79
|
"files": ["src/integrations/hooks/write-home.cjs"],
|
|
81
80
|
"mark": "function activityLog",
|
|
82
|
-
"skills": "
|
|
81
|
+
"skills": "write-home, activity-log, session-capture, inference-files, trail-state",
|
|
83
82
|
"plates": ["activity-log", "session-capture", "inference-files", "trail-state", "suit-wear"]
|
|
84
83
|
},
|
|
85
84
|
"activity-log": {
|
|
86
85
|
"files": ["src/core/activity-logger.ts"],
|
|
87
86
|
"mark": "activity.log",
|
|
88
|
-
"skills": "
|
|
87
|
+
"skills": "activity-log, write-home, reporting, suit-organs",
|
|
89
88
|
"plates": ["write-home", "reporting", "suit-organs"]
|
|
90
89
|
},
|
|
91
90
|
"session-capture": {
|
|
92
91
|
"files": ["src/inference/session-capture.ts"],
|
|
93
92
|
"mark": "saveSessionInference",
|
|
94
|
-
"skills": "
|
|
93
|
+
"skills": "session-capture, write-home, inference-files, suit-organs",
|
|
95
94
|
"plates": ["write-home", "inference-files", "suit-organs"]
|
|
96
95
|
},
|
|
97
96
|
"suit-wear": {
|
|
98
97
|
"files": ["src/core/features-config.ts", "scripts/node/install-bridges.cjs", "scripts/node/setup.cjs", "src/integrations/cursor/hooks/xray-cloud-hook.sh"],
|
|
99
98
|
"mark": "log_path",
|
|
100
|
-
"skills": "
|
|
99
|
+
"skills": "suit-wear, suit-settings, write-home, package-face",
|
|
101
100
|
"plates": ["suit-settings", "write-home", "package-face"]
|
|
102
101
|
},
|
|
103
102
|
"suit-organs": {
|
|
104
103
|
"files": ["src/reporting/framework-reporting-system.ts"],
|
|
105
104
|
"mark": "activity.log",
|
|
106
|
-
"skills": "
|
|
105
|
+
"skills": "suit-organs, activity-log, session-capture, inference-files, trail-state",
|
|
107
106
|
"plates": ["activity-log", "session-capture", "inference-files", "trail-state"]
|
|
108
107
|
},
|
|
109
108
|
"station-card": {
|
|
110
109
|
"files": ["src/integrations/hooks/station-hook-runtime.cjs", "src/integrations/hooks/wake-cascade.cjs"],
|
|
111
110
|
"mark": "formatStationMarkdown",
|
|
112
|
-
"skills": "
|
|
111
|
+
"skills": "station-card, notes-page, record-map, kept-line",
|
|
113
112
|
"plates": ["notes-page", "record-map", "kept-line"]
|
|
114
113
|
},
|
|
115
114
|
"notes-page": {
|
|
116
115
|
"files": ["src/integrations/hooks/station-hook-runtime.cjs", "src/integrations/hooks/session-note-index.cjs"],
|
|
117
116
|
"mark": "stampNotesPickup",
|
|
118
|
-
"skills": "
|
|
117
|
+
"skills": "notes-page, station-card, record-map, pickup-stamp",
|
|
119
118
|
"plates": ["station-card", "record-map"]
|
|
120
119
|
},
|
|
121
120
|
"reflection-page": {
|
|
122
121
|
"files": ["src/inference/inference-accumulator.ts"],
|
|
123
122
|
"mark": "loadReflectionInferences",
|
|
124
|
-
"skills": "
|
|
123
|
+
"skills": "reflection-page, record-map, inference-files, storyteller",
|
|
125
124
|
"plates": ["record-map"]
|
|
126
125
|
},
|
|
127
126
|
"site-manual": {
|
|
128
127
|
"files": ["docs-site/docs/introduction.md", "docs-site/docs/index.md", "docs-site/docs/full-reference.md", "docs-site/docs/guides/features-since-3.1.md"],
|
|
129
128
|
"mark": "survives the context window",
|
|
130
|
-
"skills": "
|
|
129
|
+
"skills": "site-manual, record-map, package-face, tech-writer",
|
|
131
130
|
"plates": ["record-map"]
|
|
132
131
|
},
|
|
133
132
|
"package-face": {
|
|
134
133
|
"files": ["package.json", "grok-bot/README.md", "grok-bot/llms.txt", "grok-bot/CHANGELOG.md", "src/cli/index.ts", "src/cli/commands/plugin-commands.ts", "src/__tests__/unit/plugin-commands.test.ts"],
|
|
135
134
|
"mark": "\"name\": \"0xray\"",
|
|
136
|
-
"skills": "
|
|
135
|
+
"skills": "package-face, record-map, suit-wear, tech-writer",
|
|
137
136
|
"plates": ["record-map", "suit-wear"]
|
|
138
137
|
},
|
|
139
138
|
"suit-settings": {
|
|
140
139
|
"files": ["xray/features.json"],
|
|
141
140
|
"mark": "log_path",
|
|
142
|
-
"skills": "
|
|
141
|
+
"skills": "suit-settings, suit-wear, record-map",
|
|
143
142
|
"plates": ["suit-wear", "record-map"]
|
|
144
143
|
},
|
|
145
144
|
"trail-state": {
|
|
146
145
|
"files": ["src/integrations/hooks/station-hook-runtime.cjs"],
|
|
147
146
|
"mark": "session-boot.json",
|
|
148
|
-
"skills": "
|
|
147
|
+
"skills": "trail-state, write-home, suit-organs, station-card",
|
|
149
148
|
"plates": ["write-home", "suit-organs"]
|
|
150
149
|
},
|
|
151
150
|
"inference-files": {
|
|
152
151
|
"files": ["src/inference/inference-accumulator.ts"],
|
|
153
152
|
"mark": "loadSessionInferences",
|
|
154
|
-
"skills": "
|
|
153
|
+
"skills": "inference-files, session-capture, write-home, suit-organs",
|
|
155
154
|
"plates": ["session-capture", "write-home", "suit-organs"]
|
|
156
155
|
},
|
|
157
156
|
"grok-compact": {
|
|
158
157
|
"files": ["src/integrations/grok/hooks/session-start.js"],
|
|
159
158
|
"mark": "pre_compact",
|
|
160
|
-
"skills": "
|
|
159
|
+
"skills": "grok-compact, payload-heat, cursor-compact, work-fresh",
|
|
161
160
|
"plates": ["payload-heat", "cursor-compact", "work-fresh"]
|
|
162
161
|
},
|
|
163
162
|
"payload-heat": {
|
|
164
163
|
"files": ["src/integrations/grok/hooks/grok-hook-utils.js"],
|
|
165
164
|
"mark": "function buildSessionBootPayload",
|
|
166
|
-
"skills": "
|
|
165
|
+
"skills": "payload-heat, station-heat, pickup-stamp, grok-compact",
|
|
167
166
|
"plates": ["station-heat", "pickup-stamp"]
|
|
168
167
|
},
|
|
169
168
|
"station-heat": {
|
|
170
169
|
"files": ["src/integrations/hooks/station-hook-runtime.cjs"],
|
|
171
170
|
"mark": "function applyStationHeat",
|
|
172
|
-
"skills": "
|
|
171
|
+
"skills": "station-heat, pickup-stamp, notes-page, station-card",
|
|
173
172
|
"plates": ["pickup-stamp", "notes-page"]
|
|
174
173
|
},
|
|
175
174
|
"pickup-stamp": {
|
|
176
175
|
"files": ["src/integrations/hooks/station-hook-runtime.cjs"],
|
|
177
176
|
"mark": "One pickup line",
|
|
178
|
-
"skills": "
|
|
177
|
+
"skills": "pickup-stamp, notes-page, station-heat",
|
|
179
178
|
"plates": ["notes-page"]
|
|
180
179
|
},
|
|
181
180
|
"cursor-compact": {
|
|
182
181
|
"files": ["src/integrations/cursor/hooks/pre-compact.js"],
|
|
183
182
|
"mark": "cannot block",
|
|
184
|
-
"skills": "
|
|
183
|
+
"skills": "cursor-compact, payload-heat, station-heat, grok-compact",
|
|
185
184
|
"plates": ["payload-heat", "station-heat"]
|
|
186
185
|
}
|
|
187
186
|
,
|
|
188
187
|
"work-fresh": {
|
|
189
188
|
"files": ["src/nucleus/work-freshness.mjs"],
|
|
190
189
|
"mark": "export function refreshFreshness",
|
|
191
|
-
"skills": "
|
|
190
|
+
"skills": "work-fresh, station-card, grok-compact, kept-line",
|
|
192
191
|
"plates": ["station-card", "grok-compact"]
|
|
193
192
|
},
|
|
194
193
|
"kept-line": {
|
|
195
194
|
"files": ["src/integrations/hooks/station-hook-runtime.cjs"],
|
|
196
195
|
"mark": "function withOneFreshLine",
|
|
197
|
-
"skills": "
|
|
196
|
+
"skills": "kept-line, station-card, work-fresh",
|
|
198
197
|
"plates": ["station-card", "work-fresh"]
|
|
199
198
|
},
|
|
200
199
|
"lens-gate": {
|
|
201
200
|
"files": ["src/integrations/hooks/goggles-pipeline.mjs", "src/__tests__/unit/goggles-pipeline.test.ts"],
|
|
202
201
|
"mark": "export function lensBeforeResearch",
|
|
203
|
-
"skills": "
|
|
202
|
+
"skills": "lens-gate, pre-tool, lens-page, stamp-plate",
|
|
204
203
|
"plates": ["pre-tool"]
|
|
205
204
|
},
|
|
206
205
|
"pre-tool": {
|
|
207
206
|
"files": ["src/integrations/grok/hooks/pre-tool-use.js"],
|
|
208
207
|
"mark": "function extractFromEvent",
|
|
209
|
-
"skills": "
|
|
208
|
+
"skills": "pre-tool, lens-gate, delegation-gate",
|
|
210
209
|
"plates": ["lens-gate"]
|
|
211
210
|
},
|
|
212
211
|
"lens-page": {
|
|
213
212
|
"files": ["src/integrations/hooks/goggles-pipeline.mjs"],
|
|
214
213
|
"mark": "export function formatCardPane",
|
|
215
|
-
"skills": "
|
|
214
|
+
"skills": "lens-page, record-map, lens-gate",
|
|
216
215
|
"plates": ["record-map", "lens-gate"]
|
|
217
216
|
},
|
|
218
217
|
"centrifuge": {
|
|
219
218
|
"files": ["src/integrations/hooks/station-hook-runtime.cjs"],
|
|
220
219
|
"mark": "function wakeOrder",
|
|
221
|
-
"skills": "
|
|
220
|
+
"skills": "centrifuge, station-card, inference-cycle",
|
|
222
221
|
"plates": ["station-card", "goggles"]
|
|
222
|
+
},
|
|
223
|
+
"repertoire": {
|
|
224
|
+
"file": "src/memory-routing",
|
|
225
|
+
"skills": "repertoire, memory-recall, record-map, governance"
|
|
226
|
+
},
|
|
227
|
+
"dynamo": {
|
|
228
|
+
"file": "docs-site/docs/guides/self-hosting-dynamo.md",
|
|
229
|
+
"skills": "dynamo, governance, enforcer, confer"
|
|
230
|
+
},
|
|
231
|
+
"foundry": {
|
|
232
|
+
"root": "scripts/foundry",
|
|
233
|
+
"file": "scripts/foundry/release.mjs",
|
|
234
|
+
"skills": "foundry, npm-publish, suit-wear, package-face, consumer-mcp"
|
|
235
|
+
},
|
|
236
|
+
"delegation-gate": {
|
|
237
|
+
"file": "src/nucleus/delegation-gate.ts",
|
|
238
|
+
"skills": "delegation-gate, temperament, orchestration, routing"
|
|
239
|
+
},
|
|
240
|
+
"temperament": {
|
|
241
|
+
"file": "src/nucleus/suit-temperament.ts",
|
|
242
|
+
"skills": "temperament, delegation-gate, confer, orchestrator"
|
|
243
|
+
},
|
|
244
|
+
"asides": {
|
|
245
|
+
"file": "src/nucleus/user-aside.ts",
|
|
246
|
+
"skills": "asides, orchestration, station-card, record-map"
|
|
247
|
+
},
|
|
248
|
+
"inference-cycle": {
|
|
249
|
+
"file": "src/inference/inference-cycle.ts",
|
|
250
|
+
"skills": "inference-cycle, inference-files, session-capture, repertoire"
|
|
251
|
+
},
|
|
252
|
+
"hermes": {
|
|
253
|
+
"file": "src/integrations/hermes-agent",
|
|
254
|
+
"skills": "hermes, hermes-agent, boot-orchestrator, consumer-mcp"
|
|
255
|
+
},
|
|
256
|
+
"openclaw": {
|
|
257
|
+
"file": "src/integrations/openclaw",
|
|
258
|
+
"skills": "openclaw, boot-orchestrator, consumer-mcp, hermes"
|
|
259
|
+
},
|
|
260
|
+
"opencode": {
|
|
261
|
+
"file": "src/cli/commands/opencode-install.ts",
|
|
262
|
+
"skills": "opencode, boot-orchestrator, consumer-mcp, orchestrator"
|
|
263
|
+
},
|
|
264
|
+
"consumer-mcp": {
|
|
265
|
+
"root": "src/mcps",
|
|
266
|
+
"file": ".mcp.json",
|
|
267
|
+
"skills": "consumer-mcp, boot-orchestrator, hermes, openclaw"
|
|
268
|
+
},
|
|
269
|
+
"confer": {
|
|
270
|
+
"file": "src/nucleus/confer.ts",
|
|
271
|
+
"skills": "confer, governance, code-review, researcher"
|
|
223
272
|
}
|
|
224
273
|
}
|
|
225
|
-
|
|
@@ -47,6 +47,20 @@ const PLATE_IDS = Object.freeze([
|
|
|
47
47
|
"pre-tool",
|
|
48
48
|
"lens-page",
|
|
49
49
|
"centrifuge",
|
|
50
|
+
"ground",
|
|
51
|
+
"synthesis",
|
|
52
|
+
"repertoire",
|
|
53
|
+
"dynamo",
|
|
54
|
+
"foundry",
|
|
55
|
+
"delegation-gate",
|
|
56
|
+
"temperament",
|
|
57
|
+
"asides",
|
|
58
|
+
"inference-cycle",
|
|
59
|
+
"hermes",
|
|
60
|
+
"openclaw",
|
|
61
|
+
"opencode",
|
|
62
|
+
"consumer-mcp",
|
|
63
|
+
"confer",
|
|
50
64
|
]);
|
|
51
65
|
|
|
52
66
|
/** Id token, then extra phrases. Equal top scores recall nothing. */
|
|
@@ -235,6 +249,76 @@ const CUES = {
|
|
|
235
249
|
[/the centrifuge/i, 5],
|
|
236
250
|
[/plates\/centrifuge/i, 6],
|
|
237
251
|
],
|
|
252
|
+
ground: [
|
|
253
|
+
[/ground plane/i, 6],
|
|
254
|
+
[/ground plate/i, 6],
|
|
255
|
+
[/plates\/ground/i, 6],
|
|
256
|
+
],
|
|
257
|
+
synthesis: [
|
|
258
|
+
[/synthesis plate/i, 6],
|
|
259
|
+
[/synthesis checkpoint/i, 5],
|
|
260
|
+
[/plates\/synthesis/i, 6],
|
|
261
|
+
],
|
|
262
|
+
"repertoire": [
|
|
263
|
+
[/repertoire plate/i, 6],
|
|
264
|
+
[/repertoire organ/i, 5],
|
|
265
|
+
[/plates\/repertoire/i, 6],
|
|
266
|
+
],
|
|
267
|
+
"dynamo": [
|
|
268
|
+
[/dynamo plate/i, 6],
|
|
269
|
+
[/dynamo judgment/i, 5],
|
|
270
|
+
[/plates\/dynamo/i, 6],
|
|
271
|
+
],
|
|
272
|
+
"foundry": [
|
|
273
|
+
[/foundry plate/i, 6],
|
|
274
|
+
[/foundry release/i, 5],
|
|
275
|
+
[/plates\/foundry/i, 6],
|
|
276
|
+
],
|
|
277
|
+
"delegation-gate": [
|
|
278
|
+
[/delegation gate/i, 6],
|
|
279
|
+
[/delegation-gate plate/i, 6],
|
|
280
|
+
[/plates\/delegation-gate/i, 6],
|
|
281
|
+
],
|
|
282
|
+
"temperament": [
|
|
283
|
+
[/temperament plate/i, 6],
|
|
284
|
+
[/suit temperament/i, 6],
|
|
285
|
+
[/plates\/temperament/i, 6],
|
|
286
|
+
],
|
|
287
|
+
"asides": [
|
|
288
|
+
[/asides plate/i, 6],
|
|
289
|
+
[/user aside/i, 6],
|
|
290
|
+
[/plates\/asides/i, 6],
|
|
291
|
+
],
|
|
292
|
+
"inference-cycle": [
|
|
293
|
+
[/inference cycle/i, 6],
|
|
294
|
+
[/inference-cycle plate/i, 6],
|
|
295
|
+
[/plates\/inference-cycle/i, 6],
|
|
296
|
+
],
|
|
297
|
+
"hermes": [
|
|
298
|
+
[/hermes plate/i, 6],
|
|
299
|
+
[/hermes bridge/i, 5],
|
|
300
|
+
[/plates\/hermes/i, 6],
|
|
301
|
+
],
|
|
302
|
+
"openclaw": [
|
|
303
|
+
[/openclaw plate/i, 6],
|
|
304
|
+
[/openclaw plugin/i, 5],
|
|
305
|
+
[/plates\/openclaw/i, 6],
|
|
306
|
+
],
|
|
307
|
+
"opencode": [
|
|
308
|
+
[/opencode plate/i, 6],
|
|
309
|
+
[/opencode install/i, 5],
|
|
310
|
+
[/plates\/opencode/i, 6],
|
|
311
|
+
],
|
|
312
|
+
"consumer-mcp": [
|
|
313
|
+
[/consumer mcp/i, 6],
|
|
314
|
+
[/mcp registry set/i, 5],
|
|
315
|
+
[/plates\/consumer-mcp/i, 6],
|
|
316
|
+
],
|
|
317
|
+
"confer": [
|
|
318
|
+
[/confer plate/i, 6],
|
|
319
|
+
[/confer stays off/i, 5],
|
|
320
|
+
[/plates\/confer/i, 6],
|
|
321
|
+
],
|
|
238
322
|
};
|
|
239
323
|
|
|
240
324
|
function platesDir() {
|
|
@@ -64,12 +64,10 @@ export function repertoireRoute(operation) {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
/**
|
|
67
|
+
/** The card for this tool, or null when the tool just runs. */
|
|
68
68
|
export function lensDecision(root, toolName, spoken) {
|
|
69
69
|
try {
|
|
70
|
-
|
|
71
|
-
if (stop?.decision === 'deny') return stop;
|
|
72
|
-
return null;
|
|
70
|
+
return lensBeforeResearch(root, toolName, spoken);
|
|
73
71
|
} catch {
|
|
74
72
|
return null;
|
|
75
73
|
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skills seek. The card list is the prebuilt choice. Plate recall is the live one.
|
|
3
|
+
* A model is not called. A decline is the last tier.
|
|
4
|
+
* Confer on the result is only for a feat or a refactor. This does not start the quorum.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const TASK_TYPE_ROUTES = {
|
|
8
|
+
plan: "strategist",
|
|
9
|
+
architecture: "architect-tools",
|
|
10
|
+
research: "researcher",
|
|
11
|
+
implement: "backend-engineer",
|
|
12
|
+
frontend: "frontend-engineer",
|
|
13
|
+
test: "bug-triage",
|
|
14
|
+
review: "code-review",
|
|
15
|
+
security: "security-audit",
|
|
16
|
+
governance: "enforcer",
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const CATALOG_POINTERS = new Set(["SKILLS.md", ".agents/skills"]);
|
|
20
|
+
|
|
21
|
+
export function skillIdsFromRow(skills) {
|
|
22
|
+
const raw = Array.isArray(skills) ? skills.join(",") : String(skills || "");
|
|
23
|
+
const out = [];
|
|
24
|
+
for (const part of raw.split(",")) {
|
|
25
|
+
const token = part.trim();
|
|
26
|
+
if (!token || CATALOG_POINTERS.has(token)) continue;
|
|
27
|
+
const bits = token.split("/").filter(Boolean);
|
|
28
|
+
let id = token;
|
|
29
|
+
if (bits[bits.length - 1] === "SKILL.md" && bits.length >= 2) id = bits[bits.length - 2];
|
|
30
|
+
else if (token.includes("/")) id = bits[bits.length - 1];
|
|
31
|
+
if (!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(id)) continue;
|
|
32
|
+
if (out.includes(id)) continue;
|
|
33
|
+
out.push(id);
|
|
34
|
+
if (out.length === 5) break;
|
|
35
|
+
}
|
|
36
|
+
return out;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function routeForTask(taskType) {
|
|
40
|
+
const key = String(taskType || "").trim().toLowerCase();
|
|
41
|
+
if (!key || !Object.prototype.hasOwnProperty.call(TASK_TYPE_ROUTES, key)) return "";
|
|
42
|
+
return TASK_TYPE_ROUTES[key];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function mentioned(skill, need) {
|
|
46
|
+
const text = String(need || "").toLowerCase();
|
|
47
|
+
if (!text) return false;
|
|
48
|
+
const escaped = skill.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
49
|
+
return new RegExp(`(^|[^a-z0-9])${escaped}([^a-z0-9]|$)`).test(text);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function fits(skill, need, taskType) {
|
|
53
|
+
const route = routeForTask(taskType);
|
|
54
|
+
if (route && route === skill) return true;
|
|
55
|
+
return mentioned(skill, need);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const PLATE_SKILL = {
|
|
59
|
+
boot: "boot-orchestrator",
|
|
60
|
+
processor: "processor-pipeline",
|
|
61
|
+
review: "code-review",
|
|
62
|
+
suit: "suit-wear",
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const PLATE_ONLY = new Set([
|
|
66
|
+
"goggles",
|
|
67
|
+
"kits",
|
|
68
|
+
"host-pack",
|
|
69
|
+
"glossary",
|
|
70
|
+
"dichotomy",
|
|
71
|
+
"syncopate",
|
|
72
|
+
"digest",
|
|
73
|
+
"triage",
|
|
74
|
+
"loop",
|
|
75
|
+
]);
|
|
76
|
+
|
|
77
|
+
export function staleSkillRow(skills) {
|
|
78
|
+
const raw = String(skills || "").trim();
|
|
79
|
+
if (!raw || CATALOG_POINTERS.has(raw)) return true;
|
|
80
|
+
if (raw.includes("/")) return true;
|
|
81
|
+
return skillIdsFromRow(raw).length < 3;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function skillFromPlate(plate, known, cardSkills) {
|
|
85
|
+
if (!plate || typeof plate !== "object") return "";
|
|
86
|
+
const id = String(plate.id || "").trim();
|
|
87
|
+
if (!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(id)) return "";
|
|
88
|
+
if (typeof cardSkills === "function") {
|
|
89
|
+
const first = skillIdsFromRow(cardSkills(id))[0] || "";
|
|
90
|
+
if (first && (!known || known.has(first))) return first;
|
|
91
|
+
}
|
|
92
|
+
const mapped = Object.prototype.hasOwnProperty.call(PLATE_SKILL, id) ? PLATE_SKILL[id] : "";
|
|
93
|
+
if (mapped && (!known || known.has(mapped))) return mapped;
|
|
94
|
+
if (PLATE_ONLY.has(id)) return "";
|
|
95
|
+
if (known && !known.has(id)) return "";
|
|
96
|
+
return id;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function seekSkill({ skills, need, taskType, workKind, recall, known, cardSkills } = {}) {
|
|
100
|
+
const confer = workKind === "feat" || workKind === "refactor";
|
|
101
|
+
for (const skill of skillIdsFromRow(skills)) {
|
|
102
|
+
if (fits(skill, need, taskType)) return { skill, tier: "card", confer };
|
|
103
|
+
}
|
|
104
|
+
let plate = null;
|
|
105
|
+
if (typeof recall === "function") {
|
|
106
|
+
try {
|
|
107
|
+
plate = recall(String(need || ""));
|
|
108
|
+
} catch {
|
|
109
|
+
plate = null;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
const fromPlate = skillFromPlate(plate, known, cardSkills);
|
|
113
|
+
if (fromPlate) return { skill: fromPlate, tier: "plate", confer };
|
|
114
|
+
return { skill: null, tier: "decline", confer };
|
|
115
|
+
}
|
|
@@ -1033,7 +1033,10 @@ function applyStationHeat(root, host, extra = {}, existing = {}) {
|
|
|
1033
1033
|
const intent = resolved.intent;
|
|
1034
1034
|
const rematch = resolved.rematch;
|
|
1035
1035
|
let notesLine = null;
|
|
1036
|
-
|
|
1036
|
+
const notesWake = isCompactHook(extra)
|
|
1037
|
+
|| isPromptHook(extra)
|
|
1038
|
+
|| /session[_-]?start/i.test(String(extra.hookEvent || extra.source || ""));
|
|
1039
|
+
if (notesWake) {
|
|
1037
1040
|
if (intent && (readStationTicketField(root, "Intent") || pickup || clipIntent(extra.intent))) {
|
|
1038
1041
|
const stamped = stampNotesPickup(root, intent);
|
|
1039
1042
|
if (stamped) pickup = stamped;
|
|
@@ -74,7 +74,7 @@ async function decide(event, gate) {
|
|
|
74
74
|
const spoken = `${toolName} ${JSON.stringify(args)}`.slice(0, 500);
|
|
75
75
|
const { lensDecision, repertoireRoute } = await import('../../hooks/pre-tool-speak.mjs');
|
|
76
76
|
const lens = lensDecision(projectRoot, toolName, spoken);
|
|
77
|
-
if (lens) {
|
|
77
|
+
if (lens?.decision === 'deny') {
|
|
78
78
|
return {
|
|
79
79
|
action: 'block',
|
|
80
80
|
allow: false,
|
|
@@ -86,9 +86,9 @@ async function decide(event, gate) {
|
|
|
86
86
|
const allowed = {
|
|
87
87
|
action: 'allow',
|
|
88
88
|
allow: true,
|
|
89
|
-
reason: outcome.reason,
|
|
90
|
-
gate: outcome.gate,
|
|
91
|
-
warn: Boolean(outcome.reason),
|
|
89
|
+
reason: lens?.reason || outcome.reason,
|
|
90
|
+
gate: lens?.reason ? 'lens' : outcome.gate,
|
|
91
|
+
warn: Boolean(lens?.reason || outcome.reason),
|
|
92
92
|
};
|
|
93
93
|
if (route?.hookSpecificOutput) {
|
|
94
94
|
allowed.hookSpecificOutput = route.hookSpecificOutput;
|
|
@@ -69,9 +69,18 @@ export default definePluginEntry({
|
|
|
69
69
|
if (!speakPath) return undefined;
|
|
70
70
|
const speak = await import(pathToFileURL(speakPath).href);
|
|
71
71
|
const lens = speak.lensDecision(projectRoot, event.toolName, spoken);
|
|
72
|
-
if (lens) {
|
|
72
|
+
if (lens?.decision === 'deny') {
|
|
73
73
|
return { block: true, blockReason: lens.reason };
|
|
74
74
|
}
|
|
75
|
+
if (lens?.reason) {
|
|
76
|
+
return {
|
|
77
|
+
block: false,
|
|
78
|
+
hookSpecificOutput: {
|
|
79
|
+
hookEventName: 'PreToolUse',
|
|
80
|
+
additionalContext: lens.reason,
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
}
|
|
75
84
|
const route = speak.repertoireRoute(spoken);
|
|
76
85
|
if (route?.hookSpecificOutput) {
|
|
77
86
|
return { block: false, hookSpecificOutput: route.hookSpecificOutput };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const PLATE_IDS: readonly ["routing", "governance", "boot", "orchestration", "processor", "reporting", "memory-recall", "stamp-plate", "house", "review", "goggles", "suit", "kits", "host-pack", "glossary", "record-map", "write-home", "activity-log", "session-capture", "suit-wear", "suit-organs", "station-card", "notes-page", "reflection-page", "site-manual", "package-face", "suit-settings", "trail-state", "inference-files", "grok-compact", "payload-heat", "station-heat", "pickup-stamp", "cursor-compact", "work-fresh", "kept-line", "lens-gate", "pre-tool", "lens-page", "centrifuge"];
|
|
1
|
+
export declare const PLATE_IDS: readonly ["routing", "governance", "boot", "orchestration", "processor", "reporting", "memory-recall", "stamp-plate", "house", "review", "goggles", "suit", "kits", "host-pack", "glossary", "record-map", "write-home", "activity-log", "session-capture", "suit-wear", "suit-organs", "station-card", "notes-page", "reflection-page", "site-manual", "package-face", "suit-settings", "trail-state", "inference-files", "grok-compact", "payload-heat", "station-heat", "pickup-stamp", "cursor-compact", "work-fresh", "kept-line", "lens-gate", "pre-tool", "lens-page", "centrifuge", "ground", "synthesis", "repertoire", "dynamo", "foundry", "delegation-gate", "temperament", "asides", "inference-cycle", "hermes", "openclaw", "opencode", "consumer-mcp", "confer"];
|
|
2
2
|
export type PlateId = (typeof PLATE_IDS)[number];
|
|
3
3
|
export interface PlateStamp {
|
|
4
4
|
id: PlateId;
|
|
@@ -46,6 +46,20 @@ export const PLATE_IDS = [
|
|
|
46
46
|
'pre-tool',
|
|
47
47
|
'lens-page',
|
|
48
48
|
'centrifuge',
|
|
49
|
+
'ground',
|
|
50
|
+
'synthesis',
|
|
51
|
+
'repertoire',
|
|
52
|
+
'dynamo',
|
|
53
|
+
'foundry',
|
|
54
|
+
'delegation-gate',
|
|
55
|
+
'temperament',
|
|
56
|
+
'asides',
|
|
57
|
+
'inference-cycle',
|
|
58
|
+
'hermes',
|
|
59
|
+
'openclaw',
|
|
60
|
+
'opencode',
|
|
61
|
+
'consumer-mcp',
|
|
62
|
+
'confer',
|
|
49
63
|
];
|
|
50
64
|
function isPlateId(value) {
|
|
51
65
|
return PLATE_IDS.includes(value);
|
|
@@ -22,7 +22,7 @@ export declare function scoreComplexity(operation: string, context: unknown, thr
|
|
|
22
22
|
export declare function routeToAgent(scoreOrLevel: number | ComplexityScore, level?: ComplexityLevel): string;
|
|
23
23
|
/**
|
|
24
24
|
* Convenience: score first, then route — one call.
|
|
25
|
-
* One
|
|
25
|
+
* One of the four plane names: the route is that card's first file, and the agent is not the researcher.
|
|
26
26
|
* A look that names no plane stops. Repertoire may still change the agent when a law matches.
|
|
27
27
|
*/
|
|
28
28
|
export declare function scoreAndRoute(operation: string, context: unknown, thresholds?: ComplexityThresholds): {
|
|
@@ -55,7 +55,7 @@ export function routeToAgent(scoreOrLevel, level) {
|
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* Convenience: score first, then route — one call.
|
|
58
|
-
* One
|
|
58
|
+
* One of the four plane names: the route is that card's first file, and the agent is not the researcher.
|
|
59
59
|
* A look that names no plane stops. Repertoire may still change the agent when a law matches.
|
|
60
60
|
*/
|
|
61
61
|
export function scoreAndRoute(operation, context, thresholds) {
|