@jevitate/cli 0.23.0 → 0.25.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 (82) hide show
  1. package/contracts/jevitate-catalog/v1/README.md +10 -0
  2. package/contracts/jevitate-catalog/v1/approval-hash-vectors.json +64 -0
  3. package/contracts/jevitate-catalog/v1/fixtures/invalid/jobs-unknown-field.json +12 -0
  4. package/contracts/jevitate-catalog/v1/fixtures/invalid/journey-unknown-field.json +15 -0
  5. package/contracts/jevitate-catalog/v1/fixtures/valid/jobs.json +11 -0
  6. package/contracts/jevitate-catalog/v1/fixtures/valid/journey.json +14 -0
  7. package/contracts/jevitate-catalog/v1/fixtures/valid/personas.json +7 -0
  8. package/contracts/jevitate-catalog/v1/manifest.json +69 -0
  9. package/contracts/jevitate-catalog/v1/schemas/job.schema.json +605 -0
  10. package/contracts/jevitate-catalog/v1/schemas/jobs.schema.json +28 -0
  11. package/contracts/jevitate-catalog/v1/schemas/journey.schema.json +10871 -0
  12. package/contracts/jevitate-catalog/v1/schemas/personas.schema.json +223 -0
  13. package/contracts/jevitate-catalog/v2/README.md +18 -0
  14. package/contracts/jevitate-catalog/v2/approval-hash-vectors.json +75 -0
  15. package/contracts/jevitate-catalog/v2/fixtures/invalid/jobs-unknown-field.json +12 -0
  16. package/contracts/jevitate-catalog/v2/fixtures/invalid/journey-unknown-field.json +15 -0
  17. package/contracts/jevitate-catalog/v2/fixtures/valid/jobs.json +11 -0
  18. package/contracts/jevitate-catalog/v2/fixtures/valid/journey.json +14 -0
  19. package/contracts/jevitate-catalog/v2/fixtures/valid/personas.json +7 -0
  20. package/contracts/jevitate-catalog/v2/manifest.json +78 -0
  21. package/contracts/jevitate-catalog/v2/schemas/job.schema.json +605 -0
  22. package/contracts/jevitate-catalog/v2/schemas/jobs.schema.json +28 -0
  23. package/contracts/jevitate-catalog/v2/schemas/journey.schema.json +10871 -0
  24. package/contracts/jevitate-catalog/v2/schemas/personas.schema.json +223 -0
  25. package/dist/acceptance-audit-approval-script.d.ts +6 -0
  26. package/dist/acceptance-audit-approval-script.js +20 -0
  27. package/dist/acceptance-audit-approval-script.js.map +1 -0
  28. package/dist/acceptance-audit-cli.d.ts +2 -0
  29. package/dist/acceptance-audit-cli.js +34 -0
  30. package/dist/acceptance-audit-cli.js.map +1 -0
  31. package/dist/acceptance-audit-render.d.ts +4 -0
  32. package/dist/acceptance-audit-render.js +12 -0
  33. package/dist/acceptance-audit-render.js.map +1 -0
  34. package/dist/acceptance-audit-schema.d.ts +32 -0
  35. package/dist/acceptance-audit-schema.js +19 -0
  36. package/dist/acceptance-audit-schema.js.map +1 -0
  37. package/dist/acceptance-audit-suite.d.ts +14 -0
  38. package/dist/acceptance-audit-suite.js +34 -0
  39. package/dist/acceptance-audit-suite.js.map +1 -0
  40. package/dist/acceptance-audit.d.ts +16 -0
  41. package/dist/acceptance-audit.js +36 -0
  42. package/dist/acceptance-audit.js.map +1 -0
  43. package/dist/bin.js +1155 -509
  44. package/dist/build-info.generated.js +3 -3
  45. package/dist/catalog-bundle.d.ts +4 -2
  46. package/dist/catalog-bundle.js +8 -6
  47. package/dist/catalog-bundle.js.map +1 -1
  48. package/dist/catalog-contract-identity.d.ts +5 -0
  49. package/dist/catalog-contract-identity.js +7 -0
  50. package/dist/catalog-contract-identity.js.map +1 -0
  51. package/dist/catalog.js +18 -7
  52. package/dist/catalog.js.map +1 -1
  53. package/dist/explore-goal.d.ts +3 -1
  54. package/dist/explore-goal.js +1 -0
  55. package/dist/explore-goal.js.map +1 -1
  56. package/dist/goal-run-flags.js +2 -2
  57. package/dist/goal-run-flags.js.map +1 -1
  58. package/dist/journeeze-hint.d.ts +35 -0
  59. package/dist/journeeze-hint.js +77 -0
  60. package/dist/journeeze-hint.js.map +1 -0
  61. package/dist/journey-cli/review.js +16 -2
  62. package/dist/journey-cli/review.js.map +1 -1
  63. package/dist/journey-cli/verify.js +33 -7
  64. package/dist/journey-cli/verify.js.map +1 -1
  65. package/dist/journey-review.d.ts +3 -0
  66. package/dist/journey-review.js +13 -2
  67. package/dist/journey-review.js.map +1 -1
  68. package/dist/journey-stale-api.js +4 -4
  69. package/dist/journey-stale-api.js.map +1 -1
  70. package/dist/journey-verify.d.ts +23 -0
  71. package/dist/journey-verify.js +34 -0
  72. package/dist/journey-verify.js.map +1 -1
  73. package/dist/mcp-cli-tools.js +2 -1
  74. package/dist/mcp-cli-tools.js.map +1 -1
  75. package/dist/program.js +2 -0
  76. package/dist/program.js.map +1 -1
  77. package/dist/report-cli.js +21 -2
  78. package/dist/report-cli.js.map +1 -1
  79. package/dist/ux-usability/done-adjudication.d.ts +2 -2
  80. package/package.json +14 -11
  81. package/skills/jevitate-promotion-ready/SKILL.md +5 -1
  82. package/skills/jevitate-record/SKILL.md +3 -2
