@tritard/waterbrother 0.8.1 → 0.8.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tritard/waterbrother",
3
- "version": "0.8.1",
3
+ "version": "0.8.3",
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/cli.js CHANGED
@@ -2888,9 +2888,9 @@ async function runUpdateCommand({ cwd, asJson = false }) {
2888
2888
 
2889
2889
  const inside = await runExecStep("git", ["rev-parse", "--is-inside-work-tree"], { cwd: installRoot });
2890
2890
  const isGitRepo = inside.ok && inside.stdout.trim() === "true";
2891
- steps.push(inside);
2892
2891
 
2893
2892
  if (isGitRepo) {
2893
+ steps.push(inside);
2894
2894
  const branch = await runExecStep("git", ["rev-parse", "--abbrev-ref", "HEAD"], { cwd: installRoot });
2895
2895
  steps.push(branch);
2896
2896
 
package/src/tools.js CHANGED
@@ -5,7 +5,7 @@ import crypto from "node:crypto";
5
5
  import { exec } from "node:child_process";
6
6
  import { promisify } from "node:util";
7
7
  import { normalizeAutonomyMode, normalizeExperienceMode } from "./modes.js";
8
- import { resolveSandboxPath } from "./path-utils.js";
8
+ import { expandHomePath, resolveSandboxPath } from "./path-utils.js";
9
9
  import { promptKeyChoice, promptLine } from "./prompt.js";
10
10
  import { McpManager } from "./mcp.js";
11
11
 
@@ -394,8 +394,8 @@ function globToRegExp(glob) {
394
394
  }
395
395
 
396
396
  function matchesPattern(value, pattern) {
397
- const normalizedValue = String(value || "").replace(/^\.\//, "");
398
- const normalizedPattern = String(pattern || "").replace(/^\.\//, "");
397
+ const normalizedValue = normalizePathPattern(value);
398
+ const normalizedPattern = normalizePathPattern(pattern);
399
399
  return globToRegExp(normalizedPattern).test(normalizedValue);
400
400
  }
401
401
 
@@ -409,7 +409,14 @@ function extractPatchPaths(patchText) {
409
409
  }
410
410
 
411
411
  function normalizePathList(values = []) {
412
- return uniqueStrings(values).map((item) => item.replace(/^\.\//, "").replace(/\\/g, "/"));
412
+ return uniqueStrings(values).map((item) => normalizePathPattern(item));
413
+ }
414
+
415
+ function normalizePathPattern(value) {
416
+ const raw = String(value || "").trim();
417
+ if (!raw) return "";
418
+ const expanded = expandHomePath(raw);
419
+ return String(expanded).replace(/^\.\//, "").replace(/\\/g, "/");
413
420
  }
414
421
 
415
422
  function looksLikeMutatingShellCommand(command) {