@agent-ix/quoin 0.21.2 → 0.21.8

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 (107) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/bin/quoin.js +9 -2
  4. package/default-modules.yaml +4 -4
  5. package/dist/advisor/advise.d.ts +91 -5
  6. package/dist/advisor/advise.d.ts.map +1 -1
  7. package/dist/advisor/index.d.ts +1 -1
  8. package/dist/advisor/index.d.ts.map +1 -1
  9. package/dist/{advisor-x8vSvzWl.js → advisor-COB2SuIj.js} +1 -1
  10. package/dist/assurance/graph.d.ts +8 -0
  11. package/dist/assurance/graph.d.ts.map +1 -1
  12. package/dist/auditor/audit.d.ts +51 -17
  13. package/dist/auditor/audit.d.ts.map +1 -1
  14. package/dist/auditor/index.d.ts +1 -1
  15. package/dist/auditor/index.d.ts.map +1 -1
  16. package/dist/{auditor-B6Hs00oH.js → auditor-ww0MC62a.js} +127 -73
  17. package/dist/{base-DVl7skpc.js → base-DNieRzIg.js} +1 -1
  18. package/dist/cli.d.ts +28 -0
  19. package/dist/cli.d.ts.map +1 -1
  20. package/dist/cli.js +20 -10
  21. package/dist/commands/advise.d.ts.map +1 -1
  22. package/dist/commands/advise.js +65 -42
  23. package/dist/commands/assurance.d.ts.map +1 -1
  24. package/dist/commands/assurance.js +21 -19
  25. package/dist/commands/catalog/list.js +2 -2
  26. package/dist/commands/catalog/methods.js +3 -3
  27. package/dist/commands/catalog/show.js +2 -2
  28. package/dist/commands/catalog/validate.js +2 -2
  29. package/dist/commands/completeness.js +2 -2
  30. package/dist/commands/config/doctor.js +1 -1
  31. package/dist/commands/config/edit.js +1 -1
  32. package/dist/commands/config/get.js +1 -1
  33. package/dist/commands/config/set.js +1 -1
  34. package/dist/commands/evidence/affirm.d.ts.map +1 -1
  35. package/dist/commands/evidence/affirm.js +4 -7
  36. package/dist/commands/evidence/audit.d.ts +8 -0
  37. package/dist/commands/evidence/audit.d.ts.map +1 -1
  38. package/dist/commands/evidence/audit.js +39 -36
  39. package/dist/commands/evidence/baseline.js +5 -5
  40. package/dist/commands/evidence/gc.d.ts.map +1 -1
  41. package/dist/commands/evidence/gc.js +3 -3
  42. package/dist/commands/evidence/index.js +1 -1
  43. package/dist/commands/evidence/record.js +3 -3
  44. package/dist/commands/matrix.js +1 -1
  45. package/dist/commands/module/ensure-defaults.js +3 -3
  46. package/dist/commands/module/install.js +2 -2
  47. package/dist/commands/module/list.js +2 -2
  48. package/dist/commands/module/remove.js +2 -2
  49. package/dist/commands/review.js +1 -1
  50. package/dist/commands/to-plan.js +1 -1
  51. package/dist/commands/update.js +2 -2
  52. package/dist/commands/write.js +3 -3
  53. package/dist/{completeness-Bl40nk02.js → completeness-F657dxMp.js} +1 -1
  54. package/dist/evidence/adapters/cargo-mutants.d.ts.map +1 -1
  55. package/dist/evidence/index.d.ts +1 -1
  56. package/dist/evidence/index.d.ts.map +1 -1
  57. package/dist/evidence/record.d.ts.map +1 -1
  58. package/dist/evidence/types.d.ts +23 -0
  59. package/dist/evidence/types.d.ts.map +1 -1
  60. package/dist/{evidence-DopNnj0E.js → evidence-BA5vyZJk.js} +134 -136
  61. package/dist/{flow-command-zfisQlK7.js → flow-command-D1vJU-7a.js} +14 -14
  62. package/dist/index.js +6 -6
  63. package/dist/modules-BWyZ7kVN.js +23 -0
  64. package/dist/{plugins-7DX6rIfX.js → plugins-Czi2OyDB.js} +1 -1
  65. package/dist/quire/contract.d.ts +8 -2
  66. package/dist/quire/contract.d.ts.map +1 -1
  67. package/dist/quire/exec.d.ts +12 -0
  68. package/dist/quire/exec.d.ts.map +1 -1
  69. package/dist/quire/index.d.ts +2 -2
  70. package/dist/quire/index.d.ts.map +1 -1
  71. package/dist/quire/types.d.ts +131 -0
  72. package/dist/quire/types.d.ts.map +1 -1
  73. package/dist/{quire-VZjWaHph.js → quire-UzoK3Azf.js} +281 -273
  74. package/dist/schemas/coverage-v1.schema.json +89 -5
  75. package/dist/{version-DxqfsO8n.js → version-G_RI6TD4.js} +5 -5
  76. package/dist/{write-Dkpd6XwW.js → write-BJ9rTVAS.js} +1 -1
  77. package/package.json +6 -4
  78. package/skills/gap-analysis/references/step-3-matrix-verification.md +1 -1
  79. package/skills/spec-dependency-analysis/SKILL.md +15 -0
  80. package/skills/spec-failure-domain-analysis/SKILL.md +15 -0
  81. package/skills/spec-fuzz/SKILL.md +8 -0
  82. package/skills/spec-integrity-analysis/SKILL.md +15 -0
  83. package/skills/spec-matrix/SKILL.md +9 -4
  84. package/skills/spec-matrix/assets/test-matrix-example.md +2 -2
  85. package/skills/spec-matrix/assets/test-matrix-template.md +3 -3
  86. package/skills/spec-matrix/workflow-assets/dist/index.d.ts +146 -0
  87. package/skills/spec-matrix/workflow-assets/dist/index.d.ts.map +1 -0
  88. package/skills/spec-matrix/workflow-assets/dist/index.js +7525 -0
  89. package/skills/spec-matrix/workflow-assets/dist/invariants.d.ts +6 -0
  90. package/skills/spec-matrix/workflow-assets/dist/invariants.d.ts.map +1 -0
  91. package/skills/spec-review/SKILL.md +8 -0
  92. package/skills/spec-review/workflow-assets/dist/index.d.ts +146 -0
  93. package/skills/spec-review/workflow-assets/dist/index.d.ts.map +1 -0
  94. package/skills/spec-review/workflow-assets/dist/index.js +7525 -0
  95. package/skills/spec-review/workflow-assets/dist/invariants.d.ts +6 -0
  96. package/skills/spec-review/workflow-assets/dist/invariants.d.ts.map +1 -0
  97. package/skills/spec-review/workflow-assets/skills/review/SKILL.md +4 -4
  98. package/skills/spec-review/workflow-assets/skills/review/scripts/invariants.js +3 -2
  99. package/skills/spec-review/workflow-assets/skills/review/workflows/review/def.yaml +3 -3
  100. package/skills/spec-risk-complexity-analysis/SKILL.md +15 -0
  101. package/skills/spec-scope-boundary-analysis/SKILL.md +15 -0
  102. package/skills/spec-to-plan/workflow-assets/dist/index.d.ts +146 -0
  103. package/skills/spec-to-plan/workflow-assets/dist/index.d.ts.map +1 -0
  104. package/skills/spec-to-plan/workflow-assets/dist/index.js +7525 -0
  105. package/skills/spec-to-plan/workflow-assets/dist/invariants.d.ts +6 -0
  106. package/skills/spec-to-plan/workflow-assets/dist/invariants.d.ts.map +1 -0
  107. package/dist/modules-BEWi5WeN.js +0 -23
