0xray 4.0.6 → 4.0.7

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/dist/CHANGELOG.md CHANGED
@@ -30,6 +30,13 @@ The format is based on [Conventional Commits](https://www.conventionalcommits.or
30
30
  - Mill plant fastens **inspect** (inspect AI work) plus `mill`. Not empty. Mill 0.1.6.
31
31
  - Nested mill **0.1.7**: inspect organ, four floors, passwd HOME, mill CI receipt. 4.0.5.
32
32
  - Nested mill **0.1.8**: isolated Hermes/OpenClaw, consumer tarball GET, CLI mint inspects. 4.0.6.
33
+ - Nested mill **0.1.9**: inventory DNA for Groover 0xray-suit pack. 4.0.7.
34
+
35
+ ---
36
+
37
+ ## [4.0.7] - 2026-09-09
38
+
39
+ Nested mill **0.1.9**. Inventory writes `dna` (keccak256 of canonical JSON without `mintedAt`). Inspect echoes dna + pack `0xray-suit`. Mill does not mint on chain. Not 5.0.0.
33
40
 
34
41
  ---
35
42
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "0xray",
3
- "version": "4.0.6",
3
+ "version": "4.0.7",
4
4
  "description": "Multi-agent orchestration and Codex governance for OpenCode, Hermes, Grok Build, and OpenClaw",
5
5
  "readme": "README.md",
6
6
  "license": "MIT",
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.9] - 2026-09-09
4
+
5
+ Inventory writes `dna` (keccak256 of canonical JSON without `mintedAt`). Inspect receipt echoes `dna` + pack `0xray-suit` for Groover GRVR. Mill does not mint on chain. Not an 8th MCP. Not 5.0.
6
+
3
7
  ## [0.1.8] - 2026-09-09
4
8
 
5
9
  Isolated HOME skips machine `~/.hermes` and `~/.openclaw` (passwd home, same gate as Grok). Inspect GETs a public consumer tarball (`@0xray/review-suit`). CLI `mint` runs inspect after overlay; postinstall does not. Not an 8th MCP. Not 5.0.
@@ -119,6 +119,8 @@ function checkReceipt(root) {
119
119
  suit: inventory.suit,
120
120
  mill: inventory.mill,
121
121
  millPlant: millPlantSkills,
122
+ dna: typeof inventory.dna === "string" ? inventory.dna : null,
123
+ pack: "0xray-suit",
122
124
  detail: ok ? null : "millPlant.skills must include mill and inspect",
123
125
  };
124
126
  }
@@ -273,10 +275,13 @@ export async function inspectSuit(root, opts = {}) {
273
275
  checks.push(checkIsolatedHome(env, machineHome));
274
276
 
275
277
  const failed = checks.filter((c) => c.ok === false);
278
+ const receipt = checks.find((c) => c.id === "receipt") || {};
276
279
  return {
277
280
  ok: failed.length === 0,
278
281
  failed: failed.map((c) => c.id),
279
282
  checks,
283
+ dna: receipt.dna || null,
284
+ pack: "0xray-suit",
280
285
  };
281
286
  }
