Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
fix(api): remove home-directory restriction from directory browser
cyhhao5cff90e3ccc8
diff --git a/vibe/api.py b/vibe/api.pyindex e3755fd08..495fc7b5b 100644--- a/vibe/api.py+++ b/vibe/api.py@@ -29,27 +29,19 @@ _OPENCODE_OPTIONS_TTL_SECONDS = 30.0def browse_directory(path: str) -> dict:"""List sub-directories of *path* for the directory browser UI.- Restricted to the user's home directory tree. Symlinks are not- followed when scanning entries, preventing escape via crafted links.+ Symlinks are not followed when scanning entries.Returns ``{"ok": True, "path": <abs>, "parent": <abs|None>, "dirs": [...]}``where each entry in *dirs* is ``{"name": ..., "path": ...}``."""try:- home = Path.home().resolve()target = Path(os.path.expanduser(path or "~")).resolve()- # Restrict browsing to within the user's home directory- try:- target.relative_to(home)- except ValueError:- return {"ok": False, "error": "path_out_of_scope"}-if not target.is_dir():return {"ok": False, "error": f"Not a directory: {target}"}abs_path = str(target)- parent = str(target.parent) if target != home else None+ parent = str(target.parent) if target.parent != target else Noneentries: list[dict[str, str]] = []try: