@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,219 +0,0 @@
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", u = "mock-inspections", d = "mutation-score";
5
- //#endregion
6
- //#region src/evidence/store.ts
7
- function f(e) {
8
- return s(e, "spec", "evidence");
9
- }
10
- function p(e) {
11
- return s(f(e), "bindings.json");
12
- }
13
- function m(e) {
14
- return s(f(e), "baseline.json");
15
- }
16
- function h(e, t, n) {
17
- return s(f(e), c, t, `${v(n)}.json`);
18
- }
19
- function g(e, t, n) {
20
- return s(f(e), l, t, `${v(n)}.json`);
21
- }
22
- function _(e, t, n) {
23
- return s(f(e), u, t, `${v(n)}.json`);
24
- }
25
- function v(e) {
26
- return e.slice(0, 12);
27
- }
28
- function y(e) {
29
- return `${JSON.stringify(b(e), null, 2)}\n`;
30
- }
31
- function b(e) {
32
- if (Array.isArray(e)) return e.map(b);
33
- if (typeof e != "object" || !e) return e;
34
- let t = {};
35
- for (let n of Object.keys(e).sort()) t[n] = b(e[n]);
36
- return t;
37
- }
38
- function x(e, n) {
39
- t(o(e), { recursive: !0 }), a(e, y(n), "utf8");
40
- }
41
- var S = class extends Error {
42
- path;
43
- cause;
44
- constructor(e, t) {
45
- let n = t instanceof Error ? t.message : String(t);
46
- 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";
47
- }
48
- };
49
- function C(t) {
50
- if (!e(t)) return null;
51
- try {
52
- return JSON.parse(n(t, "utf8"));
53
- } catch (e) {
54
- throw new S(t, e);
55
- }
56
- }
57
- function w(e, t) {
58
- try {
59
- return C(e);
60
- } catch (n) {
61
- if (n instanceof S) return t.push(e), null;
62
- throw n;
63
- }
64
- }
65
- function T(e, t) {
66
- let n = h(e, t.suite, t.commit);
67
- return x(n, {
68
- ...t,
69
- schemaVersion: 1
70
- }), n;
71
- }
72
- function E(e, t) {
73
- let n = g(e, t.suite, t.commit);
74
- return x(n, {
75
- ...t,
76
- schemaVersion: 1
77
- }), n;
78
- }
79
- function D(e, t) {
80
- let n = _(e, t.suite, t.commit);
81
- return x(n, {
82
- ...t,
83
- schemaVersion: 1
84
- }), n;
85
- }
86
- function O(e, t, n) {
87
- return C(_(e, t, n));
88
- }
89
- function k(t, n) {
90
- let i = s(f(t), l, n);
91
- return e(i) ? r(i).filter((e) => e.endsWith(".json")).sort() : [];
92
- }
93
- function A(e, t, n = []) {
94
- return k(e, t).map((r) => w(g(e, t, r.replace(/\.json$/, "")), n)).filter((e) => e !== null).sort((e, t) => R(e.timestamp, t.timestamp) || R(e.commit, t.commit));
95
- }
96
- function j(e, t, n = []) {
97
- return A(e, t, n).at(-1) ?? null;
98
- }
99
- function M(e) {
100
- return e.rulesEvaluated === void 0 ? null : e.rulesEvaluated === 0;
101
- }
102
- function N(t, n) {
103
- let i = s(f(t), c, n);
104
- return e(i) ? r(i).filter((e) => e.endsWith(".json")).sort() : [];
105
- }
106
- function P(e, t, n = []) {
107
- return N(e, t).map((r) => w(h(e, t, r.replace(/\.json$/, "")), n)).filter((e) => e !== null).sort((e, t) => R(e.timestamp, t.timestamp) || R(e.commit, t.commit));
108
- }
109
- function F(e, t, n = []) {
110
- return P(e, t, n).at(-1) ?? null;
111
- }
112
- function I(e) {
113
- return z(e).map((t) => F(e, t)).filter((e) => e !== null);
114
- }
115
- function L(e) {
116
- return z(e).map((t) => j(e, t)).filter((e) => e !== null);
117
- }
118
- function R(e, t) {
119
- return e === t ? 0 : e < t ? -1 : 1;
120
- }
121
- function z(t) {
122
- let n = /* @__PURE__ */ new Set();
123
- for (let i of [
124
- c,
125
- l,
126
- u
127
- ]) {
128
- let a = s(f(t), i);
129
- if (e(a)) for (let e of r(a, { withFileTypes: !0 })) e.isDirectory() && n.add(e.name);
130
- }
131
- return [...n].sort();
132
- }
133
- function B(e) {
134
- return C(p(e)) ?? {
135
- schemaVersion: 1,
136
- bindings: []
137
- };
138
- }
139
- function V(e, t) {
140
- let n = [...t.bindings].sort(G);
141
- x(p(e), {
142
- schemaVersion: 1,
143
- bindings: n
144
- });
145
- }
146
- function H(e) {
147
- return C(m(e));
148
- }
149
- function U(e, t) {
150
- x(m(e), {
151
- schemaVersion: 1,
152
- commit: t.commit,
153
- accepted: [...t.accepted].sort(R)
154
- });
155
- }
156
- function W(e, t = !1) {
157
- let n = new Set(B(e).bindings.map((e) => `${e.suite}/${v(e.commit)}.json`)), r = [];
158
- for (let a of z(e)) {
159
- let o = N(e, a), u = /* @__PURE__ */ new Set(), d = F(e, a);
160
- d && u.add(`${v(d.commit)}.json`);
161
- for (let l of o) {
162
- if (u.has(l) || n.has(`${a}/${l}`)) continue;
163
- let o = s(f(e), c, a, l);
164
- r.push(o), t || i(o);
165
- }
166
- let p = k(e, a), m = /* @__PURE__ */ new Set(), h = j(e, a);
167
- h && m.add(`${v(h.commit)}.json`);
168
- for (let o of p) {
169
- if (m.has(o) || n.has(`${a}/${o}`)) continue;
170
- let c = s(f(e), l, a, o);
171
- r.push(c), t || i(c);
172
- }
173
- }
174
- return r.sort();
175
- }
176
- function G(e, t) {
177
- return e.obligation === t.obligation ? e.suite === t.suite ? 0 : e.suite < t.suite ? -1 : 1 : e.obligation < t.obligation ? -1 : 1;
178
- }
179
- function K(e, t) {
180
- let n = e.findIndex((e) => e.obligation === t.obligation && e.suite === t.suite);
181
- if (n === -1) return {
182
- bindings: [...e, { ...t }],
183
- created: !0,
184
- suspect: !1
185
- };
186
- let r = e[n], i = r.statementHashAtBinding !== t.statementHashAtBinding, a = {
187
- ...r,
188
- commit: t.commit,
189
- symbols: t.symbols
190
- }, o = [...e];
191
- return o[n] = a, {
192
- bindings: o,
193
- created: !1,
194
- suspect: i
195
- };
196
- }
197
- function q(e, t, n, r, i, a, o) {
198
- let s = e.map((e, t) => [e, t]).filter(([e]) => e.obligation === t && (!o || e.suite === o));
199
- if (s.length === 0) return {
200
- bindings: e,
201
- found: !1
202
- };
203
- let c = [...e];
204
- for (let [e, t] of s) c[t] = {
205
- ...e,
206
- statementHashAtBinding: n,
207
- affirmations: [...e.affirmations ?? [], {
208
- who: r,
209
- commit: i,
210
- note: a
211
- }]
212
- };
213
- return {
214
- bindings: c,
215
- found: !0
216
- };
217
- }
218
- //#endregion
219
- export { V as _, W as a, E as b, j as c, H as d, B as f, U as g, f as h, y as i, L as l, M as m, m as n, F as o, O as p, K as r, I as s, q as t, z as u, D as v, d as x, T as y };