The spoken permission ask is meant to describe a vault edit in plain words ("I want to edit a note in your vault called Recipes"). On Windows it never does; every vault edit is spoken as "edit a file called Recipes.md". The gate still fires, so this is the plain-words layer failing, not a bypass, but the plain-words layer is the whole point of that design.
Observed on: 84b3a6c, Windows 11, Python 3.12.10, extra_dirs set to a vault path with backslashes (C:\Users\...\MyJarvisVault).
What happens
_human_what() in backtalk/main.py normalises the tool's file path to forward slashes at line 153-154, then at line 159 tests it against each extra_dirs entry with path.startswith(str(h).rstrip("/") + "/"). The entries are never normalised, so on Windows h still holds backslashes, the prefix never matches, and in_vault is always False. The name.endswith(".md") branch at line 162 is unreachable on this platform.
Reproduction
from backtalk.main import _human_what
print(_human_what("Edit", {"file_path": r"C:\Users\me\MyVault\Recipes.md"}, None))
# with extra_dirs = ["C:\\Users\\me\\MyVault"] in backtalk.json:
# actual: edit a file called Recipes.md
# expected: edit a note in your vault called Recipes
Writing the entry with forward slashes in the JSON ("C:/Users/me/MyVault") happens to work, because it then matches the normalised path; the backslash form, which is what every Windows tool hands you, does not. config._expand() only expands ~ and does not normalise separators, so the config layer does not save it either.
Fix
Normalise the entry the same way the path was normalised, one line at main.py:159:
in_vault = any(h and path.startswith(str(h).replace("\\", "/").rstrip("/") + "/")
for h in (CFG.get("extra_dirs") or []))
Checked here: with that change the same call returns the vault wording. Two small cleanups in the same function if you want them while you are there: homes (line 157-158) is built and never used, and import os as _os (line 156) is unused.
The spoken permission ask is meant to describe a vault edit in plain words ("I want to edit a note in your vault called Recipes"). On Windows it never does; every vault edit is spoken as "edit a file called Recipes.md". The gate still fires, so this is the plain-words layer failing, not a bypass, but the plain-words layer is the whole point of that design.
Observed on:
84b3a6c, Windows 11, Python 3.12.10,extra_dirsset to a vault path with backslashes (C:\Users\...\MyJarvisVault).What happens
_human_what()inbacktalk/main.pynormalises the tool's file path to forward slashes at line 153-154, then at line 159 tests it against eachextra_dirsentry withpath.startswith(str(h).rstrip("/") + "/"). The entries are never normalised, so on Windowshstill holds backslashes, the prefix never matches, andin_vaultis always False. Thename.endswith(".md")branch at line 162 is unreachable on this platform.Reproduction
Writing the entry with forward slashes in the JSON (
"C:/Users/me/MyVault") happens to work, because it then matches the normalised path; the backslash form, which is what every Windows tool hands you, does not.config._expand()only expands~and does not normalise separators, so the config layer does not save it either.Fix
Normalise the entry the same way the path was normalised, one line at
main.py:159:Checked here: with that change the same call returns the vault wording. Two small cleanups in the same function if you want them while you are there:
homes(line 157-158) is built and never used, andimport os as _os(line 156) is unused.