@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.
@@ -1978,6 +1978,10 @@ import {
1978
1978
  keepRecentExchanges,
1979
1979
  runAgent
1980
1980
  } from "@odla-ai/ai";
1981
+ function readOnlyNotice(readOnly, recipes) {
1982
+ if (!readOnly) return "";
1983
+ 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.";
1984
+ }
1981
1985
  async function runCodeAgent(options) {
1982
1986
  const toolCalls = [];
1983
1987
  const surface = options.surface ?? "v1";
@@ -1987,6 +1991,7 @@ async function runCodeAgent(options) {
1987
1991
  workspaceDir: options.workspaceDir,
1988
1992
  surface,
1989
1993
  ...options.readOnly === void 0 ? {} : { readOnly: options.readOnly },
1994
+ ...options.recipes === void 0 ? {} : { recipes: options.recipes },
1990
1995
  ...options.recipeIds ? { recipeIds: options.recipeIds } : {},
1991
1996
  onToolCall: (call) => {
1992
1997
  toolCalls.push(call);
@@ -1999,7 +2004,7 @@ async function runCodeAgent(options) {
1999
2004
  {
2000
2005
  name: "odla-code",
2001
2006
  model: options.model,
2002
- 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." : ""}`,
2007
+ system: options.system ?? `${SYSTEM_PROMPT_FOR[surface]}${readOnlyNotice(options.readOnly, options.recipes)}`,
2003
2008
  skills: [skill, ...options.extraSkills ?? []],
2004
2009
  maxSteps: options.maxSteps ?? 24,
2005
2010
  maxTokens: options.maxTokens ?? 16384
@@ -3154,16 +3159,17 @@ function createCodeRuntimeToolBroker(input, lease, role) {
3154
3159
  readerId: `code-session:${lease.task.taskId}`,
3155
3160
  readOnlyPrefixes: [".odla-references"]
3156
3161
  });
3157
- const reviewReads = /* @__PURE__ */ new Set([
3162
+ const reviewTools = /* @__PURE__ */ new Set([
3158
3163
  "sandbox.read",
3159
3164
  "sandbox.list",
3160
3165
  "sandbox.search",
3161
3166
  "sandbox.overview",
3162
3167
  "sandbox.where_is",
3163
3168
  "sandbox.who_imports",
3164
- "sandbox.who_touches"
3169
+ "sandbox.who_touches",
3170
+ "sandbox.run_recipe"
3165
3171
  ]);
3166
- 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" }) };
3172
+ 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" }) };
3167
3173
  }
3168
3174
 
3169
3175
  // src/code-runtime-goal.ts
@@ -3720,6 +3726,7 @@ export {
3720
3726
  V3_SYSTEM_PROMPT,
3721
3727
  SYSTEM_PROMPT_FOR,
3722
3728
  codeSkill,
3729
+ readOnlyNotice,
3723
3730
  runCodeAgent,
3724
3731
  runCodeAgentAttempt,
3725
3732
  createCodeRuntimeSessionSkillLoader,
@@ -3735,4 +3742,4 @@ export {
3735
3742
  runGoal,
3736
3743
  TheseusRuntimeEngine
3737
3744
  };
3738
- //# sourceMappingURL=chunk-TMBYA5JX.js.map
3745
+ //# sourceMappingURL=chunk-IV3VMKDV.js.map