beads/integrations
matt wilkie 129c3ea23b
fix(mcp): detect Dolt-backed projects in workspace discovery (GH#2997) (#3207)
* fix(mcp): detect Dolt-backed projects in workspace discovery (GH#2997)

The MCP `context()` tool reported "Database: Not found" for embedded Dolt
projects because `_find_beads_db()` and `_find_beads_db_in_tree()` only
globbed for `*.db` files. Embedded Dolt projects keep their data under
`.beads/embeddeddolt/` and declare the backend in `.beads/metadata.json`
— there is no `*.db` file to find.

Adds `_has_beads_project_files()` mirroring Go's `hasBeadsProjectFiles`
(metadata.json, config.yaml, dolt/, embeddeddolt/, or non-backup *.db).
Both Python discovery functions (and `.beads/redirect` validation) now
use this check, so SQLite, embedded Dolt, and server Dolt projects are
all recognized.

`context()` now reports the project root and backend when no SQLite db
is present, instead of the misleading "Not found".

* fix: delegate _find_beads_project to _find_beads_db_in_tree for redirect support

Addresses review item #2: _find_beads_project duplicated the upward
directory walk but skipped .beads/redirect handling. Now delegates to
_find_beads_db_in_tree, inheriting redirect, symlink, and all backend
detection for free.

Amp-Thread-ID: https://ampcode.com/threads/T-019d84e2-3a96-7263-a399-c3b2cc0ba6bb
Co-authored-by: Amp <amp@ampcode.com>

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-04-13 07:54:43 -07:00
..
beads-mcp fix(mcp): detect Dolt-backed projects in workspace discovery (GH#2997) (#3207) 2026-04-13 07:54:43 -07:00
claude-code feat(integrations): add /plan-to-beads Claude Code command 2025-12-19 08:47:53 -07:00
junie fix(docs): purge stale bd sync/import/--branch refs + add CI doc validation (GH#2522) 2026-03-11 13:25:40 -07:00