Skip to content

v0.4.0 — Context Engine

Choose a tag to compare

@devwhodevs devwhodevs released this 24 Mar 21:45
· 127 commits to main since this release
5b14eea

What changed

engraph v0.3 had hybrid search with a vault graph. v0.4 adds a context engine — six functions that assemble agent-ready context bundles from search results, graph connections, and vault metadata.

New commands

engraph context read <file_or_docid>              # Full note content with metadata + graph edges
engraph context list [--folder X] [--tags a,b]    # Filter notes by metadata
engraph context vault-map                          # Vault structure overview
engraph context who <name>                         # Person context bundle
engraph context project <name>                     # Project context bundle
engraph context topic <query> [--budget 32000]     # Rich topic context with budget trimming

All commands support --json for structured output.

Context engine highlights

  • who "John Nelson" — returns the person's note, all vault mentions with snippets, wikilink connections
  • project "Drift" — returns the project note, child notes, active tasks (unchecked checkboxes), team members, recent daily mentions
  • topic "delivery date" --budget 8000 — runs hybrid search, reads full note content from disk, expands via graph, assembles within character budget with truncation markers
  • vault-map — folder note counts, top tags by frequency, recently indexed files — everything an agent needs to orient in a new session

Internal improvements

  • search_internal() extracted from run_search() — reusable 3-lane RRF search for programmatic consumers
  • Five new Store query methods for filtering, aggregation, and listing
  • ContextParams shared context struct for all functions

Upgrading from v0.3

No migration needed — context engine is read-only and works with existing databases. Run engraph index if you haven't recently.

Stats

  • 13 modules (was 12), context.rs added (~1,050 lines)
  • 144 unit tests (was 119)
  • ~1,600 lines of new Rust code

What's next (v0.5 — MCP Server)

  • MCP stdio transport so Claude Code can connect directly
  • Context engine tools exposed as MCP tools
  • HTTP daemon for REST API consumers