codeharness 0.29.1 → 0.29.2
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.29.
|
|
2898
|
+
var HARNESS_VERSION = true ? "0.29.2" : "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-3ZSXMCZV.js";
|
|
44
44
|
|
|
45
45
|
// src/index.ts
|
|
46
46
|
import { Command } from "commander";
|
|
@@ -6170,6 +6170,23 @@ function registerRunCommand(program) {
|
|
|
6170
6170
|
totalCost: 0
|
|
6171
6171
|
}
|
|
6172
6172
|
});
|
|
6173
|
+
let totalCostUsd = 0;
|
|
6174
|
+
let storiesDone = counts.done;
|
|
6175
|
+
const taskStates = {};
|
|
6176
|
+
const taskMeta = {};
|
|
6177
|
+
for (const [tn, task] of Object.entries(parsedWorkflow.tasks)) {
|
|
6178
|
+
taskStates[tn] = "pending";
|
|
6179
|
+
taskMeta[tn] = { driver: task.driver ?? "claude-code" };
|
|
6180
|
+
}
|
|
6181
|
+
const storyEntries = [];
|
|
6182
|
+
for (const [key, status] of Object.entries(statuses)) {
|
|
6183
|
+
if (key.startsWith("epic-")) continue;
|
|
6184
|
+
if (status === "done") storyEntries.push({ key, status: "done" });
|
|
6185
|
+
else if (status === "in-progress") storyEntries.push({ key, status: "in-progress" });
|
|
6186
|
+
else if (status === "backlog" || status === "ready-for-dev") storyEntries.push({ key, status: "pending" });
|
|
6187
|
+
else if (status === "failed") storyEntries.push({ key, status: "failed" });
|
|
6188
|
+
}
|
|
6189
|
+
renderer.updateStories(storyEntries);
|
|
6173
6190
|
const onEvent = (event) => {
|
|
6174
6191
|
if (event.type === "stream-event" && event.streamEvent) {
|
|
6175
6192
|
renderer.update(event.streamEvent, event.driverName);
|
|
@@ -6177,24 +6194,39 @@ function registerRunCommand(program) {
|
|
|
6177
6194
|
if (event.type === "dispatch-start") {
|
|
6178
6195
|
renderer.updateSprintState({
|
|
6179
6196
|
storyKey: event.storyKey,
|
|
6180
|
-
phase:
|
|
6181
|
-
done:
|
|
6182
|
-
total: counts.total
|
|
6197
|
+
phase: event.taskName,
|
|
6198
|
+
done: storiesDone,
|
|
6199
|
+
total: counts.total,
|
|
6200
|
+
totalCost: totalCostUsd
|
|
6183
6201
|
});
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6202
|
+
taskStates[event.taskName] = "active";
|
|
6203
|
+
renderer.updateWorkflowState(parsedWorkflow.flow, event.taskName, { ...taskStates }, { ...taskMeta });
|
|
6204
|
+
const idx = storyEntries.findIndex((s) => s.key === event.storyKey);
|
|
6205
|
+
if (idx >= 0 && storyEntries[idx].status === "pending") {
|
|
6206
|
+
storyEntries[idx] = { ...storyEntries[idx], status: "in-progress" };
|
|
6207
|
+
renderer.updateStories([...storyEntries]);
|
|
6208
|
+
}
|
|
6189
6209
|
}
|
|
6190
6210
|
if (event.type === "dispatch-end") {
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6211
|
+
totalCostUsd += event.costUsd ?? 0;
|
|
6212
|
+
taskStates[event.taskName] = "done";
|
|
6213
|
+
taskMeta[event.taskName] = {
|
|
6214
|
+
...taskMeta[event.taskName],
|
|
6215
|
+
costUsd: (taskMeta[event.taskName]?.costUsd ?? 0) + (event.costUsd ?? 0),
|
|
6216
|
+
elapsedMs: (taskMeta[event.taskName]?.elapsedMs ?? 0) + (event.elapsedMs ?? 0)
|
|
6217
|
+
};
|
|
6218
|
+
renderer.updateWorkflowState(parsedWorkflow.flow, event.taskName, { ...taskStates }, { ...taskMeta });
|
|
6219
|
+
renderer.updateSprintState({
|
|
6220
|
+
storyKey: event.storyKey,
|
|
6221
|
+
phase: event.taskName,
|
|
6222
|
+
done: storiesDone,
|
|
6223
|
+
total: counts.total,
|
|
6224
|
+
totalCost: totalCostUsd
|
|
6225
|
+
});
|
|
6196
6226
|
}
|
|
6197
6227
|
if (event.type === "dispatch-error") {
|
|
6228
|
+
taskStates[event.taskName] = "failed";
|
|
6229
|
+
renderer.updateWorkflowState(parsedWorkflow.flow, event.taskName, { ...taskStates }, { ...taskMeta });
|
|
6198
6230
|
renderer.addMessage({
|
|
6199
6231
|
type: "fail",
|
|
6200
6232
|
key: event.storyKey,
|
|
@@ -11083,7 +11115,7 @@ function registerTeardownCommand(program) {
|
|
|
11083
11115
|
} else if (otlpMode === "remote-routed") {
|
|
11084
11116
|
if (!options.keepDocker) {
|
|
11085
11117
|
try {
|
|
11086
|
-
const { stopCollectorOnly: stopCollectorOnly2 } = await import("./docker-
|
|
11118
|
+
const { stopCollectorOnly: stopCollectorOnly2 } = await import("./docker-QJGQIPTO.js");
|
|
11087
11119
|
stopCollectorOnly2();
|
|
11088
11120
|
result.docker.stopped = true;
|
|
11089
11121
|
if (!isJson) {
|
|
@@ -11115,7 +11147,7 @@ function registerTeardownCommand(program) {
|
|
|
11115
11147
|
info("Shared stack: kept running (other projects may use it)");
|
|
11116
11148
|
}
|
|
11117
11149
|
} else if (isLegacyStack) {
|
|
11118
|
-
const { isStackRunning: isStackRunning2, stopStack } = await import("./docker-
|
|
11150
|
+
const { isStackRunning: isStackRunning2, stopStack } = await import("./docker-QJGQIPTO.js");
|
|
11119
11151
|
let stackRunning = false;
|
|
11120
11152
|
try {
|
|
11121
11153
|
stackRunning = isStackRunning2(composeFile);
|
|
@@ -13993,7 +14025,7 @@ function registerDriversCommand(program) {
|
|
|
13993
14025
|
}
|
|
13994
14026
|
|
|
13995
14027
|
// src/index.ts
|
|
13996
|
-
var VERSION = true ? "0.29.
|
|
14028
|
+
var VERSION = true ? "0.29.2" : "0.0.0-dev";
|
|
13997
14029
|
function createProgram() {
|
|
13998
14030
|
const program = new Command();
|
|
13999
14031
|
program.name("codeharness").description("Makes autonomous coding agents produce software that actually works").version(VERSION).option("--json", "Output in machine-readable JSON format");
|