@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
package/dist/cli.js
CHANGED
package/dist/commands/advise.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { a as e,
|
|
2
|
-
import { t as o } from "../base-
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
1
|
+
import { a as e, l as t, n, o as r, r as i, t as a } from "../quire-BsVj1xIR.js";
|
|
2
|
+
import { t as o } from "../base-gAClyCNd.js";
|
|
3
|
+
import { d as s, g as c } from "../schema-assets-HZWo_iFN.js";
|
|
4
|
+
import "../evidence-OyqpqHLS.js";
|
|
5
|
+
import { t as l } from "../advisor-B0rESCx1.js";
|
|
6
|
+
import { a as u, i as d } from "../auditor-Dd3i9Aqx.js";
|
|
6
7
|
import { Flags as f } from "@oclif/core";
|
|
7
8
|
//#region src/advisor/advise.ts
|
|
8
9
|
var p = [
|
|
@@ -73,7 +74,7 @@ function h(e, t) {
|
|
|
73
74
|
}
|
|
74
75
|
function g(e, t, n, r) {
|
|
75
76
|
let i = m(e), a = p.filter(([, e]) => h(e, i)).map(([e]) => e);
|
|
76
|
-
return
|
|
77
|
+
return u(e) !== null && a.push("configuration-matrix"), r && ("target" in r || "threshold" in r) && a.push("quantified-threshold"), t && /^(p0|high|critical)$/i.test(t.trim()) && a.push("high-criticality"), n?.bound && (n.faultDetectionScores.length === 0 ? a.push("fault-detection-unmeasured") : Math.min(...n.faultDetectionScores) < 1 && a.push("fault-detection-failed")), [...new Set(a)].sort();
|
|
77
78
|
}
|
|
78
79
|
function _(e, t) {
|
|
79
80
|
let n = new Set(g(t.statement, t.criticality, t.evidence, t.parameters)), r = new Set(t.propertyShape ? [t.propertyShape] : []), i = new Set(t.objectTypes ?? []), a = new Set(t.archetype ? [t.archetype] : []), o = [];
|
|
@@ -131,7 +132,7 @@ function x(e, t) {
|
|
|
131
132
|
}
|
|
132
133
|
//#endregion
|
|
133
134
|
//#region src/commands/advise.ts
|
|
134
|
-
var S = class
|
|
135
|
+
var S = class r extends o {
|
|
135
136
|
static summary = "Recommend a verification method for each obligation, from the catalog.";
|
|
136
137
|
static description = "The deterministic half of the test-plan advisor (FR-031). Rules match or they do\nnot; where they are inconclusive it says so and stops, rather than guessing.\n\nBefore this, the method table was skill-local prose and `Verification` columns\ndefaulted to Test by habit — nothing ever advised DAST for an attack surface,\nmonitors for a temporal property, or fault injection for a reliability NFR.\n\nObligations come from quire (coverage --json), and each criterion's FR-052\nproperty shape from quire (properties --json), so the advice is over what the\nspec actually states rather than over a document somebody pasted in.\n\nRead the output as a recommendation, never a verdict. An LLM may judge the\nresidue afterwards — labelled as judgement (the FR-042 / ADR-0010 discipline).";
|
|
137
138
|
static examples = [
|
|
@@ -150,9 +151,9 @@ var S = class e extends o {
|
|
|
150
151
|
json: f.boolean({ description: "Emit the advice as JSON." })
|
|
151
152
|
};
|
|
152
153
|
async run() {
|
|
153
|
-
let { flags: i } = await this.parse(
|
|
154
|
+
let { flags: i } = await this.parse(r), o = t(a());
|
|
154
155
|
o && this.error(o.message, { exit: 2 });
|
|
155
|
-
let
|
|
156
|
+
let u = e(n(((e) => {
|
|
156
157
|
let t = [
|
|
157
158
|
e,
|
|
158
159
|
"--scope",
|
|
@@ -161,15 +162,15 @@ var S = class e extends o {
|
|
|
161
162
|
];
|
|
162
163
|
return i.module && t.push("--module", i.module), t;
|
|
163
164
|
})("coverage")));
|
|
164
|
-
|
|
165
|
-
let
|
|
166
|
-
|
|
167
|
-
for (let e of
|
|
168
|
-
let f = C(i.repo), p =
|
|
165
|
+
u.ok || this.error(u.error.message, { exit: 2 });
|
|
166
|
+
let d = l(i.module ? [i.module] : void 0);
|
|
167
|
+
d.methods.length === 0 && this.error("no active module declares a `verification_catalog`, so there is nothing to advise from. Install one (e.g. spec-artifacts-process) or pass --module.", { exit: 2 });
|
|
168
|
+
for (let e of d.unreadable) this.warn(`skipped ${e.moduleRoot}: ${e.reason}`);
|
|
169
|
+
let f = C(i.repo), p = u.value.obligations ?? [];
|
|
169
170
|
p.length > 0 && f.size === 0 && this.warn("no property shapes were read, so recommendations rest on statement text alone. `quire properties` resolves archetypes from the whole installed module set; check that the modules declaring FR/NFR/StR are installed (quoin module list).");
|
|
170
|
-
let m =
|
|
171
|
+
let m = c(i.repo).bindings, h = s(i.repo), g = v(u.value.diagnostics);
|
|
171
172
|
g.degraded && this.warn("engine predates vocabulary classification: this quire's `uncatalogued-verification-method` diagnostics carry no `value`, so an authored method the catalog never declared cannot be told from a genuine disagreement. Every disagreement is reported as a mismatch, as before. Update quire-cli to restore the three-state split (quire-rs CR-091).");
|
|
172
|
-
let y = p.map((e) => _(
|
|
173
|
+
let y = p.map((e) => _(d, T(e, f.get(e.id), w(e.id, m, h), g))), b = [];
|
|
173
174
|
i["mismatch-only"] && b.push((e) => e.mismatch), i["inconclusive-only"] && b.push((e) => e.inconclusive);
|
|
174
175
|
let x = b.length === 0 ? y : y.filter((e) => b.some((t) => t(e)));
|
|
175
176
|
if (i.json) {
|
|
@@ -188,28 +189,28 @@ var S = class e extends o {
|
|
|
188
189
|
this.log(`${e.length} of ${t.length} obligation(s) shown. Of all ${t.length}: ${n((e) => e.mismatch)} mismatch, ${n((e) => e.uncatalogued)} uncatalogued, ${n((e) => e.inconclusive)} inconclusive. Recommendations, not verdicts: confirm the method in spec review.`);
|
|
189
190
|
}
|
|
190
191
|
};
|
|
191
|
-
function C(
|
|
192
|
-
let
|
|
192
|
+
function C(e) {
|
|
193
|
+
let t = [
|
|
193
194
|
"properties",
|
|
194
195
|
"spec/**/*.md",
|
|
195
196
|
"--scope",
|
|
196
|
-
|
|
197
|
+
e,
|
|
197
198
|
"--json"
|
|
198
|
-
],
|
|
199
|
-
if (!a.stdout.trim()) return
|
|
200
|
-
let o =
|
|
201
|
-
if (!o.ok) return
|
|
202
|
-
for (let e of o.value.documents) for (let t of e.criteria) t.row_id &&
|
|
199
|
+
], n = /* @__PURE__ */ new Map(), a = i(t);
|
|
200
|
+
if (!a.stdout.trim()) return n;
|
|
201
|
+
let o = r(a.stdout);
|
|
202
|
+
if (!o.ok) return n;
|
|
203
|
+
for (let e of o.value.documents) for (let t of e.criteria) t.row_id && n.set(t.row_id, {
|
|
203
204
|
property: t.property,
|
|
204
205
|
archetype: e.archetype
|
|
205
206
|
});
|
|
206
|
-
return
|
|
207
|
+
return n;
|
|
207
208
|
}
|
|
208
209
|
function w(e, t, n) {
|
|
209
210
|
let r = t.filter((t) => t.obligation === e);
|
|
210
211
|
return {
|
|
211
212
|
bound: r.length > 0,
|
|
212
|
-
faultDetectionScores:
|
|
213
|
+
faultDetectionScores: d(r, n)
|
|
213
214
|
};
|
|
214
215
|
}
|
|
215
216
|
function T(e, t, n, r) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assurance.d.ts","sourceRoot":"","sources":["../../src/commands/assurance.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"assurance.d.ts","sourceRoot":"","sources":["../../src/commands/assurance.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAoB1C,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,YAAY;IACjD,MAAM,CAAC,OAAO,SAC8D;IAC5E,MAAM,CAAC,WAAW,SAU0D;IAE5E,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;MAcV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAyC3B"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as i } from "../base-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { a as e, l as t, n, t as r } from "../quire-BsVj1xIR.js";
|
|
2
|
+
import { t as i } from "../base-gAClyCNd.js";
|
|
3
|
+
import { f as a, g as o, m as s, u as c } from "../schema-assets-HZWo_iFN.js";
|
|
4
|
+
import { n as l } from "../evidence-OyqpqHLS.js";
|
|
5
|
+
import { t as u } from "../advisor-B0rESCx1.js";
|
|
6
|
+
import { t as d } from "../auditor-Dd3i9Aqx.js";
|
|
7
|
+
import { n as f } from "../completeness-BzBuNq6w.js";
|
|
8
|
+
import { execFileSync as p } from "node:child_process";
|
|
9
|
+
import { Flags as m } from "@oclif/core";
|
|
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: m.string({
|
|
136
138
|
description: "Repository root.",
|
|
137
139
|
default: "."
|
|
138
140
|
}),
|
|
139
|
-
module:
|
|
140
|
-
"claim-type":
|
|
141
|
+
module: m.string({ description: "Module directory supplying the traceability model." }),
|
|
142
|
+
"claim-type": m.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: m.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 = t(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(n(c));
|
|
159
|
+
p.ok || this.error(p.error.message, { exit: 2 });
|
|
160
|
+
let m = p.value.obligations ?? [], h = k(i.repo), _ = l(i.repo, h), v = d({
|
|
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: u(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 p("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 s(e).map((t) => a(e, t)).filter((e) => e !== null);
|
|
176
199
|
}
|
|
177
|
-
function
|
|
178
|
-
return
|
|
200
|
+
function j(e) {
|
|
201
|
+
return s(e).map((t) => c(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-gAClyCNd.js";
|
|
2
|
+
import { n } from "../../modules-DDQkKC4l.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-gAClyCNd.js";
|
|
2
|
+
import { n as t } from "../../modules-DDQkKC4l.js";
|
|
3
|
+
import { n, t as r } from "../../advisor-B0rESCx1.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-gAClyCNd.js";
|
|
2
|
+
import { n as r } from "../../modules-DDQkKC4l.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-gAClyCNd.js";
|
|
2
|
+
import { n } from "../../modules-DDQkKC4l.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 {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** Repository root holding the evidence store. */
|
|
2
|
+
export declare const repoFlag: import('@oclif/core/interfaces').OptionFlag<string, import('@oclif/core/interfaces').CustomOptions>;
|
|
3
|
+
/** Canonical machine output. */
|
|
4
|
+
export declare const jsonFlag: import('@oclif/core/interfaces').BooleanFlag<boolean>;
|
|
5
|
+
/**
|
|
6
|
+
* Read one command input as exact bytes. `-` reads standard input.
|
|
7
|
+
*
|
|
8
|
+
* The bytes are returned unmodified so intake can retain what the producer
|
|
9
|
+
* actually supplied rather than a re-serialized copy of it.
|
|
10
|
+
*/
|
|
11
|
+
export declare function readInputBytes(source: string): Uint8Array;
|
|
12
|
+
/**
|
|
13
|
+
* Read one command input as strictly parsed JSON.
|
|
14
|
+
*
|
|
15
|
+
* Strict parsing is the same reader the sealed contracts use, so a duplicate
|
|
16
|
+
* key or a non-finite number is refused here rather than silently normalized
|
|
17
|
+
* into a record that then seals cleanly.
|
|
18
|
+
*/
|
|
19
|
+
export declare function readInputJson(source: string): unknown;
|
|
20
|
+
/** Canonical JCS text for machine output, with a trailing newline. */
|
|
21
|
+
export declare function canonicalOutput(value: unknown): string;
|
|
22
|
+
/** The message of an unknown thrown value, for a `this.error` hand-off. */
|
|
23
|
+
export declare function messageOf(error: unknown): string;
|
|
24
|
+
/**
|
|
25
|
+
* Refuse a body that supplies a field the caller must not state.
|
|
26
|
+
*
|
|
27
|
+
* The sealing functions delete a supplied `digest` before hashing, so without
|
|
28
|
+
* this check a caller could hand in a wrong digest and receive a cleanly
|
|
29
|
+
* sealed record back, having been told nothing.
|
|
30
|
+
*/
|
|
31
|
+
export declare function refuseSuppliedFields(value: unknown, fields: readonly string[]): string | null;
|
|
32
|
+
/** Parse one repeated `--select <proof-id>=<attestation-digest>` mapping. */
|
|
33
|
+
export declare function parseSelection(raw: string): {
|
|
34
|
+
proof_id: string;
|
|
35
|
+
attestation_digest: string;
|
|
36
|
+
} | null;
|
|
37
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/commands/change-assurance/common.ts"],"names":[],"mappings":"AASA,kDAAkD;AAClD,eAAO,MAAM,QAAQ,qGAGnB,CAAC;AAEH,gCAAgC;AAChC,eAAO,MAAM,QAAQ,uDAAyD,CAAC;AAE/E;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAEzD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAErD;AAED,sEAAsE;AACtE,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEtD;AAED,2EAA2E;AAC3E,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEhD;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,SAAS,MAAM,EAAE,GACxB,MAAM,GAAG,IAAI,CASf;AAED,6EAA6E;AAC7E,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,GACV;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAOzD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { QuoinCommand } from '../../base.js';
|
|
2
|
+
export default class ChangeAssurance extends QuoinCommand {
|
|
3
|
+
protected skipUpdateNudge: boolean;
|
|
4
|
+
static summary: string;
|
|
5
|
+
static description: string;
|
|
6
|
+
run(): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/change-assurance/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,YAAY;IACvD,SAAS,CAAC,eAAe,UAAQ;IACjC,MAAM,CAAC,OAAO,SAC+D;IAC7E,MAAM,CAAC,WAAW,SAmBqB;IAEjC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAI3B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { t as e } from "../../base-gAClyCNd.js";
|
|
2
|
+
//#region src/commands/change-assurance/index.ts
|
|
3
|
+
var t = class t extends e {
|
|
4
|
+
skipUpdateNudge = !0;
|
|
5
|
+
static summary = "Form, retain, and verify change-assurance evidence from explicit inputs.";
|
|
6
|
+
static description = "Producer-facing surface over the FR-063 record, FR-064 proof attestation,\nretained-output intake, and FR-065 verification receipt contracts (FR-068).\n\nThese commands transcribe and verify what a producer supplies. None of them\nruns the command an attestation describes, spawns a process, invokes Git, or\nperforms a network request. Digests establish content integrity and recorded\nactor labels are attribution only; nothing here establishes authorization or\nnon-repudiation, and no output is a certification.\n\nSubcommands:\n quoin change-assurance seal-record\n quoin change-assurance seal-attestation\n quoin change-assurance intake\n quoin change-assurance receipt\n quoin change-assurance verify-receipt\n quoin change-assurance schema\n quoin change-assurance recover\n\nExit status: 0 for a valid receipt, 1 for an invalid or incomplete one, and 2\nfor a usage, parse, or integrity error.";
|
|
7
|
+
async run() {
|
|
8
|
+
await this.parse(t), this.log(t.description);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { t as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { QuoinCommand } from '../../base.js';
|
|
2
|
+
export default class ChangeAssuranceIntake extends QuoinCommand {
|
|
3
|
+
protected skipUpdateNudge: boolean;
|
|
4
|
+
static summary: string;
|
|
5
|
+
static description: string;
|
|
6
|
+
static examples: string[];
|
|
7
|
+
static flags: {
|
|
8
|
+
attestation: import('@oclif/core/interfaces').OptionFlag<string, import('@oclif/core/interfaces').CustomOptions>;
|
|
9
|
+
output: import('@oclif/core/interfaces').OptionFlag<string, import('@oclif/core/interfaces').CustomOptions>;
|
|
10
|
+
repo: import('@oclif/core/interfaces').OptionFlag<string, import('@oclif/core/interfaces').CustomOptions>;
|
|
11
|
+
json: import('@oclif/core/interfaces').BooleanFlag<boolean>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=intake.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intake.d.ts","sourceRoot":"","sources":["../../../src/commands/change-assurance/intake.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAU7C,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,YAAY;IAC7D,SAAS,CAAC,eAAe,UAAQ;IACjC,MAAM,CAAC,OAAO,SACqD;IACnE,MAAM,CAAC,WAAW,SAY+C;IAEjE,MAAM,CAAC,QAAQ,WAEb;IAEF,MAAM,CAAC,KAAK;;;;;MAaV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAoC3B"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { t as e } from "../../base-gAClyCNd.js";
|
|
2
|
+
import { o as t } from "../../change-assurance-CyKLPeKa.js";
|
|
3
|
+
import { a as n, c as r, n as i, r as a, t as o } from "../../common-B1ZJ8CSO.js";
|
|
4
|
+
import { Flags as s } from "@oclif/core";
|
|
5
|
+
//#region src/commands/change-assurance/intake.ts
|
|
6
|
+
var c = class c extends e {
|
|
7
|
+
skipUpdateNudge = !0;
|
|
8
|
+
static summary = "Retain an exact sealed attestation and its exact output bytes.";
|
|
9
|
+
static description = "Verifies ONE sealed attestation against the bytes it claims and retains the\npair atomically: either both the attestation JSON and the output file become\nvisible together, or neither does.\n\nThe retained attestation is the canonical form of what was supplied and the\nretained output is byte-for-byte the file named by --output. A recorded digest\nor size that contradicts those bytes is refused and nothing is retained.\n\nRe-running with byte-identical inputs succeeds and retains nothing new. The\nsame digest with different bytes is a collision and is refused.\n\nAn interrupted intake leaves an invisible staging directory that is never read\nas an attestation; `quoin change-assurance recover` removes it.";
|
|
10
|
+
static examples = ["quoin change-assurance intake --attestation attestation.json --output junit.xml --json"];
|
|
11
|
+
static flags = {
|
|
12
|
+
attestation: s.string({
|
|
13
|
+
description: "Exact sealed attestation JSON. `-` reads stdin.",
|
|
14
|
+
required: !0
|
|
15
|
+
}),
|
|
16
|
+
output: s.string({
|
|
17
|
+
description: "Exact retained result file the attestation names. Its bytes are retained and re-hashed; it is never executed.",
|
|
18
|
+
required: !0
|
|
19
|
+
}),
|
|
20
|
+
repo: r,
|
|
21
|
+
json: i
|
|
22
|
+
};
|
|
23
|
+
async run() {
|
|
24
|
+
let { flags: e } = await this.parse(c), r;
|
|
25
|
+
try {
|
|
26
|
+
r = n(e.attestation);
|
|
27
|
+
} catch (t) {
|
|
28
|
+
this.error(`cannot read --attestation ${e.attestation}: ${a(t)}`, { exit: 2 });
|
|
29
|
+
}
|
|
30
|
+
let i;
|
|
31
|
+
try {
|
|
32
|
+
i = n(e.output);
|
|
33
|
+
} catch (t) {
|
|
34
|
+
this.error(`cannot read --output ${e.output}: ${a(t)}`, { exit: 2 });
|
|
35
|
+
}
|
|
36
|
+
let s;
|
|
37
|
+
try {
|
|
38
|
+
s = t(e.repo, r, i);
|
|
39
|
+
} catch (e) {
|
|
40
|
+
this.error(`cannot retain attestation: ${a(e)}`, { exit: 2 });
|
|
41
|
+
}
|
|
42
|
+
if (e.json) {
|
|
43
|
+
this.log(o({
|
|
44
|
+
directory: s,
|
|
45
|
+
size_bytes: i.byteLength
|
|
46
|
+
}));
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
this.log(`retained attestation → ${s}`), this.log(` output bytes: ${i.byteLength}`);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
//#endregion
|
|
53
|
+
export { c as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { QuoinCommand } from '../../base.js';
|
|
2
|
+
export default class ChangeAssuranceReceipt extends QuoinCommand {
|
|
3
|
+
protected skipUpdateNudge: boolean;
|
|
4
|
+
static summary: string;
|
|
5
|
+
static description: string;
|
|
6
|
+
static examples: string[];
|
|
7
|
+
static flags: {
|
|
8
|
+
record: import('@oclif/core/interfaces').OptionFlag<string, import('@oclif/core/interfaces').CustomOptions>;
|
|
9
|
+
"candidate-revision": import('@oclif/core/interfaces').OptionFlag<string, import('@oclif/core/interfaces').CustomOptions>;
|
|
10
|
+
parent: import('@oclif/core/interfaces').OptionFlag<string[], import('@oclif/core/interfaces').CustomOptions>;
|
|
11
|
+
select: import('@oclif/core/interfaces').OptionFlag<string[], import('@oclif/core/interfaces').CustomOptions>;
|
|
12
|
+
decisions: import('@oclif/core/interfaces').OptionFlag<string, import('@oclif/core/interfaces').CustomOptions>;
|
|
13
|
+
audits: import('@oclif/core/interfaces').OptionFlag<string | undefined, import('@oclif/core/interfaces').CustomOptions>;
|
|
14
|
+
repo: import('@oclif/core/interfaces').OptionFlag<string, import('@oclif/core/interfaces').CustomOptions>;
|
|
15
|
+
json: import('@oclif/core/interfaces').BooleanFlag<boolean>;
|
|
16
|
+
};
|
|
17
|
+
run(): Promise<void>;
|
|
18
|
+
/** Read one stored record, refusing an unknown digest rather than skipping it. */
|
|
19
|
+
private storedRecord;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=receipt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receipt.d.ts","sourceRoot":"","sources":["../../../src/commands/change-assurance/receipt.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAoB7C,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,YAAY;IAC9D,SAAS,CAAC,eAAe,UAAQ;IACjC,MAAM,CAAC,OAAO,SACoD;IAClE,MAAM,CAAC,WAAW,SAe6B;IAE/C,MAAM,CAAC,QAAQ,WAEb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;MAuCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IA6G1B,kFAAkF;IAClF,OAAO,CAAC,YAAY;CAoBrB"}
|