282
287
 
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Canonical mill DNA for Groover GRVR. keccak256 of inventory without mintedAt/dna.
3
+ * Not a chain client. Not an 8th MCP.
4
+ */
5
+ "use strict";
6
+
7
+ const { keccak_256 } = require("./mill-keccak.cjs");
8
+
9
+ function isPlainObject(value) {
10
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
11
+ }
12
+
13
+ function canonicalJson(value) {
14
+ if (value === null || typeof value !== "object") return JSON.stringify(value);
15
+ if (Array.isArray(value)) {
16
+ return `[${value.map((item) => canonicalJson(item)).join(",")}]`;
17
+ }
18
+ const keys = Object.keys(value).sort();
19
+ return `{${keys.map((key) => `${JSON.stringify(key)}:${canonicalJson(value[key])}`).join(",")}}`;
20
+ }
21
+
22
+ function dnaPayload(inventory) {
23
+ if (!isPlainObject(inventory)) {
24
+ throw new Error("inventory object required for mill DNA");
25
+ }
26
+ const payload = { ...inventory };
27
+ delete payload.mintedAt;
28
+ delete payload.dna;
29
+ return payload;
30
+ }
31
+
32
+ function inventoryDna(inventory) {
33
+ const json = canonicalJson(dnaPayload(inventory));
34
+ const digest = keccak_256(Buffer.from(json, "utf8"));
35
+ return `0x${Buffer.from(digest).toString("hex")}`;
36
+ }
37
+
38
+ function attachInventoryDna(inventory) {
39
+ if (!isPlainObject(inventory)) return inventory;
40
+ const next = { ...inventory };
41
+ next.dna = inventoryDna(next);
42
+ return next;
43
+ }
44
+
45
+ module.exports = {
46
+ canonicalJson,
47
+ dnaPayload,
48
+ inventoryDna,
49
+ attachInventoryDna,
50
+ };
@@ -0,0 +1,306 @@
1
+ /* vendored @noble/hashes keccak_256 — mill DNA. Not an 8th MCP. */
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // <stdin>
21
+ var stdin_exports = {};
22
+ __export(stdin_exports, {
23
+ keccak_256: () => keccak_256
24
+ });
25
+ module.exports = __toCommonJS(stdin_exports);
26
+
27
+ // node_modules/@noble/hashes/esm/_u64.js
28
+ var U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
29
+ var _32n = /* @__PURE__ */ BigInt(32);
30
+ function fromBig(n, le = false) {
31
+ if (le)
32
+ return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
33
+ return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
34
+ }
35
+ function split(lst, le = false) {
36
+ const len = lst.length;
37
+ let Ah = new Uint32Array(len);
38
+ let Al = new Uint32Array(len);
39
+ for (let i = 0; i < len; i++) {
40
+ const { h, l } = fromBig(lst[i], le);
41
+ [Ah[i], Al[i]] = [h, l];
42
+ }
43
+ return [Ah, Al];
44
+ }
45
+ var rotlSH = (h, l, s) => h << s | l >>> 32 - s;
46
+ var rotlSL = (h, l, s) => l << s | h >>> 32 - s;
47
+ var rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
48
+ var rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
49
+
50
+ // node_modules/@noble/hashes/esm/utils.js
51
+ function isBytes(a) {
52
+ return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
53
+ }
54
+ function anumber(n) {
55
+ if (!Number.isSafeInteger(n) || n < 0)
56
+ throw new Error("positive integer expected, got " + n);
57
+ }
58
+ function abytes(b, ...lengths) {
59
+ if (!isBytes(b))
60
+ throw new Error("Uint8Array expected");
61
+ if (lengths.length > 0 && !lengths.includes(b.length))
62
+ throw new Error("Uint8Array expected of length " + lengths + ", got length=" + b.length);
63
+ }
64
+ function aexists(instance, checkFinished = true) {
65
+ if (instance.destroyed)
66
+ throw new Error("Hash instance has been destroyed");
67
+ if (checkFinished && instance.finished)
68
+ throw new Error("Hash#digest() has already been called");
69
+ }
70
+ function aoutput(out, instance) {
71
+ abytes(out);
72
+ const min = instance.outputLen;
73
+ if (out.length < min) {
74
+ throw new Error("digestInto() expects output buffer of length at least " + min);
75
+ }
76
+ }
77
+ function u32(arr) {
78
+ return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
79
+ }
80
+ function clean(...arrays) {
81
+ for (let i = 0; i < arrays.length; i++) {
82
+ arrays[i].fill(0);
83
+ }
84
+ }
85
+ var isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();
86
+ function byteSwap(word) {
87
+ return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;
88
+ }
89
+ function byteSwap32(arr) {
90
+ for (let i = 0; i < arr.length; i++) {
91
+ arr[i] = byteSwap(arr[i]);
92
+ }
93
+ return arr;
94
+ }
95
+ var swap32IfBE = isLE ? (u) => u : byteSwap32;
96
+ function utf8ToBytes(str) {
97
+ if (typeof str !== "string")
98
+ throw new Error("string expected");
99
+ return new Uint8Array(new TextEncoder().encode(str));
100
+ }
101
+ function toBytes(data) {
102
+ if (typeof data === "string")
103
+ data = utf8ToBytes(data);
104
+ abytes(data);
105
+ return data;
106
+ }
107
+ var Hash = class {
108
+ };
109
+ function createHasher(hashCons) {
110
+ const hashC = (msg) => hashCons().update(toBytes(msg)).digest();
111
+ const tmp = hashCons();
112
+ hashC.outputLen = tmp.outputLen;
113
+ hashC.blockLen = tmp.blockLen;
114
+ hashC.create = () => hashCons();
115
+ return hashC;
116
+ }
117
+
118
+ // node_modules/@noble/hashes/esm/sha3.js
119
+ var _0n = BigInt(0);
120
+ var _1n = BigInt(1);
121
+ var _2n = BigInt(2);
122
+ var _7n = BigInt(7);
123
+ var _256n = BigInt(256);
124
+ var _0x71n = BigInt(113);
125
+ var SHA3_PI = [];
126
+ var SHA3_ROTL = [];
127
+ var _SHA3_IOTA = [];
128
+ for (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {
129
+ [x, y] = [y, (2 * x + 3 * y) % 5];
130
+ SHA3_PI.push(2 * (5 * y + x));
131
+ SHA3_ROTL.push((round + 1) * (round + 2) / 2 % 64);
132
+ let t = _0n;
133
+ for (let j = 0; j < 7; j++) {
134
+ R = (R << _1n ^ (R >> _7n) * _0x71n) % _256n;
135
+ if (R & _2n)
136
+ t ^= _1n << (_1n << /* @__PURE__ */ BigInt(j)) - _1n;
137
+ }
138
+ _SHA3_IOTA.push(t);
139
+ }
140
+ var IOTAS = split(_SHA3_IOTA, true);
141
+ var SHA3_IOTA_H = IOTAS[0];
142
+ var SHA3_IOTA_L = IOTAS[1];
143
+ var rotlH = (h, l, s) => s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s);
144
+ var rotlL = (h, l, s) => s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s);
145
+ function keccakP(s, rounds = 24) {
146
+ const B = new Uint32Array(5 * 2);
147
+ for (let round = 24 - rounds; round < 24; round++) {
148
+ for (let x = 0; x < 10; x++)
149
+ B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];
150
+ for (let x = 0; x < 10; x += 2) {
151
+ const idx1 = (x + 8) % 10;
152
+ const idx0 = (x + 2) % 10;
153
+ const B0 = B[idx0];
154
+ const B1 = B[idx0 + 1];
155
+ const Th = rotlH(B0, B1, 1) ^ B[idx1];
156
+ const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];
157
+ for (let y = 0; y < 50; y += 10) {
158
+ s[x + y] ^= Th;
159
+ s[x + y + 1] ^= Tl;
160
+ }
161
+ }
162
+ let curH = s[2];
163
+ let curL = s[3];
164
+ for (let t = 0; t < 24; t++) {
165
+ const shift = SHA3_ROTL[t];
166
+ const Th = rotlH(curH, curL, shift);
167
+ const Tl = rotlL(curH, curL, shift);
168
+ const PI = SHA3_PI[t];
169
+ curH = s[PI];
170
+ curL = s[PI + 1];
171
+ s[PI] = Th;
172
+ s[PI + 1] = Tl;
173
+ }
174
+ for (let y = 0; y < 50; y += 10) {
175
+ for (let x = 0; x < 10; x++)
176
+ B[x] = s[y + x];
177
+ for (let x = 0; x < 10; x++)
178
+ s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];
179
+ }
180
+ s[0] ^= SHA3_IOTA_H[round];
181
+ s[1] ^= SHA3_IOTA_L[round];
182
+ }
183
+ clean(B);
184
+ }
185
+ var Keccak = class _Keccak extends Hash {
186
+ // NOTE: we accept arguments in bytes instead of bits here.
187
+ constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {
188
+ super();
189
+ this.pos = 0;
190
+ this.posOut = 0;
191
+ this.finished = false;
192
+ this.destroyed = false;
193
+ this.enableXOF = false;
194
+ this.blockLen = blockLen;
195
+ this.suffix = suffix;
196
+ this.outputLen = outputLen;
197
+ this.enableXOF = enableXOF;
198
+ this.rounds = rounds;
199
+ anumber(outputLen);
200
+ if (!(0 < blockLen && blockLen < 200))
201
+ throw new Error("only keccak-f1600 function is supported");
202
+ this.state = new Uint8Array(200);
203
+ this.state32 = u32(this.state);
204
+ }
205
+ clone() {
206
+ return this._cloneInto();
207
+ }
208
+ keccak() {
209
+ swap32IfBE(this.state32);
210
+ keccakP(this.state32, this.rounds);
211
+ swap32IfBE(this.state32);
212
+ this.posOut = 0;
213
+ this.pos = 0;
214
+ }
215
+ update(data) {
216
+ aexists(this);
217
+ data = toBytes(data);
218
+ abytes(data);
219
+ const { blockLen, state } = this;
220
+ const len = data.length;
221
+ for (let pos = 0; pos < len; ) {
222
+ const take = Math.min(blockLen - this.pos, len - pos);
223
+ for (let i = 0; i < take; i++)
224
+ state[this.pos++] ^= data[pos++];
225
+ if (this.pos === blockLen)
226
+ this.keccak();
227
+ }
228
+ return this;
229
+ }
230
+ finish() {
231
+ if (this.finished)
232
+ return;
233
+ this.finished = true;
234
+ const { state, suffix, pos, blockLen } = this;
235
+ state[pos] ^= suffix;
236
+ if ((suffix & 128) !== 0 && pos === blockLen - 1)
237
+ this.keccak();
238
+ state[blockLen - 1] ^= 128;
239
+ this.keccak();
240
+ }
241
+ writeInto(out) {
242
+ aexists(this, false);
243
+ abytes(out);
244
+ this.finish();
245
+ const bufferOut = this.state;
246
+ const { blockLen } = this;
247
+ for (let pos = 0, len = out.length; pos < len; ) {
248
+ if (this.posOut >= blockLen)
249
+ this.keccak();
250
+ const take = Math.min(blockLen - this.posOut, len - pos);
251
+ out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);
252
+ this.posOut += take;
253
+ pos += take;
254
+ }
255
+ return out;
256
+ }
257
+ xofInto(out) {
258
+ if (!this.enableXOF)
259
+ throw new Error("XOF is not possible for this instance");
260
+ return this.writeInto(out);
261
+ }
262
+ xof(bytes) {
263
+ anumber(bytes);
264
+ return this.xofInto(new Uint8Array(bytes));
265
+ }
266
+ digestInto(out) {
267
+ aoutput(out, this);
268
+ if (this.finished)
269
+ throw new Error("digest() was already called");
270
+ this.writeInto(out);
271
+ this.destroy();
272
+ return out;
273
+ }
274
+ digest() {
275
+ return this.digestInto(new Uint8Array(this.outputLen));
276
+ }
277
+ destroy() {
278
+ this.destroyed = true;
279
+ clean(this.state);
280
+ }
281
+ _cloneInto(to) {
282
+ const { blockLen, suffix, outputLen, rounds, enableXOF } = this;
283
+ to || (to = new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds));
284
+ to.state32.set(this.state32);
285
+ to.pos = this.pos;
286
+ to.posOut = this.posOut;
287
+ to.finished = this.finished;
288
+ to.rounds = rounds;
289
+ to.suffix = suffix;
290
+ to.outputLen = outputLen;
291
+ to.enableXOF = enableXOF;
292
+ to.destroyed = this.destroyed;
293
+ return to;
294
+ }
295
+ };
296
+ var gen = (suffix, blockLen, outputLen) => createHasher(() => new Keccak(blockLen, suffix, outputLen));
297
+ var keccak_256 = /* @__PURE__ */ (() => gen(1, 136, 256 / 8))();
298
+ // Annotate the CommonJS export names for ESM import in node:
299
+ 0 && (module.exports = {
300
+ keccak_256
301
+ });
302
+ /*! Bundled license information:
303
+
304
+ @noble/hashes/esm/utils.js:
305
+ (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
306
+ */
@@ -10,6 +10,8 @@ const fs = require("fs");
10
10
  const os = require("os");
