Skip to content

Commit 3b1118c

Browse files
authored
Merge pull request #3 from basicmachines-co/feat/bm-slash-commands
feat: add /bm-* slash commands and bm_recent tool
2 parents ef254ea + 6513a63 commit 3b1118c

7 files changed

Lines changed: 1252 additions & 18 deletions

File tree

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file.
44

55
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).
66

7+
## [0.2.0] — 2026-05-11
8+
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`. Closes #2.
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+
- **`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+
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+
17+
### Notes
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`.
19+
- `/bm-workspace` short-circuits in local mode with a one-line explanation. Workspaces are a BM Cloud concept.
20+
- Mid-session project/workspace switching is intentionally not supported in 0.2.0 — auto-capture would land in unexpected places. Tracked as a follow-up.
21+
722
## [0.1.7] — 2026-05-10
823

924
### Changed

README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Expected:
4747

4848
## What the agent gets
4949

50-
Seven tools (curated subset of Basic Memory's MCP surface):
50+
Eight tools (curated subset of Basic Memory's MCP surface):
5151

5252
| Tool | Use |
5353
|---|---|
@@ -58,13 +58,40 @@ Seven tools (curated subset of Basic Memory's MCP surface):
5858
| `bm_context` | Navigate via `memory://` URLs to find related notes |
5959
| `bm_delete` | Delete a note |
6060
| `bm_move` | Move a note to a different folder |
61+
| `bm_recent` | List notes updated recently (default `7d`; accepts natural-language timeframes) |
6162

6263
Plus automatic capture:
6364
- **Per turn**: every user/assistant exchange appends to a running session-transcript note
6465
- **End of session**: a separate summary note is written, linked back to the transcript via a `summary_of` relation
6566

6667
A bundled skill (`skill:view basic-memory:basic-memory`) gives the agent a longer reference doc on top of the always-on `system_prompt_block`.
6768

69+
## Slash commands
70+
71+
For direct, in-session use without going through the agent (requires Hermes ≥ v0.11.0):
72+
73+
| Command | Use |
74+
|---|---|
75+
| `/bm-search <query>` | Search the knowledge graph; returns compact title/permalink/preview rows. |
76+
| `/bm-read <identifier>` | Read a note by title, permalink, or `memory://` URL. |
77+
| `/bm-context <identifier>` | Build context for a note (target + related). |
78+
| `/bm-recent [timeframe]` | Recently updated notes. Default `7d`; accepts `"2 weeks"`, `"yesterday"`, etc. |
79+
| `/bm-status` | Plugin/provider state: mode, project, capture flags, bm CLI path. |
80+
| `/bm-remember <text>` | Capture a quick note. Title = first line (≤80 chars), folder = `remember_folder` (default `bm-remember`), tagged `manual-capture`. |
81+
| `/bm-project` | List all known projects; the active one is marked. |
82+
| `/bm-workspace` | List BM Cloud workspaces. Cloud mode only — prints an explanatory line in local mode. |
83+
84+
Examples:
85+
86+
```text
87+
/bm-search Q3 OKRs
88+
/bm-read decisions/auth-rewrite
89+
/bm-recent yesterday
90+
/bm-remember Reminder: switch the staging job to the new image after the rebase lands.
91+
```
92+
93+
`/bm-project` and `/bm-workspace` are read-only in 0.2.0 — mid-session switching is intentionally not supported because auto-capture would otherwise land in the wrong place. Tracked as a follow-up.
94+
6895
## Configuration
6996

7097
Defaults are reasonable for local use:
@@ -77,6 +104,7 @@ Defaults are reasonable for local use:
77104
| `capture_folder` | `hermes-sessions` | Folder within the project for session notes |
78105
| `capture_per_turn` | `true` | Append every turn to a session transcript |
79106
| `capture_session_end` | `true` | Write a summary note when the session ends |
107+
| `remember_folder` | `bm-remember` | Folder where `/bm-remember` captures land (kept separate from session transcripts) |
80108

81109
To override, write `~/.hermes/basic-memory.json` or run `hermes memory setup basic-memory`:
82110

@@ -87,7 +115,8 @@ To override, write `~/.hermes/basic-memory.json` or run `hermes memory setup bas
87115
"project_path": "~/hermes-memory/",
88116
"capture_per_turn": true,
89117
"capture_session_end": true,
90-
"capture_folder": "hermes-sessions"
118+
"capture_folder": "hermes-sessions",
119+
"remember_folder": "bm-remember"
91120
}
92121
```
93122

0 commit comments

Comments
 (0)