Commit graph

57 commits

Author SHA1 Message Date
71d5fc0f75 Add MCP debug client and VS Code MCP config
- tools/mcp_client.dart: spawns the compiled dew binary, connects via
  stdioChannel, initializes the MCP handshake, lists all tools, and calls
  kanban_list_tickets — useful for verifying the server without a real client
- .vscode/mcp.json: proper VS Code MCP server config using ${workspaceFolder}
  to point at the compiled binary with 'mcp serve' args

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 16:13:53 -04:00
bb93f7570e Fix MCP serve: remove stdin conflict and premature ProjectContext call
Two bugs caused immediate connection close:
1. ProjectContext.find() at startup crashed if cwd wasn't a project root;
   it's not needed here — each tool handler calls it on demand.
2. io.stdin.drain() added a second listener to stdin after stdioChannel
   already subscribed, throwing StateError and killing the process.

The Dart event loop keeps the process alive while stdin has a listener.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 16:09:30 -04:00
260d291b0f Compile CLI to .project/toolchain/bin/dew for MCP stdio use
melos run pollutes stdout, breaking the MCP JSON-RPC channel.
The compiled binary has clean stdio and can be pointed at directly
by MCP clients.

- Add melos run compile script (output to .project/toolchain/bin/dew)
- Ignore .project/toolchain/ in .gitignore
- Update mcp.md with compile + client config instructions
- Remove workspace-root bin/ directory

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 15:35:44 -04:00
a74bd94547 Implement MCP tool registry and kanban tool provider
- Add McpTool + McpToolProvider interface to core
- Add McpToolRegistry to mcp package (aggregates providers)
- Add DewMcpServer (MCPServer + ToolsSupport via dart_mcp 0.5.0)
- Add 'mcp serve' subcommand — starts a real stdio MCP server
- Implement KanbanToolProvider with 5 tools:
  kanban_create_ticket, kanban_list_tickets, kanban_get_ticket,
  kanban_update_ticket, kanban_delete_ticket
- Wire McpToolRegistry + KanbanToolProvider in CLI
- 26 tests passing, dart analyze clean

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 15:29:46 -04:00
a1c36f7136 Implement kanban subcommands (create, get, update, delete)
- Add ProjectContext and DewConfig models to core
- Add Ticket model with YAML frontmatter serialisation
- Add TicketStore with auto-incrementing 4-digit IDs
- Implement create/get/update/delete subcommands under KanbanCommand
- Expand tests: ProjectContext, Ticket roundtrip, TicketStore CRUD (19 total)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 14:47:25 -04:00
0723c7d996 Scaffold docs, packages, and command registration
- Flesh out docs/index.md, docs/config.md, docs/features/mcp.md,
  docs/features/kanban.md with full content and aligned tables
- Fix .markdownlint-cli2.mjs config (rules were outside 'config' key)
- Add packages/mcp as a standalone MCP server package
- Update all pubspec descriptions
- Implement DewCommand + CommandRegistry in core
- Implement KanbanCommand and McpCommand stubs with registerCommands()
- Wire CLI entry point using CommandRunner + CommandRegistry
- Add 'melos run dew' script for running the CLI from workspace root
- Update tests across core, kanban, mcp packages

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 14:29:09 -04:00
b3201fde7b chore: Initial Commit 2026-04-23 13:09:11 -04:00