11
11
  const path = require("path");
12
12
 
13
+ const { attachInventoryDna, inventoryDna } = require("./mill-dna.cjs");
14
+
13
15
  const DEFAULT_PARAMS = {
14
16
  codex: "xray/codex.json",
15
17
  features: "xray/features.json",
@@ -436,20 +438,22 @@ function mintConsumerFromSsot(packageRoot, targetDir, log, tree) {
436
438
  },
437
439
  mintedAt: new Date().toISOString(),
438
440
  };
441
+ const withDna = attachInventoryDna(inventory);
439
442
  const xrayDir = path.join(targetDir, ".xray");
440
443
  if (!fs.existsSync(xrayDir)) fs.mkdirSync(xrayDir, { recursive: true });
441
444
  fs.writeFileSync(
442
445
  path.join(xrayDir, "foundry-inventory.json"),
443
- `${JSON.stringify(inventory, null, 2)}\n`,
446
+ `${JSON.stringify(withDna, null, 2)}\n`,
444
447
  );
445
448
  if (log) {
446
449
  log("foundry-mint", "Minted foundry-inventory from consumer mill SSOT", "info", {
447
450
  consumer: consumer.name,
448
451
  version: consumer.version,
449
452
  suit,
453
+ dna: withDna.dna,
450
454
  });
451
455
  }
452
- return inventory;
456
+ return withDna;
453
457
  }
454
458
 
455
459
  function mintConsumerSuit(millPackageRoot, targetDir, log) {
@@ -504,6 +508,8 @@ module.exports = {
504
508
  listProjectSkillDirs,
505
509
  mintConsumerFromSsot,
506
510
  mintConsumerSuit,
511
+ attachInventoryDna,
512
+ inventoryDna,
507
513
  isDogfood,
508
514
  readPackageIdentity,
509
515
  wornSkillNames,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xray/foundry",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "0xRay mill: mint their suit params, stamp, gate, publish, CI report, git hooks. Not the worn exo.",
@@ -1,5 +1,5 @@
1
1
  name: inspect
2
2
  skill: inspect
3
3
  description: "Inspect AI work: diffs, traces, mill receipts, CI. Fastened mill plant."
4
- version: "0.1.8"
4
+ version: "0.1.9"
5
5
  mode: subagent
@@ -1,5 +1,5 @@
1
1
  name: mill
2
2
  skill: mill
3
3
  description: "Fasten their plant as the suit. Factory Repertoire. Inspect is the mill discipline."
4
- version: "0.1.8"
4
+ version: "0.1.9"
5
5
  mode: subagent