feat(beads): integrate Beads Mode backend, MCP tools, and GUI support

This commit is contained in:
2026-05-06 13:48:47 -04:00
parent b1ddaa50f4
commit 2b66f3569b
17 changed files with 525 additions and 77 deletions
+34
View File
@@ -0,0 +1,34 @@
import pytest
import tempfile
from pathlib import Path
from src import beads_client
def test_beads_init_and_query(tmp_path: Path):
# Initialize a mock beads client in the temp directory
client = beads_client.BeadsClient(working_dir=tmp_path)
# Mocking initialization for the test
client.init_repo()
assert client.is_initialized()
# Create a bead
bead_id = client.create_bead(title="Test Bead", description="Test Description")
assert bead_id is not None
# Query beads
beads = client.list_beads()
assert len(beads) == 1
assert beads[0].id == bead_id
assert beads[0].title == "Test Bead"
assert beads[0].status == "active"
# Update bead status
success = client.update_bead(bead_id, "completed")
assert success
# Verify update
beads = client.list_beads()
assert beads[0].status == "completed"
# Test non-existent bead
assert not client.update_bead("bead-999", "failed")