codeharness 0.31.3 → 0.31.5

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.3" : "0.0.0-dev";
2898
+ var HARNESS_VERSION = true ? "0.31.5" : "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-A4ECRBVK.js";
19
+ } from "./chunk-3SUFGHUW.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-A4ECRBVK.js";
43
+ } from "./chunk-3SUFGHUW.js";
44
44
 
45
45
  // src/index.ts
46
46
  import { Command } from "commander";
@@ -5202,38 +5202,21 @@ function WorkflowGraph({ flow, currentTask, taskStates, taskMeta }) {
5202
5202
  /* @__PURE__ */ jsx2(TaskNode, { name: tn, status, spinnerFrame, driver }, `lt-${j}`)
5203
5203
  );
5204
5204
  }
5205
- const loopDone = loopBlock.loop.every((t) => (taskStates[`loop:${t}`] ?? taskStates[t]) === "done");
5206
- if (loopDone) {
5207
- let afterLoop = false;
5208
- for (const step of flow) {
5209
- if (afterLoop && typeof step === "string") {
5210
- elements2.push(/* @__PURE__ */ jsx2(Text2, { children: " \u2192 " }, `post-a-${step}`));
5211
- elements2.push(
5212
- /* @__PURE__ */ jsx2(TaskNode, { name: step, status: taskStates[step], spinnerFrame, driver: meta[step]?.driver }, `post-${step}`)
5213
- );
5214
- }
5215
- if (isLoopBlock2(step)) afterLoop = true;
5216
- }
5217
- }
5218
5205
  return /* @__PURE__ */ jsx2(Box2, { flexDirection: "column", children: /* @__PURE__ */ jsxs2(Text2, { children: [
5219
5206
  " ",
5220
5207
  elements2
5221
5208
  ] }) });
5222
5209
  }
5223
5210
  const elements = [];
5224
- let passedCurrent = false;
5225
5211
  for (const step of flow) {
5226
5212
  if (isLoopBlock2(step)) break;
5227
- if (typeof step === "string") {
5228
- if (elements.length > 0) {
5229
- elements.push(/* @__PURE__ */ jsx2(Text2, { children: " \u2192 " }, `a-${step}`));
5230
- }
5231
- elements.push(
5232
- /* @__PURE__ */ jsx2(TaskNode, { name: step, status: taskStates[step], spinnerFrame, driver: meta[step]?.driver }, `t-${step}`)
5233
- );
5234
- if (step === currentTask) passedCurrent = true;
5235
- if (passedCurrent && step !== currentTask) break;
5213
+ if (typeof step !== "string") continue;
5214
+ if (elements.length > 0) {
5215
+ elements.push(/* @__PURE__ */ jsx2(Text2, { children: " \u2192 " }, `a-${step}`));
5236
5216
  }
5217
+ elements.push(
5218
+ /* @__PURE__ */ jsx2(TaskNode, { name: step, status: taskStates[step], spinnerFrame, driver: meta[step]?.driver }, `t-${step}`)
5219
+ );
5237
5220
  }
5238
5221
  return /* @__PURE__ */ jsx2(Box2, { flexDirection: "column", children: /* @__PURE__ */ jsxs2(Text2, { children: [
5239
5222
  " ",
@@ -5678,8 +5661,9 @@ function startRenderer(options) {
5678
5661
  const onQuit = options?.onQuit;
5679
5662
  const inkInstance = inkRender(/* @__PURE__ */ jsx9(App, { state, onCycleLane: () => cycleLane(), onQuit: onQuit ? () => onQuit() : void 0 }), {
5680
5663
  exitOnCtrlC: false,
5681
- patchConsole: !options?._forceTTY,
5682
- maxFps: 15
5664
+ patchConsole: false,
5665
+ // Disable console patching to prevent flicker
5666
+ maxFps: 10
5683
5667
  });
5684
5668
  function rerender() {
5685
5669
  if (!cleaned) {
@@ -5689,7 +5673,7 @@ function startRenderer(options) {
5689
5673
  }
5690
5674
  const heartbeat = setInterval(() => {
5691
5675
  if (!cleaned) rerender();
5692
- }, 200);
5676
+ }, 500);
5693
5677
  function onSigint() {
5694
5678
  cleanupFull();
5695
5679
  }
@@ -5813,6 +5797,11 @@ function startRenderer(options) {
5813
5797
  }
5814
5798
  switch (event.type) {
5815
5799
  case "tool-start":
5800
+ if (state.lastThought) {
5801
+ const textEntry = { name: "", args: state.lastThought, isText: true };
5802
+ const updated = [...state.completedTools, textEntry];
5803
+ state.completedTools = updated.length > MAX_COMPLETED_TOOLS ? updated.slice(updated.length - MAX_COMPLETED_TOOLS) : updated;
5804
+ }
5816
5805
  promoteActiveTool(false);
5817
5806
  state.activeTool = { name: event.name };
5818
5807
  state.activeToolArgs = "";
@@ -6302,6 +6291,7 @@ function registerRunCommand(program) {
6302
6291
  else if (status === "failed") storyEntries.push({ key, status: "failed" });
6303
6292
  }
6304
6293
  renderer.updateStories(storyEntries);
6294
+ renderer.updateWorkflowState(parsedWorkflow.flow, null, { ...taskStates }, { ...taskMeta });
6305
6295
  const onEvent = (event) => {
6306
6296
  if (event.type === "stream-event" && event.streamEvent) {
6307
6297
  renderer.update(event.streamEvent, event.driverName);
@@ -11259,7 +11249,7 @@ function registerTeardownCommand(program) {
11259
11249
  } else if (otlpMode === "remote-routed") {
11260
11250
  if (!options.keepDocker) {
11261
11251
  try {
11262
- const { stopCollectorOnly: stopCollectorOnly2 } = await import("./docker-A35UFVYH.js");
11252
+ const { stopCollectorOnly: stopCollectorOnly2 } = await import("./docker-LGTPM2VD.js");
11263
11253
  stopCollectorOnly2();
11264
11254
  result.docker.stopped = true;
11265
11255
  if (!isJson) {
@@ -11291,7 +11281,7 @@ function registerTeardownCommand(program) {
11291
11281
  info("Shared stack: kept running (other projects may use it)");
11292
11282
  }
11293
11283
  } else if (isLegacyStack) {
11294
- const { isStackRunning: isStackRunning2, stopStack } = await import("./docker-A35UFVYH.js");
11284
+ const { isStackRunning: isStackRunning2, stopStack } = await import("./docker-LGTPM2VD.js");
11295
11285
  let stackRunning = false;
11296
11286
  try {
11297
11287
  stackRunning = isStackRunning2(composeFile);
@@ -14278,7 +14268,7 @@ function registerDriversCommand(program) {
14278
14268
  }
14279
14269
 
14280
14270
  // src/index.ts
14281
- var VERSION = true ? "0.31.3" : "0.0.0-dev";
14271
+ var VERSION = true ? "0.31.5" : "0.0.0-dev";
14282
14272
  function createProgram() {
14283
14273
  const program = new Command();
14284
14274
  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.31.3",
3
+ "version": "0.31.5",
4
4
  "type": "module",
5
5
  "description": "CLI for codeharness — makes autonomous coding agents produce software that actually works",
6
6
  "bin": {