reasonix 0.12.13 → 0.12.15

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.
package/dist/index.d.ts CHANGED
@@ -3649,7 +3649,7 @@ interface ReasonixConfig {
3649
3649
  baseUrl?: string;
3650
3650
  /**
3651
3651
  * Default preset for `reasonix chat` / `reasonix run` when no flags override.
3652
- * Maps to model + harvest + branch combos (see presets.ts). Missing → "fast".
3652
+ * Maps to model + autoEscalate (see presets.ts). Missing → "auto".
3653
3653
  */
3654
3654
  preset?: PresetName;
3655
3655
  /**
package/dist/index.js CHANGED
@@ -2682,6 +2682,7 @@ var CacheFirstLoop = class {
2682
2682
  return;
2683
2683
  }
2684
2684
  }
2685
+ let workspaceSwitchPending = false;
2685
2686
  for (const call of repairedCalls) {
2686
2687
  const name = call.function?.name ?? "";
2687
2688
  const args = call.function?.arguments ?? "{}";
@@ -2704,7 +2705,11 @@ var CacheFirstLoop = class {
2704
2705
  });
2705
2706
  for (const w of hookWarnings(preReport.outcomes, this._turn)) yield w;
2706
2707
  let result;
2707
- if (preReport.blocked) {
2708
+ if (workspaceSwitchPending) {
2709
+ result = JSON.stringify({
2710
+ error: `${name}: deferred because change_workspace in the same batch is awaiting the user's approval. Re-issue this call on your next turn \u2014 the sandbox root may have changed.`
2711
+ });
2712
+ } else if (preReport.blocked) {
2708
2713
  const blocking = preReport.outcomes[preReport.outcomes.length - 1];
2709
2714
  const reason = (blocking?.stderr || blocking?.stdout || "blocked by PreToolUse hook").trim();
2710
2715
  result = `[hook block] ${blocking?.hook.command ?? "<unknown>"}
@@ -2714,6 +2719,9 @@ ${reason}`;
2714
2719
  signal,
2715
2720
  maxResultTokens: DEFAULT_MAX_RESULT_TOKENS
2716
2721
  });
2722
+ if (name === "change_workspace" && result.includes('"WorkspaceConfirmationError:')) {
2723
+ workspaceSwitchPending = true;
2724
+ }
2717
2725
  const postReport = await runHooks({
2718
2726
  hooks: this.hooks,
2719
2727
  payload: {