@agent-ix/quoin 0.17.0 → 0.19.2

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 (109) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/default-modules.yaml +15 -6
  4. package/dist/advisor/advise.d.ts +14 -1
  5. package/dist/advisor/advise.d.ts.map +1 -1
  6. package/dist/{advisor-Dhy9S7PS.js → advisor-a9axb4Jl.js} +1 -1
  7. package/dist/assurance/graph.d.ts +79 -0
  8. package/dist/assurance/graph.d.ts.map +1 -0
  9. package/dist/assurance/index.d.ts +9 -0
  10. package/dist/assurance/index.d.ts.map +1 -0
  11. package/dist/assurance/render.d.ts +3 -0
  12. package/dist/assurance/render.d.ts.map +1 -0
  13. package/dist/auditor/audit.d.ts +23 -2
  14. package/dist/auditor/audit.d.ts.map +1 -1
  15. package/dist/auditor/combinatorial.d.ts +53 -0
  16. package/dist/auditor/combinatorial.d.ts.map +1 -0
  17. package/dist/auditor-W2jFinr6.js +188 -0
  18. package/dist/{base-D_-Jy4cE.js → base-BE20w0jY.js} +1 -1
  19. package/dist/cli.js +1 -1
  20. package/dist/combinatorial-Cq01XfhV.js +80 -0
  21. package/dist/commands/advise.js +35 -32
  22. package/dist/commands/assurance.d.ts +14 -0
  23. package/dist/commands/assurance.d.ts.map +1 -0
  24. package/dist/commands/assurance.js +179 -0
  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.d.ts +16 -0
  30. package/dist/commands/completeness.d.ts.map +1 -0
  31. package/dist/commands/completeness.js +49 -0
  32. package/dist/commands/config/doctor.js +1 -1
  33. package/dist/commands/config/edit.js +1 -1
  34. package/dist/commands/config/get.js +1 -1
  35. package/dist/commands/config/set.js +1 -1
  36. package/dist/commands/evidence/affirm.js +3 -3
  37. package/dist/commands/evidence/audit.d.ts +10 -0
  38. package/dist/commands/evidence/audit.d.ts.map +1 -1
  39. package/dist/commands/evidence/audit.js +54 -36
  40. package/dist/commands/evidence/baseline.js +12 -12
  41. package/dist/commands/evidence/gc.js +2 -2
  42. package/dist/commands/evidence/index.js +1 -1
  43. package/dist/commands/evidence/record.d.ts +2 -0
  44. package/dist/commands/evidence/record.d.ts.map +1 -1
  45. package/dist/commands/evidence/record.js +89 -32
  46. package/dist/commands/matrix.js +1 -1
  47. package/dist/commands/module/ensure-defaults.js +3 -3
  48. package/dist/commands/module/install.js +2 -2
  49. package/dist/commands/module/list.js +2 -2
  50. package/dist/commands/module/remove.js +2 -2
  51. package/dist/commands/review.js +1 -1
  52. package/dist/commands/to-plan.js +1 -1
  53. package/dist/commands/update.js +2 -2
  54. package/dist/commands/write.js +3 -3
  55. package/dist/completeness/assess.d.ts +82 -0
  56. package/dist/completeness/assess.d.ts.map +1 -0
  57. package/dist/completeness/bundle.d.ts +52 -0
  58. package/dist/completeness/bundle.d.ts.map +1 -0
  59. package/dist/completeness/declarations.d.ts +46 -0
  60. package/dist/completeness/declarations.d.ts.map +1 -0
  61. package/dist/completeness/index.d.ts +11 -0
  62. package/dist/completeness/index.d.ts.map +1 -0
  63. package/dist/completeness/run.d.ts +35 -0
  64. package/dist/completeness/run.d.ts.map +1 -0
  65. package/dist/completeness-BeqcskAI.js +228 -0
  66. package/dist/evidence/adapters/agent-eval.d.ts +26 -0
  67. package/dist/evidence/adapters/agent-eval.d.ts.map +1 -0
  68. package/dist/evidence/adapters/audit-script.d.ts +25 -0
  69. package/dist/evidence/adapters/audit-script.d.ts.map +1 -0
  70. package/dist/evidence/adapters/cargo-mutants.d.ts +3 -0
  71. package/dist/evidence/adapters/cargo-mutants.d.ts.map +1 -0
  72. package/dist/evidence/adapters/junit.d.ts +17 -0
  73. package/dist/evidence/adapters/junit.d.ts.map +1 -0
  74. package/dist/evidence/adapters/registry.d.ts +63 -0
  75. package/dist/evidence/adapters/registry.d.ts.map +1 -0
  76. package/dist/evidence/adapters/sarif.d.ts +35 -0
  77. package/dist/evidence/adapters/sarif.d.ts.map +1 -0
  78. package/dist/evidence/adapters/sbom.d.ts +35 -0
  79. package/dist/evidence/adapters/sbom.d.ts.map +1 -0
  80. package/dist/evidence/adapters/types.d.ts +55 -0
  81. package/dist/evidence/adapters/types.d.ts.map +1 -0
  82. package/dist/evidence/index.d.ts +10 -0
  83. package/dist/evidence/index.d.ts.map +1 -1
  84. package/dist/evidence/store.d.ts +48 -2
  85. package/dist/evidence/store.d.ts.map +1 -1
  86. package/dist/evidence/types.d.ts +84 -0
  87. package/dist/evidence/types.d.ts.map +1 -1
  88. package/dist/evidence-FRF9RN77.js +595 -0
  89. package/dist/{flow-command-B-ZBn9Sd.js → flow-command-BrzzKBo9.js} +1 -1
  90. package/dist/index.js +6 -6
  91. package/dist/{modules-DSkUXhHn.js → modules-_FQTZ3gx.js} +2 -2
  92. package/dist/{plugins-DiS0OXoo.js → plugins-Q1MtCIE5.js} +1 -1
  93. package/dist/quire/contract.d.ts +1 -1
  94. package/dist/quire/contract.d.ts.map +1 -1
  95. package/dist/{quire-D7ra5rUF.js → quire-Dis3ky5t.js} +1 -1
  96. package/dist/{version-DmZHxX4n.js → version-D0l3nDPZ.js} +1 -1
  97. package/dist/{write-CPdSNIkF.js → write-CMA6BDUq.js} +1 -1
  98. package/package.json +2 -1
  99. package/skills/spec-fuzz/SKILL.md +94 -0
  100. package/skills/spec-fuzz/assets/templates/atheris.py.md +74 -0
  101. package/skills/spec-fuzz/assets/templates/cargo-fuzz.rs.md +83 -0
  102. package/skills/spec-fuzz/assets/templates/fast-check.ts.md +76 -0
  103. package/skills/spec-fuzz/references/step-0-scope-and-harness.md +51 -0
  104. package/skills/spec-fuzz/references/step-1-select-obligations.md +47 -0
  105. package/skills/spec-fuzz/references/step-2-ground-entry-point.md +55 -0
  106. package/skills/spec-fuzz/references/step-3-emit-targets.md +65 -0
  107. package/skills/spec-fuzz/references/step-4-report.md +56 -0
  108. package/dist/audit-CudnEJmh.js +0 -127
  109. package/dist/evidence-QUw0KyMH.js +0 -209
