Local-first 🧠memory for Hermes Agent that lives in your Obsidian vault and remembers project context. Nightly 😴 dream passes turn repeat corrections into confirmed preferences with measurable confidence. Adapters ship for Claude Code, Codex, and OpenClaw, with an MCP server for anything else.
TypeScript
fix(windows): normalize vault path and resolve o2b command (#122)
Sergey Eroshenkovce5d56552fa1
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonindex 9cc29cdd..a8a85ed0 100644--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "open-second-brain",- "version": "1.23.0",+ "version": "1.23.1","description": "Plugin-first second brain package for AI agents and humans.","author": {"name": "Open Second Brain contributors"diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.jsonindex 48a021b5..7f32d806 100644--- a/.codex-plugin/plugin.json+++ b/.codex-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "open-second-brain",- "version": "1.23.0",+ "version": "1.23.1","description": "Plugin-first second brain package for Codex, Hermes, Claude Code, OpenClaw, and other agent runtimes.","skills": "./skills","hooks": "./hooks/hooks.json",diff --git a/CHANGELOG.md b/CHANGELOG.mdindex ce808161..18bccd7f 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).+## [1.23.1] - 2026-07-06++### Fixed++- **`o2b init` fails on native Windows** — `resolve()` produces backslash+ paths that `setConfigValue()` rejects via `CONFIG_VALUE_REJECTED_CHARS`.+ Vault path is now normalized to forward slashes before persisting; forward+ slashes work identically in Node/Bun fs APIs on Windows. (#119)+- **Hermes memory provider bridge fails on Windows** — `scripts/o2b` is a+ bash script that `subprocess.Popen` cannot execute directly (Windows+ delegates to `cmd.exe`, not a POSIX shell). Added `_resolve_command()`+ which detects the platform and falls back to `bun run <entry> mcp` when+ `o2b` is not available as a native executable.+## [1.23.0] - 2026-07-05Two optional precision layers that complete the retrieval-precision loopdiff --git a/openclaw.plugin.json b/openclaw.plugin.jsonindex 460c26a9..b6d916ef 100644--- a/openclaw.plugin.json+++ b/openclaw.plugin.json@@ -2,7 +2,7 @@"id": "open-second-brain","name": "Open Second Brain","description": "Second brain for AI agents using Obsidian-compatible Markdown vaults.",- "version": "1.23.0",+ "version": "1.23.1","activation": { "onStartup": true },"skills": ["./skills"],"contracts": {diff --git a/package.json b/package.jsonindex cf5bca88..ccef5e27 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "open-second-brain",- "version": "1.23.0",+ "version": "1.23.1","private": false,"description": "Second brain for AI agents using Obsidian-compatible Markdown vaults. Works with Hermes, Claude Code, Codex, and OpenClaw.","keywords": [diff --git a/plugin.yaml b/plugin.yamlindex 2715bf9a..4b312cc2 100644--- a/plugin.yaml+++ b/plugin.yaml@@ -1,5 +1,5 @@name: open-second-brain-version: "1.23.0"+version: "1.23.1"description: "Open Second Brain - native Hermes memory provider backed by an Obsidian-compatible Markdown vault."author: "Open Second Brain contributors"memory_provider: truediff --git a/plugins/codex/.codex-plugin/plugin.json b/plugins/codex/.codex-plugin/plugin.jsonindex ceeff3f5..421d0cf9 100644--- a/plugins/codex/.codex-plugin/plugin.json+++ b/plugins/codex/.codex-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "open-second-brain",- "version": "1.23.0",+ "version": "1.23.1","description": "Plugin-first second brain package for Codex, Hermes, Claude Code, OpenClaw, and other agent runtimes.","author": {"name": "Open Second Brain contributors",diff --git a/plugins/hermes/plugin.yaml b/plugins/hermes/plugin.yamlindex 2715bf9a..4b312cc2 100644--- a/plugins/hermes/plugin.yaml+++ b/plugins/hermes/plugin.yaml@@ -1,5 +1,5 @@name: open-second-brain-version: "1.23.0"+version: "1.23.1"description: "Open Second Brain - native Hermes memory provider backed by an Obsidian-compatible Markdown vault."author: "Open Second Brain contributors"memory_provider: truediff --git a/plugins/hermes/provider.py b/plugins/hermes/provider.pyindex 6fc05280..e47af4e5 100644--- a/plugins/hermes/provider.py+++ b/plugins/hermes/provider.py@@ -13,7 +13,9 @@ are added alongside.from __future__ import annotationsimport json+import osimport re+import shutilimport threadingfrom pathlib import Pathfrom typing import Any@@ -89,6 +91,7 @@ class OpenSecondBrainMemoryProvider(MemoryProvider):self._bridge = self._bridge_override or McpBrainBridge(vault=config.resolve_vault(),repo_root=self._repo_root(),+ command=self._resolve_command(),)try:self._bridge.start()@@ -104,6 +107,44 @@ class OpenSecondBrainMemoryProvider(MemoryProvider):root = Path(__file__).resolve().parents[2]return str(root) if (root / "skills").is_dir() else None+ @classmethod+ def _resolve_command(cls) -> tuple[str, ...]:+ """Determine the right argv prefix for the ``o2b mcp`` subprocess.++ On POSIX, ``scripts/o2b`` is a bash wrapper that ``install-cli`` may+ have symlinked into ``~/.local/bin``; ``shutil.which("o2b")`` finds it+ and ``Popen`` can execute it directly.++ On Windows, bash scripts are not directly executable by+ ``subprocess.Popen`` (it delegates to ``cmd.exe``, not a POSIX shell).+ Even if ``o2b`` were on PATH, Popen would fail with ``[WinError 193]``+ or ``[WinError 2]``. The correct cross-platform fallback is to invoke+ the TypeScript entry point through ``bun run``, which works identically+ on every OS.++ Resolution order:+ 1. POSIX + ``o2b`` in PATH → ``("o2b", "mcp")``+ 2. ``bun`` in PATH + repo root has ``src/cli/main.ts`` →+ ``("bun", "run", "<entry>", "mcp")``+ 3. Fallback → ``("o2b", "mcp")`` (will surface a clear Popen error)+ """+ # On non-Windows, a globally installed o2b works out of the box.+ if os.name != "nt" and shutil.which("o2b"):+ return ("o2b", "mcp")++ # Resolve via the repo-local TypeScript entry point + bun.+ root = cls._repo_root()+ if root:+ entry = Path(root) / "src" / "cli" / "main.ts"+ if entry.is_file():+ bun = shutil.which("bun")+ if bun:+ return (bun, "run", str(entry), "mcp")++ # Last resort: hope o2b is reachable (e.g. npm global install on+ # Windows created an o2b.cmd shim, or the user's shell can run it).+ return ("o2b", "mcp")+def get_tool_schemas(self) -> list[dict[str, Any]]:"""Return the memory-relevant subset of the server's advertised tools.diff --git a/pyproject.toml b/pyproject.tomlindex c2b430be..eac77904 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -10,7 +10,7 @@ build-backend = "setuptools.build_meta"# CLI entry points (those moved to `package.json` `bin`).[project]name = "open-second-brain"-version = "1.23.0"+version = "1.23.1"description = "Hermes Python shim for Open Second Brain. Most of the project (CLI, MCP server, OpenClaw plugin) is TypeScript on Bun; see package.json."readme = "README.md"requires-python = ">=3.11"diff --git a/src/cli/main.ts b/src/cli/main.tsindex 2effeac6..2bc830bf 100644--- a/src/cli/main.ts+++ b/src/cli/main.ts@@ -136,9 +136,10 @@ async function cmdInit(argv: string[]): Promise<number> {// a --vault flag.void flags["force"]; // accepted for backward CLI compat; unusedvoid flags["name"]; // accepted for backward CLI compat; unused+ const resolvedVault = resolve(vault).replace(/\\/g, "/");let configPath: string;try {- configPath = setConfigValue("vault", resolve(vault));+ configPath = setConfigValue("vault", resolvedVault);if (agentName) setConfigValue("agent_name", agentName);if (timezone) setConfigValue("timezone", timezone);} catch (exc) {@@ -147,7 +148,7 @@ async function cmdInit(argv: string[]): Promise<number> {);return 1;}- process.stdout.write(`initialized vault: ${resolve(vault)}\n`);+ process.stdout.write(`initialized vault: ${resolvedVault}\n`);process.stdout.write(`vault path persisted to: ${configPath}\n`);if (agentName) {process.stdout.write(`agent name registered: ${agentName}\n`);