You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Address Codex review: PluginManager reach-in + bm-recent list shape
Two fixes for the issues raised on PR #3.
P1 — ctx.register_command and ctx.register_skill silently no-op in real
Hermes installs. Memory-provider plugins are loaded through a stripped-
down _ProviderCollector (plugins/memory/__init__.py) that captures only
register_memory_provider; other registration methods are not delegated
to PluginManager. The bundled SKILL.md has been hitting this same path
since 0.1.5 — the call ran but the entry never landed.
Workaround: write directly to PluginManager._plugin_commands and
_plugin_skills from inside register(). Mirror the exact entry shape,
name normalization, and built-in-conflict guard from
PluginContext.register_command (plugins.py:401-453) and
register_skill (plugins.py:622-665). When the upstream collector is
patched, ctx.register_command/register_skill will write identical
entries — the reach-in becomes a redundant idempotent overwrite.
Recursion is safe: PluginManager.discover_and_load is idempotent
(plugins.py:699) and explicitly skips memory-provider plugins at the
manifest-routing stage (plugins.py:792-802), so calling
_ensure_plugins_discovered() from inside register() cannot re-enter.
New tests in tests/test_commands.py use a _ProviderCollector-shaped
ctx (no register_command attribute) and assert the reach-in actually
populates the fake PluginManager. The original tests used MagicMock,
which masked the silent skip by making every attribute exist.
P2 — bm_recent dropped real results. recent_activity(output_format=
"json") returns a bare list[dict] per the BM signature; the handler
only checked dict keys. Added the list branch + regression test
matching the real JSON shape.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
7
7
## [0.2.0] — 2026-05-11
8
8
9
9
### Added
10
-
-**Plugin-owned `/bm-*` slash commands** for CLI/gateway sessions. Eight commands give humans direct memory-graph access without going through the agent: `/bm-search`, `/bm-read`, `/bm-context`, `/bm-recent`, `/bm-status`, `/bm-remember`, `/bm-project`, `/bm-workspace`. Registered via `ctx.register_command(...)` (Hermes ≥ v0.11.0); older Hermes installs silently skip the slash surface. Closes #2.
10
+
-**Plugin-owned `/bm-*` slash commands** for CLI/gateway sessions. Eight commands give humans direct memory-graph access without going through the agent: `/bm-search`, `/bm-read`, `/bm-context`, `/bm-recent`, `/bm-status`, `/bm-remember`, `/bm-project`, `/bm-workspace`. Closes #2.
11
11
-**`bm_recent` tool** wrapping BM's `recent_activity`. Surfaces notes updated within a timeframe (`7d` default, accepts natural language like `"2 weeks"` or `"yesterday"`). Agent-facing and reused by `/bm-recent`.
12
12
-**`remember_folder` config key** (default `"bm-remember"`). Separate from `capture_folder` so manual captures via `/bm-remember` don't intermix with auto-generated session transcripts. Notes are tagged `manual-capture` for further disambiguation.
13
13
14
+
### Fixed
15
+
-**`ctx.register_skill(...)` was silently no-opping since 0.1.5** in real Hermes installs. Hermes loads memory-provider plugins through a stripped-down `_ProviderCollector` context (`plugins/memory/__init__.py`) that captures only `register_memory_provider`; `register_skill` and `register_command` are not delegated. The plugin now writes directly to `PluginManager._plugin_commands` and `_plugin_skills`, matching the entry shape and name normalization `PluginContext.register_command` / `register_skill` produce. This makes both the new slash commands and the bundled SKILL.md work in current Hermes installs. The clean fix lives upstream — a small patch to teach `_ProviderCollector` to delegate — and once that lands, the reach-in becomes a redundant double-write of identical entries. Forward-compat `ctx.register_command` / `ctx.register_skill` calls remain in place for the future code path.
16
+
14
17
### Notes
15
18
-`/bm-remember` derives the title from the first non-empty line of the input, trimmed to 80 chars; falls back to `Note YYYY-MM-DD HHMM UTC`.
16
19
-`/bm-workspace` short-circuits in local mode with a one-line explanation. Workspaces are a BM Cloud concept.
0 commit comments