@agent-ix/quoin 0.22.5 → 0.23.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.
Files changed (200) hide show
  1. package/dist/{advisor-BkgwDKvQ.js → advisor-B0rESCx1.js} +1 -1
  2. package/dist/{auditor-C3bSmPD_.js → auditor-Dd3i9Aqx.js} +2 -2
  3. package/dist/{base-CqKNs2Kd.js → base-gAClyCNd.js} +1 -1
  4. package/dist/change-assurance/attestations.d.ts +7 -0
  5. package/dist/change-assurance/attestations.d.ts.map +1 -0
  6. package/dist/change-assurance/index.d.ts +14 -0
  7. package/dist/change-assurance/index.d.ts.map +1 -0
  8. package/dist/change-assurance/integrity.d.ts +11 -0
  9. package/dist/change-assurance/integrity.d.ts.map +1 -0
  10. package/dist/change-assurance/records.d.ts +22 -0
  11. package/dist/change-assurance/records.d.ts.map +1 -0
  12. package/dist/change-assurance/schema-assets.d.ts +8 -0
  13. package/dist/change-assurance/schema-assets.d.ts.map +1 -0
  14. package/dist/change-assurance/store.d.ts +18 -0
  15. package/dist/change-assurance/store.d.ts.map +1 -0
  16. package/dist/change-assurance/types.d.ts +180 -0
  17. package/dist/change-assurance/types.d.ts.map +1 -0
  18. package/dist/change-assurance/verify.d.ts +4 -0
  19. package/dist/change-assurance/verify.d.ts.map +1 -0
  20. package/dist/change-assurance-CyKLPeKa.js +1236 -0
  21. package/dist/cli.js +1 -1
  22. package/dist/commands/advise.js +19 -19
  23. package/dist/commands/assurance.js +20 -20
  24. package/dist/commands/catalog/list.js +2 -2
  25. package/dist/commands/catalog/methods.js +3 -3
  26. package/dist/commands/catalog/show.js +2 -2
  27. package/dist/commands/catalog/validate.js +2 -2
  28. package/dist/commands/change-assurance/common.d.ts +37 -0
  29. package/dist/commands/change-assurance/common.d.ts.map +1 -0
  30. package/dist/commands/change-assurance/index.d.ts +8 -0
  31. package/dist/commands/change-assurance/index.d.ts.map +1 -0
  32. package/dist/commands/change-assurance/index.js +12 -0
  33. package/dist/commands/change-assurance/intake.d.ts +15 -0
  34. package/dist/commands/change-assurance/intake.d.ts.map +1 -0
  35. package/dist/commands/change-assurance/intake.js +53 -0
  36. package/dist/commands/change-assurance/receipt.d.ts +21 -0
  37. package/dist/commands/change-assurance/receipt.d.ts.map +1 -0
  38. package/dist/commands/change-assurance/receipt.js +99 -0
  39. package/dist/commands/change-assurance/recover.d.ts +13 -0
  40. package/dist/commands/change-assurance/recover.d.ts.map +1 -0
  41. package/dist/commands/change-assurance/recover.js +29 -0
  42. package/dist/commands/change-assurance/schema.d.ts +13 -0
  43. package/dist/commands/change-assurance/schema.d.ts.map +1 -0
  44. package/dist/commands/change-assurance/schema.js +40 -0
  45. package/dist/commands/change-assurance/seal-attestation.d.ts +15 -0
  46. package/dist/commands/change-assurance/seal-attestation.d.ts.map +1 -0
  47. package/dist/commands/change-assurance/seal-attestation.js +58 -0
  48. package/dist/commands/change-assurance/seal-record.d.ts +14 -0
  49. package/dist/commands/change-assurance/seal-record.d.ts.map +1 -0
  50. package/dist/commands/change-assurance/seal-record.js +53 -0
  51. package/dist/commands/change-assurance/verify-receipt.d.ts +13 -0
  52. package/dist/commands/change-assurance/verify-receipt.d.ts.map +1 -0
  53. package/dist/commands/change-assurance/verify-receipt.js +41 -0
  54. package/dist/commands/completeness.js +2 -2
  55. package/dist/commands/config/doctor.js +1 -1
  56. package/dist/commands/config/edit.js +1 -1
  57. package/dist/commands/config/get.js +1 -1
  58. package/dist/commands/config/set.js +1 -1
  59. package/dist/commands/evidence/affirm.js +19 -19
  60. package/dist/commands/evidence/audit.js +26 -26
  61. package/dist/commands/evidence/baseline.js +21 -21
  62. package/dist/commands/evidence/gc.js +3 -3
  63. package/dist/commands/evidence/index.js +1 -1
  64. package/dist/commands/evidence/inspect-mocks.js +4 -4
  65. package/dist/commands/evidence/record.d.ts.map +1 -1
  66. package/dist/commands/evidence/record.js +28 -24
  67. package/dist/commands/graph/change-impact.d.ts +16 -0
  68. package/dist/commands/graph/change-impact.d.ts.map +1 -0
  69. package/dist/commands/graph/change-impact.js +29 -0
  70. package/dist/commands/graph/churn.d.ts +14 -0
  71. package/dist/commands/graph/churn.d.ts.map +1 -0
  72. package/dist/commands/graph/churn.js +15 -0
  73. package/dist/commands/graph/common.d.ts +16 -0
  74. package/dist/commands/graph/common.d.ts.map +1 -0
  75. package/dist/commands/graph/fan-out.d.ts +14 -0
  76. package/dist/commands/graph/fan-out.d.ts.map +1 -0
  77. package/dist/commands/graph/fan-out.js +15 -0
  78. package/dist/commands/graph/index.d.ts +8 -0
  79. package/dist/commands/graph/index.d.ts.map +1 -0
  80. package/dist/commands/graph/index.js +12 -0
  81. package/dist/commands/matrix.js +1 -1
  82. package/dist/commands/measurement/index.js +1 -1
  83. package/dist/commands/measurement/intervention.d.ts +11 -0
  84. package/dist/commands/measurement/intervention.d.ts.map +1 -0
  85. package/dist/commands/measurement/intervention.js +31 -0
  86. package/dist/commands/measurement/operational-release.d.ts +11 -0
  87. package/dist/commands/measurement/operational-release.d.ts.map +1 -0
  88. package/dist/commands/measurement/operational-release.js +31 -0
  89. package/dist/commands/measurement/record.d.ts.map +1 -1
  90. package/dist/commands/measurement/record.js +12 -11
  91. package/dist/commands/module/ensure-defaults.js +3 -3
  92. package/dist/commands/module/install.js +2 -2
  93. package/dist/commands/module/list.js +2 -2
  94. package/dist/commands/module/remove.js +2 -2
  95. package/dist/commands/report.d.ts +4 -0
  96. package/dist/commands/report.d.ts.map +1 -1
  97. package/dist/commands/report.js +49 -23
  98. package/dist/commands/review.js +1 -1
  99. package/dist/commands/to-plan.js +1 -1
  100. package/dist/commands/update.js +2 -2
  101. package/dist/commands/validate.js +1 -1
  102. package/dist/commands/write.js +3 -3
  103. package/dist/common-B1ZJ8CSO.js +36 -0
  104. package/dist/common-DTrmnvL-.js +35 -0
  105. package/dist/{completeness-DamWradt.js → completeness-BzBuNq6w.js} +1 -1
  106. package/dist/evidence/adapters/contract-conformance.d.ts +16 -0
  107. package/dist/evidence/adapters/contract-conformance.d.ts.map +1 -0
  108. package/dist/evidence/adapters/differential-report.d.ts +18 -0
  109. package/dist/evidence/adapters/differential-report.d.ts.map +1 -0
  110. package/dist/evidence/adapters/registry.d.ts.map +1 -1
  111. package/dist/evidence/adapters/types.d.ts +31 -0
  112. package/dist/evidence/adapters/types.d.ts.map +1 -1
  113. package/dist/evidence/index.d.ts +5 -2
  114. package/dist/evidence/index.d.ts.map +1 -1
  115. package/dist/{evidence-DD0CHzJ0.js → evidence-OyqpqHLS.js} +191 -110
  116. package/dist/{flow-command-BfFNY0Rv.js → flow-command-CCRTE5Oe.js} +7 -7
  117. package/dist/graph-analysis/analysis.d.ts +106 -0
  118. package/dist/graph-analysis/analysis.d.ts.map +1 -0
  119. package/dist/graph-analysis/index.d.ts +6 -0
  120. package/dist/graph-analysis/index.d.ts.map +1 -0
  121. package/dist/graph-analysis/input.d.ts +33 -0
  122. package/dist/graph-analysis/input.d.ts.map +1 -0
  123. package/dist/graph-analysis/load.d.ts +21 -0
  124. package/dist/graph-analysis/load.d.ts.map +1 -0
  125. package/dist/graph-analysis/render.d.ts +4 -0
  126. package/dist/graph-analysis/render.d.ts.map +1 -0
  127. package/dist/graph-analysis-IWaoJJSN.js +657 -0
  128. package/dist/index.d.ts +1 -0
  129. package/dist/index.d.ts.map +1 -1
  130. package/dist/index.js +11 -9
  131. package/dist/measurement/agent-eval-intervention.d.ts +6 -0
  132. package/dist/measurement/agent-eval-intervention.d.ts.map +1 -0
  133. package/dist/measurement/atomic-file.d.ts +5 -0
  134. package/dist/measurement/atomic-file.d.ts.map +1 -0
  135. package/dist/measurement/date-time.d.ts +3 -0
  136. package/dist/measurement/date-time.d.ts.map +1 -0
  137. package/dist/measurement/github-release-operational.d.ts +7 -0
  138. package/dist/measurement/github-release-operational.d.ts.map +1 -0
  139. package/dist/measurement/graph-adapters.d.ts +304 -0
  140. package/dist/measurement/graph-adapters.d.ts.map +1 -0
  141. package/dist/measurement/graph-portfolio-load.d.ts +3 -0
  142. package/dist/measurement/graph-portfolio-load.d.ts.map +1 -0
  143. package/dist/measurement/graph-portfolio.d.ts +158 -0
  144. package/dist/measurement/graph-portfolio.d.ts.map +1 -0
  145. package/dist/measurement/index.d.ts +15 -2
  146. package/dist/measurement/index.d.ts.map +1 -1
  147. package/dist/measurement/intervention-report.d.ts +24 -0
  148. package/dist/measurement/intervention-report.d.ts.map +1 -0
  149. package/dist/measurement/intervention-schema.d.ts +144 -0
  150. package/dist/measurement/intervention-schema.d.ts.map +1 -0
  151. package/dist/measurement/intervention-types.d.ts +105 -0
  152. package/dist/measurement/intervention-types.d.ts.map +1 -0
  153. package/dist/measurement/intervention.d.ts +16 -0
  154. package/dist/measurement/intervention.d.ts.map +1 -0
  155. package/dist/measurement/operational-report.d.ts +17 -0
  156. package/dist/measurement/operational-report.d.ts.map +1 -0
  157. package/dist/measurement/operational-schema.d.ts +461 -0
  158. package/dist/measurement/operational-schema.d.ts.map +1 -0
  159. package/dist/measurement/operational-types.d.ts +121 -0
  160. package/dist/measurement/operational-types.d.ts.map +1 -0
  161. package/dist/measurement/operational.d.ts +13 -0
  162. package/dist/measurement/operational.d.ts.map +1 -0
  163. package/dist/measurement/plans.d.ts +3 -1
  164. package/dist/measurement/plans.d.ts.map +1 -1
  165. package/dist/measurement/portfolio.d.ts +7 -1
  166. package/dist/measurement/portfolio.d.ts.map +1 -1
  167. package/dist/measurement/report.d.ts +4 -0
  168. package/dist/measurement/report.d.ts.map +1 -1
  169. package/dist/measurement/schemas/operational-evidence-v1.schema.json.d.ts +384 -0
  170. package/dist/measurement/store.d.ts +7 -0
  171. package/dist/measurement/store.d.ts.map +1 -1
  172. package/dist/measurement/types.d.ts +2 -0
  173. package/dist/measurement/types.d.ts.map +1 -1
  174. package/dist/measurement-j8sDSqx5.js +2980 -0
  175. package/dist/{modules-ez9httBA.js → modules-DDQkKC4l.js} +2 -2
  176. package/dist/{plugins-C-ta0llj.js → plugins-CHpYhpEI.js} +1 -1
  177. package/dist/quire/assurance.d.ts +109 -0
  178. package/dist/quire/assurance.d.ts.map +1 -0
  179. package/dist/quire/contract.d.ts +2 -1
  180. package/dist/quire/contract.d.ts.map +1 -1
  181. package/dist/quire/index.d.ts +3 -2
  182. package/dist/quire/index.d.ts.map +1 -1
  183. package/dist/quire/validate.d.ts +5 -0
  184. package/dist/quire/validate.d.ts.map +1 -1
  185. package/dist/{quire-D8tCpgyA.js → quire-BsVj1xIR.js} +54 -47
  186. package/dist/schema-assets-HZWo_iFN.js +233 -0
  187. package/dist/schemas/assurance-v1.schema.json +225 -0
  188. package/dist/schemas/change-assurance-record-v1.schema.json +234 -0
  189. package/dist/schemas/operational-evidence-v1.schema.json +381 -0
  190. package/dist/schemas/proof-attestation-v1.schema.json +96 -0
  191. package/dist/schemas/verification-receipt-v1.schema.json +208 -0
  192. package/dist/{version-Dg0e6CZU.js → version-CMxMIh5g.js} +1 -1
  193. package/dist/{write-DElwS9xc.js → write-CGTI0dRO.js} +1 -1
  194. package/package.json +5 -1
  195. package/skills/gap-analysis/references/step-4-underspecified-code.md +36 -7
  196. package/skills/gap-analysis/references/step-5-semantic-review.md +2 -2
  197. package/skills/gap-analysis/references/step-6-specreview-artifact.md +6 -5
  198. package/skills/spec-fuzz/SKILL.md +7 -6
  199. package/dist/measurement-CzB74Q07.js +0 -595
  200. package/dist/store--2sAv12X.js +0 -219
@@ -1,21 +1,21 @@
1
- import { _ as e, f as t, p as n, r, u as i, x as a, y as o } from "./store--2sAv12X.js";
1
+ import { C as e, T as t, _ as n, g as r, m as i, o as a, x as o } from "./schema-assets-HZWo_iFN.js";
2
2
  import { readFileSync as s, readdirSync as c } from "node:fs";
3
3
  import { extname as l, join as u, relative as d } from "node:path";
4
4
  //#region src/evidence/record.ts
5
- function f(n) {
6
- let i = o(n.repo, {
5
+ function f(t) {
6
+ let n = e(t.repo, {
7
7
  schemaVersion: 1,
8
- suite: n.suite,
9
- commit: n.commit,
10
- tool: n.tool,
11
- evidenceKind: n.evidenceKind,
12
- timestamp: n.timestamp,
13
- entries: n.entries
14
- }), a = new Map(n.obligations.map((e) => [e.id, e])), s = /* @__PURE__ */ new Map();
15
- for (let e of n.obligations) for (let t of e.target_ids ?? []) a.has(t) || s.set(t, [...s.get(t) ?? [], e]);
8
+ suite: t.suite,
9
+ commit: t.commit,
10
+ tool: t.tool,
11
+ evidenceKind: t.evidenceKind,
12
+ timestamp: t.timestamp,
13
+ entries: t.entries
14
+ }), i = new Map(t.obligations.map((e) => [e.id, e])), s = /* @__PURE__ */ new Map();
15
+ for (let e of t.obligations) for (let t of e.target_ids ?? []) i.has(t) || s.set(t, [...s.get(t) ?? [], e]);
16
16
  let c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set();
17
- for (let e of n.entries) for (let t of e.traceIds ?? []) {
18
- let n = a.has(t) ? [a.get(t)] : s.get(t) ?? [];
17
+ for (let e of t.entries) for (let t of e.traceIds ?? []) {
18
+ let n = i.has(t) ? [i.get(t)] : s.get(t) ?? [];
19
19
  if (n.length === 0) {
20
20
  l.add(t);
21
21
  continue;
@@ -25,21 +25,21 @@ function f(n) {
25
25
  n.push(e.symbol), c.set(t.id, n);
26
26
  }
27
27
  }
28
- let u = t(n.repo).bindings, d = [], f = [];
29
- for (let [e, t] of [...c].sort(([e], [t]) => e === t ? 0 : e < t ? -1 : 1)) {
30
- let i = a.get(e);
31
- if (!i) continue;
32
- let o = r(u, {
28
+ let u = r(t.repo).bindings, d = [], f = [];
29
+ for (let [e, n] of [...c].sort(([e], [t]) => e === t ? 0 : e < t ? -1 : 1)) {
30
+ let r = i.get(e);
31
+ if (!r) continue;
32
+ let o = a(u, {
33
33
  obligation: e,
34
- statementHashAtBinding: i.statement_hash,
35
- suite: n.suite,
36
- commit: n.commit,
37
- symbols: [...t].sort()
34
+ statementHashAtBinding: r.statement_hash,
35
+ suite: t.suite,
36
+ commit: t.commit,
37
+ symbols: [...n].sort()
38
38
  });
39
39
  u = o.bindings, o.created && d.push(e), o.suspect && f.push(e);
40
40
  }
41
- return e(n.repo, { bindings: u }), {
42
- runPath: i,
41
+ return o(t.repo, { bindings: u }), {
42
+ runPath: n,
43
43
  bound: d.sort(),
44
44
  suspect: f.sort(),
45
45
  unmatched: [...l].sort()
@@ -67,59 +67,138 @@ var g = {
67
67
  summary: "cargo-mutants outcomes.json — mutation score per mutated function.",
68
68
  tools: ["cargo-mutants", "cargo mutants"],
69
69
  parse(e) {
70
- let t;
70
+ let n;
71
71
  try {
72
- t = JSON.parse(e);
72
+ n = JSON.parse(e);
73
73
  } catch (e) {
74
74
  throw new m("cargo-mutants", `input is not JSON: ${e.message}`);
75
75
  }
76
- if (!Array.isArray(t.outcomes)) throw new m("cargo-mutants", "no `outcomes` array — expected the contents of mutants.out/outcomes.json");
77
- let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
78
- for (let e of t.outcomes) {
76
+ if (!Array.isArray(n.outcomes)) throw new m("cargo-mutants", "no `outcomes` array — expected the contents of mutants.out/outcomes.json");
77
+ let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
78
+ for (let e of n.outcomes) {
79
79
  if (e.scenario === "Baseline" || typeof e.scenario != "object") continue;
80
80
  let t = e.scenario.Mutant;
81
81
  if (t === void 0) continue;
82
- let i = h(t);
83
- 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));
82
+ let n = h(t);
83
+ n !== void 0 && (e.summary === "CaughtMutant" ? r.set(n, (r.get(n) ?? 0) + 1) : (e.summary === "MissedMutant" || e.summary === "Timeout") && i.set(n, (i.get(n) ?? 0) + 1));
84
84
  }
85
- let i = [.../* @__PURE__ */ new Set([...n.keys(), ...r.keys()])].sort();
86
- if (i.length === 0) throw new m("cargo-mutants", "no viable mutants in the report — nothing was measured");
87
- return { entries: i.map((e) => {
88
- let t = n.get(e) ?? 0, i = r.get(e) ?? 0, o = t + i;
85
+ let a = [.../* @__PURE__ */ new Set([...r.keys(), ...i.keys()])].sort();
86
+ if (a.length === 0) throw new m("cargo-mutants", "no viable mutants in the report — nothing was measured");
87
+ return { entries: a.map((e) => {
88
+ let n = r.get(e) ?? 0, a = i.get(e) ?? 0, o = n + a;
89
89
  return {
90
90
  symbol: e,
91
- outcome: i === 0 ? "pass" : "fail",
92
- score: t / o,
93
- metric: a
91
+ outcome: a === 0 ? "pass" : "fail",
92
+ score: n / o,
93
+ metric: t
94
94
  };
95
95
  }) };
96
96
  }
97
- }, _ = /<testcase\b([^>]*?)(\/>|>([\s\S]*?)<\/testcase\s*>)/g, v = /([\w:.-]+)\s*=\s*"([^"]*)"/g;
98
- function y(e) {
97
+ }, _ = "quire.contract.conformance-jsonl/v1", v = /* @__PURE__ */ new Map([["match", "pass"], ["mismatch", "fail"]]), y = {
98
+ name: "contract-conformance",
99
+ summary: `Contract conformance JSONL (${_}) — one replayed fixture per line.`,
100
+ tools: [
101
+ "quire-contract-conformance",
102
+ "contract-conformance",
103
+ "quire-contract-ir"
104
+ ],
105
+ parse(e) {
106
+ let t = e.split("\n").filter((e) => e.trim() !== "");
107
+ if (t.length === 0) throw new m("contract-conformance", "input contains no conformance rows; an empty run is not a clean run");
108
+ let n = [];
109
+ return t.forEach((e, t) => {
110
+ let r;
111
+ try {
112
+ r = JSON.parse(e);
113
+ } catch (e) {
114
+ throw new m("contract-conformance", `line ${t + 1} is not JSON: ${e.message}`);
115
+ }
116
+ if (r.protocol !== _) throw new m("contract-conformance", `line ${t + 1} declares protocol ${JSON.stringify(r.protocol)}, expected ${_}`);
117
+ for (let e of [
118
+ "corpus_id",
119
+ "fixture_id",
120
+ "operation"
121
+ ]) if (typeof r[e] != "string" || r[e] === "") throw new m("contract-conformance", `line ${t + 1} has no ${e}`);
122
+ let i = v.get(r.status);
123
+ if (i === void 0) throw new m("contract-conformance", `line ${t + 1} has unknown status ${JSON.stringify(r.status)}`);
124
+ n.push({
125
+ symbol: `${r.corpus_id}::${r.operation}::${r.fixture_id}`,
126
+ outcome: i
127
+ });
128
+ }), { entries: n };
129
+ }
130
+ }, b = /^[a-z0-9][a-z0-9-]*\.differential-summary\/v1$/, ee = /* @__PURE__ */ new Map([
131
+ ["agreement", "pass"],
132
+ ["mismatch", "fail"],
133
+ ["tool-error", "error"]
134
+ ]), te = {
135
+ name: "differential-report",
136
+ summary: "Domain differential summary (<domain>.differential-summary/v1) — engine versus external reference, case by case.",
137
+ tools: [
138
+ "differential-report",
139
+ "tl-mltl",
140
+ "r2u2",
141
+ "c2po"
142
+ ],
143
+ parse(e) {
144
+ let t;
145
+ try {
146
+ t = JSON.parse(e);
147
+ } catch (e) {
148
+ throw new m("differential-report", `input is not JSON: ${e.message}`);
149
+ }
150
+ if (typeof t.schemaVersion != "string" || !b.test(t.schemaVersion)) throw new m("differential-report", `unknown schemaVersion ${JSON.stringify(t.schemaVersion)}; expected <domain>.differential-summary/v1`);
151
+ if (!Array.isArray(t.cases)) throw new m("differential-report", "report has no cases array");
152
+ if (t.cases.length === 0) throw new m("differential-report", "report contains no cases; a comparison that examined nothing is not an agreement");
153
+ let n = [], r = [];
154
+ return t.cases.forEach((e, t) => {
155
+ if (typeof e?.id != "string" || e.id === "") throw new m("differential-report", `case ${t} has no id`);
156
+ if (typeof e.status != "string" || e.status === "") throw new m("differential-report", `case ${e.id} has no status`);
157
+ if (e.status === "unsupported") {
158
+ r.push({
159
+ symbol: e.id,
160
+ state: "unsupported",
161
+ reason: "the external reference does not support this case; that is neither a skip nor an error, and no run-entry outcome carries it"
162
+ });
163
+ return;
164
+ }
165
+ let i = ee.get(e.status);
166
+ if (i === void 0) throw new m("differential-report", `case ${e.id} has unknown status ${JSON.stringify(e.status)}`);
167
+ n.push({
168
+ symbol: e.id,
169
+ outcome: i
170
+ });
171
+ }), r.length > 0 ? {
172
+ entries: n,
173
+ unrepresented: r
174
+ } : { entries: n };
175
+ }
176
+ }, x = /<testcase\b([^>]*?)(\/>|>([\s\S]*?)<\/testcase\s*>)/g, S = /([\w:.-]+)\s*=\s*"([^"]*)"/g;
177
+ function C(e) {
99
178
  let t = /* @__PURE__ */ new Map();
100
- for (let n of e.matchAll(v)) t.set(n[1], ee(n[2]));
179
+ for (let n of e.matchAll(S)) t.set(n[1], w(n[2]));
101
180
  return t;
102
181
  }
103
- function ee(e) {
182
+ function w(e) {
104
183
  return e.replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&quot;", "\"").replaceAll("&apos;", "'").replaceAll("&amp;", "&");
105
184
  }
106
- function b(e, t) {
185
+ function T(e, t) {
107
186
  let n = e.trim(), r = t.trim();
108
187
  return n === "" ? r : r === "" ? n : n === r ? r : n.endsWith(`::${r}`) || n.endsWith(`.${r}`) ? n.replaceAll(".", "::") : `${n.replaceAll(".", "::")}::${r}`;
109
188
  }
110
- var x = /<property\b([^>]*)\/?>/g;
111
- function S(e) {
189
+ var E = /<property\b([^>]*)\/?>/g;
190
+ function D(e) {
112
191
  let t = [];
113
- for (let n of e.matchAll(x)) {
114
- let e = y(n[1]), r = e.get("name"), i = e.get("value");
192
+ for (let n of e.matchAll(E)) {
193
+ let e = C(n[1]), r = e.get("name"), i = e.get("value");
115
194
  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);
116
195
  }
117
196
  return t.length > 0 ? t : void 0;
118
197
  }
119
- function C(e) {
198
+ function O(e) {
120
199
  return /<error\b/.test(e) ? "error" : /<failure\b/.test(e) ? "fail" : /<skipped\b/.test(e) ? "skip" : "pass";
121
200
  }
122
- var w = {
201
+ var k = {
123
202
  name: "junit",
124
203
  summary: "JUnit XML (<testsuite>/<testcase>), as emitted by most runners.",
125
204
  tools: [
@@ -132,34 +211,34 @@ var w = {
132
211
  ],
133
212
  parse(e) {
134
213
  let t = [];
135
- for (let n of e.matchAll(_)) {
136
- let e = y(n[1]), r = n[3] ?? "", i = b(e.get("classname") ?? "", e.get("name") ?? "");
214
+ for (let n of e.matchAll(x)) {
215
+ let e = C(n[1]), r = n[3] ?? "", i = T(e.get("classname") ?? "", e.get("name") ?? "");
137
216
  if (i === "") continue;
138
- let a = S(r);
217
+ let a = D(r);
139
218
  t.push({
140
219
  symbol: i,
141
- outcome: C(r),
220
+ outcome: O(r),
142
221
  ...a === void 0 ? {} : { traceIds: a }
143
222
  });
144
223
  }
145
224
  if (t.length === 0) throw new m("junit", "no <testcase> elements found — is this JUnit XML?");
146
225
  return { entries: t };
147
226
  }
148
- }, T = /^([A-Za-z0-9._-]+):\s*(OK|FAIL)\b\s*(?:[—-]\s*)?(.*)$/, E = /\(([^)]*)\)[.\s]*$/, D = /\b((?:FR|NFR|StR|US)-\d+-AC-\d+|TC-\d+)\b/g;
149
- function O(e) {
150
- let t = E.exec(e);
227
+ }, A = /^([A-Za-z0-9._-]+):\s*(OK|FAIL)\b\s*(?:[—-]\s*)?(.*)$/, j = /\(([^)]*)\)[.\s]*$/, M = /\b((?:FR|NFR|StR|US)-\d+-AC-\d+|TC-\d+)\b/g;
228
+ function N(e) {
229
+ let t = j.exec(e);
151
230
  if (!t) return;
152
- let n = [...t[1].matchAll(D)].map((e) => e[1]);
231
+ let n = [...t[1].matchAll(M)].map((e) => e[1]);
153
232
  return n.length > 0 ? n : void 0;
154
233
  }
155
- function k(e) {
234
+ function P(e) {
156
235
  let t = [], n = 0;
157
236
  for (let r of e.split("\n")) {
158
- let e = T.exec(r.trim());
237
+ let e = A.exec(r.trim());
159
238
  if (!e) continue;
160
239
  let [, i, a, o] = e;
161
240
  if (n += 1, a === "OK") continue;
162
- let s = o.trim(), c = O(s);
241
+ let s = o.trim(), c = N(s);
163
242
  t.push({
164
243
  ruleId: i,
165
244
  severity: "violation",
@@ -176,7 +255,7 @@ function k(e) {
176
255
  }
177
256
  //#endregion
178
257
  //#region src/evidence/adapters/agent-eval.ts
179
- function A(e) {
258
+ function F(e) {
180
259
  let t;
181
260
  try {
182
261
  t = JSON.parse(e);
@@ -192,19 +271,19 @@ function A(e) {
192
271
  symbol: t,
193
272
  outcome: e.ok === !0 ? "pass" : "fail",
194
273
  traceIds: [t],
195
- ...j(e)
274
+ ...I(e)
196
275
  });
197
276
  }
198
277
  if (r.length === 0) throw new m("agent-eval", "no scenario results in the report — did the suite run?");
199
278
  return { entries: r };
200
279
  }
201
- function j(e) {
280
+ function I(e) {
202
281
  let t = e.passRate;
203
282
  if (typeof t != "string") return {};
204
283
  let [n, r] = t.split("/").map(Number);
205
284
  return !Number.isFinite(n) || !Number.isFinite(r) || r === 0 ? {} : { score: n / r };
206
285
  }
207
- var M = {
286
+ var L = {
208
287
  name: "agent-eval",
209
288
  summary: "cli-agent-evals report JSON — one entry per scenario, keyed on the scenario id.",
210
289
  tools: [
@@ -212,11 +291,11 @@ var M = {
212
291
  "agent-evals",
213
292
  "agent-pty"
214
293
  ],
215
- parse: A
294
+ parse: F
216
295
  };
217
296
  //#endregion
218
297
  //#region src/evidence/adapters/sbom.ts
219
- function N(e) {
298
+ function R(e) {
220
299
  let t;
221
300
  try {
222
301
  t = JSON.parse(e);
@@ -225,9 +304,9 @@ function N(e) {
225
304
  }
226
305
  if (!t || typeof t != "object") throw new m("sbom", "expected a JSON object");
227
306
  let n = t;
228
- return { entries: P(n) ?? F(n) ?? te(n) };
307
+ return { entries: z(n) ?? B(n) ?? ne(n) };
229
308
  }
230
- function P(e) {
309
+ function z(e) {
231
310
  return String(e.bomFormat ?? "") === "CycloneDX" ? (Array.isArray(e.components) ? e.components : []).map((e) => {
232
311
  let t = e, n = typeof t.purl == "string" ? t.purl : null, r = typeof t.name == "string" ? t.name : null;
233
312
  if (!n && !r) return null;
@@ -238,7 +317,7 @@ function P(e) {
238
317
  };
239
318
  }).filter((e) => e !== null) : null;
240
319
  }
241
- function F(e) {
320
+ function B(e) {
242
321
  return typeof e.spdxVersion == "string" ? (Array.isArray(e.packages) ? e.packages : []).map((e) => {
243
322
  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;
244
323
  if (!r && !i) return null;
@@ -249,10 +328,10 @@ function F(e) {
249
328
  };
250
329
  }).filter((e) => e !== null) : null;
251
330
  }
252
- function te(e) {
331
+ function ne(e) {
253
332
  throw new m("sbom", `neither a CycloneDX (\`bomFormat\`) nor an SPDX (\`spdxVersion\`) document — top-level keys: ${Object.keys(e).slice(0, 6).join(", ") || "(none)"}`);
254
333
  }
255
- var I = {
334
+ var V = {
256
335
  name: "sbom",
257
336
  summary: "CycloneDX or SPDX JSON — one entry per component, so an empty inventory reads as vacuous.",
258
337
  tools: [
@@ -262,11 +341,11 @@ var I = {
262
341
  "cdxgen",
263
342
  "cargo-cyclonedx"
264
343
  ],
265
- parse: N
344
+ parse: R
266
345
  };
267
346
  //#endregion
268
347
  //#region src/evidence/adapters/sarif.ts
269
- function L(e) {
348
+ function H(e) {
270
349
  let t;
271
350
  try {
272
351
  t = JSON.parse(e);
@@ -298,7 +377,7 @@ function L(e) {
298
377
  ...i === void 0 ? {} : { rulesEvaluated: i }
299
378
  };
300
379
  }
301
- function R(e) {
380
+ function U(e) {
302
381
  let t;
303
382
  try {
304
383
  t = JSON.parse(e);
@@ -328,7 +407,7 @@ function R(e) {
328
407
  }
329
408
  //#endregion
330
409
  //#region src/evidence/adapters/registry.ts
331
- var z = {
410
+ var W = {
332
411
  name: "entries",
333
412
  summary: "Normalized {\"entries\": [{symbol, outcome, traceIds?}]} — the default.",
334
413
  tools: [],
@@ -342,13 +421,15 @@ var z = {
342
421
  if (!Array.isArray(t.entries)) throw new m("entries", "expected JSON of the form {\"entries\": [{symbol, outcome, traceIds?}]}");
343
422
  return { entries: t.entries };
344
423
  }
345
- }, B = [
346
- z,
347
- w,
424
+ }, G = [
425
+ W,
426
+ k,
348
427
  g,
349
- I,
350
- M
351
- ], V = [
428
+ V,
429
+ L,
430
+ y,
431
+ te
432
+ ], K = [
352
433
  {
353
434
  name: "sarif",
354
435
  summary: "SARIF 2.1.0 — semgrep --sarif, CodeQL, ESLint, ZAP via converter.",
@@ -357,7 +438,7 @@ var z = {
357
438
  "semgrep",
358
439
  "codeql"
359
440
  ],
360
- parse: L
441
+ parse: H
361
442
  },
362
443
  {
363
444
  name: "audit-script",
@@ -369,7 +450,7 @@ var z = {
369
450
  "import-linter",
370
451
  "dependency-cruiser"
371
452
  ],
372
- parse: k
453
+ parse: P
373
454
  },
374
455
  {
375
456
  name: "cargo-audit",
@@ -380,37 +461,37 @@ var z = {
380
461
  "cargo-deny",
381
462
  "cargo deny"
382
463
  ],
383
- parse: R
464
+ parse: U
384
465
  }
385
- ], H = [...B.map((e) => e.name), ...V.map((e) => e.name)];
386
- function U(e) {
387
- if (e.adapter !== void 0 && e.adapter !== "") return V.find((t) => t.name === e.adapter);
466
+ ], q = [...G.map((e) => e.name), ...K.map((e) => e.name)];
467
+ function J(e) {
468
+ if (e.adapter !== void 0 && e.adapter !== "") return K.find((t) => t.name === e.adapter);
388
469
  let t = (e.tool ?? "").toLowerCase();
389
- if (t !== "") return V.find((e) => e.tools.some((e) => t.includes(e)));
470
+ if (t !== "") return K.find((e) => e.tools.some((e) => t.includes(e)));
390
471
  }
391
- function W(e) {
472
+ function Y(e) {
392
473
  if (e.adapter !== void 0 && e.adapter !== "") {
393
- let t = B.find((t) => t.name === e.adapter);
394
- if (t === void 0) throw new m("adapter", `unknown adapter '${e.adapter}'. Available: ${H.join(", ")}`);
474
+ let t = G.find((t) => t.name === e.adapter);
475
+ if (t === void 0) throw new m("adapter", `unknown adapter '${e.adapter}'. Available: ${q.join(", ")}`);
395
476
  return t;
396
477
  }
397
478
  let t = (e.tool ?? "").toLowerCase();
398
479
  if (t !== "") {
399
- let e = B.find((e) => e.tools.some((e) => t.includes(e)));
480
+ let e = G.find((e) => e.tools.some((e) => t.includes(e)));
400
481
  if (e !== void 0) return e;
401
482
  }
402
- return z;
483
+ return W;
403
484
  }
404
485
  //#endregion
405
486
  //#region src/evidence/mock-inspection.ts
406
- var G = /* @__PURE__ */ new Set([
487
+ var X = /* @__PURE__ */ new Set([
407
488
  ".rs",
408
489
  ".py",
409
490
  ".ts",
410
491
  ".tsx",
411
492
  ".js",
412
493
  ".jsx"
413
- ]), K = /* @__PURE__ */ new Set([
494
+ ]), Z = /* @__PURE__ */ new Set([
414
495
  ".git",
415
496
  "dist",
416
497
  "node_modules",
@@ -418,7 +499,7 @@ var G = /* @__PURE__ */ new Set([
418
499
  "target",
419
500
  "vendor"
420
501
  ]);
421
- function q(e, t) {
502
+ function re(e, t) {
422
503
  if (!t) return {
423
504
  injections: [],
424
505
  suites: []
@@ -429,14 +510,14 @@ function q(e, t) {
429
510
  injections: r.flatMap((e) => e.injections).sort((e, t) => $(e.suite, t.suite) || $(e.path ?? "", t.path ?? "") || (e.line ?? 0) - (t.line ?? 0))
430
511
  };
431
512
  }
432
- function J(e, t) {
513
+ function ie(e, t) {
433
514
  let n = [];
434
- for (let r of Y(e)) {
435
- let i = s(r, "utf8"), a = X(i, l(r));
515
+ for (let r of ae(e)) {
516
+ let i = s(r, "utf8"), a = oe(i, l(r));
436
517
  if (a.length !== 0) for (let o of i.matchAll(/\b([A-Z][A-Za-z0-9_]*(?:(?:::|\.)[A-Za-z_][A-Za-z0-9_]*)+)\s*\(/g)) {
437
518
  let s = o[1];
438
- if (!re(s)) continue;
439
- let c = Z(a, o.index ?? -1);
519
+ if (!le(s)) continue;
520
+ let c = se(a, o.index ?? -1);
440
521
  c && n.push({
441
522
  suite: t,
442
523
  symbol: c.symbol,
@@ -456,20 +537,20 @@ function J(e, t) {
456
537
  }
457
538
  return [...r.values()].sort((e, t) => $(e.path ?? "", t.path ?? "") || (e.line ?? 0) - (t.line ?? 0) || $(e.symbol, t.symbol));
458
539
  }
459
- function Y(e) {
540
+ function ae(e) {
460
541
  let t = [], n = (e) => {
461
542
  for (let r of c(e, { withFileTypes: !0 })) {
462
- if (r.isDirectory() && K.has(r.name)) continue;
543
+ if (r.isDirectory() && Z.has(r.name)) continue;
463
544
  let i = u(e, r.name);
464
- r.isDirectory() ? n(i) : r.isFile() && G.has(l(i)) && t.push(i);
545
+ r.isDirectory() ? n(i) : r.isFile() && X.has(l(i)) && t.push(i);
465
546
  }
466
547
  };
467
548
  return n(e), t.sort($);
468
549
  }
469
- function X(e, t) {
550
+ function oe(e, t) {
470
551
  let n = [], r = t === ".rs" ? [/#\s*\[\s*test\s*\][\s\S]{0,240}?\bfn\s+([A-Za-z_][A-Za-z0-9_]*)\s*\(/g] : t === ".py" ? [/(?:^|\n)\s*(?:async\s+)?def\s+(test_[A-Za-z0-9_]*)\s*\(/g] : [/\b(?:test|it)\s*\(\s*["'`]([^"'`]+)["'`]/g, /\b(?:async\s+)?function\s+(test[A-Za-z0-9_]*)\s*\(/g];
471
552
  for (let i of r) for (let r of e.matchAll(i)) {
472
- let i = r.index ?? 0, a = t === ".py" ? i + r[0].lastIndexOf(r[1]) : i, o = t === ".py" ? Q(e, a) : ne(e, a + r[0].length);
553
+ let i = r.index ?? 0, a = t === ".py" ? i + r[0].lastIndexOf(r[1]) : i, o = t === ".py" ? Q(e, a) : ce(e, a + r[0].length);
473
554
  n.push({
474
555
  at: a,
475
556
  end: o,
@@ -478,7 +559,7 @@ function X(e, t) {
478
559
  }
479
560
  return n.sort((e, t) => e.at - t.at);
480
561
  }
481
- function Z(e, t) {
562
+ function se(e, t) {
482
563
  let n = null;
483
564
  for (let r of e) {
484
565
  if (r.at > t) break;
@@ -496,7 +577,7 @@ function Q(e, t) {
496
577
  }
497
578
  return e.length;
498
579
  }
499
- function ne(e, t) {
580
+ function ce(e, t) {
500
581
  let n = e.indexOf("{", t);
501
582
  if (n < 0 || n - t > 500) return t;
502
583
  let r = 0, i = null, a = !1, o = !1, s = !1;
@@ -522,7 +603,7 @@ function ne(e, t) {
522
603
  }
523
604
  return e.length;
524
605
  }
525
- function re(e) {
606
+ function le(e) {
526
607
  let t = e.split(/::|\./), n = t[0], r = t.at(-1) ?? "";
527
608
  return /^(?:mock|fake|stub|spy)/i.test(n) || /^(?:allow|approve|approved|bypass|fake|mock|stub|succeed|success)$/i.test(r);
528
609
  }
@@ -530,4 +611,4 @@ function $(e, t) {
530
611
  return e === t ? 0 : e < t ? -1 : 1;
531
612
  }
532
613
  //#endregion
533
- export { U as a, W as i, q as n, p as o, H as r, f as s, J as t };
614
+ export { J as a, f as c, Y as i, re as n, F as o, q as r, p as s, ie as t };
@@ -1,10 +1,10 @@
1
- import { a as e, t } from "./base-CqKNs2Kd.js";
1
+ import { a as e, t } from "./base-gAClyCNd.js";
2
2
  import { fileURLToPath as n } from "node:url";
3
3
  import { existsSync as r } from "node:fs";
4
4
  import { dirname as i, join as a, resolve as o } from "node:path";
5
5
  import { homedir as s } from "node:os";
6
- import { Flags as c } from "@oclif/core";
7
- import { spawn as l } from "node:child_process";
6
+ import { spawn as c } from "node:child_process";
7
+ import { Flags as l } from "@oclif/core";
8
8
  //#region src/flows.ts
9
9
  var u = {
10
10
  review: {
@@ -55,7 +55,7 @@ function p() {
55
55
  }
56
56
  async function m(e) {
57
57
  await new Promise((t, n) => {
58
- let r = l("ix-flow", e, { stdio: "inherit" });
58
+ let r = c("ix-flow", e, { stdio: "inherit" });
59
59
  r.on("error", n), r.on("close", (e) => {
60
60
  if (e === 0) {
61
61
  t();
@@ -69,12 +69,12 @@ async function m(e) {
69
69
  //#region src/flow-command.ts
70
70
  var h = class extends t {
71
71
  static flowFlags = {
72
- target: c.string({
72
+ target: l.string({
73
73
  description: "Spec target ref to feed the workflow (repeatable).",
74
74
  multiple: !0
75
75
  }),
76
- json: c.boolean({ description: "Forward --json to ix-flow." }),
77
- id: c.string({ description: "Explicit workflow run id." })
76
+ json: l.boolean({ description: "Forward --json to ix-flow." }),
77
+ id: l.string({ description: "Explicit workflow run id." })
78
78
  };
79
79
  async launch(e) {
80
80
  await d(this.flowName, {