@odla-ai/harness 0.11.17 → 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.
@@ -7,7 +7,7 @@ import {
7
7
  createCodeRuntimeControlClient,
8
8
  createCodeRuntimeSessionSkillLoader,
9
9
  runCodeRuntimeHeartbeatLoop
10
- } from "./chunk-RDCU4PIP.js";
10
+ } from "./chunk-O47JCUGI.js";
11
11
  import "./chunk-6T26HEWI.js";
12
12
  import {
13
13
  assertPinnedImage,
package/dist/node.cjs CHANGED
@@ -1446,7 +1446,7 @@ var CodeRuntimeReconciler = class {
1446
1446
  };
1447
1447
 
1448
1448
  // src/code-runtime.ts
1449
- var CODE_RUNTIME_PROTOCOL_VERSION = 3;
1449
+ var CODE_RUNTIME_PROTOCOL_VERSION = 4;
1450
1450
  async function runCodeRuntimeHeartbeatLoop(options) {
1451
1451
  const heartbeatMs = options.heartbeatMs ?? 15e3;
1452
1452
  if (!Number.isSafeInteger(heartbeatMs) || heartbeatMs < 1e3 || heartbeatMs > 3e5) {
@@ -2334,13 +2334,13 @@ function codeCommandMetadata(payload, resume) {
2334
2334
  const title = payload.title;
2335
2335
  const prompt = payload.prompt;
2336
2336
  const maxTokensPerInteraction = payload.maxTokensPerInteraction ?? 32e3;
2337
- if (role !== "coding" && role !== "review" || typeof title !== "string" || typeof prompt !== "string") {
2337
+ if (role !== "coding" && role !== "review" && role !== "planning" || typeof title !== "string" || typeof prompt !== "string") {
2338
2338
  throw new TypeError(`invalid Code ${resume ? "resume" : "start"} metadata`);
2339
2339
  }
2340
2340
  if (payload.readOnly !== void 0 && typeof payload.readOnly !== "boolean") {
2341
2341
  throw new TypeError(`invalid Code ${resume ? "resume" : "start"} read-only capability`);
2342
2342
  }
2343
- const readOnly = role === "review" || payload.readOnly === true;
2343
+ const readOnly = role !== "coding" || payload.readOnly === true;
2344
2344
  const planning = trusted?.planningInputDigest;
2345
2345
  const attestation = trusted?.attestationDigest;
2346
2346
  const repository = trusted?.repository;
@@ -4435,7 +4435,7 @@ function createCodeRuntimeToolBroker(input, lease, role) {
4435
4435
  "sandbox.who_touches",
4436
4436
  "sandbox.run_recipe"
4437
4437
  ]);
4438
- 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" }) };
4438
+ 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" }) };
4439
4439
  }
4440
4440
 
4441
4441
  // src/code-runtime-events.ts