@agent-ix/quoin 0.15.1 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/default-modules.yaml +4 -4
  4. package/dist/advisor/advise.d.ts.map +1 -1
  5. package/dist/advisor/methods.d.ts +11 -1
  6. package/dist/advisor/methods.d.ts.map +1 -1
  7. package/dist/{advisor-D35K3_iI.js → advisor-Dhy9S7PS.js} +21 -8
  8. package/dist/audit-CudnEJmh.js +127 -0
  9. package/dist/auditor/audit.d.ts +15 -4
  10. package/dist/auditor/audit.d.ts.map +1 -1
  11. package/dist/auditor/index.d.ts +1 -1
  12. package/dist/auditor/index.d.ts.map +1 -1
  13. package/dist/{base-CtpwIg4M.js → base-D_-Jy4cE.js} +1 -1
  14. package/dist/cli.js +1 -1
  15. package/dist/commands/advise.d.ts +16 -0
  16. package/dist/commands/advise.d.ts.map +1 -0
  17. package/dist/commands/advise.js +161 -0
  18. package/dist/commands/catalog/list.js +2 -2
  19. package/dist/commands/catalog/methods.js +3 -3
  20. package/dist/commands/catalog/show.js +2 -2
  21. package/dist/commands/catalog/validate.js +2 -2
  22. package/dist/commands/config/doctor.js +1 -1
  23. package/dist/commands/config/edit.js +1 -1
  24. package/dist/commands/config/get.js +1 -1
  25. package/dist/commands/config/set.js +1 -1
  26. package/dist/commands/evidence/affirm.d.ts.map +1 -1
  27. package/dist/commands/evidence/affirm.js +36 -50
  28. package/dist/commands/evidence/audit.d.ts +1 -0
  29. package/dist/commands/evidence/audit.d.ts.map +1 -1
  30. package/dist/commands/evidence/audit.js +46 -158
  31. package/dist/commands/evidence/baseline.d.ts +14 -0
  32. package/dist/commands/evidence/baseline.d.ts.map +1 -0
  33. package/dist/commands/evidence/baseline.js +79 -0
  34. package/dist/commands/evidence/gc.js +2 -2
  35. package/dist/commands/evidence/index.d.ts.map +1 -1
  36. package/dist/commands/evidence/index.js +4 -2
  37. package/dist/commands/evidence/record.d.ts +1 -0
  38. package/dist/commands/evidence/record.d.ts.map +1 -1
  39. package/dist/commands/evidence/record.js +34 -47
  40. package/dist/commands/matrix.js +1 -1
  41. package/dist/commands/module/ensure-defaults.js +3 -3
  42. package/dist/commands/module/install.js +2 -2
  43. package/dist/commands/module/list.js +2 -2
  44. package/dist/commands/module/remove.js +2 -2
  45. package/dist/commands/review.js +1 -1
  46. package/dist/commands/to-plan.js +1 -1
  47. package/dist/commands/update.js +2 -2
  48. package/dist/commands/write.js +3 -3
  49. package/dist/evidence/index.d.ts +1 -1
  50. package/dist/evidence/index.d.ts.map +1 -1
  51. package/dist/evidence/record.d.ts +6 -0
  52. package/dist/evidence/record.d.ts.map +1 -1
  53. package/dist/evidence/store.d.ts +76 -6
  54. package/dist/evidence/store.d.ts.map +1 -1
  55. package/dist/evidence/types.d.ts +26 -5
  56. package/dist/evidence/types.d.ts.map +1 -1
  57. package/dist/{evidence-BvUyw-Yv.js → evidence-QUw0KyMH.js} +76 -38
  58. package/dist/{flow-command-BSMqxass.js → flow-command-B-ZBn9Sd.js} +1 -1
  59. package/dist/index.js +6 -6
  60. package/dist/{modules-Ckfaq5p4.js → modules-DSkUXhHn.js} +2 -2
  61. package/dist/{plugins-CLuXx2Jr.js → plugins-DiS0OXoo.js} +1 -1
  62. package/dist/quire/exec.d.ts +44 -0
  63. package/dist/quire/exec.d.ts.map +1 -0
  64. package/dist/quire/index.d.ts +1 -0
  65. package/dist/quire/index.d.ts.map +1 -1
  66. package/dist/{quire-MbMdffPh.js → quire-D7ra5rUF.js} +315 -261
  67. package/dist/{version-By2YFRZQ.js → version-DmZHxX4n.js} +1 -1
  68. package/dist/{write-8JJ8Dumo.js → write-CPdSNIkF.js} +1 -1
  69. package/package.json +1 -1
  70. package/skills/spec-evidence-analysis/SKILL.md +27 -11
