@odla-ai/harness 0.9.4 → 0.10.0

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-XSUUHWNX.js";
10
+ } from "./chunk-5MDYIJXC.js";
11
11
  import "./chunk-FAN2R3GW.js";
12
12
  import {
13
13
  assertPinnedImage,
package/dist/node.cjs CHANGED
@@ -1217,7 +1217,7 @@ function createCodeRuntimeControlClient(options) {
1217
1217
  }
1218
1218
 
1219
1219
  // src/code-runtime.ts
1220
- var CODE_RUNTIME_PROTOCOL_VERSION = 1;
1220
+ var CODE_RUNTIME_PROTOCOL_VERSION = 2;
1221
1221
  async function runCodeRuntimeHeartbeatLoop(options) {
1222
1222
  const heartbeatMs = options.heartbeatMs ?? 15e3;
1223
1223
  if (!Number.isSafeInteger(heartbeatMs) || heartbeatMs < 1e3 || heartbeatMs > 3e5) {
@@ -1940,6 +1940,10 @@ function codeCommandMetadata(payload, resume) {
1940
1940
  if (role !== "coding" && role !== "review" || typeof title !== "string" || typeof prompt !== "string") {
1941
1941
  throw new TypeError(`invalid Code ${resume ? "resume" : "start"} metadata`);
1942
1942
  }
1943
+ if (payload.readOnly !== void 0 && typeof payload.readOnly !== "boolean") {
1944
+ throw new TypeError(`invalid Code ${resume ? "resume" : "start"} read-only capability`);
1945
+ }
1946
+ const readOnly = role === "review" || payload.readOnly === true;
1943
1947
  const planning = trusted?.planningInputDigest;
1944
1948
  const attestation = trusted?.attestationDigest;
1945
1949
  const repository = trusted?.repository;
@@ -1953,6 +1957,7 @@ function codeCommandMetadata(payload, resume) {
1953
1957
  }
1954
1958
  return {
1955
1959
  role,
1960
+ readOnly,
1956
1961
  title,
1957
1962
  prompt,
1958
1963
  maxTokensPerInteraction: Number(maxTokensPerInteraction),
@@ -3885,6 +3890,7 @@ var TheseusRuntimeEngine = class {
3885
3890
  acknowledged: false,
3886
3891
  startGate,
3887
3892
  role: metadata.role,
3893
+ readOnly: metadata.readOnly,
3888
3894
  title: metadata.title,
3889
3895
  maxTokensPerInteraction: metadata.maxTokensPerInteraction,
3890
3896
  baseCommitSha: metadata.baseCommitSha,
@@ -3941,6 +3947,7 @@ var TheseusRuntimeEngine = class {
3941
3947
  event: (event) => this.#event(command, event, active.conversationRefs).then(() => void 0, () => void 0),
3942
3948
  attempt: (prompt) => this.#runAttempt(command, {
3943
3949
  role: active.role,
3950
+ readOnly: active.readOnly,
3944
3951
  title: active.title,
3945
3952
  prompt,
3946
3953
  maxTokensPerInteraction: active.maxTokensPerInteraction,
@@ -3983,6 +3990,7 @@ var TheseusRuntimeEngine = class {
3983
3990
  await this.#takeOver(command, "prompt requires an active Code session");
3984
3991
  active.done = this.#runAttempt(command, {
3985
3992
  role: active.role,
3993
+ readOnly: active.readOnly,
3986
3994
  title: active.title,
3987
3995
  prompt,
3988
3996
  maxTokensPerInteraction: active.maxTokensPerInteraction,
@@ -4030,7 +4038,7 @@ var TheseusRuntimeEngine = class {
4030
4038
  workspaceDir: active.workspace.workspaceDir,
4031
4039
  prompt: metadata.prompt,
4032
4040
  signal: active.abort.signal,
4033
- readOnly: metadata.role === "review",
4041
+ readOnly: metadata.readOnly,
4034
4042
  recipeIds: this.options.recipes.map((recipe2) => recipe2.id),
4035
4043
  ...extraSkills.length ? { extraSkills } : {}
4036
4044
  });