@odla-ai/harness 0.11.16 → 0.11.18

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.
@@ -523,7 +523,7 @@ var CodeRuntimeReconciler = class {
523
523
  };
524
524
 
525
525
  // src/code-runtime.ts
526
- var CODE_RUNTIME_PROTOCOL_VERSION = 3;
526
+ var CODE_RUNTIME_PROTOCOL_VERSION = 4;
527
527
  async function runCodeRuntimeHeartbeatLoop(options) {
528
528
  const heartbeatMs = options.heartbeatMs ?? 15e3;
529
529
  if (!Number.isSafeInteger(heartbeatMs) || heartbeatMs < 1e3 || heartbeatMs > 3e5) {
@@ -1622,8 +1622,8 @@ function describeGateFailure(evidence) {
1622
1622
  const output = `${log?.stdout ?? ""}
1623
1623
  ${log?.stderr ?? ""}`.trim();
1624
1624
  const named = describeTapFailures(output);
1625
- return `${recipe2.recipeId}=${recipe2.status}${named ? `
1626
- ${named}` : ""}${output ? `
1625
+ return `${named ? `${named}
1626
+ ` : ""}${recipe2.recipeId}=${recipe2.status}${output ? `
1627
1627
  ${gateOutput(output)}` : ""}`;
1628
1628
  }).join("\n\n");
1629
1629
  return `Clean verification failed. Fix this and checkpoint again:
@@ -1685,13 +1685,13 @@ function codeCommandMetadata(payload, resume) {
1685
1685
  const title = payload.title;
1686
1686
  const prompt = payload.prompt;
1687
1687
  const maxTokensPerInteraction = payload.maxTokensPerInteraction ?? 32e3;
1688
- if (role !== "coding" && role !== "review" || typeof title !== "string" || typeof prompt !== "string") {
1688
+ if (role !== "coding" && role !== "review" && role !== "planning" || typeof title !== "string" || typeof prompt !== "string") {
1689
1689
  throw new TypeError(`invalid Code ${resume ? "resume" : "start"} metadata`);
1690
1690
  }
1691
1691
  if (payload.readOnly !== void 0 && typeof payload.readOnly !== "boolean") {
1692
1692
  throw new TypeError(`invalid Code ${resume ? "resume" : "start"} read-only capability`);
1693
1693
  }
1694
- const readOnly = role === "review" || payload.readOnly === true;
1694
+ const readOnly = role !== "coding" || payload.readOnly === true;
1695
1695
  const planning = trusted?.planningInputDigest;
1696
1696
  const attestation = trusted?.attestationDigest;
1697
1697
  const repository = trusted?.repository;
@@ -3786,7 +3786,7 @@ function createCodeRuntimeToolBroker(input, lease, role) {
3786
3786
  "sandbox.who_touches",
3787
3787
  "sandbox.run_recipe"
3788
3788
  ]);
3789
- return role === "coding" ? broker : { execute: (context, request) => reviewTools.has(request.tool) ? broker.execute(context, request) : Promise.resolve({ requestId: request.requestId, ok: false, content: "review sessions are read-only" }) };
3789
+ return role !== "review" ? broker : { execute: (context, request) => reviewTools.has(request.tool) ? broker.execute(context, request) : Promise.resolve({ requestId: request.requestId, ok: false, content: "review sessions are read-only" }) };
3790
3790
  }
3791
3791
 
3792
3792
  // src/code-runtime-events.ts