@odla-ai/harness 0.10.3 → 0.10.4

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-TMBYA5JX.js";
10
+ } from "./chunk-IV3VMKDV.js";
11
11
  import "./chunk-KXFI3WM2.js";
12
12
  import {
13
13
  assertPinnedImage,
package/dist/node.cjs CHANGED
@@ -66,6 +66,7 @@ __export(node_exports, {
66
66
  planReachCollisions: () => planReachCollisions,
67
67
  prepareRuntimeCheckpoint: () => prepareRuntimeCheckpoint,
68
68
  racedAttempt: () => racedAttempt,
69
+ readOnlyNotice: () => readOnlyNotice,
69
70
  recallAbout: () => recallAbout,
70
71
  registeredFiles: () => registeredFiles,
71
72
  renderMemories: () => renderMemories,
@@ -2831,6 +2832,10 @@ function codeSkill(opts) {
2831
2832
  }
2832
2833
 
2833
2834
  // src/code-agent.ts
2835
+ function readOnlyNotice(readOnly, recipes) {
2836
+ if (!readOnly) return "";
2837
+ return recipes ? "\n\nThis session is read-only: inspect and report; repository mutation is intentionally unavailable. The registered proof recipes are available through odla_run_recipe and must be run before any verdict." : "\n\nThis session is read-only. Inspect and report; repository mutation and recipe execution are intentionally unavailable.";
2838
+ }
2834
2839
  async function runCodeAgent(options) {
2835
2840
  const toolCalls = [];
2836
2841
  const surface = options.surface ?? "v1";
@@ -2840,6 +2845,7 @@ async function runCodeAgent(options) {
2840
2845
  workspaceDir: options.workspaceDir,
2841
2846
  surface,
2842
2847
  ...options.readOnly === void 0 ? {} : { readOnly: options.readOnly },
2848
+ ...options.recipes === void 0 ? {} : { recipes: options.recipes },
2843
2849
  ...options.recipeIds ? { recipeIds: options.recipeIds } : {},
2844
2850
  onToolCall: (call) => {
2845
2851
  toolCalls.push(call);
@@ -2852,7 +2858,7 @@ async function runCodeAgent(options) {
2852
2858
  {
2853
2859
  name: "odla-code",
2854
2860
  model: options.model,
2855
- system: options.system ?? `${SYSTEM_PROMPT_FOR[surface]}${options.readOnly ? "\n\nThis session is read-only. Inspect and report; repository mutation and recipe execution are intentionally unavailable." : ""}`,
2861
+ system: options.system ?? `${SYSTEM_PROMPT_FOR[surface]}${readOnlyNotice(options.readOnly, options.recipes)}`,
2856
2862
  skills: [skill, ...options.extraSkills ?? []],
2857
2863
  maxSteps: options.maxSteps ?? 24,
2858
2864
  maxTokens: options.maxTokens ?? 16384
@@ -4005,16 +4011,17 @@ function createCodeRuntimeToolBroker(input, lease, role) {
4005
4011
  readerId: `code-session:${lease.task.taskId}`,
4006
4012
  readOnlyPrefixes: [".odla-references"]
4007
4013
  });
4008
- const reviewReads = /* @__PURE__ */ new Set([
4014
+ const reviewTools = /* @__PURE__ */ new Set([
4009
4015
  "sandbox.read",
4010
4016
  "sandbox.list",
4011
4017
  "sandbox.search",
4012
4018
  "sandbox.overview",
4013
4019
  "sandbox.where_is",
4014
4020
  "sandbox.who_imports",
4015
- "sandbox.who_touches"
4021
+ "sandbox.who_touches",
4022
+ "sandbox.run_recipe"
4016
4023
  ]);
4017
- return role === "coding" ? broker : { execute: (context, request) => reviewReads.has(request.tool) ? broker.execute(context, request) : Promise.resolve({ requestId: request.requestId, ok: false, content: "review sessions are read-only" }) };
4024
+ 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" }) };
4018
4025
  }
4019
4026
 
4020
4027
  // src/code-memory.ts
@@ -5038,6 +5045,7 @@ async function installedDependencies(repoRoot) {
5038
5045
  planReachCollisions,
5039
5046
  prepareRuntimeCheckpoint,
5040
5047
  racedAttempt,
5048
+ readOnlyNotice,
5041
5049
  recallAbout,
5042
5050
  registeredFiles,
5043
5051
  renderMemories,