@tritard/waterbrother 0.16.0 → 0.16.1

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/tools.js +7 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tritard/waterbrother",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "description": "Waterbrother: bring-your-own-model coding CLI with local tools, sessions, operator modes, and approval controls",
5
5
  "type": "module",
6
6
  "bin": {
package/src/tools.js CHANGED
@@ -1340,6 +1340,13 @@ ${clipped}`;
1340
1340
  const { classifyToolCall } = await import("./security.js");
1341
1341
  const classification = classifyToolCall(toolName, args, { cwd });
1342
1342
  if (!classification.allowed) {
1343
+ // Visible warning to user — don't fail silently
1344
+ const reason = classification.reasons[0];
1345
+ if (reason?.rule === "home-dir-write") {
1346
+ output.write(`\n⚠ Can't write files here — you're in your home directory.\n Create a project folder first: mkdir my-project && cd my-project\n\n`);
1347
+ } else {
1348
+ output.write(`\n⚠ Blocked: ${classification.message}\n\n`);
1349
+ }
1343
1350
  return { approved: false, note: `Security: ${classification.message}`, policyBlocked: true };
1344
1351
  }
1345
1352
  } catch {}