Skip to content

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): resolve 3 compatibility issues on Windows (#123)

Chittos998e437fcb28
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 18bccd7f..de2bca27 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
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.
+- **`detectTooling()` fails to find tools on Windows** — PATH was split on
+ `:` only (POSIX); now uses `;` on Windows. Executable probing now honours
+ `PATHEXT` (`.exe`, `.cmd`, `.bat`, `.com`) instead of hardcoding `.exe`.
+- **MCP `inputSchema` not recognized by Hermes adapters (all platforms)** —
+ Hermes adapters (Anthropic, OpenAI, Bedrock) expect tool schemas under
+ `parameters`, but MCP serves them as `inputSchema`. Without this remap
+ brain tools had no visible arguments on any OS. Both live and static
+ fallback schemas now remap `inputSchema` → `parameters` at the provider
+ boundary.
## [1.23.0] - 2026-07-05
diff --git a/plugins/hermes/_schemas.py b/plugins/hermes/_schemas.py
index 8536eb5b..be7f5432 100644
--- a/plugins/hermes/_schemas.py
+++ b/plugins/hermes/_schemas.py
@@ -458,5 +458,13 @@ STATIC_TOOL_SCHEMAS: tuple[dict[str, Any], ...] = (
def static_tool_schemas() -> list[dict[str, Any]]:
- """Deep copies of the vendored schemas; callers may mutate freely."""
- return [copy.deepcopy(schema) for schema in STATIC_TOOL_SCHEMAS]
+ """Deep copies of the vendored schemas; callers may mutate freely.
+
+ Converts MCP ``inputSchema`` to ``parameters`` so Hermes adapters
+ (Anthropic, OpenAI, Bedrock) can see the tool's expected arguments.
+ """
+ schemas = [copy.deepcopy(schema) for schema in STATIC_TOOL_SCHEMAS]
+ for s in schemas:
+ if "inputSchema" in s and "parameters" not in s:
+ s["parameters"] = s.pop("inputSchema")
+ return schemas
diff --git a/plugins/hermes/provider.py b/plugins/hermes/provider.py
index e47af4e5..fc7dd6e6 100644
--- a/plugins/hermes/provider.py
+++ b/plugins/hermes/provider.py
@@ -160,7 +160,16 @@ class OpenSecondBrainMemoryProvider(MemoryProvider):
tools = self._bridge.list_tools()
except Exception: # noqa: BLE001 - static fallback rather than a crash
return static_tool_schemas()
- return [t for t in tools if t.get("name") in MEMORY_TOOLS]
+ filtered = []
+ for t in tools:
+ if t.get("name") not in MEMORY_TOOLS:
+ continue
+ # MCP uses "inputSchema"; Hermes adapters expect "parameters"
+ if "inputSchema" in t and "parameters" not in t:
+ t = dict(t)
+ t["parameters"] = t.pop("inputSchema")
+ filtered.append(t)
+ return filtered
def handle_tool_call(self, tool_name: str, args: dict[str, Any], **_kwargs: Any) -> str:
"""Forward an agent tool invocation to the TS core over the bridge.
diff --git a/src/core/brain/snapshot.ts b/src/core/brain/snapshot.ts
index dd705b15..1a9c5d80 100644
--- a/src/core/brain/snapshot.ts
+++ b/src/core/brain/snapshot.ts
@@ -133,10 +133,17 @@ interface ToolAvailability {
*/
function detectTooling(): ToolAvailability {
const pathEnv = process.env["PATH"] ?? "";
- const dirs = pathEnv.split(":").filter((d) => d.length > 0);
+ const dirs = pathEnv.split(process.platform === "win32" ? ";" : ":").filter((d) => d.length > 0);
+ const winExts =
+ process.platform === "win32"
+ ? (process.env["PATHEXT"] ?? ".COM;.EXE;.BAT;.CMD").split(";")
+ : [];
const probe = (cmd: string): boolean => {
for (const d of dirs) {
if (existsSync(join(d, cmd))) return true;
+ for (const ext of winExts) {
+ if (existsSync(join(d, cmd + ext.toLowerCase()))) return true;
+ }
}
return false;
};
diff --git a/tests/python/test_memory_provider.py b/tests/python/test_memory_provider.py
index 33abc694..88c2d997 100644
--- a/tests/python/test_memory_provider.py
+++ b/tests/python/test_memory_provider.py
@@ -293,7 +293,8 @@ class ProviderStaticSchemaFallbackTests(unittest.TestCase):
self.assertEqual({s["name"] for s in schemas}, set(MEMORY_TOOLS))
for schema in schemas:
self.assertTrue(schema["description"])
- self.assertEqual(schema["inputSchema"].get("type"), "object")
+ # static_tool_schemas() remaps inputSchema -> parameters
+ self.assertEqual(schema["parameters"].get("type"), "object")
def test_get_tool_schemas_after_initialize_keeps_name_set(self):
bridge = FakeBrainBridge(tools=self._curated_live_tools())
diff --git a/tests/python/test_static_schemas.py b/tests/python/test_static_schemas.py
index c3b3853a..6ced3348 100644
--- a/tests/python/test_static_schemas.py
+++ b/tests/python/test_static_schemas.py
@@ -51,11 +51,12 @@ class StaticSchemaIntegrityTests(unittest.TestCase):
def test_accessor_returns_deep_copies(self):
first = static_tool_schemas()
- first[0]["inputSchema"]["properties"]["__mutated__"] = True
+ # static_tool_schemas() remaps inputSchema -> parameters
+ first[0]["parameters"]["properties"]["__mutated__"] = True
first[0]["name"] = "mutated"
second = static_tool_schemas()
self.assertNotEqual(second[0]["name"], "mutated")
- self.assertNotIn("__mutated__", second[0]["inputSchema"]["properties"])
+ self.assertNotIn("__mutated__", second[0]["parameters"]["properties"])
def _live_memory_tool_projection() -> list[dict]: