@sentropic/h2a 0.83.0 → 0.85.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 (97) hide show
  1. package/dist/bin.js +18 -1
  2. package/dist/bin.js.map +1 -1
  3. package/dist/cli-contract.d.ts.map +1 -1
  4. package/dist/cli-contract.js +10 -1
  5. package/dist/cli-contract.js.map +1 -1
  6. package/dist/cli.d.ts.map +1 -1
  7. package/dist/cli.js +206 -25
  8. package/dist/cli.js.map +1 -1
  9. package/dist/vendor/harness/artifacts/validate-verification-run.d.ts +18 -0
  10. package/dist/vendor/harness/artifacts/validate-verification-run.d.ts.map +1 -0
  11. package/dist/vendor/harness/artifacts/validate-verification-run.js +160 -0
  12. package/dist/vendor/harness/artifacts/validate-verification-run.js.map +1 -0
  13. package/dist/vendor/harness/artifacts/verification-run.d.ts +2 -0
  14. package/dist/vendor/harness/artifacts/verification-run.d.ts.map +1 -0
  15. package/dist/vendor/harness/artifacts/verification-run.js +12 -0
  16. package/dist/vendor/harness/artifacts/verification-run.js.map +1 -0
  17. package/dist/vendor/harness/artifacts/work-event.d.ts +2 -0
  18. package/dist/vendor/harness/artifacts/work-event.d.ts.map +1 -0
  19. package/dist/vendor/harness/artifacts/work-event.js +9 -0
  20. package/dist/vendor/harness/artifacts/work-event.js.map +1 -0
  21. package/dist/vendor/harness/bin/harness.d.ts +3 -0
  22. package/dist/vendor/harness/bin/harness.d.ts.map +1 -0
  23. package/dist/vendor/harness/bin/harness.js +5 -0
  24. package/dist/vendor/harness/bin/harness.js.map +1 -0
  25. package/dist/vendor/harness/branch-md/parse.d.ts +9 -0
  26. package/dist/vendor/harness/branch-md/parse.d.ts.map +1 -0
  27. package/dist/vendor/harness/branch-md/parse.js +100 -0
  28. package/dist/vendor/harness/branch-md/parse.js.map +1 -0
  29. package/dist/vendor/harness/checks/branch-check.d.ts +15 -0
  30. package/dist/vendor/harness/checks/branch-check.d.ts.map +1 -0
  31. package/dist/vendor/harness/checks/branch-check.js +23 -0
  32. package/dist/vendor/harness/checks/branch-check.js.map +1 -0
  33. package/dist/vendor/harness/checks/scope-check.d.ts +22 -0
  34. package/dist/vendor/harness/checks/scope-check.d.ts.map +1 -0
  35. package/dist/vendor/harness/checks/scope-check.js +34 -0
  36. package/dist/vendor/harness/checks/scope-check.js.map +1 -0
  37. package/dist/vendor/harness/cli/args.d.ts +8 -0
  38. package/dist/vendor/harness/cli/args.d.ts.map +1 -0
  39. package/dist/vendor/harness/cli/args.js +32 -0
  40. package/dist/vendor/harness/cli/args.js.map +1 -0
  41. package/dist/vendor/harness/cli/mechanical-verbs.d.ts +7 -0
  42. package/dist/vendor/harness/cli/mechanical-verbs.d.ts.map +1 -0
  43. package/dist/vendor/harness/cli/mechanical-verbs.js +124 -0
  44. package/dist/vendor/harness/cli/mechanical-verbs.js.map +1 -0
  45. package/dist/vendor/harness/cli/method-verbs.d.ts +18 -0
  46. package/dist/vendor/harness/cli/method-verbs.d.ts.map +1 -0
  47. package/dist/vendor/harness/cli/method-verbs.js +174 -0
  48. package/dist/vendor/harness/cli/method-verbs.js.map +1 -0
  49. package/dist/vendor/harness/cli/run.d.ts +10 -0
  50. package/dist/vendor/harness/cli/run.d.ts.map +1 -0
  51. package/dist/vendor/harness/cli/run.js +101 -0
  52. package/dist/vendor/harness/cli/run.js.map +1 -0
  53. package/dist/vendor/harness/cli/scope.d.ts +9 -0
  54. package/dist/vendor/harness/cli/scope.d.ts.map +1 -0
  55. package/dist/vendor/harness/cli/scope.js +31 -0
  56. package/dist/vendor/harness/cli/scope.js.map +1 -0
  57. package/dist/vendor/harness/index.d.ts +13 -0
  58. package/dist/vendor/harness/index.d.ts.map +1 -0
  59. package/dist/vendor/harness/index.js +23 -0
  60. package/dist/vendor/harness/index.js.map +1 -0
  61. package/dist/vendor/harness/profile/profile.d.ts +2 -0
  62. package/dist/vendor/harness/profile/profile.d.ts.map +1 -0
  63. package/dist/vendor/harness/profile/profile.js +10 -0
  64. package/dist/vendor/harness/profile/profile.js.map +1 -0
  65. package/dist/vendor/harness/profile/sentropic.d.ts +8 -0
  66. package/dist/vendor/harness/profile/sentropic.d.ts.map +1 -0
  67. package/dist/vendor/harness/profile/sentropic.js +12 -0
  68. package/dist/vendor/harness/profile/sentropic.js.map +1 -0
  69. package/dist/vendor/harness/profile/stub.d.ts +8 -0
  70. package/dist/vendor/harness/profile/stub.d.ts.map +1 -0
  71. package/dist/vendor/harness/profile/stub.js +13 -0
  72. package/dist/vendor/harness/profile/stub.js.map +1 -0
  73. package/dist/vendor/harness/run/emit.d.ts +22 -0
  74. package/dist/vendor/harness/run/emit.d.ts.map +1 -0
  75. package/dist/vendor/harness/run/emit.js +32 -0
  76. package/dist/vendor/harness/run/emit.js.map +1 -0
  77. package/dist/vendor/harness/run/work-event.d.ts +20 -0
  78. package/dist/vendor/harness/run/work-event.d.ts.map +1 -0
  79. package/dist/vendor/harness/run/work-event.js +27 -0
  80. package/dist/vendor/harness/run/work-event.js.map +1 -0
  81. package/dist/vendor/harness/scope/scope-boundary.d.ts +17 -0
  82. package/dist/vendor/harness/scope/scope-boundary.d.ts.map +1 -0
  83. package/dist/vendor/harness/scope/scope-boundary.js +50 -0
  84. package/dist/vendor/harness/scope/scope-boundary.js.map +1 -0
  85. package/dist/vendor/harness/skills/manifest.d.ts +16 -0
  86. package/dist/vendor/harness/skills/manifest.d.ts.map +1 -0
  87. package/dist/vendor/harness/skills/manifest.js +25 -0
  88. package/dist/vendor/harness/skills/manifest.js.map +1 -0
  89. package/package.json +4 -3
  90. package/schema/harness/verification-run.schema.json +154 -0
  91. package/skills/harness/adopt/SKILL.md +32 -0
  92. package/skills/harness/brainstorm/SKILL.md +39 -0
  93. package/skills/harness/debug/SKILL.md +33 -0
  94. package/skills/harness/plan/SKILL.md +35 -0
  95. package/skills/harness/review/SKILL.md +33 -0
  96. package/skills/harness/test/SKILL.md +44 -0
  97. package/skills/harness/using-harness/SKILL.md +46 -0
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Validate an unknown value against the frozen VerificationRun v0 contract. Pure, dependency-free,
3
+ * deterministic. Returns every error rather than throwing on the first.
4
+ */
5
+ export function validateVerificationRunV0(run: any, opts?: {}): {
6
+ valid: boolean;
7
+ errors: string[];
8
+ };
9
+ /**
10
+ * Derive the scope verdict from violations+severity (DEC-S3, the frozen cross-contract predicate):
11
+ * any `blocking` ⇒ `violation`; else any `advisory` ⇒ `conditional`; else `clean`. NEVER derived
12
+ * from `result`. The harness does NOT route on this (that is the track-side adapter); it is exposed
13
+ * so the predicate can be asserted against the frozen contract rather than trusted.
14
+ */
15
+ export function deriveVerdict(violations: any): "violation" | "conditional" | "clean";
16
+ export const VERIFICATION_CATEGORIES: string[];
17
+ export const VIOLATION_SEVERITIES: string[];
18
+ //# sourceMappingURL=validate-verification-run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-verification-run.d.ts","sourceRoot":"","sources":["../../../../src/vendor/harness/artifacts/validate-verification-run.js"],"names":[],"mappings":"AAuGA;;;GAGG;AACH;;;EAsCC;AACD;;;;;GAKG;AACH,sFAMC;AAlJD,+CASE;AACF,4CAA6D"}
@@ -0,0 +1,160 @@
1
+ // Dependency-free runtime validator for the VerificationRun v0 seam.
2
+ //
3
+ // Hand-rolled (NO ajv / no JSON-Schema runtime): the `make test-harness` toolset is pinned to
4
+ // vitest/typescript/@types/node only, so the package stays dependency-free. This validator is
5
+ // the runtime counterpart of `schema/verification-run.schema.json` and of the
6
+ // `VerificationRun` types — keep all three in lock-step.
7
+ //
8
+ // Modes:
9
+ // - `structural` (default): asserts the artifact shape (a check MAY omit `target`).
10
+ // - `ingested`: additionally enforces the adapter fail-closed rule — every check MUST carry a
11
+ // `target` with ≥1 of `scope`|`acceptance` (DEC-S1). A track-ingested check with no target
12
+ // FAILS CLOSED; this surfaces it BEFORE emit instead of letting the adapter reject it.
13
+ export const VERIFICATION_CATEGORIES = [
14
+ 'none',
15
+ 'static',
16
+ 'unit',
17
+ 'integration',
18
+ 'e2e',
19
+ 'ci',
20
+ 'uat',
21
+ 'security',
22
+ ];
23
+ export const VIOLATION_SEVERITIES = ['advisory', 'blocking'];
24
+ const ACCEPTANCE_KINDS = ['unit', 'integration', 'e2e', 'manual'];
25
+ function isRecord(v) {
26
+ return typeof v === 'object' && v !== null && !Array.isArray(v);
27
+ }
28
+ function isStr(v) {
29
+ return typeof v === 'string';
30
+ }
31
+ function validateViolation(v, path, errors) {
32
+ if (!isRecord(v)) {
33
+ errors.push(`${path}: expected object`);
34
+ return;
35
+ }
36
+ if (!isStr(v.code))
37
+ errors.push(`${path}.code: expected string`);
38
+ if (!isStr(v.message))
39
+ errors.push(`${path}.message: expected string`);
40
+ if (!VIOLATION_SEVERITIES.includes(v.severity)) {
41
+ errors.push(`${path}.severity: expected one of ${VIOLATION_SEVERITIES.join('|')}`);
42
+ }
43
+ if (v.path !== undefined && !isStr(v.path))
44
+ errors.push(`${path}.path: expected string`);
45
+ }
46
+ function validateTarget(t, path, errors) {
47
+ if (!isRecord(t)) {
48
+ errors.push(`${path}: expected object`);
49
+ return;
50
+ }
51
+ if (t.scope === undefined && t.acceptance === undefined) {
52
+ errors.push(`${path}: requires at least one of scope|acceptance`);
53
+ }
54
+ if (t.scope !== undefined) {
55
+ if (!isRecord(t.scope) || !isStr(t.scope.wpRef)) {
56
+ errors.push(`${path}.scope.wpRef: expected string`);
57
+ }
58
+ }
59
+ if (t.acceptance !== undefined) {
60
+ const a = t.acceptance;
61
+ if (!isRecord(a)) {
62
+ errors.push(`${path}.acceptance: expected object`);
63
+ }
64
+ else {
65
+ if (!isStr(a.evidenceId))
66
+ errors.push(`${path}.acceptance.evidenceId: expected string`);
67
+ if (!ACCEPTANCE_KINDS.includes(a.kind)) {
68
+ errors.push(`${path}.acceptance.kind: expected one of ${ACCEPTANCE_KINDS.join('|')}`);
69
+ }
70
+ if (a.criterionIds !== undefined) {
71
+ if (!Array.isArray(a.criterionIds) || !a.criterionIds.every(isStr)) {
72
+ errors.push(`${path}.acceptance.criterionIds: expected string[]`);
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
78
+ function validateCheck(c, path, mode, errors) {
79
+ if (!isRecord(c)) {
80
+ errors.push(`${path}: expected object`);
81
+ return;
82
+ }
83
+ if (!isStr(c.code))
84
+ errors.push(`${path}.code: expected string`);
85
+ if (!VERIFICATION_CATEGORIES.includes(c.category)) {
86
+ errors.push(`${path}.category: expected one of ${VERIFICATION_CATEGORIES.join('|')}`);
87
+ }
88
+ if (typeof c.pass !== 'boolean')
89
+ errors.push(`${path}.pass: expected boolean`);
90
+ if (!Array.isArray(c.violations)) {
91
+ errors.push(`${path}.violations: expected array`);
92
+ }
93
+ else {
94
+ c.violations.forEach((v, i) => validateViolation(v, `${path}.violations[${i}]`, errors));
95
+ }
96
+ if (c.target !== undefined) {
97
+ validateTarget(c.target, `${path}.target`, errors);
98
+ }
99
+ else if (mode === 'ingested') {
100
+ // Adapter fail-closed (DEC-S1): a track-ingested check with no target is rejected.
101
+ errors.push(`${path}.target: required for a track-ingested check (adapter fails closed)`);
102
+ }
103
+ }
104
+ /**
105
+ * Validate an unknown value against the frozen VerificationRun v0 contract. Pure, dependency-free,
106
+ * deterministic. Returns every error rather than throwing on the first.
107
+ */
108
+ export function validateVerificationRunV0(run, opts = {}) {
109
+ const mode = opts.mode ?? 'structural';
110
+ const errors = [];
111
+ if (!isRecord(run)) {
112
+ return { valid: false, errors: ['$: expected object'] };
113
+ }
114
+ if (run.schemaVersion !== 1)
115
+ errors.push('$.schemaVersion: expected 1 (unknown version fails closed)');
116
+ for (const key of ['runId', 'commit', 'branch', 'env', 'runner', 'command', 'artifactLocator']) {
117
+ if (!isStr(run[key]))
118
+ errors.push(`$.${key}: expected string`);
119
+ }
120
+ if (!VERIFICATION_CATEGORIES.includes(run.category)) {
121
+ errors.push(`$.category: expected one of ${VERIFICATION_CATEGORIES.join('|')}`);
122
+ }
123
+ if (run.result !== 'pass' && run.result !== 'fail') {
124
+ errors.push('$.result: expected pass|fail');
125
+ }
126
+ if (!isStr(run.startedAt))
127
+ errors.push('$.startedAt: expected ISO-8601 string');
128
+ if (!isStr(run.finishedAt))
129
+ errors.push('$.finishedAt: expected ISO-8601 string');
130
+ if (!Array.isArray(run.checks)) {
131
+ errors.push('$.checks: expected array');
132
+ }
133
+ else {
134
+ run.checks.forEach((c, i) => validateCheck(c, `$.checks[${i}]`, mode, errors));
135
+ }
136
+ if (!Array.isArray(run.violations)) {
137
+ errors.push('$.violations: expected array');
138
+ }
139
+ else {
140
+ run.violations.forEach((v, i) => validateViolation(v, `$.violations[${i}]`, errors));
141
+ }
142
+ if (!Array.isArray(run.artifacts) || !run.artifacts.every(isStr)) {
143
+ errors.push('$.artifacts: expected string[]');
144
+ }
145
+ return { valid: errors.length === 0, errors };
146
+ }
147
+ /**
148
+ * Derive the scope verdict from violations+severity (DEC-S3, the frozen cross-contract predicate):
149
+ * any `blocking` ⇒ `violation`; else any `advisory` ⇒ `conditional`; else `clean`. NEVER derived
150
+ * from `result`. The harness does NOT route on this (that is the track-side adapter); it is exposed
151
+ * so the predicate can be asserted against the frozen contract rather than trusted.
152
+ */
153
+ export function deriveVerdict(violations) {
154
+ if (violations.some((v) => v.severity === 'blocking'))
155
+ return 'violation';
156
+ if (violations.some((v) => v.severity === 'advisory'))
157
+ return 'conditional';
158
+ return 'clean';
159
+ }
160
+ //# sourceMappingURL=validate-verification-run.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-verification-run.js","sourceRoot":"","sources":["../../../../src/vendor/harness/artifacts/validate-verification-run.js"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,EAAE;AACF,8FAA8F;AAC9F,8FAA8F;AAC9F,8EAA8E;AAC9E,yDAAyD;AACzD,EAAE;AACF,SAAS;AACT,sFAAsF;AACtF,gGAAgG;AAChG,+FAA+F;AAC/F,2FAA2F;AAC3F,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACnC,MAAM;IACN,QAAQ;IACR,MAAM;IACN,a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AM,CAAC,MAAM,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;AAClD,CAAC;AACD;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,UAAU;IACpC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,UAAU,CAAC;QACjD,OAAO,WAAW,CAAC;IACvB,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,UAAU,CAAC;QACjD,OAAO,aAAa,CAAC;IACzB,OAAO,OAAO,CAAC;AACnB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=verification-run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification-run.d.ts","sourceRoot":"","sources":["../../../../src/vendor/harness/artifacts/verification-run.js"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ // Neutral verification artifact emitted by harness checks.
2
+ //
3
+ // `VerificationRun` is the host-agnostic JSON a check run produces. harness EMITS it
4
+ // and never writes into `@sentropic/track`; a track-side adapter ingests it. It is a
5
+ // superset of track's `TestRun{ commit, env, runner, result, at }` so the seam holds.
6
+ //
7
+ // `category` is the BR25 **D3** verification taxonomy (APPROVED 2026-06-04), bound to this
8
+ // field. `security` is reserved NOW as a frozen v0 slot (DEC §2 / §6): adding an enum value
9
+ // after the freeze would be a major bump, so the slot is locked even though the security
10
+ // verify-hook is not wired yet. In v0 `security` stays schema-artifact-only / OFF-WIRE (OQ-7).
11
+ export {};
12
+ //# sourceMappingURL=verification-run.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification-run.js","sourceRoot":"","sources":["../../../../src/vendor/harness/artifacts/verification-run.js"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,EAAE;AACF,qFAAqF;AACrF,qFAAqF;AACrF,sFAAsF;AACtF,EAAE;AACF,2FAA2F;AAC3F,4FAA4F;AAC5F,yFAAyF;AACzF,+FAA+F;AAC/F,OAAO,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=work-event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"work-event.d.ts","sourceRoot":"","sources":["../../../../src/vendor/harness/artifacts/work-event.js"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ // Neutral work-event emitted by harness method/branch verbs.
2
+ //
3
+ // `WorkEvent` is the host-agnostic JSON a NON-pass/fail act produces — `brainstorm`, `debug`,
4
+ // `review`, `plan`, `branch`, `test`, `skills`. harness EMITS it and never writes into
5
+ // `@sentropic/track`; a track-side adapter ingests it (the same emit-only seam as
6
+ // `VerificationRun`). It records the NARRATIVE of an act (a session opened/closed, a request),
7
+ // NOT a verification verdict — cognition is not shoehorned into the verification taxonomy.
8
+ export {};
9
+ //# sourceMappingURL=work-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"work-event.js","sourceRoot":"","sources":["../../../../src/vendor/harness/artifacts/work-event.js"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,EAAE;AACF,8FAA8F;AAC9F,uFAAuF;AACvF,kFAAkF;AAClF,+FAA+F;AAC/F,2FAA2F;AAC3F,OAAO,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=harness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"harness.d.ts","sourceRoot":"","sources":["../../../../src/vendor/harness/bin/harness.js"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import { runHarnessCli } from '../cli/run.js';
3
+ const code = runHarnessCli(process.argv.slice(2), (s) => process.stdout.write(s + '\n'));
4
+ process.exit(code);
5
+ //# sourceMappingURL=harness.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"harness.js","sourceRoot":"","sources":["../../../../src/vendor/harness/bin/harness.js"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,MAAM,IAAI,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;AACzF,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export function parseBranchMd(text: any): {
2
+ title: string;
3
+ allowedPaths: never[];
4
+ forbiddenPaths: never[];
5
+ conditionalPaths: never[];
6
+ exceptions: never[];
7
+ lots: never[];
8
+ };
9
+ //# sourceMappingURL=parse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../../src/vendor/harness/branch-md/parse.js"],"names":[],"mappings":"AAWA;;;;;;;EAuFC"}
@@ -0,0 +1,100 @@
1
+ // Minimal, tolerant BRANCH.md parser. Extracts the structure C1/C2 need:
2
+ // title, scope buckets (Allowed/Forbidden/Conditional path globs), exception ids, and lots.
3
+ // Malformed/partial input yields empty fields — never throws.
4
+ const BACKTICK = /`([^`]+)`/g;
5
+ const EXCEPTION = /\bBR\d+[a-z]?-EX\d+\b/g;
6
+ function backtickGlobs(line) {
7
+ const out = [];
8
+ for (const m of line.matchAll(BACKTICK))
9
+ out.push(m[1]);
10
+ return out;
11
+ }
12
+ export function parseBranchMd(text) {
13
+ const lines = text.split(/\r?\n/);
14
+ const result = {
15
+ title: '',
16
+ allowedPaths: [],
17
+ forbiddenPaths: [],
18
+ conditionalPaths: [],
19
+ exceptions: [],
20
+ lots: [],
21
+ };
22
+ // Title: first `# ` heading (single hash), stripped of a leading "Feature:".
23
+ for (const line of lines) {
24
+ const m = /^#\s+(.+)$/.exec(line);
25
+ if (m) {
26
+ result.title = m[1].replace(/^Feature:\s*/i, '').trim();
27
+ break;
28
+ }
29
+ }
30
+ let bucket = null;
31
+ let inPlan = false;
32
+ let currentLot = null;
33
+ const pushBucket = (globs) => {
34
+ if (bucket === 'allowed')
35
+ result.allowedPaths.push(...globs);
36
+ else if (bucket === 'forbidden')
37
+ result.forbiddenPaths.push(...globs);
38
+ else if (bucket === 'conditional')
39
+ result.conditionalPaths.push(...globs);
40
+ };
41
+ for (const line of lines) {
42
+ for (const m of line.matchAll(EXCEPTION))
43
+ result.exceptions.push(m[0]);
44
+ if (/^##\s+/.test(line)) {
45
+ bucket = null;
46
+ inPlan = /plan\s*\/\s*todo/i.test(line);
47
+ currentLot = null;
48
+ continue;
49
+ }
50
+ // Prefix-match the bucket headings: the canonical BRANCH_TEMPLATE.md carries a
51
+ // parenthetical suffix (e.g. `**Allowed Paths (implementation scope)**`), so the
52
+ // closing `**` is NOT adjacent to "Paths". Match the prefix only (as Conditional
53
+ // already did) — otherwise Allowed/Forbidden silently parse to empty on every
54
+ // real BRANCH.md and in-scope files wrongly classify as `unknown`.
55
+ if (/\*\*Allowed Paths/i.test(line)) {
56
+ bucket = 'allowed';
57
+ pushBucket(backtickGlobs(line));
58
+ continue;
59
+ }
60
+ if (/\*\*Forbidden Paths/i.test(line)) {
61
+ bucket = 'forbidden';
62
+ pushBucket(backtickGlobs(line));
63
+ continue;
64
+ }
65
+ if (/\*\*Conditional Paths/i.test(line)) {
66
+ bucket = 'conditional';
67
+ pushBucket(backtickGlobs(line));
68
+ continue;
69
+ }
70
+ if (bucket && /^\s+-\s/.test(line)) {
71
+ pushBucket(backtickGlobs(line));
72
+ continue;
73
+ }
74
+ if (bucket && /^-\s/.test(line)) {
75
+ bucket = null;
76
+ }
77
+ if (inPlan) {
78
+ const lotMatch = /^-\s*\[( |x)\]\s*\*\*(Lot[^*]+)\*\*/i.exec(line);
79
+ if (lotMatch) {
80
+ currentLot = {
81
+ title: lotMatch[2].trim(),
82
+ checked: lotMatch[1].toLowerCase() === 'x',
83
+ items: [],
84
+ };
85
+ result.lots.push(currentLot);
86
+ continue;
87
+ }
88
+ const itemMatch = /^\s+-\s*\[( |x)\]\s*(.+)$/.exec(line);
89
+ if (itemMatch && currentLot) {
90
+ currentLot.items.push({
91
+ text: itemMatch[2].trim(),
92
+ checked: itemMatch[1].toLowerCase() === 'x',
93
+ });
94
+ }
95
+ }
96
+ }
97
+ result.exceptions = [...new Set(result.exceptions)];
98
+ return result;
99
+ }
100
+ //# sourceMappingURL=parse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse.js","sourceRoot":"","sources":["../../../../src/vendor/harness/branch-md/parse.js"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,4FAA4F;AAC5F,8DAA8D;AAC9D,MAAM,QAAQ,GAAG,YAAY,CAAC;AAC9B,MAAM,SAAS,GAAG,wBAAwB,CAAC;AAC3C,SAAS,aAAa,CAAC,IAAI;IACvB,MAAM,GAAG,GAAG,EAAE,CAAC;IACf,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACnC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACnB,OAAO,GAAG,CAAC;AACf,CAAC;AACD,MAAM,UAAU,aAAa,CAAC,IAAI;IAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAClC,MAAM,MAAM,GAAG;QACX,KAAK,EAAE,EAAE;QACT,YAAY,EAAE,EAAE;QAChB,cAAc,EAAE,EAAE;QAClB,gBAAgB,EAAE,EAAE;QACpB,UAAU,EAAE,EAAE;QACd,IAAI,EAAE,EAAE;KACX,CAAC;IACF,6EAA6E;IAC7E,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACvB,MAAM,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClC,IAAI,CAAC,EAAE,CAAC;YACJ,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC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WAAW,EAAE,KAAK,GAAG;iBAC9C,CAAC,CAAC;YACP,CAAC;QACL,CAAC;IACL,CAAC;IACD,MAAM,CAAC,UAAU,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;IACpD,OAAO,MAAM,CAAC;AAClB,CAAC"}
@@ -0,0 +1,15 @@
1
+ /** C1 — verify the working branch is the expected one (per the profile's `branchMatch`). */
2
+ export function checkBranch(input: any): {
3
+ pass: boolean;
4
+ violations: never[];
5
+ bypass: any;
6
+ } | {
7
+ pass: boolean;
8
+ violations: {
9
+ code: string;
10
+ message: string;
11
+ severity: string;
12
+ }[];
13
+ bypass?: undefined;
14
+ };
15
+ //# sourceMappingURL=branch-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branch-check.d.ts","sourceRoot":"","sources":["../../../../src/vendor/harness/checks/branch-check.js"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F;;;;;;;;;;;;EAoBC"}
@@ -0,0 +1,23 @@
1
+ /** C1 — verify the working branch is the expected one (per the profile's `branchMatch`). */
2
+ export function checkBranch(input) {
3
+ if (input.bypass) {
4
+ return { pass: true, violations: [], bypass: input.bypass };
5
+ }
6
+ const { currentBranch, expectedBranch, profile } = input;
7
+ const ok = profile.branchMatch === 'prefix'
8
+ ? currentBranch.startsWith(expectedBranch)
9
+ : currentBranch === expectedBranch;
10
+ if (ok)
11
+ return { pass: true, violations: [] };
12
+ return {
13
+ pass: false,
14
+ violations: [
15
+ {
16
+ code: 'C1',
17
+ message: `on branch '${currentBranch}', expected '${expectedBranch}' (${profile.branchMatch})`,
18
+ severity: 'advisory',
19
+ },
20
+ ],
21
+ };
22
+ }
23
+ //# sourceMappingURL=branch-check.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branch-check.js","sourceRoot":"","sources":["../../../../src/vendor/harness/checks/branch-check.js"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,MAAM,UAAU,WAAW,CAAC,KAAK;IAC7B,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;QACf,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;IAChE,CAAC;IACD,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACzD,MAAM,EAAE,GAAG,OAAO,CAAC,WAAW,KAAK,QAAQ;QACvC,CAAC,CAAC,aAAa,CAAC,UAAU,CAAC,cAAc,CAAC;QAC1C,CAAC,CAAC,aAAa,KAAK,cAAc,CAAC;IACvC,IAAI,EAAE;QACF,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;IAC1C,OAAO;QACH,IAAI,EAAE,KAAK;QACX,UAAU,EAAE;YACR;gBACI,IAAI,EAAE,IAAI;gBACV,OAAO,EAAE,cAAc,aAAa,gBAAgB,cAAc,MAAM,OAAO,CAAC,WAAW,GAAG;gBAC9F,QAAQ,EAAE,UAAU;aACvB;SACJ;KACJ,CAAC;AACN,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * C2 — verify staged files stay within the declared scope.
3
+ * - `forbidden` (explicit or profile-default) → violation;
4
+ * - `conditional` → violation unless a declared exception matches the profile's
5
+ * `exceptionIdPattern` (grammar binding) AND `conditionalRequiresException` is set;
6
+ * - `unknown` (outside Allowed/Forbidden/Conditional) → violation.
7
+ */
8
+ export function checkScope(input: any): {
9
+ pass: boolean;
10
+ violations: never[];
11
+ bypass: any;
12
+ } | {
13
+ pass: boolean;
14
+ violations: {
15
+ code: string;
16
+ path: any;
17
+ message: string;
18
+ severity: string;
19
+ }[];
20
+ bypass?: undefined;
21
+ };
22
+ //# sourceMappingURL=scope-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scope-check.d.ts","sourceRoot":"","sources":["../../../../src/vendor/harness/checks/scope-check.js"],"names":[],"mappings":"AACA;;;;;;GAMG;AACH;;;;;;;;;;;;;EAwBC"}
@@ -0,0 +1,34 @@
1
+ import { classifyPath } from '../scope/scope-boundary.js';
2
+ /**
3
+ * C2 — verify staged files stay within the declared scope.
4
+ * - `forbidden` (explicit or profile-default) → violation;
5
+ * - `conditional` → violation unless a declared exception matches the profile's
6
+ * `exceptionIdPattern` (grammar binding) AND `conditionalRequiresException` is set;
7
+ * - `unknown` (outside Allowed/Forbidden/Conditional) → violation.
8
+ */
9
+ export function checkScope(input) {
10
+ if (input.bypass)
11
+ return { pass: true, violations: [], bypass: input.bypass };
12
+ const { stagedFiles, boundary, profile, declaredExceptions = [] } = input;
13
+ const hasValidException = declaredExceptions.some((id) => profile.exceptionIdPattern.test(id));
14
+ const violations = [];
15
+ for (const path of stagedFiles) {
16
+ const cls = classifyPath(path, boundary, profile);
17
+ if (cls === 'forbidden') {
18
+ violations.push({ code: 'C2', path, message: `forbidden path touched: ${path}`, severity: 'advisory' });
19
+ }
20
+ else if (cls === 'conditional' && profile.conditionalRequiresException && !hasValidException) {
21
+ violations.push({
22
+ code: 'C2',
23
+ path,
24
+ message: `conditional path touched without a matching exception: ${path}`,
25
+ severity: 'advisory',
26
+ });
27
+ }
28
+ else if (cls === 'unknown') {
29
+ violations.push({ code: 'C2', path, message: `path outside declared scope (unknown): ${path}`, severity: 'advisory' });
30
+ }
31
+ }
32
+ return { pass: violations.length === 0, violations };
33
+ }
34
+ //# sourceMappingURL=scope-check.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scope-check.js","sourceRoot":"","sources":["../../../../src/vendor/harness/checks/scope-check.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,KAAK;IAC5B,IAAI,KAAK,CAAC,MAAM;QACZ,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,KA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Split argv into positionals and `--key [value]` flags (a bare `--key` is boolean true). */
2
+ export function parseFlags(args: any): {
3
+ positionals: any[];
4
+ flags: {};
5
+ };
6
+ export function str(v: any): string | undefined;
7
+ export function list(v: any): string[];
8
+ //# sourceMappingURL=args.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../../../src/vendor/harness/cli/args.js"],"names":[],"mappings":"AACA,8FAA8F;AAC9F;;;EAqBC;AACD,gDAEC;AACD,uCAGC"}
@@ -0,0 +1,32 @@
1
+ // Shared, pure argv helpers for the harness CLI driver.
2
+ /** Split argv into positionals and `--key [value]` flags (a bare `--key` is boolean true). */
3
+ export function parseFlags(args) {
4
+ const positionals = [];
5
+ const flags = {};
6
+ for (let i = 0; i < args.length; i++) {
7
+ const a = args[i];
8
+ if (a.startsWith('--')) {
9
+ const key = a.slice(2);
10
+ const next = args[i + 1];
11
+ if (next === undefined || next.startsWith('--')) {
12
+ flags[key] = true;
13
+ }
14
+ else {
15
+ flags[key] = next;
16
+ i++;
17
+ }
18
+ }
19
+ else {
20
+ positionals.push(a);
21
+ }
22
+ }
23
+ return { positionals, flags };
24
+ }
25
+ export function str(v) {
26
+ return typeof v === 'string' ? v : undefined;
27
+ }
28
+ export function list(v) {
29
+ const s = str(v);
30
+ return s ? s.split(/[\s,]+/).filter(Boolean) : [];
31
+ }
32
+ //# sourceMappingURL=args.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"args.js","sourceRoot":"","sources":["../../../../src/vendor/harness/cli/args.js"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,8FAA8F;AAC9F,MAAM,UAAU,UAAU,CAAC,IAAI;IAC3B,MAAM,WAAW,GAAG,EAAE,CAAC;IACvB,MAAM,KAAK,GAAG,EAAE,CAAC;IACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACnC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YACrB,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACvB,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACzB,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC9C,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;YACtB,CAAC;iBACI,CAAC;gBACF,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;gBAClB,CAAC,EAAE,CAAC;YACR,CAAC;QACL,CAAC;aACI,CAAC;YACF,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACxB,CAAC;IACL,CAAC;IACD,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;AAClC,CAAC;AACD,MAAM,UAAU,GAAG,CAAC,CAAC;IACjB,OAAO,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACjD,CAAC;AACD,MAAM,UAAU,IAAI,CAAC,CAAC;IAClB,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACtD,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Handle a mechanical/producer verb. Returns the exit code (`null` when `verb` is not one of
3
+ * `verify`/`init`/`audit`). Emits a `VerificationRun` (`--json`) or a human summary via `out`.
4
+ */
5
+ export function handleMechanicalVerb(positionals: any, flags: any, out: any): number | null;
6
+ export const MECHANICAL_VERBS: string[];
7
+ //# sourceMappingURL=mechanical-verbs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mechanical-verbs.d.ts","sourceRoot":"","sources":["../../../../src/vendor/harness/cli/mechanical-verbs.js"],"names":[],"mappings":"AAwEA;;;GAGG;AACH,4FA8CC;AA3GD,wCAA4D"}