0xray 4.0.12 → 4.0.14

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.
Files changed (58) hide show
  1. package/.grok-plugin/plugin.json +1 -1
  2. package/.xray/features.json +1 -1
  3. package/.xray/features.schema.json +1 -1
  4. package/AGENTS-consumer.md +4 -2
  5. package/AGENTS.md +8 -1
  6. package/README.md +1 -1
  7. package/SKILLS.md +1 -1
  8. package/dist/AGENTS.md +8 -1
  9. package/dist/CHANGELOG.md +25 -1
  10. package/dist/README.md +1 -1
  11. package/dist/SKILLS.md +1 -1
  12. package/dist/integrations/cursor/README.md +61 -0
  13. package/dist/integrations/cursor/hooks/after-file-edit.js +38 -0
  14. package/dist/integrations/cursor/hooks/cursor-hook-utils.js +170 -0
  15. package/dist/integrations/cursor/hooks/cursor-usage-receipt.js +298 -0
  16. package/dist/integrations/cursor/hooks/hooks.json +20 -0
  17. package/dist/integrations/cursor/hooks/pre-compact.js +88 -0
  18. package/dist/integrations/cursor/hooks/pre-tool-use.js +105 -0
  19. package/dist/integrations/hooks/station-hook-runtime.cjs +89 -1
  20. package/dist/integrations/hooks/station-hook-runtime.mjs +2 -0
  21. package/dist/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
  22. package/dist/nucleus/suit-temperament.d.ts +2 -2
  23. package/dist/nucleus/suit-temperament.js +3 -1
  24. package/llms.txt +6 -4
  25. package/package.json +4 -2
  26. package/scripts/foundry/CHANGELOG.md +37 -1
  27. package/scripts/foundry/README.md +13 -1
  28. package/scripts/foundry/assert-packed-dist-cli.mjs +97 -0
  29. package/scripts/foundry/blip-render.cjs +1237 -0
  30. package/scripts/foundry/blip-rippel.cjs +1963 -0
  31. package/scripts/foundry/blip.mjs +109 -0
  32. package/scripts/foundry/cli.mjs +8 -4
  33. package/scripts/foundry/inspect.mjs +117 -7
  34. package/scripts/foundry/mint-suit.cjs +215 -14
  35. package/scripts/foundry/package.json +7 -1
  36. package/scripts/foundry/plant/agents/blip-inspect.yml +5 -0
  37. package/scripts/foundry/plant/agents/blip.yml +5 -0
  38. package/scripts/foundry/plant/agents/inspect.yml +1 -1
  39. package/scripts/foundry/plant/agents/mill.yml +1 -1
  40. package/scripts/foundry/plant/agents/sound-inspect.yml +5 -0
  41. package/scripts/foundry/plant/agents/sound.yml +5 -0
  42. package/scripts/foundry/plant/motions/MOTION-REGISTRY.md +35 -0
  43. package/scripts/foundry/plant/motions/registry.json +81 -0
  44. package/scripts/foundry/plant/skills/blip/SKILL.md +39 -0
  45. package/scripts/foundry/plant/skills/blip-inspect/SKILL.md +32 -0
  46. package/scripts/foundry/plant/skills/inspect/SKILL.md +2 -2
  47. package/scripts/foundry/plant/skills/sound/SKILL.md +29 -0
  48. package/scripts/foundry/plant/skills/sound-inspect/SKILL.md +28 -0
  49. package/scripts/foundry/release-gate.mjs +18 -10
  50. package/scripts/foundry/release.mjs +3 -0
  51. package/scripts/foundry/sound-bed.cjs +454 -0
  52. package/scripts/foundry/sound-rippel.cjs +1434 -0
  53. package/scripts/foundry/sound.mjs +93 -0
  54. package/scripts/node/assert-packed-dist-cli.mjs +4 -0
  55. package/scripts/node/consumer-install-smoke.mjs +20 -1
  56. package/src/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
  57. package/xray/features.json +1 -1
  58. package/xray/features.schema.json +1 -1