@@ -0,0 +1,223 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jevitate.com/schemas/catalog/v2/personas.schema.json",
4
+ "title": "Jevitate personas.json v2",
5
+ "oneOf": [
6
+ {
7
+ "type": "array",
8
+ "items": {
9
+ "type": "object",
10
+ "anyOf": [
11
+ {
12
+ "required": [
13
+ "id"
14
+ ]
15
+ },
16
+ {
17
+ "required": [
18
+ "name"
19
+ ]
20
+ }
21
+ ],
22
+ "properties": {
23
+ "id": {
24
+ "type": "string",
25
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"
26
+ },
27
+ "name": {
28
+ "type": "string",
29
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"
30
+ },
31
+ "description": {
32
+ "type": "string",
33
+ "maxLength": 2000
34
+ },
35
+ "role": {
36
+ "type": "string",
37
+ "maxLength": 200
38
+ },
39
+ "storageState": {
40
+ "type": "string",
41
+ "maxLength": 1000
42
+ },
43
+ "login": {
44
+ "type": "object"
45
+ },
46
+ "approval": {
47
+ "type": "object",
48
+ "additionalProperties": false,
49
+ "required": [
50
+ "contentHash",
51
+ "at"
52
+ ],
53
+ "properties": {
54
+ "contentHash": {
55
+ "type": "string",
56
+ "pattern": "^[0-9a-f]{64}$"
57
+ },
58
+ "at": {
59
+ "type": "string",
60
+ "minLength": 1
61
+ },
62
+ "provenance": {
63
+ "type": "object"
64
+ },
65
+ "acceptedFindings": {
66
+ "type": "object"
67
+ }
68
+ }
69
+ },
70
+ "extensions": {
71
+ "type": "object",
72
+ "maxProperties": 16
73
+ }
74
+ },
75
+ "additionalProperties": true
76
+ }
77
+ },
78
+ {
79
+ "type": "object",
80
+ "additionalProperties": false,
81
+ "required": [
82
+ "personas"
83
+ ],
84
+ "properties": {
85
+ "personas": {
86
+ "type": "array",
87
+ "items": {
88
+ "type": "object",
89
+ "anyOf": [
90
+ {
91
+ "required": [
92
+ "id"
93
+ ]
94
+ },
95
+ {
96
+ "required": [
97
+ "name"
98
+ ]
99
+ }
100
+ ],
101
+ "properties": {
102
+ "id": {
103
+ "type": "string",
104
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"
105
+ },
106
+ "name": {
107
+ "type": "string",
108
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"
109
+ },
110
+ "description": {
111
+ "type": "string",
112
+ "maxLength": 2000
113
+ },
114
+ "role": {
115
+ "type": "string",
116
+ "maxLength": 200
117
+ },
118
+ "storageState": {
119
+ "type": "string",
120
+ "maxLength": 1000
121
+ },
122
+ "login": {
123
+ "type": "object"
124
+ },
125
+ "approval": {
126
+ "type": "object",
127
+ "additionalProperties": false,
128
+ "required": [
129
+ "contentHash",
130
+ "at"
131
+ ],
132
+ "properties": {
133
+ "contentHash": {
134
+ "type": "string",
135
+ "pattern": "^[0-9a-f]{64}$"
136
+ },
137
+ "at": {
138
+ "type": "string",
139
+ "minLength": 1
140
+ },
141
+ "provenance": {
142
+ "type": "object"
143
+ },
144
+ "acceptedFindings": {
145
+ "type": "object"
146
+ }
147
+ }
148
+ },
149
+ "extensions": {
150
+ "type": "object",
151
+ "maxProperties": 16
152
+ }
153
+ },
154
+ "additionalProperties": true
155
+ }
156
+ }
157
+ }
158
+ },
159
+ {
160
+ "type": "object",
161
+ "propertyNames": {
162
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"
163
+ },
164
+ "additionalProperties": {
165
+ "anyOf": [
166
+ {
167
+ "type": "string",
168
+ "minLength": 1
169
+ },
170
+ {
171
+ "type": "object",
172
+ "properties": {
173
+ "description": {
174
+ "type": "string",
175
+ "maxLength": 2000
176
+ },
177
+ "role": {
178
+ "type": "string",
179
+ "maxLength": 200
180
+ },
181
+ "storageState": {
182
+ "type": "string",
183
+ "maxLength": 1000
184
+ },
185
+ "login": {
186
+ "type": "object"
187
+ },
188
+ "approval": {
189
+ "type": "object",
190
+ "additionalProperties": false,
191
+ "required": [
192
+ "contentHash",
193
+ "at"
194
+ ],
195
+ "properties": {
196
+ "contentHash": {
197
+ "type": "string",
198
+ "pattern": "^[0-9a-f]{64}$"
199
+ },
200
+ "at": {
201
+ "type": "string",
202
+ "minLength": 1
203
+ },
204
+ "provenance": {
205
+ "type": "object"
206
+ },
207
+ "acceptedFindings": {
208
+ "type": "object"
209
+ }
210
+ }
211
+ },
212
+ "extensions": {
213
+ "type": "object",
214
+ "maxProperties": 16
215
+ }
216
+ },
217
+ "additionalProperties": true
218
+ }
219
+ ]
220
+ }
221
+ }
222
+ ]
223
+ }
@@ -0,0 +1,6 @@
1
+ export interface ApprovalInput {
2
+ readonly path: string;
3
+ readonly content: string;
4
+ }
5
+ /** #686 — emits a reviewable shell proposal only; it never executes approval, network, or promotion. */
6
+ export declare function renderHashBoundApprovalScript(inputs: readonly ApprovalInput[]): string;
@@ -0,0 +1,20 @@
1
+ import { createHash } from "node:crypto";
2
+ /** #686 — emits a reviewable shell proposal only; it never executes approval, network, or promotion. */
3
+ export function renderHashBoundApprovalScript(inputs) {
4
+ const rows = inputs.map(({ path, content }) => ({ path, hash: createHash("sha256").update(content).digest("hex") }));
5
+ return [
6
+ "#!/usr/bin/env sh",
7
+ "set -eu",
8
+ "# Generated approval proposal. Default mode only prints the bound evidence.",
9
+ 'if [ "${1:-}" != "--apply" ]; then',
10
+ ' echo "dry run: inspect hashes; rerun with --apply to recheck them locally"',
11
+ ...rows.map((r) => ` echo '${r.hash} ${r.path}'`),
12
+ " exit 0",
13
+ "fi",
14
+ "# Apply mode rechecks every file and stops at the first mismatch; it performs no approval or promotion.",
15
+ ...rows.map((r) => `[ "$(sha256sum '${r.path}' | awk '{print $1}')" = '${r.hash}' ] || { echo 'hash mismatch: ${r.path}' >&2; exit 1; }`),
16
+ "echo 'all hashes match; human approval remains an external explicit action'",
17
+ "",
18
+ ].join("\n");
19
+ }
20
+ //# sourceMappingURL=acceptance-audit-approval-script.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acceptance-audit-approval-script.js","sourceRoot":"","sources":["../src/acceptance-audit-approval-script.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAIzC,wGAAwG;AACxG,MAAM,UAAU,6BAA6B,CAAC,MAAgC;IAC5E,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IACrH,OAAO;QACL,mBAAmB;QACnB,SAAS;QACT,6EAA6E;QAC7E,oCAAoC;QACpC,8EAA8E;QAC9E,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,GAAG,CAAC;QACnD,UAAU;QACV,IAAI;QACJ,yGAAyG;QACzG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,mBAAmB,CAAC,CAAC,IAAI,6BAA6B,CAAC,CAAC,IAAI,iCAAiC,CAAC,CAAC,IAAI,kBAAkB,CAAC;QACzI,6EAA6E;QAC7E,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { Command } from "commander";
2
+ export declare function registerAcceptanceAuditCommands(program: Command): void;
@@ -0,0 +1,34 @@
1
+ import { readFile, mkdir, writeFile } from "node:fs/promises";
2
+ import { auditCoreAcceptanceAssets } from "./acceptance-audit.js";
3
+ import { acceptanceAuditResult } from "./acceptance-audit-schema.js";
4
+ import { auditSuiteIntegrity } from "./acceptance-audit-suite.js";
5
+ import { renderAcceptanceAuditJunit, renderAcceptanceAuditMarkdown, renderAcceptanceAuditSarif } from "./acceptance-audit-render.js";
6
+ import { emitEnvelope } from "./cli-output.js";
7
+ import { ok, fail } from "./envelope.js";
8
+ export function registerAcceptanceAuditCommands(program) {
9
+ const acceptance = program.command("acceptance").description("read-only acceptance evidence tools");
10
+ acceptance.command("audit").description("audit release acceptance evidence and emit CI artifacts")
11
+ .requiredOption("--requirements <file>")
12
+ .requiredOption("--suite <file>")
13
+ .option("--persona <file>").option("--journey <file>").option("--approval <file>").option("--verify <file>").option("--review <file>")
14
+ .option("--out <dir>").option("--json")
15
+ .action(async function () {
16
+ const o = this.opts();
17
+ try {
18
+ const core = await auditCoreAcceptanceAssets({ requirements: o.requirements, persona: o.persona, sourceJourney: o.journey, approvedHash: o.approval, verifyFix: o.verify, strictReview: o.review });
19
+ const entries = JSON.parse(await readFile(o.suite, "utf8"));
20
+ if (!Array.isArray(entries))
21
+ throw new Error("suite must be a JSON array of acceptance entries");
22
+ const result = acceptanceAuditResult({ requirementsFile: o.requirements, suiteFile: o.suite, strict: true }, [...core, ...auditSuiteIntegrity(entries)]);
23
+ if (o.out !== undefined) {
24
+ await mkdir(o.out, { recursive: true });
25
+ await Promise.all([writeFile(`${o.out}/acceptance-audit.md`, renderAcceptanceAuditMarkdown(result)), writeFile(`${o.out}/acceptance-audit.junit.xml`, renderAcceptanceAuditJunit(result)), writeFile(`${o.out}/acceptance-audit.sarif`, renderAcceptanceAuditSarif(result)), writeFile(`${o.out}/acceptance-audit.json`, `${JSON.stringify(result, null, 2)}\n`)]);
26
+ }
27
+ emitEnvelope(program, ok(result), { json: o.json === true, exitCode: result.exitCode, command: "acceptance audit", human: (r) => renderAcceptanceAuditMarkdown(r) });
28
+ }
29
+ catch (err) {
30
+ emitEnvelope(program, fail("E_ACCEPTANCE_AUDIT", err instanceof Error ? err.message : String(err)), { json: o.json === true, command: "acceptance audit" });
31
+ }
32
+ });
33
+ }
34
+ //# sourceMappingURL=acceptance-audit-cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acceptance-audit-cli.js","sourceRoot":"","sources":["../src/acceptance-audit-cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAA6B,MAAM,6BAA6B,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AACrI,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,UAAU,+BAA+B,CAAC,OAAgB;IAC9D,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,WAAW,CAAC,qCAAqC,CAAC,CAAC;IACpG,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,yDAAyD,CAAC;SAC/F,cAAc,CAAC,uBAAuB,CAA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C,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,sBAAsB,EAAE,6BAA6B,CAAC,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,6BAA6B,EAAE,0BAA0B,CAAC,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,yBAAyB,EAAE,0BAA0B,CAAC,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,wBAAwB,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAAC,CAAC;YACza,YAAY,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,KAAK,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,6BAA6B,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACvK,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YAAC,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,KAAK,IAAI,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC,CAAC;QAAC,CAAC;IAChL,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { AcceptanceAuditResult } from "./acceptance-audit-schema.js";
2
+ export declare function renderAcceptanceAuditMarkdown(result: AcceptanceAuditResult): string;
3
+ export declare function renderAcceptanceAuditJunit(result: AcceptanceAuditResult): string;
4
+ export declare function renderAcceptanceAuditSarif(result: AcceptanceAuditResult): string;
@@ -0,0 +1,12 @@
1
+ const xml = (value) => value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/"/g, "&quot;");
2
+ export function renderAcceptanceAuditMarkdown(result) {
3
+ return `# Acceptance audit\n\n${result.passed ? "Passed" : "Failed"} (exit ${result.exitCode}).\n\n| asset | state | reason |\n| --- | --- | --- |\n${result.findings.map((f) => `| ${f.asset} | ${f.state} | ${f.reason ?? ""} |`).join("\n")}\n`;
4
+ }
5
+ export function renderAcceptanceAuditJunit(result) {
6
+ const failures = result.findings.filter((f) => f.state !== "complete");
7
+ return `<?xml version="1.0" encoding="UTF-8"?><testsuite name="jevitate.acceptance-audit" tests="${result.findings.length}" failures="${failures.length}">${result.findings.map((f) => `<testcase name="${xml(f.asset)}">${f.state === "complete" ? "" : `<failure message="${xml(f.state)}">${xml(f.reason ?? "")}</failure>`}</testcase>`).join("")}</testsuite>\n`;
8
+ }
9
+ export function renderAcceptanceAuditSarif(result) {
10
+ return `${JSON.stringify({ version: "2.1.0", runs: [{ tool: { driver: { name: "jevitate acceptance audit", rules: result.findings.map((f) => ({ id: f.asset })) } }, results: result.findings.filter((f) => f.state !== "complete").map((f) => ({ ruleId: f.asset, level: "error", message: { text: f.reason ?? f.state } })) }] }, null, 2)}\n`;
11
+ }
12
+ //# sourceMappingURL=acceptance-audit-render.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acceptance-audit-render.js","sourceRoot":"","sources":["../src/acceptance-audit-render.ts"],"names":[],"mappings":"AAEA,MAAM,GAAG,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAElH,MAAM,UAAU,6BAA6B,CAAC,MAA6B;IACzE,OAAO,yBAAyB,MA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EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;AACnV,CAAC"}
@@ -0,0 +1,32 @@
1
+ /** #686 — the read-only contract shared by the acceptance-audit engine, renderers, and CLI. */
2
+ export declare const ACCEPTANCE_AUDIT_SCHEMA_VERSION: 1;
3
+ export declare const ACCEPTANCE_AUDIT_ASSETS: readonly ["requirements", "persona", "source-journey", "approved-hash", "verify-fix", "strict-review", "suite-sidecar", "negative-control", "partition", "exact-revision"];
4
+ export type AcceptanceAuditAsset = (typeof ACCEPTANCE_AUDIT_ASSETS)[number];
5
+ export type AcceptanceAuditState = "complete" | "missing" | "stale" | "inconclusive";
6
+ export type AcceptanceAuditExitCode = 0 | 1 | 64;
7
+ /** All input paths are local files; the audit neither invokes a model nor mutates project state. */
8
+ export interface AcceptanceAuditRequest {
9
+ readonly requirementsFile: string;
10
+ readonly suiteFile: string;
11
+ readonly strict?: boolean;
12
+ }
13
+ /** One independently inspectable asset result; `reason` is mandatory whenever it does not pass. */
14
+ export interface AcceptanceAuditFinding {
15
+ readonly asset: AcceptanceAuditAsset;
16
+ readonly state: AcceptanceAuditState;
17
+ readonly path?: string;
18
+ readonly reason?: string;
19
+ }
20
+ /**
21
+ * A deterministic audit result. `exitCode` is semantic: 0 means every required asset is complete,
22
+ * 1 means an audit finding exists, and 64 means the request itself was invalid. No result grants
23
+ * approval, promotion, credential, network, or execution authority.
24
+ */
25
+ export interface AcceptanceAuditResult {
26
+ readonly schemaVersion: typeof ACCEPTANCE_AUDIT_SCHEMA_VERSION;
27
+ readonly request: AcceptanceAuditRequest;
28
+ readonly findings: readonly AcceptanceAuditFinding[];
29
+ readonly passed: boolean;
30
+ readonly exitCode: AcceptanceAuditExitCode;
31
+ }
32
+ export declare function acceptanceAuditResult(request: AcceptanceAuditRequest, findings: readonly AcceptanceAuditFinding[]): AcceptanceAuditResult;
@@ -0,0 +1,19 @@
1
+ /** #686 — the read-only contract shared by the acceptance-audit engine, renderers, and CLI. */
2
+ export const ACCEPTANCE_AUDIT_SCHEMA_VERSION = 1;
3
+ export const ACCEPTANCE_AUDIT_ASSETS = [
4
+ "requirements",
5
+ "persona",
6
+ "source-journey",
7
+ "approved-hash",
8
+ "verify-fix",
9
+ "strict-review",
10
+ "suite-sidecar",
11
+ "negative-control",
12
+ "partition",
13
+ "exact-revision",
14
+ ];
15
+ export function acceptanceAuditResult(request, findings) {
16
+ const passed = findings.every((finding) => finding.state === "complete");
17
+ return { schemaVersion: ACCEPTANCE_AUDIT_SCHEMA_VERSION, request, findings, passed, exitCode: passed ? 0 : 1 };
18
+ }
19
+ //# sourceMappingURL=acceptance-audit-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acceptance-audit-schema.js","sourceRoot":"","sources":["../src/acceptance-audit-schema.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAU,CAAC;AAE1D,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,cAAc;IACd,SAAS;IACT,gBAAgB;IAChB,eAAe;IACf,YAAY;IACZ,eAAe;IACf,eAAe;IACf,kBAAkB;IAClB,WAAW;IACX,gBAAgB;CACR,CAAC;AAkCX,MAAM,UAAU,qBAAqB,CAAC,OAA+B,EAAE,QAA2C;IAChH,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,KAAK,UAAU,CAAC,CAAC;IACzE,OAAO,EAAE,aAAa,EAAE,+BAA+B,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACjH,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { AcceptanceAuditFinding } from "./acceptance-audit-schema.js";
2
+ /** Normalized suite evidence supplied by the CLI reader; this module performs no filesystem or network I/O. */
3
+ export interface AcceptanceSuiteEntry {
4
+ readonly id: string;
5
+ readonly revision: string;
6
+ readonly partition: string;
7
+ readonly sidecar: boolean;
8
+ readonly negativeControl: boolean;
9
+ }
10
+ /**
11
+ * #686 deterministic integrity checks. Each invariant is reported separately so consumers can
12
+ * render a precise JUnit/SARIF finding; no entry is matched to a requirement by heuristic.
13
+ */
14
+ export declare function auditSuiteIntegrity(entries: readonly AcceptanceSuiteEntry[]): AcceptanceAuditFinding[];
@@ -0,0 +1,34 @@
1
+ /**
2
+ * #686 deterministic integrity checks. Each invariant is reported separately so consumers can
3
+ * render a precise JUnit/SARIF finding; no entry is matched to a requirement by heuristic.
4
+ */
5
+ export function auditSuiteIntegrity(entries) {
6
+ const duplicates = entries.filter((entry, index) => entries.findIndex((other) => other.id === entry.id) !== index).map((entry) => entry.id);
7
+ const missingSidecar = entries.filter((entry) => !entry.sidecar).map((entry) => entry.id);
8
+ const missingPartition = entries.filter((entry) => entry.partition.trim() === "").map((entry) => entry.id);
9
+ const missingRevision = entries.filter((entry) => entry.revision.trim() === "").map((entry) => entry.id);
10
+ const hasNegativeControl = entries.some((entry) => entry.negativeControl);
11
+ return [
12
+ {
13
+ asset: "suite-sidecar",
14
+ state: missingSidecar.length === 0 ? "complete" : "missing",
15
+ ...(missingSidecar.length === 0 ? {} : { reason: `missing sidecar: ${missingSidecar.join(", ")}` }),
16
+ },
17
+ {
18
+ asset: "negative-control",
19
+ state: hasNegativeControl ? "complete" : "missing",
20
+ ...(hasNegativeControl ? {} : { reason: "suite has no declared negative control" }),
21
+ },
22
+ {
23
+ asset: "partition",
24
+ state: duplicates.length === 0 && missingPartition.length === 0 ? "complete" : "inconclusive",
25
+ ...(duplicates.length === 0 && missingPartition.length === 0 ? {} : { reason: [...(duplicates.length === 0 ? [] : [`duplicate ids: ${duplicates.join(", ")}`]), ...(missingPartition.length === 0 ? [] : [`unpartitioned: ${missingPartition.join(", ")}`])].join("; ") }),
26
+ },
27
+ {
28
+ asset: "exact-revision",
29
+ state: missingRevision.length === 0 ? "complete" : "stale",
30
+ ...(missingRevision.length === 0 ? {} : { reason: `missing exact revision: ${missingRevision.join(", ")}` }),
31
+ },
32
+ ];
33
+ }
34
+ //# sourceMappingURL=acceptance-audit-suite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acceptance-audit-suite.js","sourceRoot":"","sources":["../src/acceptance-audit-suite.ts"],"names":[],"mappings":"AAWA;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAwC;IAC1E,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE,CAAC,KAAK,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC5I,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC1F,MAAM,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE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C,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,kBAAkB,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,kBAAkB,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;SAC3Q;QACD;YACE,KAAK,EAAE,gBAAgB;YACvB,KAAK,EAAE,eAAe,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO;YAC1D,GAAG,CAAC,eAAe,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,2BAA2B,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;SAC7G;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { AcceptanceAuditFinding } from "./acceptance-audit-schema.js";
2
+ /** Explicit local paths for core acceptance evidence; absent paths are never guessed or inferred. */
3
+ export interface CoreAcceptanceAssets {
4
+ readonly requirements?: string;
5
+ readonly persona?: string;
6
+ readonly sourceJourney?: string;
7
+ readonly approvedHash?: string;
8
+ readonly verifyFix?: string;
9
+ readonly strictReview?: string;
10
+ }
11
+ /**
12
+ * Read-only presence/content audit for core evidence. This intentionally validates no relationship
13
+ * between files: mapping a persona, approval, or verification to a Journey belongs to a later,
14
+ * explicit check and is never inferred from filenames or content (#686).
15
+ */
16
+ export declare function auditCoreAcceptanceAssets(assets: CoreAcceptanceAssets): Promise<AcceptanceAuditFinding[]>;
@@ -0,0 +1,36 @@
1
+ import { access, readFile } from "node:fs/promises";
2
+ const CORE = [
3
+ ["requirements", "requirements"],
4
+ ["persona", "persona"],
5
+ ["source-journey", "sourceJourney"],
6
+ ["approved-hash", "approvedHash"],
7
+ ["verify-fix", "verifyFix"],
8
+ ["strict-review", "strictReview"],
9
+ ];
10
+ async function finding(asset, path) {
11
+ if (path === undefined || path === "")
12
+ return { asset, state: "missing", reason: "no explicit local path supplied" };
13
+ try {
14
+ await access(path);
15
+ }
16
+ catch {
17
+ return { asset, state: "missing", path, reason: "local file does not exist" };
18
+ }
19
+ try {
20
+ if ((await readFile(path, "utf8")).trim() === "")
21
+ return { asset, state: "inconclusive", path, reason: "local file is empty" };
22
+ }
23
+ catch {
24
+ return { asset, state: "inconclusive", path, reason: "local file cannot be read as text" };
25
+ }
26
+ return { asset, state: "complete", path };
27
+ }
28
+ /**
29
+ * Read-only presence/content audit for core evidence. This intentionally validates no relationship
30
+ * between files: mapping a persona, approval, or verification to a Journey belongs to a later,
31
+ * explicit check and is never inferred from filenames or content (#686).
32
+ */
33
+ export async function auditCoreAcceptanceAssets(assets) {
34
+ return Promise.all(CORE.map(([asset, key]) => finding(asset, assets[key])));
35
+ }
36
+ //# sourceMappingURL=acceptance-audit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acceptance-audit.js","sourceRoot":"","sources":["../src/acceptance-audit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAapD,MAAM,IAAI,GAAkE;IAC1E,CAAC,cAAc,EAAE,cAAc,CAAC;IAChC,CAAC,SAAS,EAAE,SAAS,CAAC;IACtB,CAAC,gBAAgB,EAAE,eAAe,CAAC;IACnC,CAAC,eAAe,EAAE,cAAc,CAAC;IACjC,CAAC,YAAY,EAAE,WAAW,CAAC;IAC3B,CAAC,eAAe,EAAE,cAAc,CAAC;CAClC,CAAC;AAEF,KAAK,UA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