codeharness 0.31.5 → 0.31.6
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.
|
@@ -2895,7 +2895,7 @@ function generateDockerfileTemplate(projectDir, stackOrDetections) {
|
|
|
2895
2895
|
}
|
|
2896
2896
|
|
|
2897
2897
|
// src/modules/infra/init-project.ts
|
|
2898
|
-
var HARNESS_VERSION = true ? "0.31.
|
|
2898
|
+
var HARNESS_VERSION = true ? "0.31.6" : "0.0.0-dev";
|
|
2899
2899
|
function failResult(opts, error) {
|
|
2900
2900
|
return {
|
|
2901
2901
|
status: "fail",
|
package/dist/index.js
CHANGED
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
validateDockerfile,
|
|
41
41
|
warn,
|
|
42
42
|
writeState
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-ZLOBOEIA.js";
|
|
44
44
|
|
|
45
45
|
// src/index.ts
|
|
46
46
|
import { Command } from "commander";
|
|
@@ -646,6 +646,35 @@ function computeSprintCounts(stories) {
|
|
|
646
646
|
}
|
|
647
647
|
return { total, done, failed, blocked, inProgress };
|
|
648
648
|
}
|
|
649
|
+
function updateStoryStatus(key, status, detail) {
|
|
650
|
+
const stateResult = getSprintState();
|
|
651
|
+
if (!stateResult.success) {
|
|
652
|
+
return fail2(stateResult.error);
|
|
653
|
+
}
|
|
654
|
+
const current = stateResult.data;
|
|
655
|
+
const existingStory = current.stories[key];
|
|
656
|
+
if (!existingStory) {
|
|
657
|
+
return fail2(`Story '${key}' does not exist in sprint state \u2014 refusing to create phantom entry`);
|
|
658
|
+
}
|
|
659
|
+
const isNewAttempt = status === "in-progress";
|
|
660
|
+
const updatedStory = {
|
|
661
|
+
...existingStory,
|
|
662
|
+
status,
|
|
663
|
+
attempts: isNewAttempt ? existingStory.attempts + 1 : existingStory.attempts,
|
|
664
|
+
lastAttempt: isNewAttempt ? (/* @__PURE__ */ new Date()).toISOString() : existingStory.lastAttempt,
|
|
665
|
+
lastError: detail?.error ?? existingStory.lastError,
|
|
666
|
+
proofPath: detail?.proofPath ?? existingStory.proofPath,
|
|
667
|
+
acResults: existingStory.acResults
|
|
668
|
+
};
|
|
669
|
+
const updatedStories = { ...current.stories, [key]: updatedStory };
|
|
670
|
+
const updatedSprint = computeSprintCounts(updatedStories);
|
|
671
|
+
const updatedState = {
|
|
672
|
+
...current,
|
|
673
|
+
sprint: updatedSprint,
|
|
674
|
+
stories: updatedStories
|
|
675
|
+
};
|
|
676
|
+
return writeStateAtomic(updatedState);
|
|
677
|
+
}
|
|
649
678
|
function updateRunProgress(update) {
|
|
650
679
|
const stateResult = getSprintState();
|
|
651
680
|
if (!stateResult.success) {
|
|
@@ -1378,6 +1407,9 @@ function validateStateConsistency(statePath2, sprintStatusPath) {
|
|
|
1378
1407
|
}
|
|
1379
1408
|
|
|
1380
1409
|
// src/modules/sprint/index.ts
|
|
1410
|
+
function updateStoryStatus2(key, status, detail) {
|
|
1411
|
+
return updateStoryStatus(key, status, detail);
|
|
1412
|
+
}
|
|
1381
1413
|
function getSprintState2() {
|
|
1382
1414
|
return getSprintState();
|
|
1383
1415
|
}
|
|
@@ -6324,6 +6356,7 @@ function registerRunCommand(program) {
|
|
|
6324
6356
|
});
|
|
6325
6357
|
taskStates[stateKey] = "active";
|
|
6326
6358
|
renderer.updateWorkflowState(parsedWorkflow.flow, event.taskName, { ...taskStates }, { ...taskMeta });
|
|
6359
|
+
updateStoryStatus2(event.storyKey, "in-progress");
|
|
6327
6360
|
const idx = storyEntries.findIndex((s) => s.key === event.storyKey);
|
|
6328
6361
|
if (idx >= 0 && storyEntries[idx].status === "pending") {
|
|
6329
6362
|
storyEntries[idx] = { ...storyEntries[idx], status: "in-progress" };
|
|
@@ -6340,6 +6373,15 @@ function registerRunCommand(program) {
|
|
|
6340
6373
|
elapsedMs: (taskMeta[stateKey]?.elapsedMs ?? 0) + (event.elapsedMs ?? 0)
|
|
6341
6374
|
};
|
|
6342
6375
|
renderer.updateWorkflowState(parsedWorkflow.flow, event.taskName, { ...taskStates }, { ...taskMeta });
|
|
6376
|
+
if (event.taskName === "verify") {
|
|
6377
|
+
storiesDone++;
|
|
6378
|
+
updateStoryStatus2(event.storyKey, "done");
|
|
6379
|
+
const idx = storyEntries.findIndex((s) => s.key === event.storyKey);
|
|
6380
|
+
if (idx >= 0) {
|
|
6381
|
+
storyEntries[idx] = { ...storyEntries[idx], status: "done" };
|
|
6382
|
+
renderer.updateStories([...storyEntries]);
|
|
6383
|
+
}
|
|
6384
|
+
}
|
|
6343
6385
|
renderer.updateSprintState({
|
|
6344
6386
|
storyKey: event.storyKey,
|
|
6345
6387
|
phase: event.taskName,
|
|
@@ -6357,6 +6399,12 @@ function registerRunCommand(program) {
|
|
|
6357
6399
|
key: event.storyKey,
|
|
6358
6400
|
message: `[${event.taskName}] ${event.error?.message ?? "unknown error"}`
|
|
6359
6401
|
});
|
|
6402
|
+
updateStoryStatus2(event.storyKey, "failed");
|
|
6403
|
+
const idx = storyEntries.findIndex((s) => s.key === event.storyKey);
|
|
6404
|
+
if (idx >= 0) {
|
|
6405
|
+
storyEntries[idx] = { ...storyEntries[idx], status: "failed" };
|
|
6406
|
+
renderer.updateStories([...storyEntries]);
|
|
6407
|
+
}
|
|
6360
6408
|
}
|
|
6361
6409
|
};
|
|
6362
6410
|
const config = {
|
|
@@ -11249,7 +11297,7 @@ function registerTeardownCommand(program) {
|
|
|
11249
11297
|
} else if (otlpMode === "remote-routed") {
|
|
11250
11298
|
if (!options.keepDocker) {
|
|
11251
11299
|
try {
|
|
11252
|
-
const { stopCollectorOnly: stopCollectorOnly2 } = await import("./docker-
|
|
11300
|
+
const { stopCollectorOnly: stopCollectorOnly2 } = await import("./docker-RHFGKHJV.js");
|
|
11253
11301
|
stopCollectorOnly2();
|
|
11254
11302
|
result.docker.stopped = true;
|
|
11255
11303
|
if (!isJson) {
|
|
@@ -11281,7 +11329,7 @@ function registerTeardownCommand(program) {
|
|
|
11281
11329
|
info("Shared stack: kept running (other projects may use it)");
|
|
11282
11330
|
}
|
|
11283
11331
|
} else if (isLegacyStack) {
|
|
11284
|
-
const { isStackRunning: isStackRunning2, stopStack } = await import("./docker-
|
|
11332
|
+
const { isStackRunning: isStackRunning2, stopStack } = await import("./docker-RHFGKHJV.js");
|
|
11285
11333
|
let stackRunning = false;
|
|
11286
11334
|
try {
|
|
11287
11335
|
stackRunning = isStackRunning2(composeFile);
|
|
@@ -13914,7 +13962,7 @@ var CodexDriver = class {
|
|
|
13914
13962
|
opts.plugins
|
|
13915
13963
|
);
|
|
13916
13964
|
}
|
|
13917
|
-
const args = ["exec", "--json", "--full-auto"];
|
|
13965
|
+
const args = ["exec", "--json", "--full-auto", "--skip-git-repo-check"];
|
|
13918
13966
|
const model = opts.model && !opts.model.startsWith("claude-") ? opts.model : void 0;
|
|
13919
13967
|
if (model) {
|
|
13920
13968
|
args.push("--model", model);
|
|
@@ -14268,7 +14316,7 @@ function registerDriversCommand(program) {
|
|
|
14268
14316
|
}
|
|
14269
14317
|
|
|
14270
14318
|
// src/index.ts
|
|
14271
|
-
var VERSION = true ? "0.31.
|
|
14319
|
+
var VERSION = true ? "0.31.6" : "0.0.0-dev";
|
|
14272
14320
|
function createProgram() {
|
|
14273
14321
|
const program = new Command();
|
|
14274
14322
|
program.name("codeharness").description("Makes autonomous coding agents produce software that actually works").version(VERSION).option("--json", "Output in machine-readable JSON format");
|