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(skills): discover Skills on Windows despite zero DirEntry identities (#2270)
Maxf1e20d49fc16
diff --git a/core/managed_skills.py b/core/managed_skills.pyindex 5a529313c..dcf9d9504 100644--- a/core/managed_skills.py+++ b/core/managed_skills.py@@ -639,7 +639,9 @@ def _root_children(if entry.name in ignored_names:continuetry:- entry_stat = entry.stat(follow_symlinks=False)+ # DirEntry.stat() reports st_dev/st_ino as zero on Windows;+ # identity checks downstream need the path's real stat.+ entry_stat = os.stat(entry.path, follow_symlinks=False)except OSError:continuechildren.append((entry.name, Path(entry.path), entry_stat))diff --git a/desktop/scripts/build-runtime-bundle.py b/desktop/scripts/build-runtime-bundle.pyindex 454fec10a..7c3c2e9e1 100755--- a/desktop/scripts/build-runtime-bundle.py+++ b/desktop/scripts/build-runtime-bundle.py@@ -651,7 +651,13 @@ def _verify_payload_with_home(if target_config["os"] == "windows"else ["/bin/zsh", "-lc", shlex.join(["vibe", *args])])- return subprocess.run(shell_command, cwd=agent_cwd, env=env, check=True, capture_output=True, text=True)+ result = subprocess.run(shell_command, cwd=agent_cwd, env=env, check=False, capture_output=True, text=True)+ if result.returncode != 0:+ raise SystemExit(+ f"Bundled CLI {shlex.join(args)} exited {result.returncode}\n"+ f"--- stdout ---\n{result.stdout}\n--- stderr ---\n{result.stderr}"+ )+ return resultfor skill in ("use-avibe", "use-avibe-vault"):loaded = agent_cli("skill", "load", "--", skill)diff --git a/tests/test_managed_skills.py b/tests/test_managed_skills.pyindex 7ff6168c2..1b6830420 100644--- a/tests/test_managed_skills.py+++ b/tests/test_managed_skills.py@@ -793,6 +793,44 @@ def test_non_utf8_resolved_directory_is_not_advertised(assert load_skill("raw", cwd) is None+def test_discovery_ignores_zero_directory_entry_identities(tmp_path: Path, monkeypatch) -> None:+ """Windows DirEntry.stat() reports st_dev/st_ino as zero; discovery must still work."""++ _, cwd = _isolate_live_commands(monkeypatch, tmp_path)+ root = cwd / ".agents" / "skills"+ _write_skill(root, "alpha", "alpha", "Alpha")+ _write_skill(root, "beta", "beta", "Beta")+ real_scandir = os.scandir++ class _WindowsLikeEntry:+ def __init__(self, entry: os.DirEntry) -> None:+ self.name = entry.name+ self.path = entry.path+ self._entry = entry++ def stat(self, *, follow_symlinks: bool = True) -> os.stat_result:+ values = list(self._entry.stat(follow_symlinks=follow_symlinks))+ values[1] = 0 # st_ino+ values[2] = 0 # st_dev+ return os.stat_result(values)++ class _WindowsLikeScandir:+ def __init__(self, path) -> None:+ self._iterator = real_scandir(path)++ def __enter__(self):+ return (_WindowsLikeEntry(entry) for entry in self._iterator)++ def __exit__(self, *exc_info) -> None:+ self._iterator.close()++ monkeypatch.setattr(managed_skills.os, "scandir", _WindowsLikeScandir)++ assert [skill.name for skill in resolve_skills(cwd)] == ["alpha", "beta"]+ loaded = load_skill("beta", cwd)+ assert loaded is not None and loaded.body == "Body\n"++def test_load_escapes_directory_attribute_controls(tmp_path: Path, monkeypatch) -> None:_, cwd = _isolate_live_commands(monkeypatch, tmp_path)working_directory = cwd / 'line\nbreak"&'