@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.
@@ -164,7 +164,7 @@ function createCodeRuntimeControlClient(options) {
164
164
  }
165
165
 
166
166
  // src/code-runtime.ts
167
- var CODE_RUNTIME_PROTOCOL_VERSION = 1;
167
+ var CODE_RUNTIME_PROTOCOL_VERSION = 2;
168
168
  async function runCodeRuntimeHeartbeatLoop(options) {
169
169
  const heartbeatMs = options.heartbeatMs ?? 15e3;
170
170
  if (!Number.isSafeInteger(heartbeatMs) || heartbeatMs < 1e3 || heartbeatMs > 3e5) {
@@ -1090,6 +1090,10 @@ function codeCommandMetadata(payload, resume) {
1090
1090
  if (role !== "coding" && role !== "review" || typeof title !== "string" || typeof prompt !== "string") {
1091
1091
  throw new TypeError(`invalid Code ${resume ? "resume" : "start"} metadata`);
1092
1092
  }
1093
+ if (payload.readOnly !== void 0 && typeof payload.readOnly !== "boolean") {
1094
+ throw new TypeError(`invalid Code ${resume ? "resume" : "start"} read-only capability`);
1095
+ }
1096
+ const readOnly = role === "review" || payload.readOnly === true;
1093
1097
  const planning = trusted?.planningInputDigest;
1094
1098
  const attestation = trusted?.attestationDigest;
1095
1099
  const repository = trusted?.repository;
@@ -1103,6 +1107,7 @@ function codeCommandMetadata(payload, resume) {
1103
1107
  }
1104
1108
  return {
1105
1109
  role,
1110
+ readOnly,
1106
1111
  title,
1107
1112
  prompt,
1108
1113
  maxTokensPerInteraction: Number(maxTokensPerInteraction),
@@ -2889,6 +2894,7 @@ var TheseusRuntimeEngine = class {
2889
2894
  acknowledged: false,
2890
2895
  startGate,
2891
2896
  role: metadata.role,
2897
+ readOnly: metadata.readOnly,
2892
2898
  title: metadata.title,
2893
2899
  maxTokensPerInteraction: metadata.maxTokensPerInteraction,
2894
2900
  baseCommitSha: metadata.baseCommitSha,
@@ -2945,6 +2951,7 @@ var TheseusRuntimeEngine = class {
2945
2951
  event: (event) => this.#event(command, event, active.conversationRefs).then(() => void 0, () => void 0),
2946
2952
  attempt: (prompt) => this.#runAttempt(command, {
2947
2953
  role: active.role,
2954
+ readOnly: active.readOnly,
2948
2955
  title: active.title,
2949
2956
  prompt,
2950
2957
  maxTokensPerInteraction: active.maxTokensPerInteraction,
@@ -2987,6 +2994,7 @@ var TheseusRuntimeEngine = class {
2987
2994
  await this.#takeOver(command, "prompt requires an active Code session");
2988
2995
  active.done = this.#runAttempt(command, {
2989
2996
  role: active.role,
2997
+ readOnly: active.readOnly,
2990
2998
  title: active.title,
2991
2999
  prompt,
2992
3000
  maxTokensPerInteraction: active.maxTokensPerInteraction,
@@ -3034,7 +3042,7 @@ var TheseusRuntimeEngine = class {
3034
3042
  workspaceDir: active.workspace.workspaceDir,
3035
3043
  prompt: metadata.prompt,
3036
3044
  signal: active.abort.signal,
3037
- readOnly: metadata.role === "review",
3045
+ readOnly: metadata.readOnly,
3038
3046
  recipeIds: this.options.recipes.map((recipe2) => recipe2.id),
3039
3047
  ...extraSkills.length ? { extraSkills } : {}
3040
3048
  });
@@ -3146,4 +3154,4 @@ export {
3146
3154
  runGoal,
3147
3155
  TheseusRuntimeEngine
3148
3156
  };
3149
- //# sourceMappingURL=chunk-XSUUHWNX.js.map
3157
+ //# sourceMappingURL=chunk-5MDYIJXC.js.map