@tritard/waterbrother 0.8.11 → 0.8.13

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/agent.js +4 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tritard/waterbrother",
3
- "version": "0.8.11",
3
+ "version": "0.8.13",
4
4
  "description": "Waterbrother: Grok-powered coding CLI with local tools, sessions, operator modes, and approval controls",
5
5
  "type": "module",
6
6
  "bin": {
package/src/agent.js CHANGED
@@ -472,7 +472,11 @@ export class Agent {
472
472
 
473
473
  async runTurn(userInput, handlers = {}) {
474
474
  const startLength = this.messages.length;
475
+ const preservedReadOnlyRoots = this.toolRuntime.getReadOnlyRoots ? this.toolRuntime.getReadOnlyRoots() : [];
476
+ const preservedWriteRoots = this.toolRuntime.getWriteRoots ? this.toolRuntime.getWriteRoots() : [];
475
477
  this.toolRuntime.beginTurn?.();
478
+ if (this.toolRuntime.setReadOnlyRoots) this.toolRuntime.setReadOnlyRoots(preservedReadOnlyRoots);
479
+ if (this.toolRuntime.setWriteRoots) this.toolRuntime.setWriteRoots(preservedWriteRoots);
476
480
 
477
481
  if (typeof userInput === "string") {
478
482
  this.messages.push({ role: "user", content: userInput });