@@ -0,0 +1,93 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Factory-sound CLI. Render a bed or inspect the last receipt.
4
+ * npx @0xray/foundry sound render [--brief TEXT] [--genre ambient|techno|jazz] [--seconds N] [--out FILE]
5
+ * npx @0xray/foundry sound inspect
6
+ */
7
+
8
+ import { createRequire } from "node:module";
9
+ import path from "node:path";
10
+ import { fileURLToPath } from "node:url";
11
+ import { resolveMillRoot } from "./mill-root.mjs";
12
+
13
+ const require = createRequire(import.meta.url);
14
+ const bed = require("./sound-bed.cjs");
15
+
16
+ const HELP =
17
+ "Usage: npx @0xray/foundry sound <render|inspect> [...args]\n" +
18
+ "\n" +
19
+ "Sound plant, not mill. FOUNDRY_ROOT overrides cwd.\n" +
20
+ "render: brief → checksum seed → genre → wav → metrics receipt.\n" +
21
+ "inspect: last .xray/sound-bed-receipt.json PASS/FAIL (missing is FAIL).\n";
22
+
23
+ function argValue(argv, name, fallback) {
24
+ const i = argv.indexOf(name);
25
+ if (i < 0 || i + 1 >= argv.length) return fallback;
26
+ return argv[i + 1];
27
+ }
28
+
29
+ function writeJson(value) {
30
+ process.stdout.write(`${JSON.stringify(value, null, 2)}\n`);
31
+ }
32
+
33
+ function inspectBed(root) {
34
+ const receipt = bed.readReceipt(root);
35
+ if (!receipt) {
36
+ return {
37
+ ok: false,
38
+ status: "FAIL",
39
+ failClosed: true,
40
+ detail: "missing .xray/sound-bed-receipt.json",
41
+ receipt: null,
42
+ };
43
+ }
44
+ const status = receipt.status === "PASS" ? "PASS" : "FAIL";
45
+ return {
46
+ ok: status === "PASS",
47
+ status,
48
+ failClosed: true,
49
+ plant: "sound",
50
+ receipt,
51
+ };
52
+ }
53
+
54
+ function main() {
55
+ const argv = process.argv.slice(2);
56
+ const cmd = argv[0];
57
+ const rest = argv.slice(1);
58
+ const root = resolveMillRoot();
59
+
60
+ if (!cmd || cmd === "--help" || cmd === "-h" || cmd === "help") {
61
+ process.stdout.write(HELP);
62
+ process.exit(cmd ? 0 : 1);
63
+ }
64
+
65
+ if (cmd === "inspect") {
66
+ const report = inspectBed(root);
67
+ writeJson(report);
68
+ process.exit(report.ok ? 0 : 1);
69
+ }
70
+
71
+ if (cmd === "render") {
72
+ const result = bed.renderBed({
73
+ root,
74
+ brief: argValue(rest, "--brief", "factory-sound bed"),
75
+ genre: argValue(rest, "--genre", "ambient"),
76
+ seconds: Number(argValue(rest, "--seconds", bed.DEFAULT_SECONDS)),
77
+ out: argValue(rest, "--out", null),
78
+ });
79
+ writeJson(result.receipt);
80
+ process.exit(result.receipt.status === "PASS" ? 0 : 1);
81
+ }
82
+
83
+ process.stderr.write(HELP);
84
+ process.exit(1);
85
+ }
86
+
87
+ export { inspectBed };
88
+
89
+ const isMain =
90
+ process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url);
91
+ if (isMain) {
92
+ main();
93
+ }
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ export * from "../foundry/assert-packed-dist-cli.mjs";
3
+ import { millMain } from "./foundry-shim.mjs";
4
+ millMain(import.meta.url, "assert-packed-dist-cli.mjs");
@@ -60,7 +60,25 @@ function assertPackedPackageHasNoFileDeps(tarballPath) {
60
60
  throw new Error("packed tarball missing vendor/@0xray/repertoire/package.json");
61
61
  }
62
62
  }
63
- console.log(" ✅ packed package.json has no file: deps; vendor organ is in the tarball");
63
+ process.stdout.write(" ✅ packed package.json has no file: deps; vendor organ is in the tarball\n");
64
+ }
65
+
66
+ const REQUIRED_TARBALL_DIST = [
67
+ "package/dist/cli/index.js",
68
+ "package/dist/mcps/orchestrator.server.js",
69
+ "package/dist/integrations/grok/hooks/session-start.js",
70
+ ];
71
+
72
+ function assertPackedDistCliInTarball(tarballPath) {
73
+ const listing = run(`tar -tzf ${JSON.stringify(tarballPath)}`);
74
+ const lines = new Set(listing.split("\n").map((l) => l.trim()).filter(Boolean));
75
+ const missing = REQUIRED_TARBALL_DIST.filter((p) => !lines.has(p));
76
+ if (missing.length > 0) {
77
+ throw new Error(
78
+ `packed tarball missing ${missing.join(", ")} (0xray@4.0.13 shipped 0 dist files)`,
79
+ );
80
+ }
81
+ process.stdout.write(" ✅ packed tarball includes dist/cli + MCP + Grok hooks\n");
64
82
  }
65
83
 
66
84
  function assertOrganRequire(tmpRoot) {
@@ -248,6 +266,7 @@ function main() {
248
266
  }
249
267
 
250
268
  assertPackedPackageHasNoFileDeps(tarballPath);
269
+ assertPackedDistCliInTarball(tarballPath);
251
270
 
252
271
  writeBareConsumerManifest(tmpRoot);
253
272
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xray-pre-tool",
3
- "version": "4.0.12",
3
+ "version": "4.0.14",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "0xRay constitution + temperament PreToolUse for OpenClaw",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "./features.schema.json",
3
- "version": "4.0.12",
3
+ "version": "4.0.14",
4
4
  "description": "0xRay Framework - Unified Feature Configuration",
5
5
  "suit_temperament": {
6
6
  "profile": "auto",
@@ -104,7 +104,7 @@
104
104
  "profile": {
105
105
  "type": "string",
106
106
  "enum": ["auto", "frontier", "guided", "strict"],
107
- "description": "auto = host_defaults (grok→frontier, hermes/opencode/openclaw→guided)"
107
+ "description": "auto = host_defaults (grok/cursor→frontier, hermes/opencode/openclaw→guided)"
108
108
  },
109
109
  "host_defaults": {
110
110
  "type": "object",