diff --git a/integrations/beads-mcp/src/beads_mcp/models.py b/integrations/beads-mcp/src/beads_mcp/models.py index 92429693..e8341249 100644 --- a/integrations/beads-mcp/src/beads_mcp/models.py +++ b/integrations/beads-mcp/src/beads_mcp/models.py @@ -6,8 +6,17 @@ from typing import Literal, Any from pydantic import BaseModel, Field, field_validator # Type aliases for issue statuses, types, and dependencies -IssueStatus = Literal["open", "in_progress", "blocked", "deferred", "closed"] -IssueType = Literal["bug", "feature", "task", "epic", "chore"] +# +# IssueStatus and IssueType are strings (not Literals) to support custom +# statuses and types configured via: +# bd config set status.custom "awaiting_review,awaiting_testing" +# bd config set types.custom "agent,molecule,event" +# +# The CLI handles validation of these values against the configured options. +# Built-in statuses: open, in_progress, blocked, deferred, closed +# Built-in types: bug, feature, task, epic, chore +IssueStatus = str +IssueType = str DependencyType = Literal["blocks", "related", "parent-child", "discovered-from"] OperationAction = Literal["created", "updated", "closed", "reopened"] diff --git a/integrations/beads-mcp/src/beads_mcp/server.py b/integrations/beads-mcp/src/beads_mcp/server.py index ea6b313e..dd5e358e 100644 --- a/integrations/beads-mcp/src/beads_mcp/server.py +++ b/integrations/beads-mcp/src/beads_mcp/server.py @@ -383,9 +383,9 @@ async def get_tool_info(tool_name: str) -> dict[str, Any]: "name": "list", "description": "List all issues with optional filters", "parameters": { - "status": "open|in_progress|blocked|deferred|closed (optional)", + "status": "open|in_progress|blocked|deferred|closed or custom (optional)", "priority": "int 0-4 (optional)", - "issue_type": "bug|feature|task|epic|chore (optional)", + "issue_type": "bug|feature|task|epic|chore or custom (optional)", "assignee": "str (optional)", "labels": "list[str] (optional) - AND filter: must have ALL labels", "labels_any": "list[str] (optional) - OR filter: must have at least one", @@ -421,7 +421,7 @@ async def get_tool_info(tool_name: str) -> dict[str, Any]: "title": "str (required)", "description": "str (default '')", "priority": "int 0-4 (default 2)", - "issue_type": "bug|feature|task|epic|chore (default task)", + "issue_type": "bug|feature|task|epic|chore or custom (default task)", "assignee": "str (optional)", "labels": "list[str] (optional)", "deps": "list[str] (optional) - dependency IDs", @@ -436,7 +436,7 @@ async def get_tool_info(tool_name: str) -> dict[str, Any]: "description": "Update an existing issue", "parameters": { "issue_id": "str (required)", - "status": "open|in_progress|blocked|deferred|closed (optional)", + "status": "open|in_progress|blocked|deferred|closed or custom (optional)", "priority": "int 0-4 (optional)", "assignee": "str (optional)", "title": "str (optional)", diff --git a/integrations/beads-mcp/src/beads_mcp/tools.py b/integrations/beads-mcp/src/beads_mcp/tools.py index b544f7f8..fef5df01 100644 --- a/integrations/beads-mcp/src/beads_mcp/tools.py +++ b/integrations/beads-mcp/src/beads_mcp/tools.py @@ -392,9 +392,9 @@ async def beads_ready_work( async def beads_list_issues( - status: Annotated[IssueStatus | None, "Filter by status (open, in_progress, blocked, deferred, closed)"] = None, + status: Annotated[IssueStatus | None, "Filter by status (open, in_progress, blocked, deferred, closed, or custom)"] = None, priority: Annotated[int | None, "Filter by priority (0-4, 0=highest)"] = None, - issue_type: Annotated[IssueType | None, "Filter by type (bug, feature, task, epic, chore)"] = None, + issue_type: Annotated[IssueType | None, "Filter by type (bug, feature, task, epic, chore, or custom)"] = None, assignee: Annotated[str | None, "Filter by assignee"] = None, labels: Annotated[list[str] | None, "Filter by labels (AND: must have ALL)"] = None, labels_any: Annotated[list[str] | None, "Filter by labels (OR: must have at least one)"] = None, @@ -438,7 +438,7 @@ async def beads_create_issue( acceptance: Annotated[str | None, "Acceptance criteria"] = None, external_ref: Annotated[str | None, "External reference (e.g., gh-9, jira-ABC)"] = None, priority: Annotated[int, "Priority (0-4, 0=highest)"] = 2, - issue_type: Annotated[IssueType, "Type: bug, feature, task, epic, or chore"] = DEFAULT_ISSUE_TYPE, + issue_type: Annotated[IssueType, "Type: bug, feature, task, epic, chore, or custom"] = DEFAULT_ISSUE_TYPE, assignee: Annotated[str | None, "Assignee username"] = None, labels: Annotated[list[str] | None, "List of labels"] = None, id: Annotated[str | None, "Explicit issue ID (e.g., bd-42)"] = None, @@ -475,7 +475,7 @@ async def beads_create_issue( async def beads_update_issue( issue_id: Annotated[str, "Issue ID (e.g., bd-1)"], - status: Annotated[IssueStatus | None, "New status (open, in_progress, blocked, deferred, closed)"] = None, + status: Annotated[IssueStatus | None, "New status (open, in_progress, blocked, deferred, closed, or custom)"] = None, priority: Annotated[int | None, "New priority (0-4)"] = None, assignee: Annotated[str | None, "New assignee"] = None, title: Annotated[str | None, "New title"] = None, diff --git a/integrations/beads-mcp/uv.lock b/integrations/beads-mcp/uv.lock index 856f5f5e..1ece0b53 100644 --- a/integrations/beads-mcp/uv.lock +++ b/integrations/beads-mcp/uv.lock @@ -76,7 +76,7 @@ wheels = [ [[package]] name = "beads-mcp" -version = "0.34.0" +version = "0.47.0" source = { editable = "." } dependencies = [ { name = "fastmcp" },