@agent-ix/quoin 0.21.8 → 0.22.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/default-modules.yaml +18 -2
- package/dist/{advisor-COB2SuIj.js → advisor-BkgwDKvQ.js} +1 -1
- package/dist/auditor/audit.d.ts +23 -18
- package/dist/auditor/audit.d.ts.map +1 -1
- package/dist/auditor/index.d.ts +2 -1
- package/dist/auditor/index.d.ts.map +1 -1
- package/dist/{auditor-ww0MC62a.js → auditor-C3bSmPD_.js} +82 -65
- package/dist/{base-DNieRzIg.js → base-CqKNs2Kd.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/advise.js +16 -15
- package/dist/commands/assurance.d.ts.map +1 -1
- package/dist/commands/assurance.js +84 -61
- package/dist/commands/catalog/list.js +2 -2
- package/dist/commands/catalog/methods.js +3 -3
- package/dist/commands/catalog/show.js +2 -2
- package/dist/commands/catalog/validate.js +2 -2
- package/dist/commands/completeness.js +2 -2
- package/dist/commands/config/doctor.d.ts.map +1 -1
- package/dist/commands/config/doctor.js +3 -3
- package/dist/commands/config/edit.d.ts.map +1 -1
- package/dist/commands/config/edit.js +3 -3
- package/dist/commands/config/get.js +1 -1
- package/dist/commands/config/set.js +1 -1
- package/dist/commands/evidence/affirm.js +6 -5
- package/dist/commands/evidence/audit.d.ts.map +1 -1
- package/dist/commands/evidence/audit.js +57 -45
- package/dist/commands/evidence/baseline.d.ts.map +1 -1
- package/dist/commands/evidence/baseline.js +52 -42
- package/dist/commands/evidence/gc.js +3 -2
- package/dist/commands/evidence/index.js +1 -1
- package/dist/commands/evidence/inspect-mocks.d.ts +16 -0
- package/dist/commands/evidence/inspect-mocks.d.ts.map +1 -0
- package/dist/commands/evidence/inspect-mocks.js +49 -0
- package/dist/commands/evidence/record.d.ts +1 -0
- package/dist/commands/evidence/record.d.ts.map +1 -1
- package/dist/commands/evidence/record.js +42 -31
- package/dist/commands/matrix.js +1 -1
- package/dist/commands/measurement/index.d.ts +7 -0
- package/dist/commands/measurement/index.d.ts.map +1 -0
- package/dist/commands/measurement/index.js +11 -0
- package/dist/commands/measurement/record.d.ts +10 -0
- package/dist/commands/measurement/record.d.ts.map +1 -0
- package/dist/commands/measurement/record.js +35 -0
- package/dist/commands/module/ensure-defaults.js +3 -3
- package/dist/commands/module/install.js +2 -2
- package/dist/commands/module/list.js +2 -2
- package/dist/commands/module/remove.js +2 -2
- package/dist/commands/report.d.ts +15 -0
- package/dist/commands/report.d.ts.map +1 -0
- package/dist/commands/report.js +70 -0
- package/dist/commands/review.js +1 -1
- package/dist/commands/to-plan.js +1 -1
- package/dist/commands/update.js +2 -2
- package/dist/commands/validate.d.ts +13 -0
- package/dist/commands/validate.d.ts.map +1 -0
- package/dist/commands/validate.js +123 -0
- package/dist/commands/write.js +3 -3
- package/dist/{completeness-F657dxMp.js → completeness-DamWradt.js} +1 -1
- package/dist/evidence/index.d.ts +3 -2
- package/dist/evidence/index.d.ts.map +1 -1
- package/dist/evidence/mock-inspection.d.ts +16 -0
- package/dist/evidence/mock-inspection.d.ts.map +1 -0
- package/dist/evidence/store.d.ts +11 -1
- package/dist/evidence/store.d.ts.map +1 -1
- package/dist/evidence/types.d.ts +31 -0
- package/dist/evidence/types.d.ts.map +1 -1
- package/dist/{evidence-BA5vyZJk.js → evidence-DD0CHzJ0.js} +246 -316
- package/dist/{flow-command-D1vJU-7a.js → flow-command-BfFNY0Rv.js} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -8
- package/dist/measurement/compare.d.ts +4 -0
- package/dist/measurement/compare.d.ts.map +1 -0
- package/dist/measurement/index.d.ts +9 -0
- package/dist/measurement/index.d.ts.map +1 -0
- package/dist/measurement/plans.d.ts +4 -0
- package/dist/measurement/plans.d.ts.map +1 -0
- package/dist/measurement/portfolio.d.ts +48 -0
- package/dist/measurement/portfolio.d.ts.map +1 -0
- package/dist/measurement/profiles.d.ts +9 -0
- package/dist/measurement/profiles.d.ts.map +1 -0
- package/dist/measurement/report.d.ts +44 -0
- package/dist/measurement/report.d.ts.map +1 -0
- package/dist/measurement/store.d.ts +7 -0
- package/dist/measurement/store.d.ts.map +1 -0
- package/dist/measurement/types.d.ts +83 -0
- package/dist/measurement/types.d.ts.map +1 -0
- package/dist/measurement/validate.d.ts +9 -0
- package/dist/measurement/validate.d.ts.map +1 -0
- package/dist/measurement-CzB74Q07.js +595 -0
- package/dist/{modules-BWyZ7kVN.js → modules-ez9httBA.js} +2 -2
- package/dist/{plugins-Czi2OyDB.js → plugins-C-ta0llj.js} +1 -1
- package/dist/quire/contract.d.ts +11 -12
- package/dist/quire/contract.d.ts.map +1 -1
- package/dist/quire/exec.d.ts +10 -0
- package/dist/quire/exec.d.ts.map +1 -1
- package/dist/quire/index.d.ts +2 -2
- package/dist/quire/index.d.ts.map +1 -1
- package/dist/quire/types.d.ts +119 -1
- package/dist/quire/types.d.ts.map +1 -1
- package/dist/{quire-UzoK3Azf.js → quire-D8tCpgyA.js} +526 -499
- package/dist/schemas/coverage-v1.schema.json +919 -105
- package/dist/schemas/properties-v1.schema.json +25 -0
- package/dist/store--2sAv12X.js +219 -0
- package/dist/validators/gates.d.ts +18 -0
- package/dist/validators/gates.d.ts.map +1 -0
- package/dist/validators/index.d.ts +2 -0
- package/dist/validators/index.d.ts.map +1 -0
- package/dist/{version-G_RI6TD4.js → version-Dg0e6CZU.js} +1 -1
- package/dist/{write-BJ9rTVAS.js → write-DElwS9xc.js} +1 -1
- package/package.json +22 -16
- package/skills/assurance-status-report/SKILL.md +135 -0
- package/skills/assurance-status-report/references/report-contract.md +110 -0
- package/skills/spec-architecture-evaluation/SKILL.md +30 -0
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { i as e, n as t, o as n, t as r } from "../quire-
|
|
2
|
-
import { t as i } from "../base-
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
import { n as d } from "../
|
|
7
|
-
import {
|
|
1
|
+
import { i as e, n as t, o as n, t as r } from "../quire-D8tCpgyA.js";
|
|
2
|
+
import { t as i } from "../base-CqKNs2Kd.js";
|
|
3
|
+
import { c as a, f as o, o as s, u as c } from "../store--2sAv12X.js";
|
|
4
|
+
import { t as l } from "../advisor-BkgwDKvQ.js";
|
|
5
|
+
import { t as u } from "../auditor-C3bSmPD_.js";
|
|
6
|
+
import { n as d } from "../evidence-DD0CHzJ0.js";
|
|
7
|
+
import { n as f } from "../completeness-DamWradt.js";
|
|
8
|
+
import { Flags as p } from "@oclif/core";
|
|
9
|
+
import { execFileSync as m } from "node:child_process";
|
|
8
10
|
//#region src/assurance/graph.ts
|
|
9
|
-
var
|
|
11
|
+
var h = /* @__PURE__ */ new Set([
|
|
10
12
|
"traces_to",
|
|
11
13
|
"refines",
|
|
12
14
|
"implements",
|
|
@@ -14,26 +16,26 @@ var p = /* @__PURE__ */ new Set([
|
|
|
14
16
|
"mitigates",
|
|
15
17
|
"satisfies"
|
|
16
18
|
]);
|
|
17
|
-
function
|
|
19
|
+
function g(e) {
|
|
18
20
|
let t = e.claimTypes ?? ["StR"], n = new Set(t.map((e) => e.toLowerCase())), r = /* @__PURE__ */ new Map();
|
|
19
21
|
for (let t of e.documents) {
|
|
20
|
-
let e =
|
|
22
|
+
let e = y(t);
|
|
21
23
|
e && r.set(e, t);
|
|
22
24
|
}
|
|
23
25
|
let i = /* @__PURE__ */ new Map();
|
|
24
26
|
for (let t of e.documents) {
|
|
25
|
-
let e =
|
|
26
|
-
if (e) for (let n of
|
|
27
|
+
let e = y(t);
|
|
28
|
+
if (e) for (let n of b(t)) r.has(n) && i.set(n, [...i.get(n) ?? [], e]);
|
|
27
29
|
}
|
|
28
30
|
let a = /* @__PURE__ */ new Map();
|
|
29
31
|
for (let t of e.findings) a.has(t.obligation) || a.set(t.obligation, t);
|
|
30
32
|
let o = /* @__PURE__ */ new Map();
|
|
31
33
|
for (let t of e.obligations) {
|
|
32
|
-
let e =
|
|
34
|
+
let e = x(t.id);
|
|
33
35
|
o.set(e, [...o.get(e) ?? [], t]);
|
|
34
36
|
}
|
|
35
37
|
let s = [], c = /* @__PURE__ */ new Set();
|
|
36
|
-
for (let [e, t] of r) n.has(String(t.frontmatter.type ?? "").toLowerCase()) && s.push(
|
|
38
|
+
for (let [e, t] of r) n.has(String(t.frontmatter.type ?? "").toLowerCase()) && s.push(_(e, r, i, o, a, c, /* @__PURE__ */ new Set()));
|
|
37
39
|
s.sort((e, t) => e.id.localeCompare(t.id));
|
|
38
40
|
let l = {
|
|
39
41
|
claims: s,
|
|
@@ -42,9 +44,9 @@ function m(e) {
|
|
|
42
44
|
};
|
|
43
45
|
return s.length === 0 && (l.reason = `no document declares itself a top-level claim (searched claim types: ${t.join(", ")}); declare one or pass --claim-type`), l;
|
|
44
46
|
}
|
|
45
|
-
function
|
|
47
|
+
function _(e, t, n, r, i, a, o) {
|
|
46
48
|
a.add(e), o.add(e);
|
|
47
|
-
let s = t.get(e), c = String(s?.frontmatter.title ?? e), l = (n.get(e) ?? []).filter((e) => !o.has(e)).sort().map((e) =>
|
|
49
|
+
let s = t.get(e), c = String(s?.frontmatter.title ?? e), l = (n.get(e) ?? []).filter((e) => !o.has(e)).sort().map((e) => _(e, t, n, r, i, a, new Set(o))), u = (r.get(e) ?? []).slice().sort((e, t) => e.id.localeCompare(t.id)).map((e) => v(e, i)), d = [...l, ...u], f = {
|
|
48
50
|
id: e,
|
|
49
51
|
kind: "goal",
|
|
50
52
|
statement: c,
|
|
@@ -53,7 +55,7 @@ function h(e, t, n, r, i, a, o) {
|
|
|
53
55
|
};
|
|
54
56
|
return d.length === 0 && (f.because = "no sub-claim and no obligation traces to this claim"), f;
|
|
55
57
|
}
|
|
56
|
-
function
|
|
58
|
+
function v(e, t) {
|
|
57
59
|
let n = t.get(e.id);
|
|
58
60
|
return {
|
|
59
61
|
id: e.id,
|
|
@@ -64,66 +66,66 @@ function g(e, t) {
|
|
|
64
66
|
children: []
|
|
65
67
|
};
|
|
66
68
|
}
|
|
67
|
-
function
|
|
69
|
+
function y(e) {
|
|
68
70
|
let t = e.frontmatter.id;
|
|
69
71
|
return typeof t == "string" && t.length > 0 ? t : null;
|
|
70
72
|
}
|
|
71
|
-
function
|
|
73
|
+
function b(e) {
|
|
72
74
|
let t = e.frontmatter.relationships;
|
|
73
75
|
if (!Array.isArray(t)) return [];
|
|
74
76
|
let n = [];
|
|
75
77
|
for (let e of t) {
|
|
76
|
-
if (!e || typeof e != "object" || !
|
|
78
|
+
if (!e || typeof e != "object" || !h.has(String(e.type ?? ""))) continue;
|
|
77
79
|
let t = String(e.target ?? "").split("/").pop();
|
|
78
80
|
t && n.push(t);
|
|
79
81
|
}
|
|
80
82
|
return n;
|
|
81
83
|
}
|
|
82
|
-
function
|
|
84
|
+
function x(e) {
|
|
83
85
|
let t = /^([A-Za-z]+-\d+)/.exec(e);
|
|
84
86
|
return t ? t[1] : e;
|
|
85
87
|
}
|
|
86
88
|
//#endregion
|
|
87
89
|
//#region src/assurance/render.ts
|
|
88
|
-
var
|
|
90
|
+
var S = {
|
|
89
91
|
supported: "✅",
|
|
90
92
|
open: "◇"
|
|
91
93
|
};
|
|
92
|
-
function
|
|
94
|
+
function C(e) {
|
|
93
95
|
let t = ["# Assurance case", ""];
|
|
94
96
|
e.claims.length === 0 && t.push("No document declares itself a top-level claim, so there is no case to", "argue. Declare an `StR` (or pass `--claim-type`) and re-run.", "");
|
|
95
97
|
let n = e.claims.filter((e) => e.status === "open").length;
|
|
96
98
|
e.claims.length > 0 && t.push(`${e.claims.length} claim(s), ${n} with an open branch.`, "");
|
|
97
|
-
for (let n of e.claims) t.push(`## ${
|
|
99
|
+
for (let n of e.claims) t.push(`## ${S[n.status]} ${n.id} — ${n.statement}`, ""), t.push(...w(n, 0)), t.push(""), t.push("```mermaid", ...T(n), "```", "");
|
|
98
100
|
return e.unreachable.length > 0 && t.push("## Reachable from no claim", "", "These carry obligations and no claim argues over them. A case rendered", "only over the reachable half would read as complete.", "", ...e.unreachable.map((e) => `- ${e}`), ""), e.unreadable.length > 0 && t.push("## Unreadable", "", ...e.unreadable.map((e) => `- ${e.path}: ${e.reason}`), ""), t.join("\n");
|
|
99
101
|
}
|
|
100
|
-
function
|
|
101
|
-
let n = " ".repeat(t), r = e.kind === "solution" ? `${n}- ${
|
|
102
|
+
function w(e, t) {
|
|
103
|
+
let n = " ".repeat(t), r = e.kind === "solution" ? `${n}- ${S[e.status]} **${e.id}** — ${e.statement}` : `${n}- ${S[e.status]} ${e.id} — ${e.statement}`, i = t === 0 ? [] : [r];
|
|
102
104
|
e.because && i.push(`${n} - ↳ ${e.because}`);
|
|
103
|
-
for (let n of e.children) i.push(...
|
|
105
|
+
for (let n of e.children) i.push(...w(n, t + 1));
|
|
104
106
|
return i;
|
|
105
107
|
}
|
|
106
|
-
function
|
|
108
|
+
function T(e) {
|
|
107
109
|
let t = ["flowchart TD"], n = /* @__PURE__ */ new Set(), r = (e) => {
|
|
108
|
-
let i =
|
|
110
|
+
let i = E(e.id);
|
|
109
111
|
if (!n.has(i)) {
|
|
110
112
|
n.add(i);
|
|
111
113
|
let r = e.kind === "solution" ? ["([", "])"] : ["[", "]"];
|
|
112
|
-
t.push(` ${i}${r[0]}"${
|
|
114
|
+
t.push(` ${i}${r[0]}"${D(e)}"${r[1]}`);
|
|
113
115
|
}
|
|
114
|
-
for (let n of e.children) r(n), t.push(` ${i} --> ${
|
|
116
|
+
for (let n of e.children) r(n), t.push(` ${i} --> ${E(n.id)}`);
|
|
115
117
|
};
|
|
116
118
|
return r(e), t;
|
|
117
119
|
}
|
|
118
|
-
function
|
|
120
|
+
function E(e) {
|
|
119
121
|
return e.replace(/[^A-Za-z0-9]/g, "_");
|
|
120
122
|
}
|
|
121
|
-
function
|
|
123
|
+
function D(e) {
|
|
122
124
|
return `${e.id}: ${e.statement}`.replace(/["`]/g, "'").replace(/;/g, ",").slice(0, 80).concat(e.status === "open" ? " ◇" : "");
|
|
123
125
|
}
|
|
124
126
|
//#endregion
|
|
125
127
|
//#region src/commands/assurance.ts
|
|
126
|
-
var
|
|
128
|
+
var O = class a extends i {
|
|
127
129
|
static summary = "Render the assurance case: claim → argument → evidence, from the store.";
|
|
128
130
|
static description = "A pile of green evidence is not an argument (FR-040). ISO 15026-2 / GSN turns\nthe trace graph into something reviewable: this claim holds BECAUSE these\nsub-claims hold, EACH verified by a stated method, WITH evidence that is fresh.\n\nStrictly a view. It runs nothing, collects nothing and writes nothing to the\nstore — where the case cannot be built, the missing data is a finding against\nthe spec, not something this fabricates.\n\nGaps render as OPEN nodes (◇), not as omissions. An undischarged obligation, a\nsuspect binding or a claim nothing traces to stays in the tree, because a case\nthat quietly narrows to what it can prove reads exactly like a complete one.";
|
|
129
131
|
static examples = [
|
|
@@ -132,50 +134,71 @@ var E = class s extends i {
|
|
|
132
134
|
"quoin assurance > docs/assurance.md"
|
|
133
135
|
];
|
|
134
136
|
static flags = {
|
|
135
|
-
repo:
|
|
137
|
+
repo: p.string({
|
|
136
138
|
description: "Repository root.",
|
|
137
139
|
default: "."
|
|
138
140
|
}),
|
|
139
|
-
module:
|
|
140
|
-
"claim-type":
|
|
141
|
+
module: p.string({ description: "Module directory supplying the traceability model." }),
|
|
142
|
+
"claim-type": p.string({
|
|
141
143
|
description: "Artifact type that is a top-level claim. Repeatable; matched case-insensitively. REPLACES the StR default rather than adding to it — pass --claim-type StR as well if StRs should stay claims. A safety or security bundle argues from a declared hazard or threat.",
|
|
142
144
|
multiple: !0
|
|
143
145
|
}),
|
|
144
|
-
json:
|
|
146
|
+
json: p.boolean({ description: "Emit the case as JSON." })
|
|
145
147
|
};
|
|
146
148
|
async run() {
|
|
147
|
-
let { flags: i } = await this.parse(
|
|
148
|
-
|
|
149
|
-
let
|
|
149
|
+
let { flags: i } = await this.parse(a), s = n(r());
|
|
150
|
+
s && this.error(s.message, { exit: 2 });
|
|
151
|
+
let c = [
|
|
150
152
|
"coverage",
|
|
151
153
|
"--scope",
|
|
152
154
|
i.repo,
|
|
153
155
|
"--json"
|
|
154
156
|
];
|
|
155
|
-
i.module &&
|
|
156
|
-
let
|
|
157
|
-
|
|
158
|
-
let
|
|
159
|
-
obligations:
|
|
160
|
-
bindings:
|
|
161
|
-
runs:
|
|
162
|
-
scans:
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
157
|
+
i.module && c.push("--module", i.module);
|
|
158
|
+
let p = e(t(c));
|
|
159
|
+
p.ok || this.error(p.error.message, { exit: 2 });
|
|
160
|
+
let m = p.value.obligations ?? [], h = k(i.repo), _ = d(i.repo, h), v = u({
|
|
161
|
+
obligations: m,
|
|
162
|
+
bindings: o(i.repo).bindings,
|
|
163
|
+
runs: j(i.repo),
|
|
164
|
+
scans: A(i.repo),
|
|
165
|
+
injections: _.injections,
|
|
166
|
+
mockInspectionSuites: _.suites,
|
|
167
|
+
catalog: l(i.module ? [i.module] : void 0)
|
|
168
|
+
}), y = f(`${i.repo}/spec`), b = g({
|
|
169
|
+
documents: y.documents,
|
|
170
|
+
obligations: m,
|
|
171
|
+
findings: v.findings,
|
|
168
172
|
claimTypes: i["claim-type"],
|
|
169
|
-
unreadable:
|
|
173
|
+
unreadable: y.unreadable
|
|
170
174
|
});
|
|
171
|
-
this.log(i.json ? JSON.stringify(
|
|
175
|
+
this.log(i.json ? JSON.stringify(b, null, 2) : C(b));
|
|
172
176
|
}
|
|
173
177
|
};
|
|
174
|
-
function
|
|
175
|
-
|
|
178
|
+
function k(e) {
|
|
179
|
+
try {
|
|
180
|
+
return m("git", [
|
|
181
|
+
"-C",
|
|
182
|
+
e,
|
|
183
|
+
"rev-parse",
|
|
184
|
+
"HEAD"
|
|
185
|
+
], {
|
|
186
|
+
encoding: "utf8",
|
|
187
|
+
stdio: [
|
|
188
|
+
"ignore",
|
|
189
|
+
"pipe",
|
|
190
|
+
"ignore"
|
|
191
|
+
]
|
|
192
|
+
}).trim();
|
|
193
|
+
} catch {
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
function A(e) {
|
|
198
|
+
return c(e).map((t) => a(e, t)).filter((e) => e !== null);
|
|
176
199
|
}
|
|
177
|
-
function
|
|
178
|
-
return
|
|
200
|
+
function j(e) {
|
|
201
|
+
return c(e).map((t) => s(e, t)).filter((e) => e !== null);
|
|
179
202
|
}
|
|
180
203
|
//#endregion
|
|
181
|
-
export {
|
|
204
|
+
export { O as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as e, t } from "../../base-
|
|
2
|
-
import { n } from "../../modules-
|
|
1
|
+
import { o as e, t } from "../../base-CqKNs2Kd.js";
|
|
2
|
+
import { n } from "../../modules-ez9httBA.js";
|
|
3
3
|
import { Flags as r } from "@oclif/core";
|
|
4
4
|
//#region src/commands/catalog/list.ts
|
|
5
5
|
var i = class i extends t {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as e } from "../../base-
|
|
2
|
-
import { n as t } from "../../modules-
|
|
3
|
-
import { n, t as r } from "../../advisor-
|
|
1
|
+
import { t as e } from "../../base-CqKNs2Kd.js";
|
|
2
|
+
import { n as t } from "../../modules-ez9httBA.js";
|
|
3
|
+
import { n, t as r } from "../../advisor-BkgwDKvQ.js";
|
|
4
4
|
import { Flags as i } from "@oclif/core";
|
|
5
5
|
//#region src/commands/catalog/methods.ts
|
|
6
6
|
var a = class a extends e {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as e, o as t, t as n } from "../../base-
|
|
2
|
-
import { n as r } from "../../modules-
|
|
1
|
+
import { i as e, o as t, t as n } from "../../base-CqKNs2Kd.js";
|
|
2
|
+
import { n as r } from "../../modules-ez9httBA.js";
|
|
3
3
|
import { Args as i, Flags as a } from "@oclif/core";
|
|
4
4
|
//#region src/commands/catalog/show.ts
|
|
5
5
|
var o = class o extends n {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as e, t } from "../../base-
|
|
2
|
-
import { n } from "../../modules-
|
|
1
|
+
import { o as e, t } from "../../base-CqKNs2Kd.js";
|
|
2
|
+
import { n } from "../../modules-ez9httBA.js";
|
|
3
3
|
import { Flags as r } from "@oclif/core";
|
|
4
4
|
//#region src/commands/catalog/validate.ts
|
|
5
5
|
var i = class i extends t {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "../base-
|
|
2
|
-
import { t } from "../completeness-
|
|
1
|
+
import { t as e } from "../base-CqKNs2Kd.js";
|
|
2
|
+
import { t } from "../completeness-DamWradt.js";
|
|
3
3
|
import { Flags as n } from "@oclif/core";
|
|
4
4
|
//#region src/commands/completeness.ts
|
|
5
5
|
var r = class r extends e {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/commands/config/doctor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG7C,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,YAAY;IACpD,MAAM,CAAC,OAAO,SAA2D;IACzE,MAAM,CAAC,WAAW,SAC+C;IAE3D,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/commands/config/doctor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG7C,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,YAAY;IACpD,MAAM,CAAC,OAAO,SAA2D;IACzE,MAAM,CAAC,WAAW,SAC+C;IAE3D,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAU3B"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as e } from "../../base-
|
|
1
|
+
import { t as e } from "../../base-CqKNs2Kd.js";
|
|
2
2
|
import { a as t } from "../../config-schema-Dp-vlxuR.js";
|
|
3
3
|
import { runConfigDoctor as n } from "@agent-ix/ix-cli-core";
|
|
4
4
|
//#region src/commands/config/doctor.ts
|
|
5
|
-
var r = class extends e {
|
|
5
|
+
var r = class r extends e {
|
|
6
6
|
static summary = "Report config files that failed to parse or validate.";
|
|
7
7
|
static description = "A malformed config never blocks a command -- schema defaults are used and the\nproblem is recorded instead. This is where those records surface.";
|
|
8
8
|
async run() {
|
|
9
|
-
t();
|
|
9
|
+
await this.parse(r), t();
|
|
10
10
|
let { exitCode: e } = await n();
|
|
11
11
|
process.exitCode = e;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../src/commands/config/edit.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG7C,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,YAAY;IAClD,MAAM,CAAC,OAAO,SAA0C;IAExD,MAAM,CAAC,QAAQ,WAAyB;IAElC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../src/commands/config/edit.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG7C,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,YAAY;IAClD,MAAM,CAAC,OAAO,SAA0C;IAExD,MAAM,CAAC,QAAQ,WAAyB;IAElC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAK3B"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as e } from "../../base-
|
|
1
|
+
import { t as e } from "../../base-CqKNs2Kd.js";
|
|
2
2
|
import { a as t, n } from "../../config-schema-Dp-vlxuR.js";
|
|
3
3
|
import { runConfigEdit as r } from "@agent-ix/ix-cli-core";
|
|
4
4
|
//#region src/commands/config/edit.ts
|
|
5
|
-
var i = class extends e {
|
|
5
|
+
var i = class i extends e {
|
|
6
6
|
static summary = "Open quoin's config file in $EDITOR.";
|
|
7
7
|
static examples = ["quoin config edit"];
|
|
8
8
|
async run() {
|
|
9
|
-
t(), await r(n);
|
|
9
|
+
await this.parse(i), t(), await r(n);
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
//#endregion
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { i as e, n as t, o as n, t as r } from "../../quire-
|
|
2
|
-
import { t as i } from "../../base-
|
|
3
|
-
import {
|
|
1
|
+
import { i as e, n as t, o as n, t as r } from "../../quire-D8tCpgyA.js";
|
|
2
|
+
import { t as i } from "../../base-CqKNs2Kd.js";
|
|
3
|
+
import { _ as a, f as o, t as s } from "../../store--2sAv12X.js";
|
|
4
|
+
import "../../evidence-DD0CHzJ0.js";
|
|
4
5
|
import { Flags as c } from "@oclif/core";
|
|
5
6
|
import { execFileSync as l } from "node:child_process";
|
|
6
7
|
//#region src/commands/evidence/affirm.ts
|
|
@@ -45,8 +46,8 @@ var u = class u extends i {
|
|
|
45
46
|
i.repo,
|
|
46
47
|
"rev-parse",
|
|
47
48
|
"HEAD"
|
|
48
|
-
], { encoding: "utf8" }).trim(), h =
|
|
49
|
-
_ || this.error(`no binding exists for \`${i.obligation}\`, so there is nothing to affirm. A binding is created when a suite first discharges the obligation (\`quoin evidence record\`).`, { exit: 2 }),
|
|
49
|
+
], { encoding: "utf8" }).trim(), h = o(i.repo).bindings, { bindings: g, found: _ } = s(h, i.obligation, p.statement_hash, i.who, m, i.note);
|
|
50
|
+
_ || this.error(`no binding exists for \`${i.obligation}\`, so there is nothing to affirm. A binding is created when a suite first discharges the obligation (\`quoin evidence record\`).`, { exit: 2 }), a(i.repo, { bindings: g });
|
|
50
51
|
let v = {
|
|
51
52
|
obligation: i.obligation,
|
|
52
53
|
who: i.who,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../src/commands/evidence/audit.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../src/commands/evidence/audit.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAkB7C,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,YAAY;IACrD,MAAM,CAAC,OAAO,SACmD;IACjE,MAAM,CAAC,WAAW,SAiBuC;IAEzD,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;MA0BV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA2F3B;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAM1D;AAuBD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EAAE,GAAG,SAAS,EAC7B,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,KAAK,GAC/B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAuBpC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { i as e, n as t, o as n, t as r } from "../../quire-
|
|
2
|
-
import { t as i } from "../../base-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { i as e, n as t, o as n, t as r } from "../../quire-D8tCpgyA.js";
|
|
2
|
+
import { t as i } from "../../base-CqKNs2Kd.js";
|
|
3
|
+
import { d as a, f as o, l as s, n as c, s as l } from "../../store--2sAv12X.js";
|
|
4
|
+
import { t as u } from "../../advisor-BkgwDKvQ.js";
|
|
5
|
+
import { r as d, t as f } from "../../auditor-C3bSmPD_.js";
|
|
6
|
+
import { n as p } from "../../evidence-DD0CHzJ0.js";
|
|
7
|
+
import { Flags as m } from "@oclif/core";
|
|
8
|
+
import { execFileSync as h } from "node:child_process";
|
|
8
9
|
//#region src/commands/evidence/audit.ts
|
|
9
|
-
var
|
|
10
|
+
var g = class c extends i {
|
|
10
11
|
static summary = "Audit the evidence store: suspect links, staleness, vacuity.";
|
|
11
12
|
static description = "Reads the store and reports. RUNS NOTHING (ADR-0011 invariant 1) — the\nconsumer's CI refreshes evidence, and an auditor that could re-run a suite could\nalso make a finding disappear by re-running it.\n\nChecks:\n suspect-link the statement changed after the evidence was bound\n stale-evidence bound to a missing run, or to a run behind HEAD\n vacuous-evidence every bound symbol was skipped or absent from the run\n undischarged no evidence is bound at all\n method-conformance evidence of a kind the declared method does not produce\n unknown-method the declared method is in no catalog\n insufficient-multiplicity criticality demands two independent suites\n insufficient-mutation-score criticality demands a mutation score it misses\n unmeasured-mutation-score a demanded mutation score, with none recorded\n\n--ratchet compares against spec/evidence/baseline.json and fails only on NEW\nviolations. A gate that fails on the whole existing backlog gets disabled within\na week. Write that baseline with: quoin evidence baseline";
|
|
12
13
|
static examples = [
|
|
@@ -15,74 +16,85 @@ var h = class f extends i {
|
|
|
15
16
|
"quoin evidence audit --json"
|
|
16
17
|
];
|
|
17
18
|
static flags = {
|
|
18
|
-
repo:
|
|
19
|
+
repo: m.string({
|
|
19
20
|
description: "Repository root.",
|
|
20
21
|
default: "."
|
|
21
22
|
}),
|
|
22
|
-
module:
|
|
23
|
-
ratchet:
|
|
24
|
-
strict:
|
|
25
|
-
json:
|
|
26
|
-
"multiplicity-requires":
|
|
23
|
+
module: m.string({ description: "Module directory supplying the traceability model." }),
|
|
24
|
+
ratchet: m.boolean({ description: "Report only violations absent from the baseline." }),
|
|
25
|
+
strict: m.boolean({ description: "Exit 1 when any reported finding remains." }),
|
|
26
|
+
json: m.boolean({ description: "Emit the report as JSON." }),
|
|
27
|
+
"multiplicity-requires": m.string({
|
|
27
28
|
description: "Criticality values demanding two independent suites. Repeatable. Unset by default: no obligation source in the ecosystem declares a criticality column, so a built-in default could never fire.",
|
|
28
29
|
multiple: !0
|
|
29
30
|
}),
|
|
30
|
-
"mutation-floor":
|
|
31
|
+
"mutation-floor": m.string({
|
|
31
32
|
description: "Minimum mutation score per criticality, as <criticality>=<0..1>. Repeatable. Unset by default, for the same reason as --multiplicity-requires: a built-in floor is a rule nobody chose.",
|
|
32
33
|
multiple: !0
|
|
33
34
|
})
|
|
34
35
|
};
|
|
35
36
|
async run() {
|
|
36
|
-
let { flags: i } = await this.parse(
|
|
37
|
-
|
|
38
|
-
let
|
|
37
|
+
let { flags: i } = await this.parse(c), m = n(r());
|
|
38
|
+
m && this.error(m.message, { exit: 2 });
|
|
39
|
+
let h = [
|
|
39
40
|
"coverage",
|
|
40
41
|
"--scope",
|
|
41
42
|
i.repo,
|
|
42
43
|
"--json"
|
|
43
44
|
];
|
|
44
|
-
i.module &&
|
|
45
|
-
let
|
|
46
|
-
|
|
47
|
-
let
|
|
48
|
-
obligations:
|
|
49
|
-
bindings:
|
|
50
|
-
runs:
|
|
51
|
-
scans:
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
i.module && h.push("--module", i.module);
|
|
46
|
+
let g = e(t(h));
|
|
47
|
+
g.ok || this.error(g.error.message, { exit: 2 });
|
|
48
|
+
let b = v(i.repo), x = p(i.repo, b), S = f({
|
|
49
|
+
obligations: g.value.obligations ?? [],
|
|
50
|
+
bindings: o(i.repo).bindings,
|
|
51
|
+
runs: l(i.repo),
|
|
52
|
+
scans: s(i.repo),
|
|
53
|
+
injections: x.injections,
|
|
54
|
+
mockInspectionSuites: x.suites,
|
|
55
|
+
catalog: u(i.module ? [i.module] : void 0),
|
|
56
|
+
headCommit: b,
|
|
54
57
|
multiplicityRequires: i["multiplicity-requires"],
|
|
55
|
-
mutationFloor:
|
|
56
|
-
}),
|
|
57
|
-
if (i.ratchet && !
|
|
58
|
-
findings:
|
|
59
|
-
healthy:
|
|
60
|
-
|
|
58
|
+
mutationFloor: y(i["mutation-floor"], (e) => this.error(e, { exit: 2 }))
|
|
59
|
+
}), C = i.ratchet ? a(i.repo) : null, w = C !== null, T = C ? d(S, C) : S.findings;
|
|
60
|
+
if (i.ratchet && !w && !i.json && this.log(_(i.repo)), i.json) this.log(JSON.stringify({
|
|
61
|
+
findings: T,
|
|
62
|
+
healthy: S.healthy,
|
|
63
|
+
unevaluated: S.unevaluated,
|
|
64
|
+
ratchet: w
|
|
61
65
|
}, null, 2));
|
|
62
|
-
else if (S.length === 0) this.log(`${
|
|
66
|
+
else if (T.length === 0 && S.unevaluated.length === 0) this.log(`${S.healthy.length} obligation(s) with healthy evidence; nothing to report`);
|
|
63
67
|
else {
|
|
64
|
-
for (let e of
|
|
65
|
-
|
|
68
|
+
for (let e of T) this.log(`[${e.severity}] ${e.kind}: ${e.summary}`);
|
|
69
|
+
for (let e of S.unevaluated) this.log(`[not-evaluated] ${e.check}: ${e.obligation}: ${e.reason}`);
|
|
70
|
+
this.log(""), this.log(`${T.length} finding(s), ${S.unevaluated.length} check(s) not evaluated, ${S.healthy.length} healthy` + (w ? " (new violations only)" : ""));
|
|
66
71
|
}
|
|
67
|
-
i.strict && S.length > 0 && this.exit(1);
|
|
72
|
+
i.strict && (T.length > 0 || S.unevaluated.length > 0) && this.exit(1);
|
|
68
73
|
}
|
|
69
74
|
};
|
|
70
|
-
function g(e) {
|
|
71
|
-
return `--ratchet requested but ${f(e)} does not exist; reporting the full backlog, not new violations. Write the baseline with: quoin evidence baseline`;
|
|
72
|
-
}
|
|
73
75
|
function _(e) {
|
|
76
|
+
return `--ratchet requested but ${c(e)} does not exist; reporting the full backlog, not new violations. Write the baseline with: quoin evidence baseline`;
|
|
77
|
+
}
|
|
78
|
+
function v(e) {
|
|
74
79
|
try {
|
|
75
|
-
return
|
|
80
|
+
return h("git", [
|
|
76
81
|
"-C",
|
|
77
82
|
e,
|
|
78
83
|
"rev-parse",
|
|
79
84
|
"HEAD"
|
|
80
|
-
], {
|
|
85
|
+
], {
|
|
86
|
+
encoding: "utf8",
|
|
87
|
+
stdio: [
|
|
88
|
+
"ignore",
|
|
89
|
+
"pipe",
|
|
90
|
+
"ignore"
|
|
91
|
+
]
|
|
92
|
+
}).trim();
|
|
81
93
|
} catch {
|
|
82
94
|
return;
|
|
83
95
|
}
|
|
84
96
|
}
|
|
85
|
-
function
|
|
97
|
+
function y(e, t) {
|
|
86
98
|
if (!e || e.length === 0) return;
|
|
87
99
|
let n = {};
|
|
88
100
|
for (let r of e) {
|
|
@@ -92,4 +104,4 @@ function v(e, t) {
|
|
|
92
104
|
return n;
|
|
93
105
|
}
|
|
94
106
|
//#endregion
|
|
95
|
-
export {
|
|
107
|
+
export { g as default, _ as missingBaselineNotice, y as parseMutationFloor };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseline.d.ts","sourceRoot":"","sources":["../../../src/commands/evidence/baseline.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"baseline.d.ts","sourceRoot":"","sources":["../../../src/commands/evidence/baseline.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAmB7C,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,YAAY;IACxD,MAAM,CAAC,OAAO,SAA0D;IACxE,MAAM,CAAC,WAAW,SAU8C;IAEhE,MAAM,CAAC,QAAQ,WAGb;IAEF,MAAM,CAAC,KAAK;;;;;MASV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAqD3B"}
|