@@ -0,0 +1,595 @@
1
+ import { existsSync as e, mkdirSync as t, readFileSync as n, readdirSync as r, rmSync as i, writeFileSync as a } from "node:fs";
2
+ import { dirname as o, join as s } from "node:path";
3
+ //#region src/evidence/types.ts
4
+ var c = "runs", l = "scans";
5
+ //#endregion
6
+ //#region src/evidence/store.ts
7
+ function u(e) {
8
+ return s(e, "spec", "evidence");
9
+ }
10
+ function d(e) {
11
+ return s(u(e), "bindings.json");
12
+ }
13
+ function f(e) {
14
+ return s(u(e), "baseline.json");
15
+ }
16
+ function p(e, t, n) {
17
+ return s(u(e), c, t, `${h(n)}.json`);
18
+ }
19
+ function m(e, t, n) {
20
+ return s(u(e), l, t, `${h(n)}.json`);
21
+ }
22
+ function h(e) {
23
+ return e.slice(0, 12);
24
+ }
25
+ function g(e) {
26
+ return `${JSON.stringify(_(e), null, 2)}\n`;
27
+ }
28
+ function _(e) {
29
+ if (Array.isArray(e)) return e.map(_);
30
+ if (typeof e != "object" || !e) return e;
31
+ let t = {};
32
+ for (let n of Object.keys(e).sort()) t[n] = _(e[n]);
33
+ return t;
34
+ }
35
+ function v(e, n) {
36
+ t(o(e), { recursive: !0 }), a(e, g(n), "utf8");
37
+ }
38
+ var y = class extends Error {
39
+ path;
40
+ cause;
41
+ constructor(e, t) {
42
+ let n = t instanceof Error ? t.message : String(t);
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
+ }
45
+ };
46
+ function b(t) {
47
+ if (!e(t)) return null;
48
+ try {
49
+ return JSON.parse(n(t, "utf8"));
50
+ } catch (e) {
51
+ throw new y(t, e);
52
+ }
53
+ }
54
+ function x(e, t) {
55
+ try {
56
+ return b(e);
57
+ } catch (n) {
58
+ if (n instanceof y) return t.push(e), null;
59
+ throw n;
60
+ }
61
+ }
62
+ function ee(e, t) {
63
+ let n = p(e, t.suite, t.commit);
64
+ return v(n, {
65
+ ...t,
66
+ schemaVersion: 1
67
+ }), n;
68
+ }
69
+ function S(e, t) {
70
+ let n = m(e, t.suite, t.commit);
71
+ return v(n, {
72
+ ...t,
73
+ schemaVersion: 1
74
+ }), n;
75
+ }
76
+ function C(t, n) {
77
+ let i = s(u(t), l, n);
78
+ return e(i) ? r(i).filter((e) => e.endsWith(".json")).sort() : [];
79
+ }
80
+ function w(e, t, n = []) {
81
+ return C(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));
82
+ }
83
+ function T(e, t, n = []) {
84
+ return w(e, t, n).at(-1) ?? null;
85
+ }
86
+ function E(e) {
87
+ return e.rulesEvaluated === void 0 ? null : e.rulesEvaluated === 0;
88
+ }
89
+ function D(t, n) {
90
+ let i = s(u(t), c, n);
91
+ return e(i) ? r(i).filter((e) => e.endsWith(".json")).sort() : [];
92
+ }
93
+ function te(e, t, n = []) {
94
+ return D(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
+ function O(e, t, n = []) {
97
+ return te(e, t, n).at(-1) ?? null;
98
+ }
99
+ function k(e, t) {
100
+ return e === t ? 0 : e < t ? -1 : 1;
101
+ }
102
+ function A(t) {
103
+ let n = /* @__PURE__ */ new Set();
104
+ for (let i of [c, l]) {
105
+ let a = s(u(t), i);
106
+ if (e(a)) for (let e of r(a, { withFileTypes: !0 })) e.isDirectory() && n.add(e.name);
107
+ }
108
+ return [...n].sort();
109
+ }
110
+ function j(e) {
111
+ return b(d(e)) ?? {
112
+ schemaVersion: 1,
113
+ bindings: []
114
+ };
115
+ }
116
+ function M(e, t) {
117
+ let n = [...t.bindings].sort(N);
118
+ v(d(e), {
119
+ schemaVersion: 1,
120
+ bindings: n
121
+ });
122
+ }
123
+ function ne(e) {
124
+ return b(f(e));
125
+ }
126
+ function re(e, t) {
127
+ v(f(e), {
128
+ schemaVersion: 1,
129
+ commit: t.commit,
130
+ accepted: [...t.accepted].sort(k)
131
+ });
132
+ }
133
+ function ie(e, t = !1) {
134
+ let n = new Set(j(e).bindings.map((e) => `${e.suite}/${h(e.commit)}.json`)), r = [];
135
+ for (let a of A(e)) {
136
+ let o = D(e, a), d = /* @__PURE__ */ new Set(), f = O(e, a);
137
+ f && d.add(`${h(f.commit)}.json`);
138
+ for (let l of o) {
139
+ if (d.has(l) || n.has(`${a}/${l}`)) continue;
140
+ let o = s(u(e), c, a, l);
141
+ r.push(o), t || i(o);
142
+ }
143
+ let p = C(e, a), m = /* @__PURE__ */ new Set(), g = T(e, a);
144
+ g && m.add(`${h(g.commit)}.json`);
145
+ for (let o of p) {
146
+ if (m.has(o) || n.has(`${a}/${o}`)) continue;
147
+ let c = s(u(e), l, a, o);
148
+ r.push(c), t || i(c);
149
+ }
150
+ }
151
+ return r.sort();
152
+ }
153
+ function N(e, t) {
154
+ return e.obligation === t.obligation ? e.suite === t.suite ? 0 : e.suite < t.suite ? -1 : 1 : e.obligation < t.obligation ? -1 : 1;
155
+ }
156
+ function P(e, t) {
157
+ let n = e.findIndex((e) => e.obligation === t.obligation && e.suite === t.suite);
158
+ if (n === -1) return {
159
+ bindings: [...e, { ...t }],
160
+ created: !0,
161
+ suspect: !1
162
+ };
163
+ let r = e[n], i = r.statementHashAtBinding !== t.statementHashAtBinding, a = {
164
+ ...r,
165
+ commit: t.commit,
166
+ symbols: t.symbols
167
+ }, o = [...e];
168
+ return o[n] = a, {
169
+ bindings: o,
170
+ created: !1,
171
+ suspect: i
172
+ };
173
+ }
174
+ function F(e, t, n, r, i, a, o) {
175
+ let s = e.map((e, t) => [e, t]).filter(([e]) => e.obligation === t && (!o || e.suite === o));
176
+ if (s.length === 0) return {
177
+ bindings: e,
178
+ found: !1
179
+ };
180
+ let c = [...e];
181
+ for (let [e, t] of s) c[t] = {
182
+ ...e,
183
+ statementHashAtBinding: n,
184
+ affirmations: [...e.affirmations ?? [], {
185
+ who: r,
186
+ commit: i,
187
+ note: a
188
+ }]
189
+ };
190
+ return {
191
+ bindings: c,
192
+ found: !0
193
+ };
194
+ }
195
+ //#endregion
196
+ //#region src/evidence/record.ts
197
+ function I(e) {
198
+ let t = ee(e.repo, {
199
+ schemaVersion: 1,
200
+ suite: e.suite,
201
+ commit: e.commit,
202
+ tool: e.tool,
203
+ evidenceKind: e.evidenceKind,
204
+ timestamp: e.timestamp,
205
+ entries: e.entries
206
+ }), n = new Map(e.obligations.map((e) => [e.id, e])), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
207
+ for (let t of e.entries) for (let e of t.traceIds ?? []) {
208
+ if (!n.has(e)) {
209
+ i.add(e);
210
+ continue;
211
+ }
212
+ if (t.outcome !== "pass") continue;
213
+ let a = r.get(e) ?? [];
214
+ a.push(t.symbol), r.set(e, a);
215
+ }
216
+ let a = j(e.repo).bindings, o = [], s = [];
217
+ for (let [t, i] of [...r].sort(([e], [t]) => e === t ? 0 : e < t ? -1 : 1)) {
218
+ let r = n.get(t);
219
+ if (!r) continue;
220
+ let c = P(a, {
221
+ obligation: t,
222
+ statementHashAtBinding: r.statement_hash,
223
+ suite: e.suite,
224
+ commit: e.commit,
225
+ symbols: [...i].sort()
226
+ });
227
+ a = c.bindings, c.created && o.push(t), c.suspect && s.push(t);
228
+ }
229
+ return M(e.repo, {
230
+ schemaVersion: 1,
231
+ bindings: a
232
+ }), {
233
+ runPath: t,
234
+ bound: o.sort(),
235
+ suspect: s.sort(),
236
+ unmatched: [...i].sort()
237
+ };
238
+ }
239
+ function L(e) {
240
+ return e.obligations ?? [];
241
+ }
242
+ //#endregion
243
+ //#region src/evidence/adapters/types.ts
244
+ var R = class extends Error {
245
+ adapter;
246
+ constructor(e, t) {
247
+ super(`${e}: ${t}`), this.adapter = e, this.name = "AdapterError";
248
+ }
249
+ };
250
+ //#endregion
251
+ //#region src/evidence/adapters/cargo-mutants.ts
252
+ function z(e) {
253
+ let t = e.file?.trim(), n = e.function?.function_name?.trim();
254
+ if (t !== void 0 && t !== "" && n !== void 0 && n !== "") return `${t}::${n}`;
255
+ }
256
+ var B = {
257
+ name: "cargo-mutants",
258
+ summary: "cargo-mutants outcomes.json — mutation score per mutated function.",
259
+ tools: ["cargo-mutants", "cargo mutants"],
260
+ parse(e) {
261
+ let t;
262
+ try {
263
+ t = JSON.parse(e);
264
+ } catch (e) {
265
+ throw new R("cargo-mutants", `input is not JSON: ${e.message}`);
266
+ }
267
+ if (!Array.isArray(t.outcomes)) throw new R("cargo-mutants", "no `outcomes` array — expected the contents of mutants.out/outcomes.json");
268
+ let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
269
+ for (let e of t.outcomes) {
270
+ if (e.scenario === "Baseline" || typeof e.scenario != "object") continue;
271
+ let t = e.scenario.Mutant;
272
+ if (t === void 0) continue;
273
+ let i = z(t);
274
+ 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));
275
+ }
276
+ let i = [.../* @__PURE__ */ new Set([...n.keys(), ...r.keys()])].sort();
277
+ if (i.length === 0) throw new R("cargo-mutants", "no viable mutants in the report — nothing was measured");
278
+ return { entries: i.map((e) => {
279
+ let t = n.get(e) ?? 0, i = r.get(e) ?? 0, a = t + i;
280
+ return {
281
+ symbol: e,
282
+ outcome: i === 0 ? "pass" : "fail",
283
+ score: t / a
284
+ };
285
+ }) };
286
+ }
287
+ }, V = /<testcase\b([^>]*?)(\/>|>([\s\S]*?)<\/testcase\s*>)/g, H = /([\w:.-]+)\s*=\s*"([^"]*)"/g;
288
+ function U(e) {
289
+ let t = /* @__PURE__ */ new Map();
290
+ for (let n of e.matchAll(H)) t.set(n[1], W(n[2]));
291
+ return t;
292
+ }
293
+ function W(e) {
294
+ return e.replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&quot;", "\"").replaceAll("&apos;", "'").replaceAll("&amp;", "&");
295
+ }
296
+ function G(e, t) {
297
+ let n = e.trim(), r = t.trim();
298
+ return n === "" ? r : r === "" ? n : n === r ? r : n.endsWith(`::${r}`) || n.endsWith(`.${r}`) ? n.replaceAll(".", "::") : `${n.replaceAll(".", "::")}::${r}`;
299
+ }
300
+ var K = /<property\b([^>]*)\/?>/g;
301
+ function q(e) {
302
+ let t = [];
303
+ for (let n of e.matchAll(K)) {
304
+ let e = U(n[1]), r = e.get("name"), i = e.get("value");
305
+ 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);
306
+ }
307
+ return t.length > 0 ? t : void 0;
308
+ }
309
+ function J(e) {
310
+ return /<error\b/.test(e) ? "error" : /<failure\b/.test(e) ? "fail" : /<skipped\b/.test(e) ? "skip" : "pass";
311
+ }
312
+ var ae = {
313
+ name: "junit",
314
+ summary: "JUnit XML (<testsuite>/<testcase>), as emitted by most runners.",
315
+ tools: [
316
+ "junit",
317
+ "pytest",
318
+ "jest",
319
+ "vitest",
320
+ "gotestsum",
321
+ "surefire"
322
+ ],
323
+ parse(e) {
324
+ let t = [];
325
+ for (let n of e.matchAll(V)) {
326
+ let e = U(n[1]), r = n[3] ?? "", i = G(e.get("classname") ?? "", e.get("name") ?? "");
327
+ if (i === "") continue;
328
+ let a = q(r);
329
+ t.push({
330
+ symbol: i,
331
+ outcome: J(r),
332
+ ...a === void 0 ? {} : { traceIds: a }
333
+ });
334
+ }
335
+ if (t.length === 0) throw new R("junit", "no <testcase> elements found — is this JUnit XML?");
336
+ return { entries: t };
337
+ }
338
+ }, oe = /^([A-Za-z0-9._-]+):\s*(OK|FAIL)\b\s*(?:[—-]\s*)?(.*)$/, se = /\(([^)]*)\)[.\s]*$/, ce = /\b((?:FR|NFR|StR|US)-\d+-AC-\d+|TC-\d+)\b/g;
339
+ function le(e) {
340
+ let t = se.exec(e);
341
+ if (!t) return;
342
+ let n = [...t[1].matchAll(ce)].map((e) => e[1]);
343
+ return n.length > 0 ? n : void 0;
344
+ }
345
+ function ue(e) {
346
+ let t = [], n = 0;
347
+ for (let r of e.split("\n")) {
348
+ let e = oe.exec(r.trim());
349
+ if (!e) continue;
350
+ let [, i, a, o] = e;
351
+ if (n += 1, a === "OK") continue;
352
+ let s = o.trim(), c = le(s);
353
+ t.push({
354
+ ruleId: i,
355
+ severity: "violation",
356
+ ...s === "" ? {} : { message: s },
357
+ ...c === void 0 ? {} : { traceIds: c }
358
+ });
359
+ }
360
+ if (n === 0) throw new R("audit-script", "no `<name>: OK` or `<name>: FAIL` line found — is this audit-script output?");
361
+ return {
362
+ findings: t,
363
+ tool: "audit-script",
364
+ rulesEvaluated: n
365
+ };
366
+ }
367
+ //#endregion
368
+ //#region src/evidence/adapters/agent-eval.ts
369
+ function de(e) {
370
+ let t;
371
+ try {
372
+ t = JSON.parse(e);
373
+ } catch (e) {
374
+ throw new R("agent-eval", `not JSON: ${e instanceof Error ? e.message : String(e)}`);
375
+ }
376
+ let n = t;
377
+ if (!n || typeof n != "object" || !Array.isArray(n.results)) throw new R("agent-eval", "expected a cli-agent-evals report with a \"results\" array");
378
+ let r = [];
379
+ for (let e of n.results) {
380
+ let t = typeof e.id == "string" ? e.id : null;
381
+ t && r.push({
382
+ symbol: t,
383
+ outcome: e.ok === !0 ? "pass" : "fail",
384
+ traceIds: [t],
385
+ ...fe(e)
386
+ });
387
+ }
388
+ if (r.length === 0) throw new R("agent-eval", "no scenario results in the report — did the suite run?");
389
+ return { entries: r };
390
+ }
391
+ function fe(e) {
392
+ let t = e.passRate;
393
+ if (typeof t != "string") return {};
394
+ let [n, r] = t.split("/").map(Number);
395
+ return !Number.isFinite(n) || !Number.isFinite(r) || r === 0 ? {} : { score: n / r };
396
+ }
397
+ var pe = {
398
+ name: "agent-eval",
399
+ summary: "cli-agent-evals report JSON — one entry per scenario, keyed on the scenario id.",
400
+ tools: [
401
+ "cli-agent-evals",
402
+ "agent-evals",
403
+ "agent-pty"
404
+ ],
405
+ parse: de
406
+ };
407
+ //#endregion
408
+ //#region src/evidence/adapters/sbom.ts
409
+ function me(e) {
410
+ let t;
411
+ try {
412
+ t = JSON.parse(e);
413
+ } catch (e) {
414
+ throw new R("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.`);
415
+ }
416
+ if (!t || typeof t != "object") throw new R("sbom", "expected a JSON object");
417
+ let n = t;
418
+ return { entries: he(n) ?? ge(n) ?? _e(n) };
419
+ }
420
+ function he(e) {
421
+ return String(e.bomFormat ?? "") === "CycloneDX" ? (Array.isArray(e.components) ? e.components : []).map((e) => {
422
+ let t = e, n = typeof t.purl == "string" ? t.purl : null, r = typeof t.name == "string" ? t.name : null;
423
+ if (!n && !r) return null;
424
+ let i = typeof t.version == "string" ? t.version : null;
425
+ return {
426
+ symbol: n ?? (i ? `${r}@${i}` : r),
427
+ outcome: "pass"
428
+ };
429
+ }).filter((e) => e !== null) : null;
430
+ }
431
+ function ge(e) {
432
+ return typeof e.spdxVersion == "string" ? (Array.isArray(e.packages) ? e.packages : []).map((e) => {
433
+ 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;
434
+ if (!r && !i) return null;
435
+ let a = typeof t.versionInfo == "string" ? t.versionInfo : null;
436
+ return {
437
+ symbol: r ?? (a ? `${i}@${a}` : i),
438
+ outcome: "pass"
439
+ };
440
+ }).filter((e) => e !== null) : null;
441
+ }
442
+ function _e(e) {
443
+ throw new R("sbom", `neither a CycloneDX (\`bomFormat\`) nor an SPDX (\`spdxVersion\`) document — top-level keys: ${Object.keys(e).slice(0, 6).join(", ") || "(none)"}`);
444
+ }
445
+ var Y = {
446
+ name: "sbom",
447
+ summary: "CycloneDX or SPDX JSON — one entry per component, so an empty inventory reads as vacuous.",
448
+ tools: [
449
+ "cyclonedx",
450
+ "spdx",
451
+ "syft",
452
+ "cdxgen",
453
+ "cargo-cyclonedx"
454
+ ],
455
+ parse: me
456
+ };
457
+ //#endregion
458
+ //#region src/evidence/adapters/sarif.ts
459
+ function ve(e) {
460
+ let t;
461
+ try {
462
+ t = JSON.parse(e);
463
+ } catch (e) {
464
+ throw new R("sarif", `input is not JSON: ${e.message}`);
465
+ }
466
+ if (!Array.isArray(t.runs)) throw new R("sarif", "no `runs` array — expected a SARIF 2.1.0 log");
467
+ if (t.runs.length === 0) throw new R("sarif", "`runs` is empty — a log with no run proves no scan executed");
468
+ let n = [], r = [], i;
469
+ for (let e of t.runs) {
470
+ let t = e.tool?.driver;
471
+ t?.name !== void 0 && t.name !== "" && r.push(t.version === void 0 ? t.name : `${t.name} ${t.version}`), Array.isArray(t?.rules) && (i = (i ?? 0) + t.rules.length);
472
+ for (let t of e.results ?? []) {
473
+ let e = t.ruleId ?? t.rule?.id;
474
+ if (e === void 0 || e === "") continue;
475
+ let r = t.locations?.[0]?.physicalLocation;
476
+ n.push({
477
+ ruleId: e,
478
+ ...t.level === void 0 ? {} : { severity: t.level },
479
+ ...t.message?.text === void 0 ? {} : { message: t.message.text },
480
+ ...r?.artifactLocation?.uri === void 0 ? {} : { path: r.artifactLocation.uri },
481
+ ...r?.region?.startLine === void 0 ? {} : { line: r.region.startLine }
482
+ });
483
+ }
484
+ }
485
+ return {
486
+ findings: n,
487
+ ...r.length === 0 ? {} : { tool: r.join(", ") },
488
+ ...i === void 0 ? {} : { rulesEvaluated: i }
489
+ };
490
+ }
491
+ function ye(e) {
492
+ let t;
493
+ try {
494
+ t = JSON.parse(e);
495
+ } catch (e) {
496
+ throw new R("cargo-audit", `input is not JSON: ${e.message}`);
497
+ }
498
+ if (t.vulnerabilities === void 0) throw new R("cargo-audit", "no `vulnerabilities` object — expected `cargo audit --json` output");
499
+ let n = [], r = (e, t) => {
500
+ let r = e.advisory?.id;
501
+ if (r === void 0 || r === "") return;
502
+ let i = e.package;
503
+ n.push({
504
+ ruleId: r,
505
+ severity: t,
506
+ ...e.advisory?.title === void 0 ? {} : { message: e.advisory.title },
507
+ ...i?.name === void 0 ? {} : { path: i.version === void 0 ? i.name : `${i.name}@${i.version}` }
508
+ });
509
+ };
510
+ for (let e of t.vulnerabilities.list ?? []) r(e, "vulnerability");
511
+ for (let [e, n] of Object.entries(t.warnings ?? {})) for (let t of n) r(t, e);
512
+ let i = t.database?.["advisory-count"];
513
+ return {
514
+ findings: n,
515
+ tool: "cargo-audit",
516
+ ...i === void 0 ? {} : { rulesEvaluated: i }
517
+ };
518
+ }
519
+ //#endregion
520
+ //#region src/evidence/adapters/registry.ts
521
+ var X = {
522
+ name: "entries",
523
+ summary: "Normalized {\"entries\": [{symbol, outcome, traceIds?}]} — the default.",
524
+ tools: [],
525
+ parse(e) {
526
+ let t;
527
+ try {
528
+ t = JSON.parse(e);
529
+ } catch (e) {
530
+ throw new R("entries", `input is not JSON: ${e.message}`);
531
+ }
532
+ if (!Array.isArray(t.entries)) throw new R("entries", "expected JSON of the form {\"entries\": [{symbol, outcome, traceIds?}]}");
533
+ return { entries: t.entries };
534
+ }
535
+ }, Z = [
536
+ X,
537
+ ae,
538
+ B,
539
+ Y,
540
+ pe
541
+ ], Q = [
542
+ {
543
+ name: "sarif",
544
+ summary: "SARIF 2.1.0 — semgrep --sarif, CodeQL, ESLint, ZAP via converter.",
545
+ tools: [
546
+ "sarif",
547
+ "semgrep",
548
+ "codeql"
549
+ ],
550
+ parse: ve
551
+ },
552
+ {
553
+ name: "audit-script",
554
+ summary: "Architecture-conformance audit scripts: '<name>: OK' / '<name>: FAIL — … (AC-ID)'.",
555
+ tools: [
556
+ "audit-script",
557
+ "make ci",
558
+ "audit-static",
559
+ "import-linter",
560
+ "dependency-cruiser"
561
+ ],
562
+ parse: ue
563
+ },
564
+ {
565
+ name: "cargo-audit",
566
+ summary: "cargo audit --json — RUSTSEC advisories and warning kinds.",
567
+ tools: [
568
+ "cargo-audit",
569
+ "cargo audit",
570
+ "cargo-deny",
571
+ "cargo deny"
572
+ ],
573
+ parse: ye
574
+ }
575
+ ], $ = [...Z.map((e) => e.name), ...Q.map((e) => e.name)];
576
+ function be(e) {
577
+ if (e.adapter !== void 0 && e.adapter !== "") return Q.find((t) => t.name === e.adapter);
578
+ let t = (e.tool ?? "").toLowerCase();
579
+ if (t !== "") return Q.find((e) => e.tools.some((e) => t.includes(e)));
580
+ }
581
+ function xe(e) {
582
+ if (e.adapter !== void 0 && e.adapter !== "") {
583
+ let t = Z.find((t) => t.name === e.adapter);
584
+ if (t === void 0) throw new R("adapter", `unknown adapter '${e.adapter}'. Available: ${$.join(", ")}`);
585
+ return t;
586
+ }
587
+ let t = (e.tool ?? "").toLowerCase();
588
+ if (t !== "") {
589
+ let e = Z.find((e) => e.tools.some((e) => t.includes(e)));
590
+ if (e !== void 0) return e;
591
+ }
592
+ return X;
593
+ }
594
+ //#endregion
595
+ export { M as _, I as a, P as c, T as d, A as f, re as g, E as h, L as i, ie as l, j as m, xe as n, F as o, ne as p, be as r, f as s, $ as t, O as u, S as v };
@@ -1,4 +1,4 @@
1
- import { a as e, t } from "./base-D_-Jy4cE.js";
1
+ import { a as e, t } from "./base-BE20w0jY.js";
2
2
  import { existsSync as n } from "node:fs";
3
3
  import { dirname as r, join as i, resolve as a } from "node:path";
4
4
  import { fileURLToPath as o } from "node:url";
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { n as e, t } from "./version-DmZHxX4n.js";
1
+ import { n as e, t } from "./version-D0l3nDPZ.js";
2
2
  import { isVersionRequest as n, main as r } from "./cli.js";
3
- import { i, n as a, o, r as s, t as c } from "./base-D_-Jy4cE.js";
4
- import { a as l, i as u, n as d, r as f } from "./plugins-DiS0OXoo.js";
5
- import { n as p, t as m } from "./modules-DSkUXhHn.js";
3
+ import { i, n as a, o, r as s, t as c } from "./base-BE20w0jY.js";
4
+ import { a as l, i as u, n as d, r as f } from "./plugins-Q1MtCIE5.js";
5
+ import { n as p, t as m } from "./modules-_FQTZ3gx.js";
6
6
  import { i as h, n as g, r as _, t as v } from "./config-schema-Dp-vlxuR.js";
7
- import { a as y, i as b, n as x, o as S, r as C, t as w } from "./write-CPdSNIkF.js";
8
- import { t as T } from "./flow-command-B-ZBn9Sd.js";
7
+ import { a as y, i as b, n as x, o as S, r as C, t as w } from "./write-CMA6BDUq.js";
8
+ import { t as T } from "./flow-command-BrzzKBo9.js";
9
9
  export { T as FlowCommand, v as QUOIN_ENV_BINDINGS, g as QUOIN_PLUGIN_ID, c as QuoinCommand, _ as QuoinConfigSchema, b as UNRESOLVED_ORG_MESSAGE, w as createAuthoringPack, a as defaultModuleRoots, m as defaultModulesManifest, p as ensureDefaultModules, s as filamentModulesDir, i as findCatalogEntry, x as formatAuthoringPack, d as installPlugin, n as isVersionRequest, h as ixSchema, f as listPlugins, o as loadCatalog, r as main, y as originOrg, t as packageVersion, u as parseSourceArg, C as parseTypeList, l as removePlugin, S as resolveOrg, e as resolveVersion };
@@ -1,5 +1,5 @@
1
- import { a as e } from "./base-D_-Jy4cE.js";
2
- import { t } from "./plugins-DiS0OXoo.js";
1
+ import { a as e } from "./base-BE20w0jY.js";
2
+ import { t } from "./plugins-Q1MtCIE5.js";
3
3
  import { readFileSync as n } from "node:fs";
4
4
  import { dirname as r, join as i } from "node:path";
5
5
  import { fileURLToPath as a } from "node:url";
@@ -1,4 +1,4 @@
1
- import { a as e, r as t } from "./base-D_-Jy4cE.js";
1
+ import { a as e, r as t } from "./base-BE20w0jY.js";
2
2
  import { existsSync as n, readFileSync as r, rmSync as i } from "node:fs";
3
3
  import { basename as a, join as o } from "node:path";
4
4
  import { parse as s } from "yaml";
@@ -24,7 +24,7 @@
24
24
  /** Where the vendored schemas came from, and exactly which bytes. */
25
25
  export declare const QUIRE_CONTRACT: {
26
26
  /** The quire-rs release the vendored schemas were copied from. */
27
- readonly sourceTag: "v0.29.0";
27
+ readonly sourceTag: "v0.33.0";
28
28
  /** The contract version, as carried in each schema's `$id` and filename. */
29
29
  readonly contractVersion: "v1";
30
30
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/quire/contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAOH,qEAAqE;AACrE,eAAO,MAAM,cAAc;IACzB,kEAAkE;;IAElE,4EAA4E;;IAE5E;;;;;;;OAOG;;IAEH;;;OAGG;;;;;CAOK,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,cAAc,CAAC,MAAM,CAAC;AAI5D,0CAA0C;AAC1C,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAEnD;AAED,6CAA6C;AAC7C,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAEpD;AAED,uDAAuD;AACvD,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAInD;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,6EAA6E;AAC7E,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG7D;AAED,oDAAoD;AACpD,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAQ5D;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,MAAM,GAAG,IAAI,GAC3B,qBAAqB,GAAG,IAAI,CA2B9B"}
1
+ {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/quire/contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAOH,qEAAqE;AACrE,eAAO,MAAM,cAAc;IACzB,kEAAkE;;IAElE,4EAA4E;;IAE5E;;;;;;;OAOG;;IAkBH;;;OAGG;;;;;CAOK,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,cAAc,CAAC,MAAM,CAAC;AAI5D,0CAA0C;AAC1C,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAEnD;AAED,6CAA6C;AAC7C,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAEpD;AAED,uDAAuD;AACvD,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAInD;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,6EAA6E;AAC7E,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG7D;AAED,oDAAoD;AACpD,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAQ5D;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,MAAM,GAAG,IAAI,GAC3B,qBAAqB,GAAG,IAAI,CA2B9B"}
@@ -25,7 +25,7 @@ var a = Object.defineProperty, o = Object.getOwnPropertyDescriptor, s = Object.g
25
25
  });
26
26
  return e;
27
27
  }, p = (e) => c.call(e, "module.exports") ? e["module.exports"] : f(a({}, "__esModule", { value: !0 }), e), m = {
28
- sourceTag: "v0.29.0",
28
+ sourceTag: "v0.33.0",
29
29
  contractVersion: "v1",
30
30
  minimumCli: "0.21.0",
31
31
  hashes: {
@@ -11,7 +11,7 @@ function a(e) {
11
11
  return e || i();
12
12
  }
13
13
  function o() {
14
- return a("0.17.0");
14
+ return a("0.19.2");
15
15
  }
16
16
  //#endregion
17
17
  export { a as n, o as t };
@@ -1,4 +1,4 @@
1
- import { i as e } from "./base-D_-Jy4cE.js";
1
+ import { i as e } from "./base-BE20w0jY.js";
2
2
  import { n as t, r as n, t as r } from "./config-schema-Dp-vlxuR.js";
3
3
  import { ConfigService as i } from "@agent-ix/ix-cli-core";
4
4
  import { existsSync as a, readFileSync as o, statSync as s } from "node:fs";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@agent-ix/quoin",
3
3
  "description": "Spec-driven development for Claude Code — author validated, ISO/IEC/IEEE 29148-aligned specs, then plan and build against them.",
4
- "version": "0.17.0",
4
+ "version": "0.19.2",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "files": [
@@ -97,6 +97,7 @@
97
97
  "zod": ">=4.4.3"
98
98
  },
99
99
  "devDependencies": {
100
+ "@agent-ix/quire-cli": "^0.23.0",
100
101
  "@types/node": "26.1.2",
101
102
  "@typescript-eslint/eslint-plugin": "8.66.0",
102
103
  "@typescript-eslint/parser": "8.66.0",