Skip to content

feat(vdb): wire `vdb index` and `vdb serve` to engine mains

Ben requested to merge feat/vdb-index-serve into main

Build-order step 4. Builds on !6 (merged) (resolver) and !7 (merged) (typer skeleton).

vdb index / vdb serve resolve the active vault and call the engine logic in-process (no subprocess):

  • Both engine main() now accept main(argv=None)python3 vault-indexer.py … / piping into vault-mcp-server.py keep working unchanged.
  • vault-indexer gains --table-groups to override ENABLED_TABLE_GROUPS at runtime. A single installed vdb cannot carry per-vault constants, so vdb index reads enabled_groups from the vault's vdb-config.yaml and passes them through — installed multi-vault indexing stays correct.
  • vdb serve resolves the DB path from vault.db_path or <vault>/vault-index.db.
  • vdb/engines.py loads the hyphenated engine files by path (still standalone-runnable) and puts repo root on sys.path for the mcp server's sibling import vault_notify.

tests/test_vdb_engines.py covers index dry-run/full, the table-groups→config flow, and a serve JSON-RPC round-trip. Full suite green; standalone indexer + mcp smoke still pass.

🤖 Generated with Claude Code

Merge request reports

Loading