fix(mcp): support custom issue types and statuses (#1023)

Change IssueType and IssueStatus from Literal to str to support
custom types configured via:
  bd config set types.custom "agent,molecule,event"
  bd config set status.custom "awaiting_review,awaiting_testing"

The CLI handles validation of these values against the configured
options. The MCP layer is just a transport and shouldn't re-validate
what the CLI already validates.

This fixes Pydantic validation errors when listing issues that have
custom types like 'event', 'molecule', or 'agent'.

Built-in types: bug, feature, task, epic, chore
Built-in statuses: open, in_progress, blocked, deferred, closed
This commit is contained in:
Marvin Bitterlich
2026-01-12 02:17:01 +00:00
committed by GitHub
parent d04bffb9b6
commit 68da7c9f78
4 changed files with 20 additions and 11 deletions
+11 -2
View File
@@ -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"]