codeharness 0.35.5 → 0.35.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.35.5" : "0.0.0-dev";
2898
+ var HARNESS_VERSION = true ? "0.35.7" : "0.0.0-dev";
2899
2899
  function failResult(opts, error) {
2900
2900
  return {
2901
2901
  status: "fail",
@@ -16,7 +16,7 @@ import {
16
16
  stopCollectorOnly,
17
17
  stopSharedStack,
18
18
  stopStack
19
- } from "./chunk-VMNLIAOU.js";
19
+ } from "./chunk-WNIM6AUG.js";
20
20
  export {
21
21
  checkRemoteEndpoint,
22
22
  cleanupOrphanedContainers,
package/dist/index.js CHANGED
@@ -40,7 +40,7 @@ import {
40
40
  validateDockerfile,
41
41
  warn,
42
42
  writeState
43
- } from "./chunk-VMNLIAOU.js";
43
+ } from "./chunk-WNIM6AUG.js";
44
44
 
45
45
  // src/index.ts
46
46
  import { Command } from "commander";
@@ -6008,8 +6008,40 @@ function startRenderer(options) {
6008
6008
  } else if (newKey && !lastStoryKey) {
6009
6009
  lastStoryKey = newKey;
6010
6010
  }
6011
+ recomputeStoryContext();
6011
6012
  rerender();
6012
6013
  }
6014
+ function recomputeStoryContext() {
6015
+ const currentStory = state.sprintInfo?.storyKey ?? "";
6016
+ const ctx = [];
6017
+ const epicMatch = currentStory.match(/Epic (\d+)/);
6018
+ if (epicMatch) {
6019
+ const epicPrefix2 = `${epicMatch[1]}-`;
6020
+ const epicStories = state.stories.filter((s) => s.key.startsWith(epicPrefix2));
6021
+ const lastDone = [...epicStories].reverse().find((s) => s.status === "done");
6022
+ const firstIp = epicStories.find((s) => s.status === "in-progress");
6023
+ const firstPending = epicStories.find((s) => s.status === "pending");
6024
+ if (lastDone) ctx.push({ key: lastDone.key, role: "prev" });
6025
+ if (firstIp) ctx.push({ key: firstIp.key, role: "current" });
6026
+ else if (firstPending) ctx.push({ key: firstPending.key, role: "next" });
6027
+ } else if (currentStory) {
6028
+ let foundCurrent = false;
6029
+ let prevKey = null;
6030
+ for (const s of state.stories) {
6031
+ if (s.key === currentStory) {
6032
+ if (prevKey) ctx.push({ key: prevKey, role: "prev" });
6033
+ ctx.push({ key: s.key, role: "current" });
6034
+ foundCurrent = true;
6035
+ } else if (foundCurrent && (s.status === "pending" || s.status === "in-progress")) {
6036
+ ctx.push({ key: s.key, role: "next" });
6037
+ break;
6038
+ } else if (s.status === "done" || s.status === "in-progress") {
6039
+ prevKey = s.key;
6040
+ }
6041
+ }
6042
+ }
6043
+ state.storyContext = ctx;
6044
+ }
6013
6045
  function updateStories(stories) {
6014
6046
  if (cleaned) return;
6015
6047
  const currentKey = state.sprintInfo?.storyKey ?? null;
@@ -6038,34 +6070,7 @@ function startRenderer(options) {
6038
6070
  lastStoryKey = currentKey;
6039
6071
  }
6040
6072
  state.stories = updatedStories;
6041
- const ctx = [];
6042
- const currentStory = currentKey ?? "";
6043
- const currentTask = state.currentTaskName ?? "";
6044
- const epicMatch = currentStory.match(/^Epic (\d+)/);
6045
- if (epicMatch) {
6046
- const epicPrefix2 = `${epicMatch[1]}-`;
6047
- const epicStories = updatedStories.filter((s) => s.key.startsWith(epicPrefix2));
6048
- const lastDone = [...epicStories].reverse().find((s) => s.status === "done" || s.status === "in-progress");
6049
- if (lastDone) ctx.push({ key: lastDone.key, role: "prev" });
6050
- const ipStory = epicStories.find((s) => s.status === "in-progress");
6051
- if (ipStory) ctx.push({ key: `${epicStories.length} stories in epic`, role: "current" });
6052
- } else {
6053
- let foundCurrent = false;
6054
- let prevKey = null;
6055
- for (const s of updatedStories) {
6056
- if (s.key === currentStory) {
6057
- if (prevKey) ctx.push({ key: prevKey, role: "prev" });
6058
- ctx.push({ key: s.key, role: "current" });
6059
- foundCurrent = true;
6060
- } else if (foundCurrent && (s.status === "pending" || s.status === "in-progress")) {
6061
- ctx.push({ key: s.key, role: "next" });
6062
- break;
6063
- } else if (s.status === "done" || s.status === "in-progress") {
6064
- prevKey = s.key;
6065
- }
6066
- }
6067
- }
6068
- state.storyContext = ctx;
6073
+ recomputeStoryContext();
6069
6074
  rerender();
6070
6075
  }
6071
6076
  function addMessage(msg) {
@@ -11222,7 +11227,7 @@ function registerTeardownCommand(program) {
11222
11227
  } else if (otlpMode === "remote-routed") {
11223
11228
  if (!options.keepDocker) {
11224
11229
  try {
11225
- const { stopCollectorOnly: stopCollectorOnly2 } = await import("./docker-RJSBPNHU.js");
11230
+ const { stopCollectorOnly: stopCollectorOnly2 } = await import("./docker-MXONF2RK.js");
11226
11231
  stopCollectorOnly2();
11227
11232
  result.docker.stopped = true;
11228
11233
  if (!isJson) {
@@ -11254,7 +11259,7 @@ function registerTeardownCommand(program) {
11254
11259
  info("Shared stack: kept running (other projects may use it)");
11255
11260
  }
11256
11261
  } else if (isLegacyStack) {
11257
- const { isStackRunning: isStackRunning2, stopStack } = await import("./docker-RJSBPNHU.js");
11262
+ const { isStackRunning: isStackRunning2, stopStack } = await import("./docker-MXONF2RK.js");
11258
11263
  let stackRunning = false;
11259
11264
  try {
11260
11265
  stackRunning = isStackRunning2(composeFile);
@@ -14241,7 +14246,7 @@ function registerDriversCommand(program) {
14241
14246
  }
14242
14247
 
14243
14248
  // src/index.ts
14244
- var VERSION = true ? "0.35.5" : "0.0.0-dev";
14249
+ var VERSION = true ? "0.35.7" : "0.0.0-dev";
14245
14250
  function createProgram() {
14246
14251
  const program = new Command();
14247
14252
  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.35.5",
3
+ "version": "0.35.7",
4
4
  "type": "module",
5
5
  "description": "CLI for codeharness — makes autonomous coding agents produce software that actually works",
6
6
  "bin": {