@agent-ix/quoin 0.21.9 → 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.
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/default-modules.yaml +18 -2
- package/dist/{advisor-BiKhR9Yp.js → advisor-B0rESCx1.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-Dd3i9Aqx.js} +82 -65
- package/dist/{base-W7vrLi5E.js → base-gAClyCNd.js} +1 -1
- package/dist/change-assurance/attestations.d.ts +7 -0
- package/dist/change-assurance/attestations.d.ts.map +1 -0
- package/dist/change-assurance/index.d.ts +14 -0
- package/dist/change-assurance/index.d.ts.map +1 -0
- package/dist/change-assurance/integrity.d.ts +11 -0
- package/dist/change-assurance/integrity.d.ts.map +1 -0
- package/dist/change-assurance/records.d.ts +22 -0
- package/dist/change-assurance/records.d.ts.map +1 -0
- package/dist/change-assurance/schema-assets.d.ts +8 -0
- package/dist/change-assurance/schema-assets.d.ts.map +1 -0
- package/dist/change-assurance/store.d.ts +18 -0
- package/dist/change-assurance/store.d.ts.map +1 -0
- package/dist/change-assurance/types.d.ts +180 -0
- package/dist/change-assurance/types.d.ts.map +1 -0
- package/dist/change-assurance/verify.d.ts +4 -0
- package/dist/change-assurance/verify.d.ts.map +1 -0
- package/dist/change-assurance-CyKLPeKa.js +1236 -0
- package/dist/cli.js +1 -1
- package/dist/commands/advise.js +27 -26
- 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/change-assurance/common.d.ts +37 -0
- package/dist/commands/change-assurance/common.d.ts.map +1 -0
- package/dist/commands/change-assurance/index.d.ts +8 -0
- package/dist/commands/change-assurance/index.d.ts.map +1 -0
- package/dist/commands/change-assurance/index.js +12 -0
- package/dist/commands/change-assurance/intake.d.ts +15 -0
- package/dist/commands/change-assurance/intake.d.ts.map +1 -0
- package/dist/commands/change-assurance/intake.js +53 -0
- package/dist/commands/change-assurance/receipt.d.ts +21 -0
- package/dist/commands/change-assurance/receipt.d.ts.map +1 -0
- package/dist/commands/change-assurance/receipt.js +99 -0
- package/dist/commands/change-assurance/recover.d.ts +13 -0
- package/dist/commands/change-assurance/recover.d.ts.map +1 -0
- package/dist/commands/change-assurance/recover.js +29 -0
- package/dist/commands/change-assurance/schema.d.ts +13 -0
- package/dist/commands/change-assurance/schema.d.ts.map +1 -0
- package/dist/commands/change-assurance/schema.js +40 -0
- package/dist/commands/change-assurance/seal-attestation.d.ts +15 -0
- package/dist/commands/change-assurance/seal-attestation.d.ts.map +1 -0
- package/dist/commands/change-assurance/seal-attestation.js +58 -0
- package/dist/commands/change-assurance/seal-record.d.ts +14 -0
- package/dist/commands/change-assurance/seal-record.d.ts.map +1 -0
- package/dist/commands/change-assurance/seal-record.js +53 -0
- package/dist/commands/change-assurance/verify-receipt.d.ts +13 -0
- package/dist/commands/change-assurance/verify-receipt.d.ts.map +1 -0
- package/dist/commands/change-assurance/verify-receipt.js +41 -0
- 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 +17 -16
- package/dist/commands/evidence/audit.d.ts.map +1 -1
- package/dist/commands/evidence/audit.js +55 -43
- package/dist/commands/evidence/baseline.d.ts.map +1 -1
- package/dist/commands/evidence/baseline.js +50 -40
- 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 +48 -33
- package/dist/commands/graph/change-impact.d.ts +16 -0
- package/dist/commands/graph/change-impact.d.ts.map +1 -0
- package/dist/commands/graph/change-impact.js +29 -0
- package/dist/commands/graph/churn.d.ts +14 -0
- package/dist/commands/graph/churn.d.ts.map +1 -0
- package/dist/commands/graph/churn.js +15 -0
- package/dist/commands/graph/common.d.ts +16 -0
- package/dist/commands/graph/common.d.ts.map +1 -0
- package/dist/commands/graph/fan-out.d.ts +14 -0
- package/dist/commands/graph/fan-out.d.ts.map +1 -0
- package/dist/commands/graph/fan-out.js +15 -0
- package/dist/commands/graph/index.d.ts +8 -0
- package/dist/commands/graph/index.d.ts.map +1 -0
- package/dist/commands/graph/index.js +12 -0
- 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/intervention.d.ts +11 -0
- package/dist/commands/measurement/intervention.d.ts.map +1 -0
- package/dist/commands/measurement/intervention.js +31 -0
- package/dist/commands/measurement/operational-release.d.ts +11 -0
- package/dist/commands/measurement/operational-release.d.ts.map +1 -0
- package/dist/commands/measurement/operational-release.js +31 -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 +36 -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 +19 -0
- package/dist/commands/report.d.ts.map +1 -0
- package/dist/commands/report.js +96 -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/common-B1ZJ8CSO.js +36 -0
- package/dist/common-DTrmnvL-.js +35 -0
- package/dist/{completeness-BQDxME0a.js → completeness-BzBuNq6w.js} +1 -1
- package/dist/evidence/adapters/contract-conformance.d.ts +16 -0
- package/dist/evidence/adapters/contract-conformance.d.ts.map +1 -0
- package/dist/evidence/adapters/differential-report.d.ts +18 -0
- package/dist/evidence/adapters/differential-report.d.ts.map +1 -0
- package/dist/evidence/adapters/registry.d.ts.map +1 -1
- package/dist/evidence/adapters/types.d.ts +31 -0
- package/dist/evidence/adapters/types.d.ts.map +1 -1
- package/dist/evidence/index.d.ts +7 -3
- 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-OyqpqHLS.js +614 -0
- package/dist/{flow-command-C_dUJNm-.js → flow-command-CCRTE5Oe.js} +7 -7
- package/dist/graph-analysis/analysis.d.ts +106 -0
- package/dist/graph-analysis/analysis.d.ts.map +1 -0
- package/dist/graph-analysis/index.d.ts +6 -0
- package/dist/graph-analysis/index.d.ts.map +1 -0
- package/dist/graph-analysis/input.d.ts +33 -0
- package/dist/graph-analysis/input.d.ts.map +1 -0
- package/dist/graph-analysis/load.d.ts +21 -0
- package/dist/graph-analysis/load.d.ts.map +1 -0
- package/dist/graph-analysis/render.d.ts +4 -0
- package/dist/graph-analysis/render.d.ts.map +1 -0
- package/dist/graph-analysis-IWaoJJSN.js +657 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -8
- package/dist/measurement/agent-eval-intervention.d.ts +6 -0
- package/dist/measurement/agent-eval-intervention.d.ts.map +1 -0
- package/dist/measurement/atomic-file.d.ts +5 -0
- package/dist/measurement/atomic-file.d.ts.map +1 -0
- package/dist/measurement/compare.d.ts +4 -0
- package/dist/measurement/compare.d.ts.map +1 -0
- package/dist/measurement/date-time.d.ts +3 -0
- package/dist/measurement/date-time.d.ts.map +1 -0
- package/dist/measurement/github-release-operational.d.ts +7 -0
- package/dist/measurement/github-release-operational.d.ts.map +1 -0
- package/dist/measurement/graph-adapters.d.ts +304 -0
- package/dist/measurement/graph-adapters.d.ts.map +1 -0
- package/dist/measurement/graph-portfolio-load.d.ts +3 -0
- package/dist/measurement/graph-portfolio-load.d.ts.map +1 -0
- package/dist/measurement/graph-portfolio.d.ts +158 -0
- package/dist/measurement/graph-portfolio.d.ts.map +1 -0
- package/dist/measurement/index.d.ts +22 -0
- package/dist/measurement/index.d.ts.map +1 -0
- package/dist/measurement/intervention-report.d.ts +24 -0
- package/dist/measurement/intervention-report.d.ts.map +1 -0
- package/dist/measurement/intervention-schema.d.ts +144 -0
- package/dist/measurement/intervention-schema.d.ts.map +1 -0
- package/dist/measurement/intervention-types.d.ts +105 -0
- package/dist/measurement/intervention-types.d.ts.map +1 -0
- package/dist/measurement/intervention.d.ts +16 -0
- package/dist/measurement/intervention.d.ts.map +1 -0
- package/dist/measurement/operational-report.d.ts +17 -0
- package/dist/measurement/operational-report.d.ts.map +1 -0
- package/dist/measurement/operational-schema.d.ts +461 -0
- package/dist/measurement/operational-schema.d.ts.map +1 -0
- package/dist/measurement/operational-types.d.ts +121 -0
- package/dist/measurement/operational-types.d.ts.map +1 -0
- package/dist/measurement/operational.d.ts +13 -0
- package/dist/measurement/operational.d.ts.map +1 -0
- package/dist/measurement/plans.d.ts +6 -0
- package/dist/measurement/plans.d.ts.map +1 -0
- package/dist/measurement/portfolio.d.ts +54 -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 +48 -0
- package/dist/measurement/report.d.ts.map +1 -0
- package/dist/measurement/schemas/operational-evidence-v1.schema.json.d.ts +384 -0
- package/dist/measurement/store.d.ts +14 -0
- package/dist/measurement/store.d.ts.map +1 -0
- package/dist/measurement/types.d.ts +85 -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-j8sDSqx5.js +2980 -0
- package/dist/{modules-Cn9Htfp0.js → modules-DDQkKC4l.js} +2 -2
- package/dist/{plugins-Byi1bWLD.js → plugins-CHpYhpEI.js} +1 -1
- package/dist/quire/assurance.d.ts +109 -0
- package/dist/quire/assurance.d.ts.map +1 -0
- package/dist/quire/contract.d.ts +12 -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 +4 -3
- 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/validate.d.ts +5 -0
- package/dist/quire/validate.d.ts.map +1 -1
- package/dist/{quire-UzoK3Azf.js → quire-BsVj1xIR.js} +533 -499
- package/dist/schema-assets-HZWo_iFN.js +233 -0
- package/dist/schemas/assurance-v1.schema.json +225 -0
- package/dist/schemas/change-assurance-record-v1.schema.json +234 -0
- package/dist/schemas/coverage-v1.schema.json +919 -105
- package/dist/schemas/operational-evidence-v1.schema.json +381 -0
- package/dist/schemas/proof-attestation-v1.schema.json +96 -0
- package/dist/schemas/properties-v1.schema.json +25 -0
- package/dist/schemas/verification-receipt-v1.schema.json +208 -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-BMXhyIie.js → version-CMxMIh5g.js} +1 -1
- package/dist/{write-BDxILTLC.js → write-CGTI0dRO.js} +1 -1
- package/package.json +26 -16
- package/skills/assurance-status-report/SKILL.md +135 -0
- package/skills/assurance-status-report/references/report-contract.md +110 -0
- package/skills/gap-analysis/references/step-4-underspecified-code.md +36 -7
- package/skills/gap-analysis/references/step-5-semantic-review.md +2 -2
- package/skills/gap-analysis/references/step-6-specreview-artifact.md +6 -5
- package/skills/spec-architecture-evaluation/SKILL.md +30 -0
- package/skills/spec-fuzz/SKILL.md +7 -6
- package/dist/evidence-BA5vyZJk.js +0 -603
|
@@ -0,0 +1,657 @@
|
|
|
1
|
+
import { i as e } from "./quire-BsVj1xIR.js";
|
|
2
|
+
import { c as t, s as n } from "./schema-assets-HZWo_iFN.js";
|
|
3
|
+
import "./evidence-OyqpqHLS.js";
|
|
4
|
+
import { existsSync as r, readFileSync as i } from "node:fs";
|
|
5
|
+
import { z as a } from "zod";
|
|
6
|
+
//#region src/graph-analysis/input.ts
|
|
7
|
+
var o = a.object({
|
|
8
|
+
archetype: a.string().min(1),
|
|
9
|
+
schema_digest: a.string().regex(/^[0-9a-f]{64}$/)
|
|
10
|
+
}).strict(), s = a.object({
|
|
11
|
+
name: a.string().min(1),
|
|
12
|
+
version: a.string().min(1),
|
|
13
|
+
schemas: a.array(o)
|
|
14
|
+
}).strict(), c = a.object({
|
|
15
|
+
format: a.literal("quire-assurance"),
|
|
16
|
+
format_version: a.literal(1),
|
|
17
|
+
modules: a.array(s)
|
|
18
|
+
}).strict(), l = a.object({
|
|
19
|
+
repository: a.string().min(1),
|
|
20
|
+
revision: a.string().regex(/^[0-9a-f]{40}$/)
|
|
21
|
+
}).strict(), u = a.object({
|
|
22
|
+
obligation: a.string().min(1),
|
|
23
|
+
kind: a.string().min(1),
|
|
24
|
+
severity: a.enum([
|
|
25
|
+
"low",
|
|
26
|
+
"medium",
|
|
27
|
+
"high"
|
|
28
|
+
]),
|
|
29
|
+
summary: a.string()
|
|
30
|
+
}).passthrough(), d = a.object({
|
|
31
|
+
check: a.string().min(1),
|
|
32
|
+
obligation: a.string().min(1),
|
|
33
|
+
suites: a.array(a.string()),
|
|
34
|
+
reason: a.string()
|
|
35
|
+
}).passthrough(), f = a.object({
|
|
36
|
+
findings: a.array(u),
|
|
37
|
+
healthy: a.array(a.string().min(1)),
|
|
38
|
+
unevaluated: a.array(d)
|
|
39
|
+
}).passthrough(), p = a.object({
|
|
40
|
+
format: a.literal("quoin-audit-envelope"),
|
|
41
|
+
format_version: a.literal(1),
|
|
42
|
+
source: l,
|
|
43
|
+
export: c,
|
|
44
|
+
report: f
|
|
45
|
+
}).strict();
|
|
46
|
+
function m(e) {
|
|
47
|
+
let t = y(e, "premises", c);
|
|
48
|
+
return t.ok ? {
|
|
49
|
+
ok: !0,
|
|
50
|
+
value: _(t.value)
|
|
51
|
+
} : t;
|
|
52
|
+
}
|
|
53
|
+
function h(e) {
|
|
54
|
+
let t = y(e, "audit", p);
|
|
55
|
+
return t.ok ? {
|
|
56
|
+
ok: !0,
|
|
57
|
+
value: {
|
|
58
|
+
...t.value,
|
|
59
|
+
export: _(t.value.export),
|
|
60
|
+
report: v(t.value.report)
|
|
61
|
+
}
|
|
62
|
+
} : t;
|
|
63
|
+
}
|
|
64
|
+
function g(e, t) {
|
|
65
|
+
return x(_({
|
|
66
|
+
format: e.format,
|
|
67
|
+
format_version: e.format_version,
|
|
68
|
+
modules: e.modules
|
|
69
|
+
}), _(t)) ? null : b("premises", "the accepted format, version, modules, and schema digests must exactly match the assurance export");
|
|
70
|
+
}
|
|
71
|
+
function ee(e, t) {
|
|
72
|
+
if (!x(e.source, t.source)) return b("audit", "the audit source repository/revision does not match the assurance export");
|
|
73
|
+
let n = {
|
|
74
|
+
format: t.format,
|
|
75
|
+
format_version: t.format_version,
|
|
76
|
+
modules: t.modules
|
|
77
|
+
};
|
|
78
|
+
return x(_(e.export), _(n)) ? null : b("audit", "the audit export format/module premises do not match the assurance export");
|
|
79
|
+
}
|
|
80
|
+
function _(e) {
|
|
81
|
+
return {
|
|
82
|
+
...e,
|
|
83
|
+
modules: e.modules.map((e) => ({
|
|
84
|
+
...e,
|
|
85
|
+
schemas: e.schemas.map((e) => ({ ...e })).sort((e, t) => w(e.archetype, t.archetype) || w(e.schema_digest, t.schema_digest))
|
|
86
|
+
})).sort((e, t) => w(e.name, t.name) || w(e.version, t.version))
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function v(e) {
|
|
90
|
+
return {
|
|
91
|
+
...e,
|
|
92
|
+
findings: e.findings.map((e) => ({ ...e })).sort((e, t) => w(C(e), C(t))),
|
|
93
|
+
healthy: [...e.healthy].sort(w),
|
|
94
|
+
unevaluated: e.unevaluated.map((e) => ({
|
|
95
|
+
...e,
|
|
96
|
+
suites: [...e.suites].sort(w)
|
|
97
|
+
})).sort((e, t) => w(C(e), C(t)))
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
function y(e, t, n) {
|
|
101
|
+
let r;
|
|
102
|
+
try {
|
|
103
|
+
r = JSON.parse(e);
|
|
104
|
+
} catch (e) {
|
|
105
|
+
return {
|
|
106
|
+
ok: !1,
|
|
107
|
+
error: b(t, `invalid JSON: ${e instanceof Error ? e.message : String(e)}`)
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
let i = n.safeParse(r);
|
|
111
|
+
if (!i.success) {
|
|
112
|
+
let e = i.error.issues.map((e) => `${e.path.join(".") || "<root>"}: ${e.message}`);
|
|
113
|
+
return {
|
|
114
|
+
ok: !1,
|
|
115
|
+
error: {
|
|
116
|
+
kind: "graph-input-violation",
|
|
117
|
+
input: t,
|
|
118
|
+
errors: e,
|
|
119
|
+
message: `${t} input is invalid (${e.join("; ")})`
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
return {
|
|
124
|
+
ok: !0,
|
|
125
|
+
value: i.data
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
function b(e, t) {
|
|
129
|
+
return {
|
|
130
|
+
kind: "graph-input-violation",
|
|
131
|
+
input: e,
|
|
132
|
+
errors: [t],
|
|
133
|
+
message: `${e} input is invalid: ${t}`
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
function x(e, t) {
|
|
137
|
+
return JSON.stringify(S(e)) === JSON.stringify(S(t));
|
|
138
|
+
}
|
|
139
|
+
function S(e) {
|
|
140
|
+
return Array.isArray(e) ? e.map(S) : typeof e != "object" || !e ? e : Object.fromEntries(Object.entries(e).sort(([e], [t]) => e === t ? 0 : e < t ? -1 : 1).map(([e, t]) => [e, S(t)]));
|
|
141
|
+
}
|
|
142
|
+
function C(e) {
|
|
143
|
+
return JSON.stringify(S(e));
|
|
144
|
+
}
|
|
145
|
+
function w(e, t) {
|
|
146
|
+
return e === t ? 0 : e < t ? -1 : 1;
|
|
147
|
+
}
|
|
148
|
+
//#endregion
|
|
149
|
+
//#region src/graph-analysis/analysis.ts
|
|
150
|
+
var te = [
|
|
151
|
+
"depends_on",
|
|
152
|
+
"derives_from",
|
|
153
|
+
"implements",
|
|
154
|
+
"mitigates",
|
|
155
|
+
"refines",
|
|
156
|
+
"requires",
|
|
157
|
+
"satisfies",
|
|
158
|
+
"traces_to"
|
|
159
|
+
], ne = /* @__PURE__ */ new Set([
|
|
160
|
+
"StR",
|
|
161
|
+
"US",
|
|
162
|
+
"FR",
|
|
163
|
+
"NFR"
|
|
164
|
+
]);
|
|
165
|
+
function re(e) {
|
|
166
|
+
let t = D(e, "fan-out");
|
|
167
|
+
if (e.bindings.availability !== "available") return {
|
|
168
|
+
...t,
|
|
169
|
+
state: "not_computed",
|
|
170
|
+
rows: []
|
|
171
|
+
};
|
|
172
|
+
let n = k(e.assurance), r = new Set(n.keys()), i = /* @__PURE__ */ new Map();
|
|
173
|
+
for (let n of e.bindings.bindings) {
|
|
174
|
+
let e = i.get(n.suite) ?? {
|
|
175
|
+
live: /* @__PURE__ */ new Set(),
|
|
176
|
+
unresolved: /* @__PURE__ */ new Set()
|
|
177
|
+
};
|
|
178
|
+
r.has(n.obligation) ? e.live.add(n.obligation) : (e.unresolved.add(n.obligation), t.gaps.push({
|
|
179
|
+
kind: "unresolved-binding",
|
|
180
|
+
subject: `${n.suite}:${n.obligation}`,
|
|
181
|
+
reason: `${n.obligation} is absent from the accepted assurance export`
|
|
182
|
+
})), i.set(n.suite, e);
|
|
183
|
+
}
|
|
184
|
+
return O({
|
|
185
|
+
...t,
|
|
186
|
+
rows: [...i.entries()].sort(([e], [t]) => W(e, t)).map(([e, t]) => ({
|
|
187
|
+
suite: e,
|
|
188
|
+
obligations: U(t.live).map((e) => ({
|
|
189
|
+
obligation: e,
|
|
190
|
+
requirements: n.get(e) ?? []
|
|
191
|
+
})),
|
|
192
|
+
obligationCount: t.live.size,
|
|
193
|
+
unresolvedBindings: U(t.unresolved)
|
|
194
|
+
}))
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
function T(e) {
|
|
198
|
+
let t = D(e, "churn");
|
|
199
|
+
if (e.bindings.availability !== "available") return {
|
|
200
|
+
...t,
|
|
201
|
+
state: "not_computed",
|
|
202
|
+
rows: []
|
|
203
|
+
};
|
|
204
|
+
let n = k(e.assurance), r = new Set(n.keys()), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
|
|
205
|
+
for (let n of e.bindings.bindings) {
|
|
206
|
+
if (!r.has(n.obligation)) {
|
|
207
|
+
(n.affirmations?.length ?? 0) > 0 && t.gaps.push({
|
|
208
|
+
kind: "unresolved-binding",
|
|
209
|
+
subject: `${n.suite}:${n.obligation}`,
|
|
210
|
+
reason: `affirmation history belongs to absent obligation ${n.obligation}`
|
|
211
|
+
});
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
let e = i.get(n.obligation) ?? /* @__PURE__ */ new Set();
|
|
215
|
+
e.add(n.suite), i.set(n.obligation, e);
|
|
216
|
+
let o = a.get(n.obligation) ?? /* @__PURE__ */ new Map();
|
|
217
|
+
for (let e of n.affirmations ?? []) {
|
|
218
|
+
let t = [
|
|
219
|
+
n.obligation,
|
|
220
|
+
e.who,
|
|
221
|
+
e.commit,
|
|
222
|
+
e.note ?? ""
|
|
223
|
+
].join("\0"), r = o.get(t);
|
|
224
|
+
r ? r.suites = U(/* @__PURE__ */ new Set([...r.suites, n.suite])) : o.set(t, {
|
|
225
|
+
who: e.who,
|
|
226
|
+
commit: e.commit,
|
|
227
|
+
...e.note === void 0 ? {} : { note: e.note },
|
|
228
|
+
suites: [n.suite]
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
a.set(n.obligation, o);
|
|
232
|
+
}
|
|
233
|
+
let o = e.assurance.obligations.filter(({ id: e }) => r.has(e)).map(({ id: e }) => {
|
|
234
|
+
let t = [...a.get(e)?.values() ?? []].sort(V);
|
|
235
|
+
return {
|
|
236
|
+
obligation: e,
|
|
237
|
+
requirements: n.get(e) ?? [],
|
|
238
|
+
suites: U(i.get(e) ?? /* @__PURE__ */ new Set()),
|
|
239
|
+
events: t,
|
|
240
|
+
eventCount: t.length
|
|
241
|
+
};
|
|
242
|
+
});
|
|
243
|
+
return o.sort((e, t) => t.eventCount - e.eventCount || W(e.obligation, t.obligation)), O({
|
|
244
|
+
...t,
|
|
245
|
+
rows: o
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
function E(e, t, n) {
|
|
249
|
+
let r = D(e, "change-impact"), i = U(new Set(n ?? te)), a = {
|
|
250
|
+
...r,
|
|
251
|
+
requested: U(new Set(t)),
|
|
252
|
+
relationKinds: i,
|
|
253
|
+
rows: []
|
|
254
|
+
};
|
|
255
|
+
if (e.bindings.availability !== "available") return {
|
|
256
|
+
...a,
|
|
257
|
+
state: "not_computed"
|
|
258
|
+
};
|
|
259
|
+
let o = new Set(e.assurance.relation_kinds.map(({ kind: e }) => e));
|
|
260
|
+
for (let e of i.filter((e) => !o.has(e))) a.gaps.push({
|
|
261
|
+
kind: "unknown-relation-kind",
|
|
262
|
+
subject: e,
|
|
263
|
+
reason: `relationship kind ${e} is absent from the accepted export vocabulary`
|
|
264
|
+
});
|
|
265
|
+
if (a.gaps.some(({ kind: e }) => e === "unknown-relation-kind")) return {
|
|
266
|
+
...a,
|
|
267
|
+
state: "not_computed",
|
|
268
|
+
gaps: H(a.gaps)
|
|
269
|
+
};
|
|
270
|
+
let s = new Set(e.assurance.artifacts.filter(A).map(({ id: e }) => e)), c = [];
|
|
271
|
+
for (let e of a.requested) s.has(e) ? c.push(e) : a.gaps.push({
|
|
272
|
+
kind: "unknown-requirement",
|
|
273
|
+
subject: e,
|
|
274
|
+
reason: `${e} is absent from the accepted assurance export`
|
|
275
|
+
});
|
|
276
|
+
let l = P(c, N(e.assurance, new Set(i), s, new Set(e.assurance.artifacts.map(({ id: e }) => e)), a.gaps)), u = k(e.assurance, !0), d = /* @__PURE__ */ new Map();
|
|
277
|
+
for (let t of e.assurance.obligations) for (let e of u.get(t.id) ?? []) {
|
|
278
|
+
let n = d.get(e) ?? [];
|
|
279
|
+
n.push(t), d.set(e, n);
|
|
280
|
+
}
|
|
281
|
+
let f = j(e.bindings.bindings), p = [...l.entries()].sort(([e], [t]) => W(e, t)).map(([t, n]) => ({
|
|
282
|
+
requirement: t,
|
|
283
|
+
depth: n.edges.length,
|
|
284
|
+
path: n,
|
|
285
|
+
obligations: (d.get(t) ?? []).slice().sort((e, t) => W(e.id, t.id)).map((t) => ({
|
|
286
|
+
obligation: t.id,
|
|
287
|
+
requirements: u.get(t.id) ?? [],
|
|
288
|
+
bindings: (f.get(t.id) ?? []).map((n) => ({
|
|
289
|
+
suite: n.suite,
|
|
290
|
+
auditorVerdict: M(e.audit.report, t.id, a.gaps)
|
|
291
|
+
}))
|
|
292
|
+
}))
|
|
293
|
+
}));
|
|
294
|
+
return O({
|
|
295
|
+
...a,
|
|
296
|
+
rows: p
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
function D(e, t) {
|
|
300
|
+
let n = [];
|
|
301
|
+
if (e.bindings.availability === "absent" ? n.push({
|
|
302
|
+
kind: "absent-bindings-store",
|
|
303
|
+
subject: "bindings.json",
|
|
304
|
+
reason: e.bindings.reason
|
|
305
|
+
}) : e.bindings.availability === "unreadable" ? n.push({
|
|
306
|
+
kind: "unreadable-bindings-store",
|
|
307
|
+
subject: "bindings.json",
|
|
308
|
+
reason: e.bindings.reason
|
|
309
|
+
}) : e.bindings.bindings.length === 0 && n.push({
|
|
310
|
+
kind: "empty-bindings-store",
|
|
311
|
+
subject: "bindings.json",
|
|
312
|
+
reason: "the bindings store is present and valid but contains no bindings"
|
|
313
|
+
}), e.bindings.availability === "available") {
|
|
314
|
+
let t = new Set(e.assurance.obligations.map(({ id: e }) => e));
|
|
315
|
+
for (let r of e.bindings.bindings) t.has(r.obligation) || n.push({
|
|
316
|
+
kind: "unresolved-binding",
|
|
317
|
+
subject: `${r.suite}:${r.obligation}`,
|
|
318
|
+
reason: `${r.obligation} is absent from the accepted assurance export`
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
for (let t of e.assurance.relation_observations) t.availability === "unknown" ? n.push({
|
|
322
|
+
kind: "unknown-relation-availability",
|
|
323
|
+
subject: t.subject ?? t.declaration,
|
|
324
|
+
reason: t.reason ?? `availability of ${t.declaration} is unknown`
|
|
325
|
+
}) : t.availability === "missing" && n.push({
|
|
326
|
+
kind: "missing-required-relation",
|
|
327
|
+
subject: t.subject ?? t.declaration,
|
|
328
|
+
reason: t.reason ?? `${t.declaration} is not satisfied`
|
|
329
|
+
});
|
|
330
|
+
let r = k(e.assurance);
|
|
331
|
+
for (let t of e.assurance.obligations) (r.get(t.id) ?? []).length === 0 && n.push({
|
|
332
|
+
kind: "unresolved-obligation-owner",
|
|
333
|
+
subject: t.id,
|
|
334
|
+
reason: `${t.document} does not identify an accepted artifact`
|
|
335
|
+
});
|
|
336
|
+
return {
|
|
337
|
+
view: t,
|
|
338
|
+
source: e.assurance.source,
|
|
339
|
+
export: {
|
|
340
|
+
format: e.assurance.format,
|
|
341
|
+
format_version: e.assurance.format_version
|
|
342
|
+
},
|
|
343
|
+
premises: _(e.premises),
|
|
344
|
+
state: n.length === 0 ? "complete" : "incomplete",
|
|
345
|
+
gaps: H(n)
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
function O(e) {
|
|
349
|
+
let t = H(e.gaps);
|
|
350
|
+
return {
|
|
351
|
+
...e,
|
|
352
|
+
state: e.state === "not_computed" ? "not_computed" : t.length === 0 ? "complete" : "incomplete",
|
|
353
|
+
gaps: t
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
function k(e, t = !1) {
|
|
357
|
+
let n = /* @__PURE__ */ new Map();
|
|
358
|
+
for (let r of e.artifacts.filter((e) => !t || A(e))) {
|
|
359
|
+
let e = n.get(r.locator.path) ?? [];
|
|
360
|
+
e.push(r.id), n.set(r.locator.path, e);
|
|
361
|
+
}
|
|
362
|
+
return new Map(e.obligations.map((e) => [e.id, U(n.get(e.document) ?? [])]));
|
|
363
|
+
}
|
|
364
|
+
function A(e) {
|
|
365
|
+
return ne.has(e.artifact_type);
|
|
366
|
+
}
|
|
367
|
+
function j(e) {
|
|
368
|
+
let t = /* @__PURE__ */ new Map();
|
|
369
|
+
for (let n of e) {
|
|
370
|
+
let e = t.get(n.obligation) ?? /* @__PURE__ */ new Map();
|
|
371
|
+
e.has(n.suite) || e.set(n.suite, n), t.set(n.obligation, e);
|
|
372
|
+
}
|
|
373
|
+
return new Map([...t].map(([e, t]) => [e, [...t.values()].sort((e, t) => W(e.suite, t.suite))]));
|
|
374
|
+
}
|
|
375
|
+
function M(e, t, n) {
|
|
376
|
+
let r = v(e), i = {
|
|
377
|
+
findings: r.findings.filter((e) => e.obligation === t),
|
|
378
|
+
healthy: r.healthy.filter((e) => e === t),
|
|
379
|
+
unevaluated: r.unevaluated.filter((e) => e.obligation === t)
|
|
380
|
+
};
|
|
381
|
+
return i.findings.length === 0 && i.healthy.length === 0 && i.unevaluated.length === 0 && n.push({
|
|
382
|
+
kind: "missing-auditor-verdict",
|
|
383
|
+
subject: t,
|
|
384
|
+
reason: `${t} has no FR-032 finding, healthy result, or unevaluated check`
|
|
385
|
+
}), i;
|
|
386
|
+
}
|
|
387
|
+
function N(e, t, n, r, i) {
|
|
388
|
+
let a = [];
|
|
389
|
+
for (let o of e.relations) o.kind !== "corpus" || !t.has(o.edge_type) || o.resolution === "resolved" && r.has(o.source) && r.has(o.target) && (!n.has(o.source) || !n.has(o.target)) || (o.resolution !== "resolved" || !n.has(o.source) || !n.has(o.target) ? i.push({
|
|
390
|
+
kind: "dangling-relation",
|
|
391
|
+
subject: `${o.source}:${o.edge_type}:${o.target}`,
|
|
392
|
+
reason: "selected relationship cannot resolve both accepted artifacts"
|
|
393
|
+
}) : a.push(o));
|
|
394
|
+
return a.sort(B);
|
|
395
|
+
}
|
|
396
|
+
function P(e, t) {
|
|
397
|
+
let n = /* @__PURE__ */ new Map();
|
|
398
|
+
for (let e of t) {
|
|
399
|
+
let t = n.get(e.target) ?? [];
|
|
400
|
+
t.push(e), n.set(e.target, t);
|
|
401
|
+
}
|
|
402
|
+
for (let e of n.values()) e.sort(B);
|
|
403
|
+
let r = /* @__PURE__ */ new Map(), i = new F();
|
|
404
|
+
for (let t of e.sort(W)) {
|
|
405
|
+
let e = {
|
|
406
|
+
seed: t,
|
|
407
|
+
edges: []
|
|
408
|
+
};
|
|
409
|
+
I(e, r.get(t)) && (r.set(t, e), i.push({
|
|
410
|
+
node: t,
|
|
411
|
+
path: e
|
|
412
|
+
}));
|
|
413
|
+
}
|
|
414
|
+
for (; i.length > 0;) {
|
|
415
|
+
let e = i.pop();
|
|
416
|
+
if (L(r.get(e.node), e.path)) for (let t of n.get(e.node) ?? []) {
|
|
417
|
+
let n = {
|
|
418
|
+
seed: e.path.seed,
|
|
419
|
+
edges: [...e.path.edges, {
|
|
420
|
+
source: t.source,
|
|
421
|
+
target: t.target,
|
|
422
|
+
relationship: t.edge_type
|
|
423
|
+
}]
|
|
424
|
+
};
|
|
425
|
+
I(n, r.get(t.source)) && (r.set(t.source, n), i.push({
|
|
426
|
+
node: t.source,
|
|
427
|
+
path: n
|
|
428
|
+
}));
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
return r;
|
|
432
|
+
}
|
|
433
|
+
var F = class {
|
|
434
|
+
items = [];
|
|
435
|
+
get length() {
|
|
436
|
+
return this.items.length;
|
|
437
|
+
}
|
|
438
|
+
push(e) {
|
|
439
|
+
this.items.push(e);
|
|
440
|
+
let t = this.items.length - 1;
|
|
441
|
+
for (; t > 0;) {
|
|
442
|
+
let n = Math.floor((t - 1) / 2);
|
|
443
|
+
if (z(this.items[n], e) <= 0) break;
|
|
444
|
+
this.items[t] = this.items[n], t = n;
|
|
445
|
+
}
|
|
446
|
+
this.items[t] = e;
|
|
447
|
+
}
|
|
448
|
+
pop() {
|
|
449
|
+
let e = this.items[0], t = this.items.pop();
|
|
450
|
+
if (e === void 0 || t === void 0 || this.items.length === 0) return e;
|
|
451
|
+
let n = 0;
|
|
452
|
+
for (;;) {
|
|
453
|
+
let e = n * 2 + 1;
|
|
454
|
+
if (e >= this.items.length) break;
|
|
455
|
+
let r = e + 1, i = r < this.items.length && z(this.items[r], this.items[e]) < 0 ? r : e;
|
|
456
|
+
if (z(this.items[i], t) >= 0) break;
|
|
457
|
+
this.items[n] = this.items[i], n = i;
|
|
458
|
+
}
|
|
459
|
+
return this.items[n] = t, e;
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
function I(e, t) {
|
|
463
|
+
return t ? e.edges.length === t.edges.length ? W(R(e), R(t)) < 0 : e.edges.length < t.edges.length : !0;
|
|
464
|
+
}
|
|
465
|
+
function L(e, t) {
|
|
466
|
+
return e !== void 0 && R(e) === R(t);
|
|
467
|
+
}
|
|
468
|
+
function R(e) {
|
|
469
|
+
return [e.seed, ...e.edges.flatMap(({ source: e, target: t, relationship: n }) => [
|
|
470
|
+
e,
|
|
471
|
+
t,
|
|
472
|
+
n
|
|
473
|
+
])].join("\0");
|
|
474
|
+
}
|
|
475
|
+
function z(e, t) {
|
|
476
|
+
return e.path.edges.length - t.path.edges.length || W(R(e.path), R(t.path)) || W(e.node, t.node);
|
|
477
|
+
}
|
|
478
|
+
function B(e, t) {
|
|
479
|
+
return W(e.source, t.source) || W(e.target, t.target) || W(e.edge_type, t.edge_type);
|
|
480
|
+
}
|
|
481
|
+
function V(e, t) {
|
|
482
|
+
return W(e.who, t.who) || W(e.commit, t.commit) || W(e.note ?? "", t.note ?? "");
|
|
483
|
+
}
|
|
484
|
+
function H(e) {
|
|
485
|
+
let t = /* @__PURE__ */ new Map();
|
|
486
|
+
for (let n of e) t.set(`${n.kind}\u0000${n.subject}\u0000${n.reason}`, n);
|
|
487
|
+
return [...t.values()].sort((e, t) => W(e.kind, t.kind) || W(e.subject, t.subject) || W(e.reason, t.reason));
|
|
488
|
+
}
|
|
489
|
+
function U(e) {
|
|
490
|
+
return [...e].sort(W);
|
|
491
|
+
}
|
|
492
|
+
function W(e, t) {
|
|
493
|
+
return e === t ? 0 : e < t ? -1 : 1;
|
|
494
|
+
}
|
|
495
|
+
//#endregion
|
|
496
|
+
//#region src/graph-analysis/load.ts
|
|
497
|
+
var G = a.object({
|
|
498
|
+
who: a.string(),
|
|
499
|
+
commit: a.string(),
|
|
500
|
+
note: a.string().optional()
|
|
501
|
+
}).passthrough(), K = a.object({
|
|
502
|
+
obligation: a.string().min(1),
|
|
503
|
+
statementHashAtBinding: a.string().min(1),
|
|
504
|
+
suite: a.string().min(1),
|
|
505
|
+
commit: a.string().min(1),
|
|
506
|
+
symbols: a.array(a.string()),
|
|
507
|
+
affirmations: a.array(G).optional()
|
|
508
|
+
}).passthrough(), q = a.object({
|
|
509
|
+
schemaVersion: a.literal(1),
|
|
510
|
+
bindings: a.array(K)
|
|
511
|
+
}).passthrough();
|
|
512
|
+
function ie(t) {
|
|
513
|
+
let a = Y(t.exportPath, "export");
|
|
514
|
+
if (!a.ok) return a;
|
|
515
|
+
let o = e(a.value);
|
|
516
|
+
if (!o.ok) return X("export", o.error.message);
|
|
517
|
+
let s = Y(t.premisesPath, "premises");
|
|
518
|
+
if (!s.ok) return s;
|
|
519
|
+
let c = m(s.value);
|
|
520
|
+
if (!c.ok) return X("premises", c.error.message);
|
|
521
|
+
let l = g(o.value, c.value);
|
|
522
|
+
if (l) return X("premises", l.message);
|
|
523
|
+
let u = Y(t.auditPath, "audit");
|
|
524
|
+
if (!u.ok) return u;
|
|
525
|
+
let d = h(u.value);
|
|
526
|
+
if (!d.ok) return X("audit", d.error.message);
|
|
527
|
+
let f = ee(d.value, o.value);
|
|
528
|
+
if (f) return X("audit", f.message);
|
|
529
|
+
let p = n(t.repo), _;
|
|
530
|
+
if (!r(p)) _ = {
|
|
531
|
+
availability: "absent",
|
|
532
|
+
reason: `${p} is absent`
|
|
533
|
+
};
|
|
534
|
+
else try {
|
|
535
|
+
let e = q.safeParse(JSON.parse(i(p, "utf8")));
|
|
536
|
+
_ = e.success ? {
|
|
537
|
+
availability: "available",
|
|
538
|
+
bindings: ae(e.data.bindings)
|
|
539
|
+
} : {
|
|
540
|
+
availability: "unreadable",
|
|
541
|
+
reason: `${p} is valid JSON but does not match the retained bindings schema: ${e.error.issues.map((e) => `${e.path.join(".") || "<root>"}: ${e.message}`).join("; ")}`
|
|
542
|
+
};
|
|
543
|
+
} catch (e) {
|
|
544
|
+
_ = {
|
|
545
|
+
availability: "unreadable",
|
|
546
|
+
reason: e instanceof Error ? e.message : String(e)
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
return {
|
|
550
|
+
ok: !0,
|
|
551
|
+
value: {
|
|
552
|
+
assurance: o.value,
|
|
553
|
+
premises: c.value,
|
|
554
|
+
audit: d.value,
|
|
555
|
+
bindings: _
|
|
556
|
+
}
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
function ae(e) {
|
|
560
|
+
return e.map((e) => ({
|
|
561
|
+
...e,
|
|
562
|
+
symbols: [...e.symbols].sort(J),
|
|
563
|
+
...e.affirmations === void 0 ? {} : { affirmations: e.affirmations.map((e) => ({ ...e })).sort((e, t) => J(e.who, t.who) || J(e.commit, t.commit) || J(e.note ?? "", t.note ?? "")) }
|
|
564
|
+
})).sort((e, t) => J(e.obligation, t.obligation) || J(e.suite, t.suite) || J(e.commit, t.commit) || J(e.statementHashAtBinding, t.statementHashAtBinding) || J(JSON.stringify(e.symbols), JSON.stringify(t.symbols)) || J(JSON.stringify(e.affirmations ?? []), JSON.stringify(t.affirmations ?? [])));
|
|
565
|
+
}
|
|
566
|
+
function J(e, t) {
|
|
567
|
+
return e === t ? 0 : e < t ? -1 : 1;
|
|
568
|
+
}
|
|
569
|
+
function Y(e, t) {
|
|
570
|
+
try {
|
|
571
|
+
return {
|
|
572
|
+
ok: !0,
|
|
573
|
+
value: i(e, "utf8")
|
|
574
|
+
};
|
|
575
|
+
} catch (n) {
|
|
576
|
+
return {
|
|
577
|
+
ok: !1,
|
|
578
|
+
error: {
|
|
579
|
+
kind: "graph-input-read",
|
|
580
|
+
input: t,
|
|
581
|
+
message: `cannot read ${t} input ${e}: ${n instanceof Error ? n.message : String(n)}`
|
|
582
|
+
}
|
|
583
|
+
};
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
function X(e, t) {
|
|
587
|
+
return {
|
|
588
|
+
ok: !1,
|
|
589
|
+
error: {
|
|
590
|
+
kind: "graph-input-invalid",
|
|
591
|
+
input: e,
|
|
592
|
+
message: t
|
|
593
|
+
}
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
//#endregion
|
|
597
|
+
//#region src/graph-analysis/render.ts
|
|
598
|
+
function oe(e) {
|
|
599
|
+
return t(e);
|
|
600
|
+
}
|
|
601
|
+
function se(e) {
|
|
602
|
+
let t = [
|
|
603
|
+
`# Evidence graph: ${e.view}`,
|
|
604
|
+
"",
|
|
605
|
+
`State: **${e.state}**`,
|
|
606
|
+
`Source: \`${$(e.source.repository)}@${e.source.revision}\``,
|
|
607
|
+
`Export: \`${e.export.format} v${e.export.format_version}\``,
|
|
608
|
+
"",
|
|
609
|
+
"## Accepted module premises",
|
|
610
|
+
""
|
|
611
|
+
];
|
|
612
|
+
if (e.premises.modules.length === 0) t.push("*(none)*", "");
|
|
613
|
+
else {
|
|
614
|
+
for (let n of e.premises.modules) t.push(`- \`${$(n.name)}@${$(n.version)}\`: ${n.schemas.length} schema(s)`);
|
|
615
|
+
t.push("");
|
|
616
|
+
}
|
|
617
|
+
return e.view === "fan-out" ? ce(e, t) : e.view === "change-impact" ? le(e, t) : ue(e, t), de(e, t), `${t.join("\n").trimEnd()}\n`;
|
|
618
|
+
}
|
|
619
|
+
function ce(e, t) {
|
|
620
|
+
if (t.push("## Fan-out", "", "| Suite | Live obligations | Count | Unresolved |", "| --- | --- | ---: | --- |"), e.rows.length === 0) t.push("| *(none)* | — | 0 | — |");
|
|
621
|
+
else for (let n of e.rows) {
|
|
622
|
+
let e = n.obligations.map(({ obligation: e, requirements: t }) => `${e} (${t.join(", ") || "owner unknown"})`).join(", ");
|
|
623
|
+
t.push(`| ${Z(n.suite)} | ${Z(e) || "—"} | ${n.obligationCount} | ${Z(n.unresolvedBindings.join(", ")) || "—"} |`);
|
|
624
|
+
}
|
|
625
|
+
t.push("");
|
|
626
|
+
}
|
|
627
|
+
function le(e, t) {
|
|
628
|
+
if (t.push("## Change impact", "", `Requested: ${e.requested.map(Q).join(", ") || "*(none)*"}`, `Relations: ${e.relationKinds.map(Q).join(", ") || "*(none)*"}`, "", "| Requirement | Depth | Seed | Obligations |", "| --- | ---: | --- | --- |"), e.rows.length === 0) t.push("| *(none)* | — | — | — |");
|
|
629
|
+
else for (let n of e.rows) {
|
|
630
|
+
let e = n.obligations.map(({ obligation: e }) => e).join(", ");
|
|
631
|
+
t.push(`| ${Z(n.requirement)} | ${n.depth} | ${Z(n.path.seed)} | ${Z(e) || "—"} |`);
|
|
632
|
+
}
|
|
633
|
+
t.push("");
|
|
634
|
+
}
|
|
635
|
+
function ue(e, t) {
|
|
636
|
+
if (t.push("## Retained reaffirmation history", "", "| Obligation | Requirements | Suites | Events |", "| --- | --- | --- | ---: |"), e.rows.length === 0) t.push("| *(none)* | — | — | 0 |");
|
|
637
|
+
else for (let n of e.rows) t.push(`| ${Z(n.obligation)} | ${Z(n.requirements.join(", ")) || "—"} | ${Z(n.suites.join(", ")) || "—"} | ${n.eventCount} |`);
|
|
638
|
+
t.push("");
|
|
639
|
+
}
|
|
640
|
+
function de(e, t) {
|
|
641
|
+
if (e.gaps.length !== 0) {
|
|
642
|
+
t.push("## Gaps", "");
|
|
643
|
+
for (let n of e.gaps) t.push(`- **${n.kind}** ${Q(n.subject)}: ${n.reason}`);
|
|
644
|
+
t.push("");
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
function Z(e) {
|
|
648
|
+
return e.replaceAll("|", "\\|").replaceAll("\n", " ");
|
|
649
|
+
}
|
|
650
|
+
function Q(e) {
|
|
651
|
+
return `\`${$(e)}\``;
|
|
652
|
+
}
|
|
653
|
+
function $(e) {
|
|
654
|
+
return e.replaceAll("`", "\\`");
|
|
655
|
+
}
|
|
656
|
+
//#endregion
|
|
657
|
+
export { T as a, E as i, oe as n, re as o, ie as r, se as t };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ export { main, isVersionRequest } from './cli.js';
|
|
|
2
2
|
export { packageVersion, resolveVersion } from './version.js';
|
|
3
3
|
export { loadCatalog, defaultModuleRoots, filamentModulesDir, findCatalogEntry, } from './catalog.js';
|
|
4
4
|
export { ensureDefaultModules, defaultModulesManifest } from './modules.js';
|
|
5
|
+
export * from './measurement/index.js';
|
|
6
|
+
export * from './change-assurance/index.js';
|
|
5
7
|
export { installPlugin, listPlugins, removePlugin, parseSourceArg, } from './plugins.js';
|
|
6
8
|
export { createAuthoringPack, formatAuthoringPack, parseTypeList, } from './write.js';
|
|
7
9
|
export { QuoinCommand } from './base.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EACL,aAAa,EACb,WAAW,EACX,YAAY,EACZ,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACL,UAAU,EACV,SAAS,EACT,sBAAsB,EACtB,KAAK,SAAS,EACd,KAAK,WAAW,GACjB,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,QAAQ,EACR,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,KAAK,WAAW,GACjB,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC5E,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EACL,aAAa,EACb,WAAW,EACX,YAAY,EACZ,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACL,UAAU,EACV,SAAS,EACT,sBAAsB,EACtB,KAAK,SAAS,EACd,KAAK,WAAW,GACjB,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,QAAQ,EACR,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,KAAK,WAAW,GACjB,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { n as e, t } from "./version-
|
|
1
|
+
import { n as e, t } from "./version-CMxMIh5g.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-
|
|
4
|
-
import { a as l, i as u, n as d, r as f } from "./plugins-
|
|
5
|
-
import { n as p, t as m } from "./modules-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
3
|
+
import { i, n as a, o, r as s, t as c } from "./base-gAClyCNd.js";
|
|
4
|
+
import { a as l, i as u, n as d, r as f } from "./plugins-CHpYhpEI.js";
|
|
5
|
+
import { n as p, t as m } from "./modules-DDQkKC4l.js";
|
|
6
|
+
import { $ as h, A as g, B as _, C as v, D as y, E as b, F as x, G as S, H as C, I as w, J as T, K as E, L as D, M as O, N as k, O as A, P as j, Q as M, R as N, S as P, T as F, U as I, V as L, W as R, X as z, Y as B, Z as V, _ as H, a as U, at as W, b as G, c as K, d as q, et as J, f as Y, g as X, h as Z, i as Q, it as $, j as ee, k as te, l as ne, m as re, n as ie, nt as ae, o as oe, ot as se, p as ce, q as le, r as ue, rt as de, s as fe, st as pe, t as me, tt as he, u as ge, v as _e, w as ve, x as ye, y as be, z as xe } from "./measurement-j8sDSqx5.js";
|
|
7
|
+
import { n as Se, r as Ce, t as we } from "./schema-assets-HZWo_iFN.js";
|
|
8
|
+
import { C as Te, D as Ee, E as De, O as Oe, S as ke, T as Ae, _ as je, a as Me, b as Ne, c as Pe, d as Fe, f as Ie, g as Le, h as Re, i as ze, l as Be, m as Ve, n as He, o as Ue, p as We, r as Ge, s as Ke, t as qe, u as Je, v as Ye, w as Xe, x as Ze, y as Qe } from "./change-assurance-CyKLPeKa.js";
|
|
9
|
+
import { i as $e, n as et, r as tt, t as nt } from "./config-schema-Dp-vlxuR.js";
|
|
10
|
+
import { a as rt, i as it, n as at, o as ot, r as st, t as ct } from "./write-CGTI0dRO.js";
|
|
11
|
+
import { t as lt } from "./flow-command-CCRTE5Oe.js";
|
|
12
|
+
export { Ge as CHANGE_ASSURANCE_INTEGRITY_BOUNDARY, we as CHANGE_ASSURANCE_SCHEMA_NAMES, lt as FlowCommand, V as GRAPH_ADAPTER_NAMES, M as GraphAdapterError, Q as GraphPortfolioMappingError, ke as IntegrityError, S as InterventionIntakeError, se as MEASUREMENT_SCHEMA_VERSION, de as MeasurementValidationError, ge as PORTFOLIO_STALE_AFTER_DAYS, nt as QUOIN_ENV_BINDINGS, et as QUOIN_PLUGIN_ID, c as QuoinCommand, tt as QuoinConfigSchema, it as UNRESOLVED_ORG_MESSAGE, h as adaptGraphQualityObservation, J as adaptQuireAssurance, Te as assertDigest, D as assertGoverningDefinition, Ie as attestationBytes, ze as attestationPath, Xe as blake3Hex, ue as buildGovernedGraphPortfolio, U as buildGovernedGraphPortfolioFrom, le as buildInterventionReport, Z as buildMeasurementReport, X as buildMeasurementReportFrom, x as buildOperationalReport, q as buildPortfolioReport, Y as buildPortfolioReportFromCollections, Ae as canonicalBytes, oe as canonicalGraphPortfolioJson, De as canonicalizeJcs, Me as changeAssuranceRoot, Se as changeAssuranceSchemaPath, fe as compareGraphQualityCollections, pe as compareMeasurementCollections, H as comparisonFor, ct as createAuthoringPack, a as defaultModuleRoots, m as defaultModulesManifest, Ee as digestValue, p as ensureDefaultModules, s as filamentModulesDir, i as findCatalogEntry, at as formatAuthoringPack, he as graphQualityObservationId, Re as hashIxFlowEvent, d as installPlugin, Ue as intakeAttestation, E as interventionExperimentSchema, N as interventionPath, xe as interventionsRoot, n as isVersionRequest, $e as ixSchema, f as listPlugins, B as loadActiveAssuranceProfiles, o as loadCatalog, z as loadMeasurementPlans, r as main, P as measurementPath, v as measurementsRoot, y as operationalDischarge, j as operationalEvidenceSchema, A as operationalPath, te as operationalRoot, rt as originOrg, t as packageVersion, K as parseGraphPortfolioMappings, u as parseSourceArg, Oe as parseStrictJson, st as parseTypeList, ie as produceAgentEvalIntervention, me as produceGitHubReleaseOperational, _ as rawEvidenceFor, Ke as readAttestation, Ce as readChangeAssuranceSchema, Pe as readChangeRecord, L as readInterventionRecords, ve as readMeasurementCollectionResults, F as readMeasurementCollections, g as readOperationalRecords, Le as recordBytes, Be as recordPath, Je as recoverChangeAssuranceStaging, l as removePlugin, ne as renderGovernedGraphPortfolio, T as renderInterventionReport, _e as renderMeasurementComparison, be as renderMeasurementReport, G as renderMeasurementReportJson, w as renderOperationalReport, ce as renderPortfolioReport, re as renderPortfolioReportJson, ot as resolveOrg, e as resolveVersion, We as sealAttestation, je as sealChangeRecord, ae as selectGraphAdapter, ye as seriesFor, Ye as validateDecision, C as validateInterventionRecord, $ as validateMeasurementCollection, ee as validateOperationalRecord, W as validateStoredMeasurementCollection, Ve as verifyAttestation, qe as verifyChangeAssurance, Qe as verifyChangeRecord, Ne as verifyIxFlowChain, Ze as verifyLineage, I as verifyRawEvidenceReferences, He as verifyReceipt, Fe as writeChangeRecord, R as writeInterventionRecord, b as writeMeasurementCollection, O as writeOperationalPair, k as writeOperationalRecord };
|