harnessed 4.32.9 → 4.32.11

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.
package/dist/cli.mjs CHANGED
@@ -38,7 +38,7 @@ var init_package = __esm({
38
38
  "package.json"() {
39
39
  package_default = {
40
40
  name: "harnessed",
41
- version: "4.32.9",
41
+ version: "4.32.11",
42
42
  description: "AI coding harness package manager + composition orchestrator",
43
43
  type: "module",
44
44
  license: "Apache-2.0",
@@ -3733,14 +3733,18 @@ var init_fallbackHandlers = __esm({
3733
3733
 
3734
3734
  // src/workflow/lib/ralphLoop.ts
3735
3735
  function isComplete(output) {
3736
+ let env;
3736
3737
  try {
3737
- const env = JSON.parse(output);
3738
- if (env.subtype === "success" && env.structured_output?.status === "COMPLETE") return true;
3739
- if (extractPromise(env.text ?? env.result ?? "") === "COMPLETE") return true;
3740
- return false;
3738
+ env = JSON.parse(output);
3741
3739
  } catch {
3742
3740
  return extractPromise(output) === "COMPLETE";
3743
3741
  }
3742
+ const succeeded = env.subtype === "success";
3743
+ const status = env.structured_output?.status;
3744
+ if (status === "COMPLETE") return succeeded;
3745
+ if (status === "PARTIAL" || status === "BLOCKED") return false;
3746
+ if (succeeded) return true;
3747
+ return extractPromise(env.text ?? env.result ?? "") === "COMPLETE";
3744
3748
  }
3745
3749
  async function ralphLoopWrap(spawn6, maxIter) {
3746
3750
  let last = "";
@@ -3777,7 +3781,7 @@ var init_completionSchema = __esm({
3777
3781
  type: "object",
3778
3782
  properties: {
3779
3783
  status: { type: "string", enum: ["COMPLETE", "PARTIAL", "BLOCKED"] },
3780
- phase: { type: "string", enum: ["01-clarify", "02-code", "03-test", "04-deliver"] },
3784
+ phase: { type: "string" },
3781
3785
  summary: { type: "string" },
3782
3786
  blockers: { type: "array", items: { type: "string" } },
3783
3787
  // v3.5.0 Phase 2 — Option 1-Lite signal-driven Agent Teams escalation.
@@ -3788,7 +3792,7 @@ var init_completionSchema = __esm({
3788
3792
  needs_teams_escalation: { type: "boolean" },
3789
3793
  escalation_reason: { type: "string" }
3790
3794
  },
3791
- required: ["status", "phase"]
3795
+ required: ["status"]
3792
3796
  };
3793
3797
  }
3794
3798
  });
@@ -4450,7 +4454,7 @@ This applies to: strategic-layer review skip / phase-layer clarification skip /
4450
4454
  };
4451
4455
  }
4452
4456
  const env = JSON.parse(envelopeJson);
4453
- const status = env.structured_output?.status === "COMPLETE" || env.subtype === "success" ? "ok" : "fail";
4457
+ const status = isComplete(envelopeJson) ? "ok" : "fail";
4454
4458
  const escalation = env.structured_output?.needs_teams_escalation === true;
4455
4459
  return {
4456
4460
  status,