Skip to content

Releases: R3dy/RealMemory

v0.1.1 — Plugin Load Fix

Choose a tag to compare

@R3dy R3dy released this 12 Aug 21:57

Fix

OpenCode's plugin loader requires id in the default PluginModule export for file/path plugins (no package.json name fallback, unlike npm plugins). ADR-009 shipped { server } without id, producing:

Path plugin file:///... must export id

What broke

All 6 plugin hooks were dead in the host OpenCode environment — the plugin failed to load on every session. The brain-loop (issue #22's headline feature) was non-functional. Manual MCP tools worked (configured separately), but auto-recall, auto-capture, evaluateDelta, system-prompt injection, compacting hygiene, and decay scheduling never fired.

The fix

Added id: "realmemory" to the pluginModule object in src/plugin-entry.ts:

const pluginModule = {
  id: "realmemory",
  server: realmemoryPlugin,
};

Verification

Verified via testing harness (opencode run --print-logs --log-level DEBUG):

  • session.created → auto-recall (5 memories) + decay — ✅ firing
  • chat.message → auto-recall (1 memory) + classifyIntent — ✅ firing
  • session.idle → evaluateDelta — ✅ firing (preference_compliance metric recorded)
  • No failed to load plugin error

Full Changelog: v0.1.0...v0.1.1

v0.1.0 — Initial Release

Choose a tag to compare

@R3dy R3dy released this 08 Aug 23:55

realmemory v0.1.0

An OpenCode plugin that gives AI agents real persistent memory — a weighted, indexed database that stores what agents learn across sessions and recalls it automatically when relevant. Replaces the illusion of learning (MEMORY.md) with actual learning.

Features

  • Weighted, indexed memory database — SQLite with vector embeddings (ONNX) + full-text search (FTS5)
  • Composite weight system — recency × relevance × frequency × confidence, with exponential decay and auto-archiving
  • Relationship graph — typed edges between memories (reinforces, contradicts, extends, exception_to, derived_from) with one-hop traversal during recall
  • Semantic recall — local embeddings via @huggingface/transformers (Xenova/all-MiniLM-L6-v2), keyword fallback via FTS5
  • Cross-project memory — project-scoped and global memories, filterable on store and recall
  • MCP server — 8 tools (store_memory, recall, search, relate, update_memory, forget, list_memories, get_memory) via stdio transport, accessible from any MCP-compatible client
  • OpenCode plugin hooks — auto-recall on session start, auto-capture from tool outputs (default on), message recall with deduplication
  • Config loading — JSON config files (global + project), with defaults
  • Secret scrubbing — 12 patterns (AWS keys, GitHub tokens, OpenAI keys, Slack tokens, Bearer tokens, PEM keys, generic password/api_key patterns)

Install

// opencode.json
{
  "plugin": ["realmemory"]
}

Or from git:

{
  "plugin": ["realmemory@git+https://github.com/R3dy/RealMemory.git"]
}

Stats

  • 265 tests passing
  • 10 epics, 20 stories
  • 3 runtime dependencies (@modelcontextprotocol/sdk, @huggingface/transformers, better-sqlite3)
  • Dual ESM/CJS output with TypeScript types
  • Node.js 18+ and Bun supported

License

MIT