0xray 4.0.42 → 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/.plugin/plugin.json +1 -1
- package/.xray/features.json +8 -5
- package/.xray/features.schema.json +8 -0
- package/AGENTS-consumer.md +9 -7
- package/AGENTS.md +19 -10
- package/LICENSE +1 -1
- package/README.md +15 -9
- package/SKILLS.md +3 -1
- package/dist/.gitignore.default +4 -1
- package/dist/AGENTS.md +19 -10
- package/dist/CHANGELOG.md +109 -11
- package/dist/LICENSE +1 -1
- package/dist/README.md +15 -9
- package/dist/SKILLS.md +3 -1
- package/dist/cli/commands/opencode-install.js +3 -9
- package/dist/cli/commands/plugin-commands.d.ts +4 -0
- package/dist/cli/commands/plugin-commands.js +84 -41
- 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/core/config-loader.js +4 -4
- package/dist/core/features-config.d.ts +1 -1
- package/dist/core/features-config.js +3 -3
- 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/hooks.json +6 -3
- package/dist/integrations/cursor/hooks/pre-tool-use.js +104 -37
- package/dist/integrations/cursor/hooks/xray-cloud-hook.sh +9 -1
- 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 +6 -76
- package/dist/integrations/grok/hooks/session-start.js +4 -2
- package/dist/integrations/hermes-agent/bridge.mjs +17 -1
- package/dist/integrations/hooks/delegation-gate-runtime.mjs +3 -2
- package/dist/integrations/hooks/goggles-mcp.mjs +23 -181
- package/dist/integrations/hooks/goggles-pipeline.mjs +606 -571
- package/dist/integrations/hooks/goggles-planes.json +95 -46
- package/dist/integrations/hooks/plates.cjs +84 -0
- package/dist/integrations/hooks/pre-tool-speak.mjs +74 -0
- 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 +24 -7
- package/dist/integrations/openclaw/plugin/xray-pre-tool/index.js +26 -2
- 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/monitoring/{nudge-watchdog.d.ts → nudge-monitor.d.ts} +14 -5
- package/dist/monitoring/{nudge-watchdog.js → nudge-monitor.js} +42 -17
- 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 +20 -0
- package/dist/processors/implementations/nudge-processor.d.ts +1 -1
- package/dist/processors/implementations/nudge-processor.js +4 -4
- package/dist/skills/orchestrator/SKILL.md +1 -7
- package/docs-site/docs/plates/activity-log.md +1 -1
- package/docs-site/docs/plates/asides.md +35 -0
- package/docs-site/docs/plates/bifrost.md +48 -0
- package/docs-site/docs/plates/boot.md +2 -2
- package/docs-site/docs/plates/centrifuge.md +1 -1
- package/docs-site/docs/plates/confer.md +35 -0
- package/docs-site/docs/plates/consumer-mcp.md +35 -0
- package/docs-site/docs/plates/cursor-compact.md +1 -1
- 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/glossary.md +7 -3
- package/docs-site/docs/plates/goggles.md +12 -1
- package/docs-site/docs/plates/governance.md +1 -1
- package/docs-site/docs/plates/grok-compact.md +1 -1
- package/docs-site/docs/plates/grokbot.md +3 -1
- package/docs-site/docs/plates/ground.md +35 -0
- package/docs-site/docs/plates/hermes.md +35 -0
- package/docs-site/docs/plates/host-pack.md +1 -1
- package/docs-site/docs/plates/house.md +1 -1
- package/docs-site/docs/plates/index.md +16 -7
- package/docs-site/docs/plates/inference-cycle.md +35 -0
- package/docs-site/docs/plates/inference-files.md +1 -1
- package/docs-site/docs/plates/kept-line.md +1 -1
- package/docs-site/docs/plates/kits.md +1 -1
- package/docs-site/docs/plates/lens-gate.md +8 -6
- package/docs-site/docs/plates/lens-page.md +1 -1
- package/docs-site/docs/plates/memory-recall.md +1 -1
- package/docs-site/docs/plates/notes-page.md +2 -2
- package/docs-site/docs/plates/openclaw.md +35 -0
- package/docs-site/docs/plates/opencode.md +35 -0
- package/docs-site/docs/plates/orchestration.md +1 -1
- package/docs-site/docs/plates/package-face.md +1 -1
- package/docs-site/docs/plates/payload-heat.md +1 -1
- package/docs-site/docs/plates/pickup-stamp.md +1 -1
- package/docs-site/docs/plates/pre-tool.md +1 -1
- package/docs-site/docs/plates/processor.md +1 -1
- package/docs-site/docs/plates/record-map.md +1 -1
- package/docs-site/docs/plates/reflection-page.md +1 -1
- package/docs-site/docs/plates/repertoire.md +35 -0
- package/docs-site/docs/plates/reporting.md +1 -1
- package/docs-site/docs/plates/review.md +1 -1
- package/docs-site/docs/plates/routing.md +1 -1
- package/docs-site/docs/plates/session-capture.md +1 -1
- package/docs-site/docs/plates/site-manual.md +1 -1
- package/docs-site/docs/plates/stamp-plate.md +1 -1
- package/docs-site/docs/plates/station-card.md +1 -1
- package/docs-site/docs/plates/station-heat.md +1 -1
- package/docs-site/docs/plates/suit-organs.md +1 -1
- package/docs-site/docs/plates/suit-settings.md +1 -1
- package/docs-site/docs/plates/suit-wear.md +1 -1
- package/docs-site/docs/plates/suit.md +3 -3
- 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 +2 -2
- package/docs-site/docs/plates/work-fresh.md +1 -1
- package/docs-site/docs/plates/write-home.md +1 -1
- package/llms.txt +14 -6
- package/package.json +3 -3
- package/scripts/foundry/README.md +5 -3
- 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-gate.mjs +111 -15
- package/scripts/foundry/release.mjs +9 -1
- package/scripts/foundry/validate-release-docs.mjs +2 -2
- package/scripts/foundry/version-manager.mjs +12 -4
- package/scripts/mjs/verify-pipeline-facets.mjs +1 -1
- package/scripts/node/install-bridges.cjs +91 -46
- package/scripts/node/pack-tmp-suit-proof.mjs +37 -10
- package/src/integrations/openclaw/plugin/xray-pre-tool/index.js +26 -2
- package/src/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
- package/src/skills/orchestrator/SKILL.md +1 -7
- package/vendor/@0xray/repertoire/README.md +1 -1
- package/xray/agents_template.md +2 -2
- package/xray/features.json +8 -5
- package/xray/features.schema.json +8 -0
- package/docs-site/docs/plates/live-mesh.md +0 -41
package/dist/SKILLS.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# 0xray Skills
|
|
2
2
|
|
|
3
|
-
**4.
|
|
3
|
+
**4.1** — a suit that survives the context window
|
|
4
4
|
|
|
5
5
|
Confer votes. Burst runs the swarm.
|
|
6
6
|
|
|
7
|
+
0xRay is a three-subsystem autonomous engine. The suit is the wear. This file is the catalog.
|
|
8
|
+
|
|
7
9
|
**45 skills** in this exo catalog. Default consumer plant is **`mill` + `inspect`**, not this dump. `npm install 0xray` does **not** sync 45 skills unless `foundry.json` `"costume": true`. Factory shop plant (`shop-extract`, `shop-witness`, `shop-pin`) coexists with mill plant when a hangar wears those shops. Extra shops: `foundry.json` `shopPlant`. Fasten is **foundry-plant/0**: builtin plant is mill+inspect only. `foundry.json` `"plant": "@0xray/blip"` (aliases `"plant": "blip"` / `"plant": "sound"`) fastens whatever that mill package declares — organs (looker, vibe, mixer) live in the mill, not this catalog. Nested mill `@0xray/foundry@0.1.12`. CLI shims `foundry blip|sound` still exist on foundry 0.1.11+. Agent map: [llms.txt](llms.txt).
|
|
8
10
|
|
|
9
11
|
xray ships 45 knowledge skills (`src/skills/<name>/SKILL.md`) as the **costume / self-plant catalog**. Lead-dev operating model lives in **`orchestrator`** skill + `multi_agent_orchestration.lead_dev_mode` in features.json. **Repertoire is preferred** for long-term judgment (vendored 0.2.9, dest = named laws). Station is the compact ticket, not a skill and not a keyword store. Skills load on demand via the **xray-skills** MCP server (`npx -y 0xray mcp skills`) or when you plant them. This file is the exo catalog — mill does **not** write it to the consumer root.
|
|
@@ -75,7 +75,7 @@ function copyDir(src, dest, relPath = "") {
|
|
|
75
75
|
async function installForOpencode(options = {}) {
|
|
76
76
|
const { frameworkLogger } = await import('../../core/framework-logger.js');
|
|
77
77
|
const { syncBuiltinSkills } = await import('./skill-install.js');
|
|
78
|
-
const { mintAfterWear
|
|
78
|
+
const { mintAfterWear } = await import('./foundry-mint-wear.js');
|
|
79
79
|
const wiring = loadWiring();
|
|
80
80
|
frameworkLogger.log('opencode-integration', 'install-start', 'info', { options });
|
|
81
81
|
const opencodeSource = path.join(__dirname, '..', '..', '..', '.opencode');
|
|
@@ -109,14 +109,8 @@ async function installForOpencode(options = {}) {
|
|
|
109
109
|
console.log('Use --force to reinstall.');
|
|
110
110
|
}
|
|
111
111
|
else {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
frameworkLogger.log('opencode-integration', 'opencode-copied', 'info', { destination: opencodeDest });
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
fs.mkdirSync(opencodeDest, { recursive: true });
|
|
118
|
-
frameworkLogger.log('opencode-integration', 'mill-plant-plugin', 'info', { destination: opencodeDest });
|
|
119
|
-
}
|
|
112
|
+
copyDir(opencodeSource, opencodeDest);
|
|
113
|
+
frameworkLogger.log('opencode-integration', 'opencode-copied', 'info', { destination: opencodeDest });
|
|
120
114
|
const pluginSource = path.join(__dirname, '..', '..', '..', 'dist', 'plugin', 'xray-codex-injection.js');
|
|
121
115
|
const pluginDest = path.join(opencodeDest, 'plugin', 'xray-codex-injection.js');
|
|
122
116
|
if (fs.existsSync(pluginSource)) {
|
|
@@ -16,3 +16,7 @@ export declare function pluginEnableCommand(pluginName: string): Promise<void>;
|
|
|
16
16
|
export declare function pluginDisableCommand(pluginName: string): Promise<void>;
|
|
17
17
|
export declare function pluginStatusCommand(pluginName: string): Promise<void>;
|
|
18
18
|
export declare function pluginUninstallCommand(pluginName: string): Promise<void>;
|
|
19
|
+
type YamlMap = Record<string, unknown>;
|
|
20
|
+
/** Subset of YAML used by plugin.yaml: maps, scalar lists, and lists of maps. */
|
|
21
|
+
export declare function parseYaml(content: string): YamlMap;
|
|
22
|
+
export {};
|
|
@@ -152,24 +152,25 @@ export async function pluginStatusCommand(pluginName) {
|
|
|
152
152
|
console.log(` Type: ${m.type}`);
|
|
153
153
|
console.log(` Description: ${m.description}`);
|
|
154
154
|
console.log(` License: ${m.license || "N/A"}`);
|
|
155
|
-
if (m.capabilities) {
|
|
155
|
+
if (Array.isArray(m.capabilities)) {
|
|
156
156
|
console.log("\n Capabilities:");
|
|
157
157
|
for (const cap of m.capabilities) {
|
|
158
|
-
console.log(` - ${cap}`);
|
|
158
|
+
console.log(` - ${String(cap)}`);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
if (m.tools) {
|
|
161
|
+
if (Array.isArray(m.tools)) {
|
|
162
162
|
console.log("\n Tools:");
|
|
163
163
|
for (const tool of m.tools) {
|
|
164
|
-
|
|
164
|
+
const row = tool;
|
|
165
|
+
console.log(` - ${String(row.name)}: ${String(row.description)}`);
|
|
165
166
|
}
|
|
166
167
|
}
|
|
167
|
-
if (m.runtime) {
|
|
168
|
+
if (m.runtime && typeof m.runtime === "object" && !Array.isArray(m.runtime)) {
|
|
168
169
|
const runtime = m.runtime;
|
|
169
170
|
console.log("\n Runtime:");
|
|
170
|
-
console.log(` Command: ${runtime.command}`);
|
|
171
|
-
if (runtime.args) {
|
|
172
|
-
console.log(` Args: ${runtime.args.join(" ")}`);
|
|
171
|
+
console.log(` Command: ${String(runtime.command)}`);
|
|
172
|
+
if (Array.isArray(runtime.args)) {
|
|
173
|
+
console.log(` Args: ${runtime.args.map((arg) => String(arg)).join(" ")}`);
|
|
173
174
|
}
|
|
174
175
|
}
|
|
175
176
|
console.log("\n" + "═".repeat(50) + "\n");
|
|
@@ -195,51 +196,93 @@ function validateManifest(manifest) {
|
|
|
195
196
|
}
|
|
196
197
|
}
|
|
197
198
|
}
|
|
198
|
-
function
|
|
199
|
-
const
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
]
|
|
205
|
-
|
|
199
|
+
function parseScalar(raw) {
|
|
200
|
+
const value = raw.trim();
|
|
201
|
+
if ((value.startsWith('"') && value.endsWith('"')) ||
|
|
202
|
+
(value.startsWith("'") && value.endsWith("'"))) {
|
|
203
|
+
return value.slice(1, -1);
|
|
204
|
+
}
|
|
205
|
+
if (value.startsWith("[") && value.endsWith("]")) {
|
|
206
|
+
const inner = value.slice(1, -1).trim();
|
|
207
|
+
if (!inner)
|
|
208
|
+
return [];
|
|
209
|
+
return inner.split(",").map((part) => parseScalar(part));
|
|
210
|
+
}
|
|
211
|
+
if (value === "true")
|
|
212
|
+
return true;
|
|
213
|
+
if (value === "false")
|
|
214
|
+
return false;
|
|
215
|
+
if (/^-?\d+$/.test(value))
|
|
216
|
+
return Number(value);
|
|
217
|
+
return value;
|
|
218
|
+
}
|
|
219
|
+
/** Subset of YAML used by plugin.yaml: maps, scalar lists, and lists of maps. */
|
|
220
|
+
export function parseYaml(content) {
|
|
221
|
+
const root = {};
|
|
222
|
+
const stack = [{ indent: -1, container: root }];
|
|
223
|
+
for (const line of content.split("\n")) {
|
|
206
224
|
const trimmed = line.trim();
|
|
207
225
|
if (!trimmed || trimmed.startsWith("#"))
|
|
208
226
|
continue;
|
|
209
227
|
const indent = line.search(/\S/);
|
|
210
|
-
|
|
211
|
-
if (isListItem) {
|
|
212
|
-
const value = trimmed.slice(2).trim();
|
|
228
|
+
while (stack.length > 1) {
|
|
213
229
|
const top = stack[stack.length - 1];
|
|
214
|
-
if (top
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
if (top && currentKey) {
|
|
218
|
-
top.obj[currentKey].push(value);
|
|
219
|
-
}
|
|
220
|
-
continue;
|
|
230
|
+
if (!top || indent > top.indent)
|
|
231
|
+
break;
|
|
232
|
+
stack.pop();
|
|
221
233
|
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
234
|
+
if (trimmed.startsWith("- ")) {
|
|
235
|
+
let owner = stack[stack.length - 1];
|
|
236
|
+
if (owner &&
|
|
237
|
+
!Array.isArray(owner.container) &&
|
|
238
|
+
Object.keys(owner.container).length === 0 &&
|
|
239
|
+
stack.length > 1) {
|
|
240
|
+
const holder = stack[stack.length - 2];
|
|
241
|
+
const emptyIndent = owner.indent;
|
|
228
242
|
stack.pop();
|
|
243
|
+
if (holder && !Array.isArray(holder.container) && holder.key) {
|
|
244
|
+
const list = [];
|
|
245
|
+
holder.container[holder.key] = list;
|
|
246
|
+
stack.push({ indent: emptyIndent, container: list });
|
|
247
|
+
}
|
|
248
|
+
owner = stack[stack.length - 1];
|
|
229
249
|
}
|
|
230
|
-
|
|
231
|
-
if (!current)
|
|
250
|
+
if (!owner || !Array.isArray(owner.container))
|
|
232
251
|
continue;
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
|
|
252
|
+
const rest = trimmed.slice(2).trim();
|
|
253
|
+
const colon = rest.indexOf(":");
|
|
254
|
+
const quoted = rest.startsWith('"') || rest.startsWith("'");
|
|
255
|
+
if (!quoted && colon > 0) {
|
|
256
|
+
const item = {};
|
|
257
|
+
const key = rest.slice(0, colon).trim();
|
|
258
|
+
const value = rest.slice(colon + 1).trim();
|
|
259
|
+
item[key] = value ? parseScalar(value) : {};
|
|
260
|
+
owner.container.push(item);
|
|
261
|
+
stack.push({ indent, container: item, key });
|
|
236
262
|
}
|
|
237
263
|
else {
|
|
238
|
-
|
|
239
|
-
stack.push({ indent, obj: parent[key] });
|
|
264
|
+
owner.container.push(parseScalar(rest));
|
|
240
265
|
}
|
|
241
|
-
|
|
266
|
+
continue;
|
|
267
|
+
}
|
|
268
|
+
const colonIndex = trimmed.indexOf(":");
|
|
269
|
+
if (colonIndex <= 0)
|
|
270
|
+
continue;
|
|
271
|
+
const key = trimmed.slice(0, colonIndex).trim();
|
|
272
|
+
const value = trimmed.slice(colonIndex + 1).trim();
|
|
273
|
+
const current = stack[stack.length - 1];
|
|
274
|
+
if (!current || Array.isArray(current.container))
|
|
275
|
+
continue;
|
|
276
|
+
if (value) {
|
|
277
|
+
current.container[key] = parseScalar(value);
|
|
278
|
+
current.key = key;
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
const child = {};
|
|
282
|
+
current.container[key] = child;
|
|
283
|
+
current.key = key;
|
|
284
|
+
stack.push({ indent, container: child });
|
|
242
285
|
}
|
|
243
286
|
}
|
|
244
|
-
return
|
|
287
|
+
return root;
|
|
245
288
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { existsSync, readdirSync, readFileSync, mkdirSync, writeFileSync, cpSync, rmSync, statSync, unlinkSync, copyFileSync } from "fs";
|
|
2
2
|
import { join, basename, dirname } from "path";
|
|
3
3
|
import { fileURLToPath } from "url";
|
|
4
|
-
import { createRequire } from "module";
|
|
5
4
|
import { execSync } from "child_process";
|
|
6
5
|
function getLocalRegistryPath() {
|
|
7
6
|
return join(process.cwd(), ".xray", "skill-registry.json");
|
|
@@ -485,9 +484,6 @@ export async function skillRegistryCommand(action, args) {
|
|
|
485
484
|
// Each platform's install command calls this to copy framework skills.
|
|
486
485
|
export function syncBuiltinSkills(targetSkillsDir, packageRoot) {
|
|
487
486
|
const root = packageRoot ?? join(dirname(fileURLToPath(import.meta.url)), "..", "..", "..");
|
|
488
|
-
const millSuit = createRequire(import.meta.url)(join(root, "scripts/foundry/mint-suit.cjs"));
|
|
489
|
-
if (!millSuit.wantsCostume(process.cwd()))
|
|
490
|
-
return 0;
|
|
491
487
|
const candidateDirs = [
|
|
492
488
|
join(root, "dist", "skills"),
|
|
493
489
|
join(root, "src", "skills"),
|
|
@@ -500,7 +496,16 @@ export function syncBuiltinSkills(targetSkillsDir, packageRoot) {
|
|
|
500
496
|
if (!existsSync(targetSkillsDir))
|
|
501
497
|
mkdirSync(targetSkillsDir, { recursive: true });
|
|
502
498
|
for (const entry of readdirSync(sourceDir, { withFileTypes: true })) {
|
|
503
|
-
|
|
499
|
+
let linkedDir = false;
|
|
500
|
+
if (entry.isSymbolicLink()) {
|
|
501
|
+
try {
|
|
502
|
+
linkedDir = statSync(join(sourceDir, entry.name)).isDirectory();
|
|
503
|
+
}
|
|
504
|
+
catch {
|
|
505
|
+
linkedDir = false;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
if (!entry.isDirectory() && !linkedDir)
|
|
504
509
|
continue;
|
|
505
510
|
const skillMd = join(sourceDir, entry.name, "SKILL.md");
|
|
506
511
|
if (!existsSync(skillMd))
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Goggles on status and health.
|
|
3
|
-
*
|
|
3
|
+
* The line is whether the organ is worn.
|
|
4
4
|
*/
|
|
5
5
|
export type GogglesStatus = {
|
|
6
6
|
organPresent: boolean;
|
|
7
|
-
kind0Text: string;
|
|
8
|
-
kind0Quiet: boolean;
|
|
9
|
-
kind0Label: string;
|
|
10
7
|
organLine: string;
|
|
11
8
|
};
|
|
12
|
-
export declare function probeGoggles(packageRoot: string,
|
|
9
|
+
export declare function probeGoggles(packageRoot: string, _cwd: string): GogglesStatus;
|
|
13
10
|
export declare function formatGogglesStatus(probe: GogglesStatus): string[];
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Goggles on status and health.
|
|
3
|
-
*
|
|
3
|
+
* The line is whether the organ is worn.
|
|
4
4
|
*/
|
|
5
|
-
import { existsSync
|
|
5
|
+
import { existsSync } from "node:fs";
|
|
6
6
|
import { join } from "node:path";
|
|
7
|
-
const WORN_PLANES = ["dichotomy", "syncopate", "synthesis", "digest", "triage", "loop"];
|
|
8
7
|
const ORGAN_PAIRS = [
|
|
9
8
|
["dist/integrations/hooks/goggles-pipeline.mjs", "dist/integrations/hooks/goggles-planes.json"],
|
|
10
9
|
["src/integrations/hooks/goggles-pipeline.mjs", "src/integrations/hooks/goggles-planes.json"],
|
|
@@ -17,60 +16,13 @@ function organPair(packageRoot) {
|
|
|
17
16
|
}
|
|
18
17
|
return null;
|
|
19
18
|
}
|
|
20
|
-
function
|
|
21
|
-
const
|
|
22
|
-
if (!existsSync(file))
|
|
23
|
-
return { found: false, text: "" };
|
|
24
|
-
try {
|
|
25
|
-
return { found: true, text: readFileSync(file, "utf8").trim() };
|
|
26
|
-
}
|
|
27
|
-
catch {
|
|
28
|
-
return { found: false, text: "" };
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
function mapDrift(packageRoot, planesRel) {
|
|
32
|
-
try {
|
|
33
|
-
const data = JSON.parse(readFileSync(join(packageRoot, planesRel), "utf8"));
|
|
34
|
-
const map = Array.isArray(data.planes) ? data.planes.map((name) => String(name)) : [];
|
|
35
|
-
const same = map.length === WORN_PLANES.length && map.every((name, index) => name === WORN_PLANES[index]);
|
|
36
|
-
return same ? "" : "Actuality. Drift: worn is not the map.";
|
|
37
|
-
}
|
|
38
|
-
catch {
|
|
39
|
-
return "";
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
export function probeGoggles(packageRoot, cwd) {
|
|
43
|
-
const pair = organPair(packageRoot);
|
|
44
|
-
const organPresent = pair !== null;
|
|
45
|
-
const lens = lensText(cwd);
|
|
46
|
-
let kind0Text = "";
|
|
47
|
-
let kind0Label = "(no LENS yet)";
|
|
48
|
-
let kind0Quiet = false;
|
|
49
|
-
if (lens.found) {
|
|
50
|
-
kind0Text = lens.text;
|
|
51
|
-
if (!lens.text || lens.text === "quiet (match)") {
|
|
52
|
-
kind0Quiet = true;
|
|
53
|
-
kind0Label = "quiet (match)";
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
kind0Label = lens.text;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
else if (pair) {
|
|
60
|
-
const drift = mapDrift(packageRoot, pair[1]);
|
|
61
|
-
if (drift) {
|
|
62
|
-
kind0Text = drift;
|
|
63
|
-
kind0Label = drift;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
19
|
+
export function probeGoggles(packageRoot, _cwd) {
|
|
20
|
+
const organPresent = organPair(packageRoot) !== null;
|
|
66
21
|
return {
|
|
67
22
|
organPresent,
|
|
68
|
-
kind0Text,
|
|
69
|
-
kind0Quiet,
|
|
70
|
-
kind0Label,
|
|
71
23
|
organLine: organPresent ? "Goggles: worn" : "Goggles: not found",
|
|
72
24
|
};
|
|
73
25
|
}
|
|
74
26
|
export function formatGogglesStatus(probe) {
|
|
75
|
-
return [probe.organLine
|
|
27
|
+
return [probe.organLine];
|
|
76
28
|
}
|
package/dist/cli/index.js
CHANGED
|
@@ -79,7 +79,7 @@ program
|
|
|
79
79
|
process.exit(1);
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
|
-
const LOOK_HELP = "
|
|
82
|
+
const LOOK_HELP = "dev, integration, domain, or ecosystem. The card is in LENS.md.";
|
|
83
83
|
function gogglesScript() {
|
|
84
84
|
const built = join(packageRoot, "dist", "integrations", "hooks", "goggles-pipeline.mjs");
|
|
85
85
|
const source = join(packageRoot, "src", "integrations", "hooks", "goggles-pipeline.mjs");
|
|
@@ -104,7 +104,7 @@ function runGoggles(args) {
|
|
|
104
104
|
}
|
|
105
105
|
program
|
|
106
106
|
.command("look")
|
|
107
|
-
.argument("[args...]", "
|
|
107
|
+
.argument("[args...]", "one card plane")
|
|
108
108
|
.description(LOOK_HELP)
|
|
109
109
|
.action((args) => {
|
|
110
110
|
runGoggles(args);
|
|
@@ -93,9 +93,9 @@ export class XrayConfigLoader {
|
|
|
93
93
|
}
|
|
94
94
|
const cfg = config;
|
|
95
95
|
return {
|
|
96
|
-
enabled: typeof cfg.enabled === 'boolean' ? cfg.enabled :
|
|
96
|
+
enabled: typeof cfg.enabled === 'boolean' ? cfg.enabled : false,
|
|
97
97
|
interval_minutes: Math.max(5, Math.min(1440, typeof cfg.interval_minutes === 'number' ? cfg.interval_minutes : 60)),
|
|
98
|
-
auto_schedule: typeof cfg.auto_schedule === 'boolean' ? cfg.auto_schedule :
|
|
98
|
+
auto_schedule: typeof cfg.auto_schedule === 'boolean' ? cfg.auto_schedule : false,
|
|
99
99
|
include_health_assessment: typeof cfg.include_health_assessment === 'boolean' ? cfg.include_health_assessment : true,
|
|
100
100
|
include_agent_activities: typeof cfg.include_agent_activities === 'boolean' ? cfg.include_agent_activities : true,
|
|
101
101
|
include_pipeline_operations: typeof cfg.include_pipeline_operations === 'boolean' ? cfg.include_pipeline_operations : true,
|
|
@@ -123,9 +123,9 @@ export class XrayConfigLoader {
|
|
|
123
123
|
session_persistence: true,
|
|
124
124
|
},
|
|
125
125
|
autonomous_reporting: {
|
|
126
|
-
enabled:
|
|
126
|
+
enabled: false,
|
|
127
127
|
interval_minutes: 60,
|
|
128
|
-
auto_schedule:
|
|
128
|
+
auto_schedule: false,
|
|
129
129
|
include_health_assessment: true,
|
|
130
130
|
include_agent_activities: true,
|
|
131
131
|
include_pipeline_operations: true,
|
|
@@ -406,7 +406,7 @@ export interface FeaturesConfig {
|
|
|
406
406
|
enabled?: boolean;
|
|
407
407
|
};
|
|
408
408
|
memory_routing?: MemoryRoutingConfig;
|
|
409
|
-
/**
|
|
409
|
+
/** Marker is opt-in and the shipped default is off. */
|
|
410
410
|
grok_postprocessor_light?: boolean;
|
|
411
411
|
/** P2 — git post-commit session inference capture */
|
|
412
412
|
inference_session_capture?: {
|
|
@@ -342,9 +342,9 @@ export class FeaturesConfigLoader {
|
|
|
342
342
|
no_new_surface: true,
|
|
343
343
|
},
|
|
344
344
|
autonomous_reporting: {
|
|
345
|
-
enabled:
|
|
345
|
+
enabled: false,
|
|
346
346
|
interval_minutes: 60,
|
|
347
|
-
auto_schedule:
|
|
347
|
+
auto_schedule: false,
|
|
348
348
|
include_health_assessment: true,
|
|
349
349
|
include_agent_activities: true,
|
|
350
350
|
include_pipeline_operations: true,
|
|
@@ -410,7 +410,7 @@ export class FeaturesConfigLoader {
|
|
|
410
410
|
max_cache_size_mb: 50,
|
|
411
411
|
},
|
|
412
412
|
inference: {
|
|
413
|
-
description: "
|
|
413
|
+
description: "The cycle runs from the CLI command inference:run and the session wake does not start it.",
|
|
414
414
|
enabled: true,
|
|
415
415
|
workflow_dir: ".xray/inference",
|
|
416
416
|
reports_dir: ".xray/reports",
|
|
@@ -22,7 +22,7 @@ export declare function preProcessAndRoute(operation: string, context: RuleValid
|
|
|
22
22
|
export declare const FOUNDRY_EXO_CANNOT_SHIP = "Exo cannot ship. Use: node scripts/node/release.mjs [patch|minor|major]";
|
|
23
23
|
/**
|
|
24
24
|
* Release keyword used to run version-manager + git add -A + npm publish from the exo.
|
|
25
|
-
* That path is refused. Canonical mill:
|
|
25
|
+
* That path is refused. Canonical mill: scripts/foundry/release.mjs.
|
|
26
26
|
*/
|
|
27
27
|
export declare function executeReleaseWorkflow(operation: string, _context: RuleValidationContext, jobId: string, _routing: RoutingRecommendation): Promise<EnforcementResult>;
|
|
28
28
|
export interface EnforcementResult {
|
|
@@ -203,7 +203,7 @@ function buildTaskDescription(operation, context) {
|
|
|
203
203
|
export const FOUNDRY_EXO_CANNOT_SHIP = "Exo cannot ship. Use: node scripts/node/release.mjs [patch|minor|major]";
|
|
204
204
|
/**
|
|
205
205
|
* Release keyword used to run version-manager + git add -A + npm publish from the exo.
|
|
206
|
-
* That path is refused. Canonical mill:
|
|
206
|
+
* That path is refused. Canonical mill: scripts/foundry/release.mjs.
|
|
207
207
|
*/
|
|
208
208
|
export async function executeReleaseWorkflow(operation, _context, jobId, _routing) {
|
|
209
209
|
await frameworkLogger.log("enforcer-tools", "release-workflow-refused", "error", {
|
|
@@ -34,7 +34,7 @@ Install the package first (`npm install`), then `npx 0xray wear`. Postinstall wr
|
|
|
34
34
|
|
|
35
35
|
| Hook | Stdin | Stdout |
|
|
36
36
|
|------|--------|--------|
|
|
37
|
-
| `preToolUse` | Cursor tool event (`tool_name`, `tool_input`, `cwd`, `workspace_roots`, `conversation_id`) | `{ "permission": "allow" \| "deny" }` plus `user_message` / `agent_message`
|
|
37
|
+
| `preToolUse` | Cursor tool event (`tool_name`, `tool_input`, `cwd`, `workspace_roots`, `conversation_id`) | `{ "permission": "allow" \| "deny" }` plus `user_message` / `agent_message` when the hook has something to say |
|
|
38
38
|
| `preCompact` | `{ trigger, context_tokens, conversation_id, generation_id, … }` | `{ "user_message": "…" }` after Station write. Receipt keeps `conversation_id` + `generation_id`. That id is enough to resume. |
|
|
39
39
|
| `afterFileEdit` | file event | `{}` — boots Station only |
|
|
40
40
|
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
"hooks": {
|
|
4
4
|
"preToolUse": [
|
|
5
5
|
{
|
|
6
|
-
"command": ".cursor/hooks/pre-tool-use.sh"
|
|
6
|
+
"command": ".cursor/hooks/pre-tool-use.sh",
|
|
7
|
+
"failClosed": true
|
|
7
8
|
}
|
|
8
9
|
],
|
|
9
10
|
"preCompact": [
|
|
@@ -18,12 +19,14 @@
|
|
|
18
19
|
],
|
|
19
20
|
"beforeShellExecution": [
|
|
20
21
|
{
|
|
21
|
-
"command": ".cursor/hooks/before-shell-execution.sh"
|
|
22
|
+
"command": ".cursor/hooks/before-shell-execution.sh",
|
|
23
|
+
"failClosed": true
|
|
22
24
|
}
|
|
23
25
|
],
|
|
24
26
|
"beforeReadFile": [
|
|
25
27
|
{
|
|
26
|
-
"command": ".cursor/hooks/before-read-file.sh"
|
|
28
|
+
"command": ".cursor/hooks/before-read-file.sh",
|
|
29
|
+
"failClosed": true
|
|
27
30
|
}
|
|
28
31
|
]
|
|
29
32
|
}
|