@@ -1,4 +1,4 @@
1
- import { t as e } from "../flow-command-BSMqxass.js";
1
+ import { t as e } from "../flow-command-B-ZBn9Sd.js";
2
2
  //#region src/commands/matrix.ts
3
3
  var t = class t extends e {
4
4
  static summary = "Build or update a requirements test matrix.";
@@ -1,6 +1,6 @@
1
- import { t as e } from "../../base-CtpwIg4M.js";
2
- import { r as t } from "../../plugins-CLuXx2Jr.js";
3
- import { n } from "../../modules-Ckfaq5p4.js";
1
+ import { t as e } from "../../base-D_-Jy4cE.js";
2
+ import { r as t } from "../../plugins-DiS0OXoo.js";
3
+ import { n } from "../../modules-DSkUXhHn.js";
4
4
  //#region src/commands/module/ensure-defaults.ts
5
5
  var r = class r extends e {
6
6
  static summary = "Idempotently install the default spec module set.";
@@ -1,5 +1,5 @@
1
- import { t as e } from "../../base-CtpwIg4M.js";
2
- import { n as t } from "../../plugins-CLuXx2Jr.js";
1
+ import { t as e } from "../../base-D_-Jy4cE.js";
2
+ import { n as t } from "../../plugins-DiS0OXoo.js";
3
3
  import { Args as n } from "@oclif/core";
4
4
  //#region src/commands/module/install.ts
5
5
  var r = class r extends e {
@@ -1,5 +1,5 @@
1
- import { t as e } from "../../base-CtpwIg4M.js";
2
- import { r as t } from "../../plugins-CLuXx2Jr.js";
1
+ import { t as e } from "../../base-D_-Jy4cE.js";
2
+ import { r as t } from "../../plugins-DiS0OXoo.js";
3
3
  //#region src/commands/module/list.ts
4
4
  var n = class n extends e {
5
5
  static summary = "List installed spec modules.";
@@ -1,5 +1,5 @@
1
- import { t as e } from "../../base-CtpwIg4M.js";
2
- import { a as t } from "../../plugins-CLuXx2Jr.js";
1
+ import { t as e } from "../../base-D_-Jy4cE.js";
2
+ import { a as t } from "../../plugins-DiS0OXoo.js";
3
3
  import { Args as n } from "@oclif/core";
4
4
  //#region src/commands/module/remove.ts
5
5
  var r = class r extends e {
@@ -1,4 +1,4 @@
1
- import { t as e } from "../flow-command-BSMqxass.js";
1
+ import { t as e } from "../flow-command-B-ZBn9Sd.js";
2
2
  //#region src/commands/review.ts
3
3
  var t = class t extends e {
4
4
  static summary = "Run a composite spec review workflow.";
@@ -1,4 +1,4 @@
1
- import { t as e } from "../flow-command-BSMqxass.js";
1
+ import { t as e } from "../flow-command-B-ZBn9Sd.js";
2
2
  //#region src/commands/to-plan.ts
3
3
  var t = class t extends e {
4
4
  static summary = "Convert accepted requirements into an implementation plan.";
@@ -1,5 +1,5 @@
1
- import { t as e } from "../version-By2YFRZQ.js";
2
- import { t } from "../base-CtpwIg4M.js";
1
+ import { t as e } from "../version-DmZHxX4n.js";
2
+ import { t } from "../base-D_-Jy4cE.js";
3
3
  import { runSelfUpdate as n } from "@agent-ix/ix-cli-core";
4
4
  import { Flags as r } from "@oclif/core";
5
5
  //#region src/commands/update.ts
@@ -1,6 +1,6 @@
1
- import { o as e, t } from "../base-CtpwIg4M.js";
2
- import { n } from "../modules-Ckfaq5p4.js";
3
- import { n as r, r as i, t as a } from "../write-8JJ8Dumo.js";
1
+ import { o as e, t } from "../base-D_-Jy4cE.js";
2
+ import { n } from "../modules-DSkUXhHn.js";
3
+ import { n as r, r as i, t as a } from "../write-CPdSNIkF.js";
4
4
  import { Args as o, Flags as s } from "@oclif/core";
5
5
  //#region src/commands/write.ts
6
6
  var c = class c extends t {
@@ -7,7 +7,7 @@
7
7
  * already observed at ecosystem scale: 1,014 trace tags binding to nothing
8
8
  * while matrices read as covered (agent-ix/quire-rs#72).
9
9
  */
10
- export { affirm, baselinePath, bind, bindingsPath, canonicalJson, gc, inspectionsPath, listRecordedSuites, listRuns, readBaseline, readBindings, readRun, runPath, short, storeRoot, suitesPath, writeBaseline, writeBindings, writeRun, } from './store.js';
10
+ export { affirm, baselinePath, bind, bindingsPath, canonicalJson, gc, inspectionsPath, latestRun, listRecordedSuites, listRuns, readBaseline, readBindings, readRun, readRuns, runPath, short, storeRoot, suitesPath, writeBaseline, writeBindings, writeRun, } from './store.js';
11
11
  export { RUNS_DIR, STORE_SCHEMA_VERSION, type Affirmation, type BaselineFile, type Binding, type BindingsFile, type RunEntry, type RunRecord, } from './types.js';
12
12
  export { obligationsFrom, recordRun, type RecordOutcome, type RecordRequest, } from './record.js';
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/evidence/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,MAAM,EACN,YAAY,EACZ,IAAI,EACJ,YAAY,EACZ,aAAa,EACb,EAAE,EACF,eAAe,EACf,kBAAkB,EAClB,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,OAAO,EACP,KAAK,EACL,SAAS,EACT,UAAU,EACV,aAAa,EACb,aAAa,EACb,QAAQ,GACT,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,QAAQ,EACR,oBAAoB,EACpB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,SAAS,GACf,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,eAAe,EACf,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/evidence/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,MAAM,EACN,YAAY,EACZ,IAAI,EACJ,YAAY,EACZ,aAAa,EACb,EAAE,EACF,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,OAAO,EACP,KAAK,EACL,SAAS,EACT,UAAU,EACV,aAAa,EACb,aAAa,EACb,QAAQ,GACT,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,QAAQ,EACR,oBAAoB,EACpB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,SAAS,GACf,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,eAAe,EACf,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,aAAa,CAAC"}
@@ -6,6 +6,12 @@ export interface RecordRequest {
6
6
  suite: string;
7
7
  commit: string;
8
8
  tool: string;
9
+ /**
10
+ * The kind of evidence this run produced, from the declared `test_type`
11
+ * vocabulary. Optional; method conformance compares kind to kind and stays
12
+ * silent when a run declares none, rather than inferring one.
13
+ */
14
+ evidenceKind?: string;
9
15
  /** ISO-8601. Passed in rather than read from the clock, so a record is reproducible. */
10
16
  timestamp: string;
11
17
  entries: RunEntry[];
@@ -1 +1 @@
1
- {"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../src/evidence/record.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,EAAsC,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE/E,gDAAgD;AAChD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,wFAAwF;IACxF,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB;;;;;;OAMG;IACH,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED,oCAAoC;AACpC,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,wDAAwD;IACxD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB;;;;OAIG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,6DAA6D;IAC7D,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa,CAgE/D;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,cAAc,GAAG,UAAU,EAAE,CAEpE"}
1
+ {"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../src/evidence/record.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,EAAsC,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE/E,gDAAgD;AAChD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wFAAwF;IACxF,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB;;;;;;OAMG;IACH,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED,oCAAoC;AACpC,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,wDAAwD;IACxD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB;;;;OAIG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,6DAA6D;IAC7D,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa,CAoE/D;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,cAAc,GAAG,UAAU,EAAE,CAEpE"}
@@ -27,17 +27,69 @@ export declare function short(commit: string): string;
27
27
  * produce identical bytes.
28
28
  */
29
29
  export declare function canonicalJson(value: unknown): string;
30
+ /**
31
+ * A store file that exists and cannot be read as JSON.
32
+ *
33
+ * `bindings.json` and `baseline.json` are **checked into git**, so a merge
34
+ * conflict leaves `<<<<<<< HEAD` in one of them. Before this, every store read
35
+ * threw a bare `SyntaxError: Unexpected token '<'` naming no file
36
+ * (agent-ix/quoin#106).
37
+ */
38
+ export declare class StoreReadError extends Error {
39
+ readonly path: string;
40
+ readonly cause: unknown;
41
+ constructor(path: string, cause: unknown);
42
+ }
30
43
  /** Write one run record. Last-write-wins at the same (suite, commit). */
31
44
  export declare function writeRun(repo: string, record: RunRecord): string;
32
45
  /** Read one run record, or `null` when that (suite, commit) has none. */
33
46
  export declare function readRun(repo: string, suite: string, commit: string): RunRecord | null;
34
- /** Every run recorded for a suite, newest filename last (lexicographic). */
47
+ /**
48
+ * Every run file recorded for a suite, in filename order.
49
+ *
50
+ * Filename order is **not** time order — a filename is a commit prefix, which
51
+ * is uniformly random hex. Use [`latestRun`] when you mean the newest run;
52
+ * this exists for enumeration.
53
+ */
35
54
  export declare function listRuns(repo: string, suite: string): string[];
55
+ /**
56
+ * Every run recorded for a suite, oldest first by `timestamp`.
57
+ *
58
+ * An unreadable run file is skipped and its path pushed onto `skipped` when the
59
+ * caller passes one — one corrupt record must not hide every finding in the
60
+ * report (agent-ix/quoin#106).
61
+ */
62
+ export declare function readRuns(repo: string, suite: string, skipped?: string[]): RunRecord[];
63
+ /**
64
+ * The newest run of a suite, by **timestamp** — or `null` when it has none.
65
+ *
66
+ * Not `listRuns().at(-1)`. A run filename is `<commit12>.json` and a commit
67
+ * prefix is uniformly random hex, so the lexicographically last file is the
68
+ * newest run with probability 1/n. That arbitrary choice drove the auditor's
69
+ * freshness and vacuity checks and `gc`'s retention: record a fresh run at HEAD
70
+ * and, if an older run's prefix happened to sort higher, `stale-evidence` was
71
+ * reported against evidence that was current — and re-recording could not fix
72
+ * it, because the ordering is a property of the hashes and not of what you do
73
+ * (agent-ix/quoin#104).
74
+ *
75
+ * `RunRecord.timestamp` was there the whole time. The commit is the tiebreak,
76
+ * so two runs stamped identically still order deterministically.
77
+ */
78
+ export declare function latestRun(repo: string, suite: string, skipped?: string[]): RunRecord | null;
36
79
  /** Every suite that has at least one recorded run. */
37
80
  export declare function listRecordedSuites(repo: string): string[];
38
81
  /** The binding graph. An absent file reads as an empty graph, not an error. */
39
82
  export declare function readBindings(repo: string): BindingsFile;
40
- /** Write the binding graph, ordered by obligation id so diffs stay minimal. */
83
+ /**
84
+ * Write the binding graph, ordered by `(obligation, suite)` so diffs stay
85
+ * minimal.
86
+ *
87
+ * Compared with plain `<`, not `localeCompare`: this file is checked in and its
88
+ * diff is meant to *be* the per-PR delta, and `localeCompare` without an
89
+ * explicit locale depends on the runtime's ICU data — so two machines could
90
+ * serialize the same binding set in different orders and produce a diff nobody
91
+ * made.
92
+ */
41
93
  export declare function writeBindings(repo: string, file: BindingsFile): void;
42
94
  /** The ratchet baseline, or `null` when none has been accepted. */
43
95
  export declare function readBaseline(repo: string): BaselineFile | null;
@@ -55,22 +107,40 @@ export declare function gc(repo: string, dryRun?: boolean): string[];
55
107
  * Bind an obligation to the run that discharged it, stamping the statement hash
56
108
  * as it stands now.
57
109
  *
110
+ * **Keyed on `(obligation, suite)`, not on the obligation alone.** The binding
111
+ * graph is cross-suite by design — one obligation discharged by a unit suite
112
+ * and a mutation suite is the case `bindings.json` exists to hold in one file —
113
+ * and keying on the obligation made the second suite *overwrite* the first.
114
+ * Two consequences, both silent: the cross-suite relationship was destroyed on
115
+ * write, and `insufficient-multiplicity` counted distinct suites per obligation
116
+ * across a set that could never hold more than one, so the finding could not be
117
+ * cleared by any amount of evidence (agent-ix/quoin#102).
118
+ *
58
119
  * **Auto-bind, explicit affirmation.** First discharge binds without asking:
59
120
  * requiring a human to confirm a binding the evidence already proves would put
60
121
  * a gate in front of the common case and teach people to click through it. What
61
122
  * stays explicit is *re-affirmation* after a statement changes — that is the
62
123
  * judgement call, and it is the one worth a signature.
63
124
  *
64
- * Returns the binding, whether it was newly created, and (when it already
65
- * existed) whether it is now suspect.
125
+ * Returns the binding, whether it was newly created, and (when this
126
+ * `(obligation, suite)` already existed) whether it is now suspect.
66
127
  */
67
128
  export declare function bind(existing: Binding[], next: Omit<Binding, "affirmations">): {
68
129
  bindings: Binding[];
69
130
  created: boolean;
70
131
  suspect: boolean;
71
132
  };
72
- /** Record a re-affirmation against an existing binding, clearing suspicion. */
73
- export declare function affirm(existing: Binding[], obligation: string, currentHash: string, who: string, commit: string, note?: string): {
133
+ /**
134
+ * Record a re-affirmation, clearing suspicion.
135
+ *
136
+ * Affirms **every** binding for the obligation, not the first one found. The
137
+ * judgement being recorded is "I have read the new statement and the evidence
138
+ * still discharges it", and that is a judgement about the requirement rather
139
+ * than about one suite — affirming only the first would leave a sibling suite
140
+ * suspect for a reason nobody could act on. `suite` narrows it when the
141
+ * reviewer means only one.
142
+ */
143
+ export declare function affirm(existing: Binding[], obligation: string, currentHash: string, who: string, commit: string, note?: string, suite?: string): {
74
144
  bindings: Binding[];
75
145
  found: boolean;
76
146
  };
@@ -1 +1 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/evidence/store.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAYH,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,2EAA2E;AAC3E,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAE3E;AAED,4DAA4D;AA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EAAE,MAAM,EAAE,MAAM,UAAQ,GAAG,MAAM,EAAE,CAwBzD;AAUD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,IAAI,CAClB,QAAQ,EAAE,OAAO,EAAE,EACnB,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,GAClC;IAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAwB7D;AAED;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CACpB,QAAQ,EAAE,OAAO,EAAE,EACnB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,MAAM,GACb;IAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAkBzC"}
@@ -66,6 +66,20 @@ export interface RunRecord {
66
66
  commit: string;
67
67
  /** Tool and version, as the adapter reported them. */
68
68
  tool: string;
69
+ /**
70
+ * The kind of evidence this run produced, from the declared `test_type`
71
+ * vocabulary (`Unit`, `Property`, `Static`, `Manual`, …) — the same
72
+ * vocabulary the suite registry's `Evidence Kind` column and the catalog's
73
+ * `evidence_kind` use.
74
+ *
75
+ * Optional, and its absence is **not** an invitation to guess. Method
76
+ * conformance used to infer "this was a test run" from `entries.length > 0`,
77
+ * which is true of a transcribed inspection too — so every `Inspection` or
78
+ * `Analysis` obligation recorded through `quoin evidence record` was flagged
79
+ * (agent-ix/quoin#105). With no kind declared the question cannot be asked,
80
+ * and the check says nothing rather than something wrong.
81
+ */
82
+ evidenceKind?: string;
69
83
  /** ISO-8601, supplied by the caller — never read from the clock here. */
70
84
  timestamp: string;
71
85
  entries: RunEntry[];
@@ -109,14 +123,21 @@ export interface BindingsFile {
109
123
  schemaVersion: number;
110
124
  bindings: Binding[];
111
125
  }
112
- /** The accepted violation set a ratchet compares against. */
126
+ /**
127
+ * The accepted violation set a ratchet compares against.
128
+ *
129
+ * `accepted` holds `<kind>:<obligation>` keys — **every** finding kind, not two
130
+ * named buckets. The original shape carried `undischarged` and `suspect` only,
131
+ * so `stale-evidence`, `vacuous-evidence`, `method-conformance`,
132
+ * `unknown-method` and `insufficient-multiplicity` could never appear in a
133
+ * baseline and `--ratchet` reported the entire existing backlog for all five —
134
+ * the outcome ratchet mode exists to prevent (agent-ix/quoin#105).
135
+ */
113
136
  export interface BaselineFile {
114
137
  schemaVersion: number;
115
138
  /** Commit the baseline was accepted at. */
116
139
  commit: string;
117
- /** Obligation ids accepted as currently undischarged. */
118
- undischarged: string[];
119
- /** Obligation ids accepted as currently suspect. */
120
- suspect: string[];
140
+ /** Accepted findings as `<kind>:<obligation>`, sorted. */
141
+ accepted: string[];
121
142
  }
122
143
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/evidence/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,oEAAoE;AACpE,eAAO,MAAM,QAAQ,SAAS,CAAC;AAE/B,yEAAyE;AACzE,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC;;;;;;;GAOG;AACH,MAAM,WAAW,QAAQ;IACvB,qCAAqC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAC5C;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,SAAS;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,MAAM,EAAE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C,MAAM,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB"}
@@ -32,48 +32,82 @@ function h(e) {
32
32
  function g(e, n) {
33
33
  t(o(e), { recursive: !0 }), a(e, m(n), "utf8");
34
34
  }
35
- function _(t) {
36
- return e(t) ? JSON.parse(n(t, "utf8")) : null;
35
+ var _ = class extends Error {
36
+ path;
37
+ cause;
38
+ constructor(e, t) {
39
+ let n = t instanceof Error ? t.message : String(t);
40
+ super(`${e} exists but is not readable JSON: ${n}. A merge conflict in a checked-in store file is the usual cause — resolve it, or delete the file to start from an empty store.`), this.path = e, this.cause = t, this.name = "StoreReadError";
41
+ }
42
+ };
43
+ function v(t) {
44
+ if (!e(t)) return null;
45
+ try {
46
+ return JSON.parse(n(t, "utf8"));
47
+ } catch (e) {
48
+ throw new _(t, e);
49
+ }
50
+ }
51
+ function y(e, t) {
52
+ try {
53
+ return v(e);
54
+ } catch (n) {
55
+ if (n instanceof _) return t.push(e), null;
56
+ throw n;
57
+ }
37
58
  }
38
- function v(e, t) {
59
+ function b(e, t) {
39
60
  let n = f(e, t.suite, t.commit);
40
61
  return g(n, {
41
62
  ...t,
42
63
  schemaVersion: 1
43
64
  }), n;
44
65
  }
45
- function y(e, t, n) {
46
- return _(f(e, t, n));
47
- }
48
- function b(t, n) {
66
+ function x(t, n) {
49
67
  let i = s(l(t), c, n);
50
68
  return e(i) ? r(i).filter((e) => e.endsWith(".json")).sort() : [];
51
69
  }
52
- function x(t) {
70
+ function S(e, t, n = []) {
71
+ return x(e, t).map((r) => y(f(e, t, r.replace(/\.json$/, "")), n)).filter((e) => e !== null).sort((e, t) => w(e.timestamp, t.timestamp) || w(e.commit, t.commit));
72
+ }
73
+ function C(e, t, n = []) {
74
+ return S(e, t, n).at(-1) ?? null;
75
+ }
76
+ function w(e, t) {
77
+ return e === t ? 0 : e < t ? -1 : 1;
78
+ }
79
+ function T(t) {
53
80
  let n = s(l(t), c);
54
81
  return e(n) ? r(n, { withFileTypes: !0 }).filter((e) => e.isDirectory()).map((e) => e.name).sort() : [];
55
82
  }
56
- function S(e) {
57
- return _(u(e)) ?? {
83
+ function E(e) {
84
+ return v(u(e)) ?? {
58
85
  schemaVersion: 1,
59
86
  bindings: []
60
87
  };
61
88
  }
62
- function C(e, t) {
63
- let n = [...t.bindings].sort((e, t) => e.obligation.localeCompare(t.obligation));
89
+ function D(e, t) {
90
+ let n = [...t.bindings].sort(j);
64
91
  g(u(e), {
65
92
  schemaVersion: 1,
66
93
  bindings: n
67
94
  });
68
95
  }
69
- function w(e) {
70
- return _(d(e));
96
+ function O(e) {
97
+ return v(d(e));
98
+ }
99
+ function k(e, t) {
100
+ g(d(e), {
101
+ schemaVersion: 1,
102
+ commit: t.commit,
103
+ accepted: [...t.accepted].sort(w)
104
+ });
71
105
  }
72
- function T(e, t = !1) {
73
- let n = new Set(S(e).bindings.map((e) => `${e.suite}/${p(e.commit)}.json`)), r = [];
74
- for (let a of x(e)) {
75
- let o = b(e, a), u = /* @__PURE__ */ new Set(), d = o.at(-1);
76
- d && u.add(d);
106
+ function A(e, t = !1) {
107
+ let n = new Set(E(e).bindings.map((e) => `${e.suite}/${p(e.commit)}.json`)), r = [];
108
+ for (let a of T(e)) {
109
+ let o = x(e, a), u = /* @__PURE__ */ new Set(), d = C(e, a);
110
+ d && u.add(`${p(d.commit)}.json`);
77
111
  for (let d of o) {
78
112
  if (u.has(d) || n.has(`${a}/${d}`)) continue;
79
113
  let o = s(l(e), c, a, d);
@@ -82,8 +116,11 @@ function T(e, t = !1) {
82
116
  }
83
117
  return r.sort();
84
118
  }
85
- function E(e, t) {
86
- let n = e.findIndex((e) => e.obligation === t.obligation);
119
+ function j(e, t) {
120
+ return e.obligation === t.obligation ? e.suite === t.suite ? 0 : e.suite < t.suite ? -1 : 1 : e.obligation < t.obligation ? -1 : 1;
121
+ }
122
+ function M(e, t) {
123
+ let n = e.findIndex((e) => e.obligation === t.obligation && e.suite === t.suite);
87
124
  if (n === -1) return {
88
125
  bindings: [...e, { ...t }],
89
126
  created: !0,
@@ -91,7 +128,6 @@ function E(e, t) {
91
128
  };
92
129
  let r = e[n], i = r.statementHashAtBinding !== t.statementHashAtBinding, a = {
93
130
  ...r,
94
- suite: t.suite,
95
131
  commit: t.commit,
96
132
  symbols: t.symbols
97
133
  }, o = [...e];
@@ -101,34 +137,36 @@ function E(e, t) {
101
137
  suspect: i
102
138
  };
103
139
  }
104
- function D(e, t, n, r, i, a) {
105
- let o = e.findIndex((e) => e.obligation === t);
106
- if (o === -1) return {
140
+ function N(e, t, n, r, i, a, o) {
141
+ let s = e.map((e, t) => [e, t]).filter(([e]) => e.obligation === t && (!o || e.suite === o));
142
+ if (s.length === 0) return {
107
143
  bindings: e,
108
144
  found: !1
109
145
  };
110
- let s = e[o], c = [...e];
111
- return c[o] = {
112
- ...s,
146
+ let c = [...e];
147
+ for (let [e, t] of s) c[t] = {
148
+ ...e,
113
149
  statementHashAtBinding: n,
114
- affirmations: [...s.affirmations ?? [], {
150
+ affirmations: [...e.affirmations ?? [], {
115
151
  who: r,
116
152
  commit: i,
117
153
  note: a
118
154
  }]
119
- }, {
155
+ };
156
+ return {
120
157
  bindings: c,
121
158
  found: !0
122
159
  };
123
160
  }
124
161
  //#endregion
125
162
  //#region src/evidence/record.ts
126
- function O(e) {
127
- let t = v(e.repo, {
163
+ function P(e) {
164
+ let t = b(e.repo, {
128
165
  schemaVersion: 1,
129
166
  suite: e.suite,
130
167
  commit: e.commit,
131
168
  tool: e.tool,
169
+ evidenceKind: e.evidenceKind,
132
170
  timestamp: e.timestamp,
133
171
  entries: e.entries
134
172
  }), n = new Map(e.obligations.map((e) => [e.id, e])), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
@@ -141,11 +179,11 @@ function O(e) {
141
179
  let a = r.get(e) ?? [];
142
180
  a.push(t.symbol), r.set(e, a);
143
181
  }
144
- let a = S(e.repo).bindings, o = [], s = [];
145
- for (let [t, i] of [...r].sort(([e], [t]) => e.localeCompare(t))) {
182
+ let a = E(e.repo).bindings, o = [], s = [];
183
+ for (let [t, i] of [...r].sort(([e], [t]) => e === t ? 0 : e < t ? -1 : 1)) {
146
184
  let r = n.get(t);
147
185
  if (!r) continue;
148
- let c = E(a, {
186
+ let c = M(a, {
149
187
  obligation: t,
150
188
  statementHashAtBinding: r.statement_hash,
151
189
  suite: e.suite,
@@ -154,7 +192,7 @@ function O(e) {
154
192
  });
155
193
  a = c.bindings, c.created && o.push(t), c.suspect && s.push(t);
156
194
  }
157
- return C(e.repo, {
195
+ return D(e.repo, {
158
196
  schemaVersion: 1,
159
197
  bindings: a
160
198
  }), {
@@ -164,8 +202,8 @@ function O(e) {
164
202
  unmatched: [...i].sort()
165
203
  };
166
204
  }
167
- function k(e) {
205
+ function F(e) {
168
206
  return e.obligations ?? [];
169
207
  }
170
208
  //#endregion
171
- export { x as a, S as c, T as i, y as l, O as n, b as o, D as r, w as s, k as t, C as u };
209
+ export { A as a, O as c, D as d, d as i, E as l, P as n, C as o, N as r, T as s, F as t, k as u };
@@ -1,4 +1,4 @@
1
- import { a as e, t } from "./base-CtpwIg4M.js";
1
+ import { a as e, t } from "./base-D_-Jy4cE.js";
2
2
  import { existsSync as n } from "node:fs";
3
3
  import { dirname as r, join as i, resolve as a } from "node:path";
4
4
  import { fileURLToPath as o } from "node:url";
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { n as e, t } from "./version-By2YFRZQ.js";
1
+ import { n as e, t } from "./version-DmZHxX4n.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-CtpwIg4M.js";
4
- import { a as l, i as u, n as d, r as f } from "./plugins-CLuXx2Jr.js";
5
- import { n as p, t as m } from "./modules-Ckfaq5p4.js";
3
+ import { i, n as a, o, r as s, t as c } from "./base-D_-Jy4cE.js";
4
+ import { a as l, i as u, n as d, r as f } from "./plugins-DiS0OXoo.js";
5
+ import { n as p, t as m } from "./modules-DSkUXhHn.js";
6
6
  import { i as h, n as g, r as _, t as v } from "./config-schema-Dp-vlxuR.js";
7
- import { a as y, i as b, n as x, o as S, r as C, t as w } from "./write-8JJ8Dumo.js";
8
- import { t as T } from "./flow-command-BSMqxass.js";
7
+ import { a as y, i as b, n as x, o as S, r as C, t as w } from "./write-CPdSNIkF.js";
8
+ import { t as T } from "./flow-command-B-ZBn9Sd.js";
9
9
  export { T as FlowCommand, v as QUOIN_ENV_BINDINGS, g as QUOIN_PLUGIN_ID, c as QuoinCommand, _ as QuoinConfigSchema, b as UNRESOLVED_ORG_MESSAGE, w as createAuthoringPack, a as defaultModuleRoots, m as defaultModulesManifest, p as ensureDefaultModules, s as filamentModulesDir, i as findCatalogEntry, x as formatAuthoringPack, d as installPlugin, n as isVersionRequest, h as ixSchema, f as listPlugins, o as loadCatalog, r as main, y as originOrg, t as packageVersion, u as parseSourceArg, C as parseTypeList, l as removePlugin, S as resolveOrg, e as resolveVersion };
@@ -1,5 +1,5 @@
1
- import { a as e } from "./base-CtpwIg4M.js";
2
- import { t } from "./plugins-CLuXx2Jr.js";
1
+ import { a as e } from "./base-D_-Jy4cE.js";
2
+ import { t } from "./plugins-DiS0OXoo.js";
3
3
  import { readFileSync as n } from "node:fs";
4
4
  import { dirname as r, join as i } from "node:path";
5
5
  import { fileURLToPath as a } from "node:url";
@@ -1,4 +1,4 @@
1
- import { a as e, r as t } from "./base-CtpwIg4M.js";
1
+ import { a as e, r as t } from "./base-D_-Jy4cE.js";
2
2
  import { existsSync as n, readFileSync as r, rmSync as i } from "node:fs";
3
3
  import { basename as a, join as o } from "node:path";
4
4
  import { parse as s } from "yaml";
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Running the `quire` CLI (FR-029).
3
+ *
4
+ * One place, so the subprocess contract — what is captured, what is reported on
5
+ * failure — is a decision made once rather than repeated at each call site.
6
+ */
7
+ /**
8
+ * Run `quire` and return stdout, surfacing **stderr** when it fails.
9
+ *
10
+ * `stdio: ["ignore", "pipe", "ignore"]` threw away exactly the sentence the
11
+ * operator needs. Reproduced (agent-ix/quoin#106):
12
+ *
13
+ * ```
14
+ * $ quire coverage --scope . --json
15
+ * no module in scope declares a `traceability:` model, so there is nothing to
16
+ * reconcile; install a module that declares one (e.g. spec-artifacts-process)
17
+ * or pass --module
18
+ * ```
19
+ *
20
+ * `src/quire/contract.ts` goes to real trouble over the version-premise
21
+ * diagnostic for precisely this reason; discarding the subprocess's own
22
+ * diagnostic undid it one frame later.
23
+ */
24
+ export declare function runQuire(args: string[]): string;
25
+ /**
26
+ * As {@link runQuire}, but a non-zero exit returns what was written rather than
27
+ * throwing.
28
+ *
29
+ * `quire properties` exits 1 when **any** input document fails to resolve — an
30
+ * asset with no `type:`, say — while still writing a complete, valid payload
31
+ * for every document that did. Treating that as total failure threw away the
32
+ * whole property-shape axis over two untyped files, silently (agent-ix/quoin#103).
33
+ *
34
+ * The caller decides what a partial result is worth; this only stops the
35
+ * decision being made by an exception.
36
+ */
37
+ export declare function runQuireAllowFailure(args: string[]): {
38
+ stdout: string;
39
+ stderr: string;
40
+ ok: boolean;
41
+ };
42
+ /** `quire --version` output, or `null` when quire is not on PATH. */
43
+ export declare function quireVersion(): string | null;
44
+ //# sourceMappingURL=exec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../src/quire/exec.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAc/C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG;IACpD,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,OAAO,CAAC;CACb,CAkBA;AAED,qEAAqE;AACrE,wBAAgB,YAAY,IAAI,MAAM,GAAG,IAAI,CAM5C"}
@@ -8,4 +8,5 @@
8
8
  export { QUIRE_CONTRACT, checkVersionPremise, compareVersions, parseCliVersion, readSchema, schemaHash, schemaPath, type SchemaName, type VersionPremiseFailure, } from './contract.js';
9
9
  export { parseCoverage, parseProperties, validateCoverage, validateProperties, type ContractViolation, type ValidationResult, } from './validate.js';
10
10
  export type { AcShape, CoverageDiagnostic, CoverageReport, CoverageTotals, Criterion, CriteriaCounts, CriterionObligation, Extraction, GroupCounts, NoSymbolRow, Obligation, PropertiesDocument, PropertiesReport, PropertyShape, PropertySpan, StatusLie, UnbackedRow, UntrackedSymbol, } from './types.js';
11
+ export { quireVersion, runQuire, runQuireAllowFailure } from './exec.js';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/quire/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,UAAU,EACV,UAAU,EACV,UAAU,EACV,KAAK,UAAU,EACf,KAAK,qBAAqB,GAC3B,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,GACtB,MAAM,eAAe,CAAC;AAEvB,YAAY,EACV,OAAO,EACP,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,SAAS,EACT,WAAW,EACX,eAAe,GAChB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/quire/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,UAAU,EACV,UAAU,EACV,UAAU,EACV,KAAK,UAAU,EACf,KAAK,qBAAqB,GAC3B,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,GACtB,MAAM,eAAe,CAAC;AAEvB,YAAY,EACV,OAAO,EACP,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,SAAS,EACT,WAAW,EACX,eAAe,GAChB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC"}