codeharness 0.31.5 → 0.31.7
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.7" : "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-A5DXO37U.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
|
}
|
|
@@ -5519,7 +5551,8 @@ function App({ state, onCycleLane, onQuit }) {
|
|
|
5519
5551
|
}, { isActive: typeof process.stdin.setRawMode === "function" });
|
|
5520
5552
|
const activeLaneCount = state.laneCount ?? 0;
|
|
5521
5553
|
const termRows = process.stdout.rows || 24;
|
|
5522
|
-
const
|
|
5554
|
+
const staticLines = state.messages.length;
|
|
5555
|
+
const fixedHeight = 10 + staticLines + 2;
|
|
5523
5556
|
const availableHeight = Math.max(3, termRows - fixedHeight);
|
|
5524
5557
|
return /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", children: [
|
|
5525
5558
|
/* @__PURE__ */ jsx7(Static, { items: state.messages, children: (msg, i) => /* @__PURE__ */ jsx7(StoryMessageLine, { msg }, i) }),
|
|
@@ -6324,6 +6357,7 @@ function registerRunCommand(program) {
|
|
|
6324
6357
|
});
|
|
6325
6358
|
taskStates[stateKey] = "active";
|
|
6326
6359
|
renderer.updateWorkflowState(parsedWorkflow.flow, event.taskName, { ...taskStates }, { ...taskMeta });
|
|
6360
|
+
updateStoryStatus2(event.storyKey, "in-progress");
|
|
6327
6361
|
const idx = storyEntries.findIndex((s) => s.key === event.storyKey);
|
|
6328
6362
|
if (idx >= 0 && storyEntries[idx].status === "pending") {
|
|
6329
6363
|
storyEntries[idx] = { ...storyEntries[idx], status: "in-progress" };
|
|
@@ -6340,6 +6374,15 @@ function registerRunCommand(program) {
|
|
|
6340
6374
|
elapsedMs: (taskMeta[stateKey]?.elapsedMs ?? 0) + (event.elapsedMs ?? 0)
|
|
6341
6375
|
};
|
|
6342
6376
|
renderer.updateWorkflowState(parsedWorkflow.flow, event.taskName, { ...taskStates }, { ...taskMeta });
|
|
6377
|
+
if (event.taskName === "verify") {
|
|
6378
|
+
storiesDone++;
|
|
6379
|
+
updateStoryStatus2(event.storyKey, "done");
|
|
6380
|
+
const idx = storyEntries.findIndex((s) => s.key === event.storyKey);
|
|
6381
|
+
if (idx >= 0) {
|
|
6382
|
+
storyEntries[idx] = { ...storyEntries[idx], status: "done" };
|
|
6383
|
+
renderer.updateStories([...storyEntries]);
|
|
6384
|
+
}
|
|
6385
|
+
}
|
|
6343
6386
|
renderer.updateSprintState({
|
|
6344
6387
|
storyKey: event.storyKey,
|
|
6345
6388
|
phase: event.taskName,
|
|
@@ -6357,6 +6400,12 @@ function registerRunCommand(program) {
|
|
|
6357
6400
|
key: event.storyKey,
|
|
6358
6401
|
message: `[${event.taskName}] ${event.error?.message ?? "unknown error"}`
|
|
6359
6402
|
});
|
|
6403
|
+
updateStoryStatus2(event.storyKey, "failed");
|
|
6404
|
+
const idx = storyEntries.findIndex((s) => s.key === event.storyKey);
|
|
6405
|
+
if (idx >= 0) {
|
|
6406
|
+
storyEntries[idx] = { ...storyEntries[idx], status: "failed" };
|
|
6407
|
+
renderer.updateStories([...storyEntries]);
|
|
6408
|
+
}
|
|
6360
6409
|
}
|
|
6361
6410
|
};
|
|
6362
6411
|
const config = {
|
|
@@ -11249,7 +11298,7 @@ function registerTeardownCommand(program) {
|
|
|
11249
11298
|
} else if (otlpMode === "remote-routed") {
|
|
11250
11299
|
if (!options.keepDocker) {
|
|
11251
11300
|
try {
|
|
11252
|
-
const { stopCollectorOnly: stopCollectorOnly2 } = await import("./docker-
|
|
11301
|
+
const { stopCollectorOnly: stopCollectorOnly2 } = await import("./docker-NMEOPB6R.js");
|
|
11253
11302
|
stopCollectorOnly2();
|
|
11254
11303
|
result.docker.stopped = true;
|
|
11255
11304
|
if (!isJson) {
|
|
@@ -11281,7 +11330,7 @@ function registerTeardownCommand(program) {
|
|
|
11281
11330
|
info("Shared stack: kept running (other projects may use it)");
|
|
11282
11331
|
}
|
|
11283
11332
|
} else if (isLegacyStack) {
|
|
11284
|
-
const { isStackRunning: isStackRunning2, stopStack } = await import("./docker-
|
|
11333
|
+
const { isStackRunning: isStackRunning2, stopStack } = await import("./docker-NMEOPB6R.js");
|
|
11285
11334
|
let stackRunning = false;
|
|
11286
11335
|
try {
|
|
11287
11336
|
stackRunning = isStackRunning2(composeFile);
|
|
@@ -13914,7 +13963,7 @@ var CodexDriver = class {
|
|
|
13914
13963
|
opts.plugins
|
|
13915
13964
|
);
|
|
13916
13965
|
}
|
|
13917
|
-
const args = ["exec", "--json", "--full-auto"];
|
|
13966
|
+
const args = ["exec", "--json", "--full-auto", "--skip-git-repo-check"];
|
|
13918
13967
|
const model = opts.model && !opts.model.startsWith("claude-") ? opts.model : void 0;
|
|
13919
13968
|
if (model) {
|
|
13920
13969
|
args.push("--model", model);
|
|
@@ -14268,7 +14317,7 @@ function registerDriversCommand(program) {
|
|
|
14268
14317
|
}
|
|
14269
14318
|
|
|
14270
14319
|
// src/index.ts
|
|
14271
|
-
var VERSION = true ? "0.31.
|
|
14320
|
+
var VERSION = true ? "0.31.7" : "0.0.0-dev";
|
|
14272
14321
|
function createProgram() {
|
|
14273
14322
|
const program = new Command();
|
|
14274
14323
|
program.name("codeharness").description("Makes autonomous coding agents produce software that actually works").version(VERSION).option("--json", "Output in machine-readable JSON format");
|