codeharness 0.35.6 → 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.6" : "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-A6L3F4PG.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-A6L3F4PG.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,36 +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");
6049
- const firstIp = epicStories.find((s) => s.status === "in-progress");
6050
- const firstPending = epicStories.find((s) => s.status === "pending");
6051
- if (lastDone) ctx.push({ key: lastDone.key, role: "prev" });
6052
- if (firstIp) ctx.push({ key: firstIp.key, role: "current" });
6053
- else if (firstPending) ctx.push({ key: firstPending.key, role: "next" });
6054
- } else {
6055
- let foundCurrent = false;
6056
- let prevKey = null;
6057
- for (const s of updatedStories) {
6058
- if (s.key === currentStory) {
6059
- if (prevKey) ctx.push({ key: prevKey, role: "prev" });
6060
- ctx.push({ key: s.key, role: "current" });
6061
- foundCurrent = true;
6062
- } else if (foundCurrent && (s.status === "pending" || s.status === "in-progress")) {
6063
- ctx.push({ key: s.key, role: "next" });
6064
- break;
6065
- } else if (s.status === "done" || s.status === "in-progress") {
6066
- prevKey = s.key;
6067
- }
6068
- }
6069
- }
6070
- state.storyContext = ctx;
6073
+ recomputeStoryContext();
6071
6074
  rerender();
6072
6075
  }
6073
6076
  function addMessage(msg) {
@@ -11224,7 +11227,7 @@ function registerTeardownCommand(program) {
11224
11227
  } else if (otlpMode === "remote-routed") {
11225
11228
  if (!options.keepDocker) {
11226
11229
  try {
11227
- const { stopCollectorOnly: stopCollectorOnly2 } = await import("./docker-LXF5I54P.js");
11230
+ const { stopCollectorOnly: stopCollectorOnly2 } = await import("./docker-MXONF2RK.js");
11228
11231
  stopCollectorOnly2();
11229
11232
  result.docker.stopped = true;
11230
11233
  if (!isJson) {
@@ -11256,7 +11259,7 @@ function registerTeardownCommand(program) {
11256
11259
  info("Shared stack: kept running (other projects may use it)");
11257
11260
  }
11258
11261
  } else if (isLegacyStack) {
11259
- const { isStackRunning: isStackRunning2, stopStack } = await import("./docker-LXF5I54P.js");
11262
+ const { isStackRunning: isStackRunning2, stopStack } = await import("./docker-MXONF2RK.js");
11260
11263
  let stackRunning = false;
11261
11264
  try {
11262
11265
  stackRunning = isStackRunning2(composeFile);
@@ -14243,7 +14246,7 @@ function registerDriversCommand(program) {
14243
14246
  }
14244
14247
 
14245
14248
  // src/index.ts
14246
- var VERSION = true ? "0.35.6" : "0.0.0-dev";
14249
+ var VERSION = true ? "0.35.7" : "0.0.0-dev";
14247
14250
  function createProgram() {
14248
14251
  const program = new Command();
14249
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.6",
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": {