@@ -1,41 +1,41 @@
1
1
  import { existsSync as e, mkdirSync as t, readFileSync as n, readdirSync as r, rmSync as i, writeFileSync as a } from "node:fs";
2
2
  import { dirname as o, join as s } from "node:path";
3
3
  //#region src/evidence/types.ts
4
- var c = "runs", l = "scans";
4
+ var c = "runs", l = "scans", u = "mutation-score";
5
5
  //#endregion
6
6
  //#region src/evidence/store.ts
7
- function u(e) {
8
- return s(e, "spec", "evidence");
9
- }
10
7
  function d(e) {
11
- return s(u(e), "bindings.json");
8
+ return s(e, "spec", "evidence");
12
9
  }
13
10
  function f(e) {
14
- return s(u(e), "baseline.json");
11
+ return s(d(e), "bindings.json");
15
12
  }
16
- function p(e, t, n) {
17
- return s(u(e), c, t, `${h(n)}.json`);
13
+ function p(e) {
14
+ return s(d(e), "baseline.json");
18
15
  }
19
16
  function m(e, t, n) {
20
- return s(u(e), l, t, `${h(n)}.json`);
17
+ return s(d(e), c, t, `${g(n)}.json`);
21
18
  }
22
- function h(e) {
23
- return e.slice(0, 12);
19
+ function h(e, t, n) {
20
+ return s(d(e), l, t, `${g(n)}.json`);
24
21
  }
25
22
  function g(e) {
26
- return `${JSON.stringify(_(e), null, 2)}\n`;
23
+ return e.slice(0, 12);
27
24
  }
28
25
  function _(e) {
29
- if (Array.isArray(e)) return e.map(_);
26
+ return `${JSON.stringify(v(e), null, 2)}\n`;
27
+ }
28
+ function v(e) {
29
+ if (Array.isArray(e)) return e.map(v);
30
30
  if (typeof e != "object" || !e) return e;
31
31
  let t = {};
32
- for (let n of Object.keys(e).sort()) t[n] = _(e[n]);
32
+ for (let n of Object.keys(e).sort()) t[n] = v(e[n]);
33
33
  return t;
34
34
  }
35
- function v(e, n) {
36
- t(o(e), { recursive: !0 }), a(e, g(n), "utf8");
35
+ function y(e, n) {
36
+ t(o(e), { recursive: !0 }), a(e, _(n), "utf8");
37
37
  }
38
- var y = class extends Error {
38
+ var b = class extends Error {
39
39
  path;
40
40
  cause;
41
41
  constructor(e, t) {
@@ -43,63 +43,63 @@ var y = class extends Error {
43
43
  super(`${e} exists but is not readable JSON: ${n}. A merge conflict in a checked-in store file is the usual cause — resolve it, or delete the file to start from an empty store.`), this.path = e, this.cause = t, this.name = "StoreReadError";
44
44
  }
45
45
  };
46
- function b(t) {
46
+ function x(t) {
47
47
  if (!e(t)) return null;
48
48
  try {
49
49
  return JSON.parse(n(t, "utf8"));
50
50
  } catch (e) {
51
- throw new y(t, e);
51
+ throw new b(t, e);
52
52
  }
53
53
  }
54
- function x(e, t) {
54
+ function S(e, t) {
55
55
  try {
56
- return b(e);
56
+ return x(e);
57
57
  } catch (n) {
58
- if (n instanceof y) return t.push(e), null;
58
+ if (n instanceof b) return t.push(e), null;
59
59
  throw n;
60
60
  }
61
61
  }
62
62
  function ee(e, t) {
63
- let n = p(e, t.suite, t.commit);
64
- return v(n, {
63
+ let n = m(e, t.suite, t.commit);
64
+ return y(n, {
65
65
  ...t,
66
66
  schemaVersion: 1
67
67
  }), n;
68
68
  }
69
69
  function te(e, t) {
70
- let n = m(e, t.suite, t.commit);
71
- return v(n, {
70
+ let n = h(e, t.suite, t.commit);
71
+ return y(n, {
72
72
  ...t,
73
73
  schemaVersion: 1
74
74
  }), n;
75
75
  }
76
- function S(t, n) {
77
- let i = s(u(t), l, n);
76
+ function C(t, n) {
77
+ let i = s(d(t), l, n);
78
78
  return e(i) ? r(i).filter((e) => e.endsWith(".json")).sort() : [];
79
79
  }
80
- function C(e, t, n = []) {
81
- return S(e, t).map((r) => x(m(e, t, r.replace(/\.json$/, "")), n)).filter((e) => e !== null).sort((e, t) => k(e.timestamp, t.timestamp) || k(e.commit, t.commit));
80
+ function ne(e, t, n = []) {
81
+ return C(e, t).map((r) => S(h(e, t, r.replace(/\.json$/, "")), n)).filter((e) => e !== null).sort((e, t) => k(e.timestamp, t.timestamp) || k(e.commit, t.commit));
82
82
  }
83
83
  function w(e, t, n = []) {
84
- return C(e, t, n).at(-1) ?? null;
84
+ return ne(e, t, n).at(-1) ?? null;
85
85
  }
86
- function ne(e) {
86
+ function re(e) {
87
87
  return e.rulesEvaluated === void 0 ? null : e.rulesEvaluated === 0;
88
88
  }
89
89
  function T(t, n) {
90
- let i = s(u(t), c, n);
90
+ let i = s(d(t), c, n);
91
91
  return e(i) ? r(i).filter((e) => e.endsWith(".json")).sort() : [];
92
92
  }
93
- function re(e, t, n = []) {
94
- return T(e, t).map((r) => x(p(e, t, r.replace(/\.json$/, "")), n)).filter((e) => e !== null).sort((e, t) => k(e.timestamp, t.timestamp) || k(e.commit, t.commit));
95
- }
96
93
  function E(e, t, n = []) {
97
- return re(e, t, n).at(-1) ?? null;
94
+ return T(e, t).map((r) => S(m(e, t, r.replace(/\.json$/, "")), n)).filter((e) => e !== null).sort((e, t) => k(e.timestamp, t.timestamp) || k(e.commit, t.commit));
98
95
  }
99
- function D(e) {
100
- return A(e).map((t) => E(e, t)).filter((e) => e !== null);
96
+ function D(e, t, n = []) {
97
+ return E(e, t, n).at(-1) ?? null;
101
98
  }
102
99
  function O(e) {
100
+ return A(e).map((t) => D(e, t)).filter((e) => e !== null);
101
+ }
102
+ function ie(e) {
103
103
  return A(e).map((t) => w(e, t)).filter((e) => e !== null);
104
104
  }
105
105
  function k(e, t) {
@@ -108,58 +108,58 @@ function k(e, t) {
108
108
  function A(t) {
109
109
  let n = /* @__PURE__ */ new Set();
110
110
  for (let i of [c, l]) {
111
- let a = s(u(t), i);
111
+ let a = s(d(t), i);
112
112
  if (e(a)) for (let e of r(a, { withFileTypes: !0 })) e.isDirectory() && n.add(e.name);
113
113
  }
114
114
  return [...n].sort();
115
115
  }
116
116
  function j(e) {
117
- return b(d(e)) ?? {
117
+ return x(f(e)) ?? {
118
118
  schemaVersion: 1,
119
119
  bindings: []
120
120
  };
121
121
  }
122
122
  function M(e, t) {
123
- let n = [...t.bindings].sort(P);
124
- v(d(e), {
123
+ let n = [...t.bindings].sort(F);
124
+ y(f(e), {
125
125
  schemaVersion: 1,
126
126
  bindings: n
127
127
  });
128
128
  }
129
- function ie(e) {
130
- return b(f(e));
129
+ function ae(e) {
130
+ return x(p(e));
131
131
  }
132
- function ae(e, t) {
133
- v(f(e), {
132
+ function N(e, t) {
133
+ y(p(e), {
134
134
  schemaVersion: 1,
135
135
  commit: t.commit,
136
136
  accepted: [...t.accepted].sort(k)
137
137
  });
138
138
  }
139
- function N(e, t = !1) {
140
- let n = new Set(j(e).bindings.map((e) => `${e.suite}/${h(e.commit)}.json`)), r = [];
139
+ function P(e, t = !1) {
140
+ let n = new Set(j(e).bindings.map((e) => `${e.suite}/${g(e.commit)}.json`)), r = [];
141
141
  for (let a of A(e)) {
142
- let o = T(e, a), d = /* @__PURE__ */ new Set(), f = E(e, a);
143
- f && d.add(`${h(f.commit)}.json`);
142
+ let o = T(e, a), u = /* @__PURE__ */ new Set(), f = D(e, a);
143
+ f && u.add(`${g(f.commit)}.json`);
144
144
  for (let l of o) {
145
- if (d.has(l) || n.has(`${a}/${l}`)) continue;
146
- let o = s(u(e), c, a, l);
145
+ if (u.has(l) || n.has(`${a}/${l}`)) continue;
146
+ let o = s(d(e), c, a, l);
147
147
  r.push(o), t || i(o);
148
148
  }
149
- let p = S(e, a), m = /* @__PURE__ */ new Set(), g = w(e, a);
150
- g && m.add(`${h(g.commit)}.json`);
149
+ let p = C(e, a), m = /* @__PURE__ */ new Set(), h = w(e, a);
150
+ h && m.add(`${g(h.commit)}.json`);
151
151
  for (let o of p) {
152
152
  if (m.has(o) || n.has(`${a}/${o}`)) continue;
153
- let c = s(u(e), l, a, o);
153
+ let c = s(d(e), l, a, o);
154
154
  r.push(c), t || i(c);
155
155
  }
156
156
  }
157
157
  return r.sort();
158
158
  }
159
- function P(e, t) {
159
+ function F(e, t) {
160
160
  return e.obligation === t.obligation ? e.suite === t.suite ? 0 : e.suite < t.suite ? -1 : 1 : e.obligation < t.obligation ? -1 : 1;
161
161
  }
162
- function F(e, t) {
162
+ function I(e, t) {
163
163
  let n = e.findIndex((e) => e.obligation === t.obligation && e.suite === t.suite);
164
164
  if (n === -1) return {
165
165
  bindings: [...e, { ...t }],
@@ -177,7 +177,7 @@ function F(e, t) {
177
177
  suspect: i
178
178
  };
179
179
  }
180
- function I(e, t, n, r, i, a, o) {
180
+ function L(e, t, n, r, i, a, o) {
181
181
  let s = e.map((e, t) => [e, t]).filter(([e]) => e.obligation === t && (!o || e.suite === o));
182
182
  if (s.length === 0) return {
183
183
  bindings: e,
@@ -200,7 +200,7 @@ function I(e, t, n, r, i, a, o) {
200
200
  }
201
201
  //#endregion
202
202
  //#region src/evidence/record.ts
203
- function L(e) {
203
+ function R(e) {
204
204
  let t = ee(e.repo, {
205
205
  schemaVersion: 1,
206
206
  suite: e.suite,
@@ -227,7 +227,7 @@ function L(e) {
227
227
  for (let [t, r] of [...i].sort(([e], [t]) => e === t ? 0 : e < t ? -1 : 1)) {
228
228
  let i = n.get(t);
229
229
  if (!i) continue;
230
- let a = F(o, {
230
+ let a = I(o, {
231
231
  obligation: t,
232
232
  statementHashAtBinding: i.statement_hash,
233
233
  suite: e.suite,
@@ -236,22 +236,19 @@ function L(e) {
236
236
  });
237
237
  o = a.bindings, a.created && s.push(t), a.suspect && c.push(t);
238
238
  }
239
- return M(e.repo, {
240
- schemaVersion: 1,
241
- bindings: o
242
- }), {
239
+ return M(e.repo, { bindings: o }), {
243
240
  runPath: t,
244
241
  bound: s.sort(),
245
242
  suspect: c.sort(),
246
243
  unmatched: [...a].sort()
247
244
  };
248
245
  }
249
- function R(e) {
246
+ function z(e) {
250
247
  return e.obligations ?? [];
251
248
  }
252
249
  //#endregion
253
250
  //#region src/evidence/adapters/types.ts
254
- var z = class extends Error {
251
+ var B = class extends Error {
255
252
  adapter;
256
253
  constructor(e, t) {
257
254
  super(`${e}: ${t}`), this.adapter = e, this.name = "AdapterError";
@@ -259,11 +256,11 @@ var z = class extends Error {
259
256
  };
260
257
  //#endregion
261
258
  //#region src/evidence/adapters/cargo-mutants.ts
262
- function B(e) {
259
+ function V(e) {
263
260
  let t = e.file?.trim(), n = e.function?.function_name?.trim();
264
261
  if (t !== void 0 && t !== "" && n !== void 0 && n !== "") return `${t}::${n}`;
265
262
  }
266
- var V = {
263
+ var H = {
267
264
  name: "cargo-mutants",
268
265
  summary: "cargo-mutants outcomes.json — mutation score per mutated function.",
269
266
  tools: ["cargo-mutants", "cargo mutants"],
@@ -272,54 +269,55 @@ var V = {
272
269
  try {
273
270
  t = JSON.parse(e);
274
271
  } catch (e) {
275
- throw new z("cargo-mutants", `input is not JSON: ${e.message}`);
272
+ throw new B("cargo-mutants", `input is not JSON: ${e.message}`);
276
273
  }
277
- if (!Array.isArray(t.outcomes)) throw new z("cargo-mutants", "no `outcomes` array — expected the contents of mutants.out/outcomes.json");
274
+ if (!Array.isArray(t.outcomes)) throw new B("cargo-mutants", "no `outcomes` array — expected the contents of mutants.out/outcomes.json");
278
275
  let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
279
276
  for (let e of t.outcomes) {
280
277
  if (e.scenario === "Baseline" || typeof e.scenario != "object") continue;
281
278
  let t = e.scenario.Mutant;
282
279
  if (t === void 0) continue;
283
- let i = B(t);
280
+ let i = V(t);
284
281
  i !== void 0 && (e.summary === "CaughtMutant" ? n.set(i, (n.get(i) ?? 0) + 1) : (e.summary === "MissedMutant" || e.summary === "Timeout") && r.set(i, (r.get(i) ?? 0) + 1));
285
282
  }
286
283
  let i = [.../* @__PURE__ */ new Set([...n.keys(), ...r.keys()])].sort();
287
- if (i.length === 0) throw new z("cargo-mutants", "no viable mutants in the report — nothing was measured");
284
+ if (i.length === 0) throw new B("cargo-mutants", "no viable mutants in the report — nothing was measured");
288
285
  return { entries: i.map((e) => {
289
286
  let t = n.get(e) ?? 0, i = r.get(e) ?? 0, a = t + i;
290
287
  return {
291
288
  symbol: e,
292
289
  outcome: i === 0 ? "pass" : "fail",
293
- score: t / a
290
+ score: t / a,
291
+ metric: u
294
292
  };
295
293
  }) };
296
294
  }
297
- }, H = /<testcase\b([^>]*?)(\/>|>([\s\S]*?)<\/testcase\s*>)/g, U = /([\w:.-]+)\s*=\s*"([^"]*)"/g;
298
- function W(e) {
295
+ }, U = /<testcase\b([^>]*?)(\/>|>([\s\S]*?)<\/testcase\s*>)/g, W = /([\w:.-]+)\s*=\s*"([^"]*)"/g;
296
+ function G(e) {
299
297
  let t = /* @__PURE__ */ new Map();
300
- for (let n of e.matchAll(U)) t.set(n[1], G(n[2]));
298
+ for (let n of e.matchAll(W)) t.set(n[1], K(n[2]));
301
299
  return t;
302
300
  }
303
- function G(e) {
301
+ function K(e) {
304
302
  return e.replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&quot;", "\"").replaceAll("&apos;", "'").replaceAll("&amp;", "&");
305
303
  }
306
- function K(e, t) {
304
+ function q(e, t) {
307
305
  let n = e.trim(), r = t.trim();
308
306
  return n === "" ? r : r === "" ? n : n === r ? r : n.endsWith(`::${r}`) || n.endsWith(`.${r}`) ? n.replaceAll(".", "::") : `${n.replaceAll(".", "::")}::${r}`;
309
307
  }
310
- var q = /<property\b([^>]*)\/?>/g;
311
- function J(e) {
308
+ var J = /<property\b([^>]*)\/?>/g;
309
+ function oe(e) {
312
310
  let t = [];
313
- for (let n of e.matchAll(q)) {
314
- let e = W(n[1]), r = e.get("name"), i = e.get("value");
311
+ for (let n of e.matchAll(J)) {
312
+ let e = G(n[1]), r = e.get("name"), i = e.get("value");
315
313
  if (r !== void 0 && i !== void 0 && (r === "trace" || r === "traceIds" || r === "trace_ids")) for (let e of i.split(/[,\s]+/)) e !== "" && t.push(e);
316
314
  }
317
315
  return t.length > 0 ? t : void 0;
318
316
  }
319
- function oe(e) {
317
+ function se(e) {
320
318
  return /<error\b/.test(e) ? "error" : /<failure\b/.test(e) ? "fail" : /<skipped\b/.test(e) ? "skip" : "pass";
321
319
  }
322
- var se = {
320
+ var ce = {
323
321
  name: "junit",
324
322
  summary: "JUnit XML (<testsuite>/<testcase>), as emitted by most runners.",
325
323
  tools: [
@@ -332,34 +330,34 @@ var se = {
332
330
  ],
333
331
  parse(e) {
334
332
  let t = [];
335
- for (let n of e.matchAll(H)) {
336
- let e = W(n[1]), r = n[3] ?? "", i = K(e.get("classname") ?? "", e.get("name") ?? "");
333
+ for (let n of e.matchAll(U)) {
334
+ let e = G(n[1]), r = n[3] ?? "", i = q(e.get("classname") ?? "", e.get("name") ?? "");
337
335
  if (i === "") continue;
338
- let a = J(r);
336
+ let a = oe(r);
339
337
  t.push({
340
338
  symbol: i,
341
- outcome: oe(r),
339
+ outcome: se(r),
342
340
  ...a === void 0 ? {} : { traceIds: a }
343
341
  });
344
342
  }
345
- if (t.length === 0) throw new z("junit", "no <testcase> elements found — is this JUnit XML?");
343
+ if (t.length === 0) throw new B("junit", "no <testcase> elements found — is this JUnit XML?");
346
344
  return { entries: t };
347
345
  }
348
- }, ce = /^([A-Za-z0-9._-]+):\s*(OK|FAIL)\b\s*(?:[—-]\s*)?(.*)$/, le = /\(([^)]*)\)[.\s]*$/, ue = /\b((?:FR|NFR|StR|US)-\d+-AC-\d+|TC-\d+)\b/g;
349
- function de(e) {
350
- let t = le.exec(e);
346
+ }, le = /^([A-Za-z0-9._-]+):\s*(OK|FAIL)\b\s*(?:[—-]\s*)?(.*)$/, ue = /\(([^)]*)\)[.\s]*$/, de = /\b((?:FR|NFR|StR|US)-\d+-AC-\d+|TC-\d+)\b/g;
347
+ function fe(e) {
348
+ let t = ue.exec(e);
351
349
  if (!t) return;
352
- let n = [...t[1].matchAll(ue)].map((e) => e[1]);
350
+ let n = [...t[1].matchAll(de)].map((e) => e[1]);
353
351
  return n.length > 0 ? n : void 0;
354
352
  }
355
- function fe(e) {
353
+ function pe(e) {
356
354
  let t = [], n = 0;
357
355
  for (let r of e.split("\n")) {
358
- let e = ce.exec(r.trim());
356
+ let e = le.exec(r.trim());
359
357
  if (!e) continue;
360
358
  let [, i, a, o] = e;
361
359
  if (n += 1, a === "OK") continue;
362
- let s = o.trim(), c = de(s);
360
+ let s = o.trim(), c = fe(s);
363
361
  t.push({
364
362
  ruleId: i,
365
363
  severity: "violation",
@@ -367,7 +365,7 @@ function fe(e) {
367
365
  ...c === void 0 ? {} : { traceIds: c }
368
366
  });
369
367
  }
370
- if (n === 0) throw new z("audit-script", "no `<name>: OK` or `<name>: FAIL` line found — is this audit-script output?");
368
+ if (n === 0) throw new B("audit-script", "no `<name>: OK` or `<name>: FAIL` line found — is this audit-script output?");
371
369
  return {
372
370
  findings: t,
373
371
  tool: "audit-script",
@@ -376,15 +374,15 @@ function fe(e) {
376
374
  }
377
375
  //#endregion
378
376
  //#region src/evidence/adapters/agent-eval.ts
379
- function pe(e) {
377
+ function me(e) {
380
378
  let t;
381
379
  try {
382
380
  t = JSON.parse(e);
383
381
  } catch (e) {
384
- throw new z("agent-eval", `not JSON: ${e instanceof Error ? e.message : String(e)}`);
382
+ throw new B("agent-eval", `not JSON: ${e instanceof Error ? e.message : String(e)}`);
385
383
  }
386
384
  let n = t;
387
- if (!n || typeof n != "object" || !Array.isArray(n.results)) throw new z("agent-eval", "expected a cli-agent-evals report with a \"results\" array");
385
+ if (!n || typeof n != "object" || !Array.isArray(n.results)) throw new B("agent-eval", "expected a cli-agent-evals report with a \"results\" array");
388
386
  let r = [];
389
387
  for (let e of n.results) {
390
388
  let t = typeof e.id == "string" ? e.id : null;
@@ -392,19 +390,19 @@ function pe(e) {
392
390
  symbol: t,
393
391
  outcome: e.ok === !0 ? "pass" : "fail",
394
392
  traceIds: [t],
395
- ...me(e)
393
+ ...he(e)
396
394
  });
397
395
  }
398
- if (r.length === 0) throw new z("agent-eval", "no scenario results in the report — did the suite run?");
396
+ if (r.length === 0) throw new B("agent-eval", "no scenario results in the report — did the suite run?");
399
397
  return { entries: r };
400
398
  }
401
- function me(e) {
399
+ function he(e) {
402
400
  let t = e.passRate;
403
401
  if (typeof t != "string") return {};
404
402
  let [n, r] = t.split("/").map(Number);
405
403
  return !Number.isFinite(n) || !Number.isFinite(r) || r === 0 ? {} : { score: n / r };
406
404
  }
407
- var he = {
405
+ var ge = {
408
406
  name: "agent-eval",
409
407
  summary: "cli-agent-evals report JSON — one entry per scenario, keyed on the scenario id.",
410
408
  tools: [
@@ -412,22 +410,22 @@ var he = {
412
410
  "agent-evals",
413
411
  "agent-pty"
414
412
  ],
415
- parse: pe
413
+ parse: me
416
414
  };
417
415
  //#endregion
418
416
  //#region src/evidence/adapters/sbom.ts
419
- function ge(e) {
417
+ function _e(e) {
420
418
  let t;
421
419
  try {
422
420
  t = JSON.parse(e);
423
421
  } catch (e) {
424
- throw new z("sbom", `not JSON: ${e instanceof Error ? e.message : String(e)}. CycloneDX and SPDX both have JSON serialisations; the tag-value SPDX form is not read here.`);
422
+ throw new B("sbom", `not JSON: ${e instanceof Error ? e.message : String(e)}. CycloneDX and SPDX both have JSON serialisations; the tag-value SPDX form is not read here.`);
425
423
  }
426
- if (!t || typeof t != "object") throw new z("sbom", "expected a JSON object");
424
+ if (!t || typeof t != "object") throw new B("sbom", "expected a JSON object");
427
425
  let n = t;
428
- return { entries: _e(n) ?? Y(n) ?? ve(n) };
426
+ return { entries: Y(n) ?? ve(n) ?? ye(n) };
429
427
  }
430
- function _e(e) {
428
+ function Y(e) {
431
429
  return String(e.bomFormat ?? "") === "CycloneDX" ? (Array.isArray(e.components) ? e.components : []).map((e) => {
432
430
  let t = e, n = typeof t.purl == "string" ? t.purl : null, r = typeof t.name == "string" ? t.name : null;
433
431
  if (!n && !r) return null;
@@ -438,7 +436,7 @@ function _e(e) {
438
436
  };
439
437
  }).filter((e) => e !== null) : null;
440
438
  }
441
- function Y(e) {
439
+ function ve(e) {
442
440
  return typeof e.spdxVersion == "string" ? (Array.isArray(e.packages) ? e.packages : []).map((e) => {
443
441
  let t = e, n = (Array.isArray(t.externalRefs) ? t.externalRefs : []).map((e) => e).find((e) => String(e.referenceType ?? "") === "purl"), r = n && typeof n.referenceLocator == "string" ? n.referenceLocator : null, i = typeof t.name == "string" ? t.name : null;
444
442
  if (!r && !i) return null;
@@ -449,10 +447,10 @@ function Y(e) {
449
447
  };
450
448
  }).filter((e) => e !== null) : null;
451
449
  }
452
- function ve(e) {
453
- throw new z("sbom", `neither a CycloneDX (\`bomFormat\`) nor an SPDX (\`spdxVersion\`) document — top-level keys: ${Object.keys(e).slice(0, 6).join(", ") || "(none)"}`);
450
+ function ye(e) {
451
+ throw new B("sbom", `neither a CycloneDX (\`bomFormat\`) nor an SPDX (\`spdxVersion\`) document — top-level keys: ${Object.keys(e).slice(0, 6).join(", ") || "(none)"}`);
454
452
  }
455
- var ye = {
453
+ var be = {
456
454
  name: "sbom",
457
455
  summary: "CycloneDX or SPDX JSON — one entry per component, so an empty inventory reads as vacuous.",
458
456
  tools: [
@@ -462,19 +460,19 @@ var ye = {
462
460
  "cdxgen",
463
461
  "cargo-cyclonedx"
464
462
  ],
465
- parse: ge
463
+ parse: _e
466
464
  };
467
465
  //#endregion
468
466
  //#region src/evidence/adapters/sarif.ts
469
- function be(e) {
467
+ function xe(e) {
470
468
  let t;
471
469
  try {
472
470
  t = JSON.parse(e);
473
471
  } catch (e) {
474
- throw new z("sarif", `input is not JSON: ${e.message}`);
472
+ throw new B("sarif", `input is not JSON: ${e.message}`);
475
473
  }
476
- if (!Array.isArray(t.runs)) throw new z("sarif", "no `runs` array — expected a SARIF 2.1.0 log");
477
- if (t.runs.length === 0) throw new z("sarif", "`runs` is empty — a log with no run proves no scan executed");
474
+ if (!Array.isArray(t.runs)) throw new B("sarif", "no `runs` array — expected a SARIF 2.1.0 log");
475
+ if (t.runs.length === 0) throw new B("sarif", "`runs` is empty — a log with no run proves no scan executed");
478
476
  let n = [], r = [], i;
479
477
  for (let e of t.runs) {
480
478
  let t = e.tool?.driver;
@@ -498,14 +496,14 @@ function be(e) {
498
496
  ...i === void 0 ? {} : { rulesEvaluated: i }
499
497
  };
500
498
  }
501
- function xe(e) {
499
+ function Se(e) {
502
500
  let t;
503
501
  try {
504
502
  t = JSON.parse(e);
505
503
  } catch (e) {
506
- throw new z("cargo-audit", `input is not JSON: ${e.message}`);
504
+ throw new B("cargo-audit", `input is not JSON: ${e.message}`);
507
505
  }
508
- if (t.vulnerabilities === void 0) throw new z("cargo-audit", "no `vulnerabilities` object — expected `cargo audit --json` output");
506
+ if (t.vulnerabilities === void 0) throw new B("cargo-audit", "no `vulnerabilities` object — expected `cargo audit --json` output");
509
507
  let n = [], r = (e, t) => {
510
508
  let r = e.advisory?.id;
511
509
  if (r === void 0 || r === "") return;
@@ -537,17 +535,17 @@ var X = {
537
535
  try {
538
536
  t = JSON.parse(e);
539
537
  } catch (e) {
540
- throw new z("entries", `input is not JSON: ${e.message}`);
538
+ throw new B("entries", `input is not JSON: ${e.message}`);
541
539
  }
542
- if (!Array.isArray(t.entries)) throw new z("entries", "expected JSON of the form {\"entries\": [{symbol, outcome, traceIds?}]}");
540
+ if (!Array.isArray(t.entries)) throw new B("entries", "expected JSON of the form {\"entries\": [{symbol, outcome, traceIds?}]}");
543
541
  return { entries: t.entries };
544
542
  }
545
543
  }, Z = [
546
544
  X,
547
- se,
548
- V,
549
- ye,
550
- he
545
+ ce,
546
+ H,
547
+ be,
548
+ ge
551
549
  ], Q = [
552
550
  {
553
551
  name: "sarif",
@@ -557,7 +555,7 @@ var X = {
557
555
  "semgrep",
558
556
  "codeql"
559
557
  ],
560
- parse: be
558
+ parse: xe
561
559
  },
562
560
  {
563
561
  name: "audit-script",
@@ -569,7 +567,7 @@ var X = {
569
567
  "import-linter",
570
568
  "dependency-cruiser"
571
569
  ],
572
- parse: fe
570
+ parse: pe
573
571
  },
574
572
  {
575
573
  name: "cargo-audit",
@@ -580,18 +578,18 @@ var X = {
580
578
  "cargo-deny",
581
579
  "cargo deny"
582
580
  ],
583
- parse: xe
581
+ parse: Se
584
582
  }
585
583
  ], $ = [...Z.map((e) => e.name), ...Q.map((e) => e.name)];
586
- function Se(e) {
584
+ function Ce(e) {
587
585
  if (e.adapter !== void 0 && e.adapter !== "") return Q.find((t) => t.name === e.adapter);
588
586
  let t = (e.tool ?? "").toLowerCase();
589
587
  if (t !== "") return Q.find((e) => e.tools.some((e) => t.includes(e)));
590
588
  }
591
- function Ce(e) {
589
+ function we(e) {
592
590
  if (e.adapter !== void 0 && e.adapter !== "") {
593
591
  let t = Z.find((t) => t.name === e.adapter);
594
- if (t === void 0) throw new z("adapter", `unknown adapter '${e.adapter}'. Available: ${$.join(", ")}`);
592
+ if (t === void 0) throw new B("adapter", `unknown adapter '${e.adapter}'. Available: ${$.join(", ")}`);
595
593
  return t;
596
594
  }
597
595
  let t = (e.tool ?? "").toLowerCase();
@@ -602,4 +600,4 @@ function Ce(e) {
602
600
  return X;
603
601
  }
604
602
  //#endregion
605
- export { ne as _, L as a, te as b, F as c, D as d, w as f, j as g, ie as h, R as i, N as l, A as m, Ce as n, I as o, O as p, Se as r, f as s, $ as t, E as u, ae as v, M as y };
603
+ export { re as _, R as a, te as b, I as c, O as d, w as f, j as g, ae as h, z as i, P as l, A as m, we as n, L as o, ie as p, Ce as r, p as s, $ as t, D as u, N as v, u as x, M as y };
@@ -1,7 +1,7 @@
1
- import { a as e, t } from "./base-DVl7skpc.js";
2
- import { existsSync as n } from "node:fs";
3
- import { dirname as r, join as i, resolve as a } from "node:path";
4
- import { fileURLToPath as o } from "node:url";
1
+ import { a as e, t } from "./base-DNieRzIg.js";
2
+ import { fileURLToPath as n } from "node:url";
3
+ import { existsSync as r } from "node:fs";
4
+ import { dirname as i, join as a, resolve as o } from "node:path";
5
5
  import { homedir as s } from "node:os";
6
6
  import { Flags as c } from "@oclif/core";
7
7
  import { spawn as l } from "node:child_process";
@@ -21,15 +21,15 @@ var u = {
21
21
  }
22
22
  };
23
23
  async function d(t, n = {}) {
24
- let r = f(t), a = e(), o = [
24
+ let r = f(t), i = e(), o = [
25
25
  "run",
26
26
  t,
27
27
  "--path",
28
28
  r,
29
29
  "--config-root",
30
- a,
30
+ i,
31
31
  "--state-dir",
32
- i(a, "flows")
32
+ a(i, "flows")
33
33
  ];
34
34
  n.id && o.push("--id", n.id), n.json && o.push("--json");
35
35
  for (let e of n.target ?? []) o.push("--target", e);
@@ -38,20 +38,20 @@ async function d(t, n = {}) {
38
38
  function f(e) {
39
39
  let t = u[e];
40
40
  if (!t) throw Error(`unknown spec flow ${e}`);
41
- let o = [
41
+ let n = [
42
42
  process.env.IX_SPEC_WORKFLOWS_ROOT,
43
43
  p(),
44
- i(r(a(process.cwd())), "ix-spec-workflows"),
45
- i(s(), ".ix", "plugins", "ix-spec-workflows")
44
+ a(i(o(process.cwd())), "ix-spec-workflows"),
45
+ a(s(), ".ix", "plugins", "ix-spec-workflows")
46
46
  ].filter((e) => !!e);
47
- for (let e of o) {
48
- let r = i(e, t.packageSkill, "workflow-assets", "skills", t.runtimeSkill);
49
- if (n(r)) return r;
47
+ for (let e of n) {
48
+ let n = a(e, t.packageSkill, "workflow-assets", "skills", t.runtimeSkill);
49
+ if (r(n)) return n;
50
50
  }
51
51
  throw Error(`could not find ix-spec workflow skill ${t.runtimeSkill}; set IX_SPEC_WORKFLOWS_ROOT`);
52
52
  }
53
53
  function p() {
54
- return i(r(r(o(import.meta.url))), "skills");
54
+ return a(i(i(n(import.meta.url))), "skills");
55
55
  }
56
56
  async function m(e) {
57
57
  await new Promise((t, n) => {