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
Plan β OSB Hermes-core surface align
Branch: feat/osb-hermes-core-surface-align. Drive cards one at a time; each worker builds on the commits the previously-driven card landed. Follow TDD: write the failing test first, then the minimal change that makes it pass. Reference: docs/brainstorm/osb-hermes-core-surface-align/design.md.
Run tests from the repo root:
- Python provider tests:
python -m pytest tests/python/test_static_schemas.py tests/python/test_memory_provider.py -q(orpython -m unittestif pytest is absent). - The live anti-drift test in
test_static_schemas.pyskips automatically when Bun/o2bis missing β that is expected and must stay a skip, not a failure.
Task t_2c8448bb β Verify OSB tool schemas against new core normalize/validate-before-wrap (PR #52140)
Files
tests/python/test_static_schemas.pyβ add a newNormalizeContractTests(unittest.TestCase)class.plugins/hermes/_schemas.pyβ read-only verify (no change expected; pre-check confirmed flat schemas).plugins/hermes/provider.pyβ read-only verify ofget_tool_schemas()(theinputSchemaβparametersin-place remap is the focus).
Acceptance (a passing test)
- A test that imports
STATIC_TOOL_SCHEMAS,static_tool_schemas(), andMEMORY_TOOLS, and asserts, for both the raw static tuple and the remapped accessor output:- No entry contains a nested
{type:function, function:{...}}wrapper (i.e. no keytype == "function"with afunctionsub-dict at top level). - Every entry has a non-empty top-level
name(str). - After the
inputSchemaβparametersremap, the set ofnames, the count, and the declaration order are unchanged vs. the curatedMEMORY_TOOLSset / static tuple order. - The remap is idempotent: calling the accessor twice yields identical deep-copied output (guards the existing
test_accessor_returns_deep_copiescontract too).
- No entry contains a nested
- Additionally, a test that drives
OpenSecondBrainMemoryProvider.get_tool_schemas()through aFakeBrainBridgereturning a live-shaped tool list (one withinputSchema, one accidentally pre-wrapped{type:function,...}) and asserts the provider filters out only non-curated names and never emits a nameless/ double-wrapped entry β proving the OSB toolset survives the normalize path a strict provider would apply. python -m pytest tests/python/test_static_schemas.py -qis green; existingStaticSchemaIntegrityTestsstill pass.
Depends on
- Nothing (leaf). Ship first on the shared branch.
Task t_3190e771 β Re-verify OSB compression hooks under in_place=True default flip (PR #52658)
Files
tests/python/test_memory_provider.pyβ add a new test (and, only if the FakeBridge lacks it, a tiny helper to record ordered call args; reuse the existingFakeBrainBridge.callslist).plugins/hermes/provider.pyβ read-only verify ofon_pre_compress/on_session_end/_flush_buffer(no change expected; confirm buffer-clear semantics).
Acceptance (a passing test)
- A test
test_repeated_in_place_compaction_flushes_each_boundary_once_with_stable_session_idthat:- Initializes a provider with a
FakeBrainBridgewhosebrain_pre_compact_extractreturns an empty structured result. sync_turn("u1","a1", session_id="sess-stable"), then_drain_captures().- Fires
on_pre_compress([])(boundary #1), thenon_pre_compress([])again (boundary #2, samesession_id="sess-stable"β simulating repeated in-place compaction with a non-rotating id), thenon_session_end([]). - Asserts
brain_pre_compact_extractwas called exactly once per boundary that had buffered turns β i.e. boundary #1 flushes the buffered turn; boundaries #2 and the finalon_session_endmake zero additional extract calls (buffer was cleared), because no new turn was buffered between them. - Additionally: buffer some turns between boundary #1 and #2 and assert boundary #2 flushes exactly once with the newly-buffered turns only (no re-flush of #1's content) β proving no duplicate/clobbered writes accumulate under a stable id.
- Initializes a provider with a
- A second test
test_stable_session_id_does_not_assume_rotationdocumenting the decision: the provider makes no assumption thatsession_idchanges across compaction; passing the same id to repeatedsync_turn+on_pre_compressproduces independent, dedup-safe flushes (the TS core dedupes by content hash anyway). python -m pytest tests/python/test_memory_provider.py -qis green; all existingProviderLifecycleTestsstill pass.
Depends on
- t_2c8448bb having landed its test additions on the shared branch (so this worker builds on a green, schema-verified base). Both ship in the same release commit set; drive t_2c8448bb first, then this one.
Release notes (both tasks)
- No
CHANGELOG.mdentry is required for a verify+regression-guard release with no behavior change, UNLESS a defect is found and fixed during implementation β in which case add a### Fixedline under the next unreleased version describing the corrected surface. - Combined design:
docs/brainstorm/osb-hermes-core-surface-align/design.md. - Commit each card's work as its own focused commit on
feat/osb-hermes-core-surface-align; the phase-0 brainstorm commit (chore(brainstorm): osb-hermes-core-surface-align) is already the branch base.