codeharness 0.12.2 → 0.13.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 (2) hide show
  1. package/dist/index.js +31 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1348,7 +1348,7 @@ function importStoriesToBeads(stories, opts, beadsFns) {
1348
1348
  }
1349
1349
 
1350
1350
  // src/commands/init.ts
1351
- var HARNESS_VERSION = true ? "0.12.2" : "0.0.0-dev";
1351
+ var HARNESS_VERSION = true ? "0.13.0" : "0.0.0-dev";
1352
1352
  function getStackLabel(stack) {
1353
1353
  if (stack === "nodejs") return "Node.js (package.json)";
1354
1354
  if (stack === "python") return "Python";
@@ -2379,7 +2379,7 @@ function countStories(statuses) {
2379
2379
  if (status === "backlog" || status === "ready-for-dev") ready++;
2380
2380
  else if (status === "done") done++;
2381
2381
  else if (status === "in-progress" || status === "review") inProgress++;
2382
- else if (status === "verified") verified++;
2382
+ else if (status === "verifying") verified++;
2383
2383
  }
2384
2384
  return { total, ready, done, inProgress, verified };
2385
2385
  }
@@ -3339,7 +3339,34 @@ function validateProofQuality(proofPath) {
3339
3339
  const inlineMatches = [...content.matchAll(inlineAcPattern)];
3340
3340
  const acNumbers = new Set(inlineMatches.map((m) => m[1]));
3341
3341
  if (acNumbers.size === 0) {
3342
- return { verified: 0, pending: 0, escalated: 0, total: 0, passed: false };
3342
+ const narrativeAcPattern = /=== AC ?(\d+):/g;
3343
+ const narrativeMatches = [...content.matchAll(narrativeAcPattern)];
3344
+ const narrativeAcNumbers = new Set(narrativeMatches.map((m) => m[1]));
3345
+ if (narrativeAcNumbers.size === 0) {
3346
+ return { verified: 0, pending: 0, escalated: 0, total: 0, passed: false };
3347
+ }
3348
+ const sortedAcs = narrativeMatches.map((m) => ({ num: m[1], idx: m.index })).filter((v, i, a) => a.findIndex((x) => x.num === v.num) === i).sort((a, b) => a.idx - b.idx);
3349
+ for (let i = 0; i < sortedAcs.length; i++) {
3350
+ const { num: acNum, idx: acIdx } = sortedAcs[i];
3351
+ const regionStart = i > 0 ? sortedAcs[i - 1].idx : 0;
3352
+ const regionEnd = i + 1 < sortedAcs.length ? sortedAcs[i + 1].idx : content.length;
3353
+ const section = content.slice(regionStart, regionEnd);
3354
+ if (section.includes("[ESCALATE]")) {
3355
+ escalated++;
3356
+ } else if (/```output/m.test(section)) {
3357
+ verified++;
3358
+ } else {
3359
+ pending++;
3360
+ }
3361
+ }
3362
+ const narrativeTotal = verified + pending + escalated;
3363
+ return {
3364
+ verified,
3365
+ pending,
3366
+ escalated,
3367
+ total: narrativeTotal,
3368
+ passed: pending === 0 && verified > 0
3369
+ };
3343
3370
  }
3344
3371
  for (const acNum of acNumbers) {
3345
3372
  const acPattern = new RegExp(`--- AC ?${acNum}:`, "g");
@@ -6827,7 +6854,7 @@ function registerGithubImportCommand(program) {
6827
6854
  }
6828
6855
 
6829
6856
  // src/index.ts
6830
- var VERSION = true ? "0.12.2" : "0.0.0-dev";
6857
+ var VERSION = true ? "0.13.0" : "0.0.0-dev";
6831
6858
  function createProgram() {
6832
6859
  const program = new Command();
6833
6860
  program.name("codeharness").description("Makes autonomous coding agents produce software that actually works").version(VERSION).option("--json", "Output in machine-readable JSON format");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeharness",
3
- "version": "0.12.2",
3
+ "version": "0.13.0",
4
4
  "type": "module",
5
5
  "description": "CLI for codeharness — makes autonomous coding agents produce software that actually works",
6
6
  "bin": {