- Add DewToolCommand mixin that auto-derives MCP tool JSON Schema from ArgParser, eliminating the need to define CLI commands and MCP tools separately - Add schemaFromArgParser() to generate JSON Schema from ArgParser options - Add CommandRegistry.mcpTools recursive collector for all DewToolCommand subcommands - Refactor all kanban subcommands to use the mixin; switch get/update/delete from positional rest args to --id / -i option for schema compatibility - Promote list to a proper CLI subcommand (was MCP-only before) - Add search, comment, and config subcommands (CLI + MCP tools) - Add TicketStore.addComment() for non-destructive comment appending - Simplify mcp.registerCommands() to take only CommandRegistry - Simplify CLI entry point (no more KanbanToolProvider/McpToolRegistry) - Delete stale files: kanban_tool_provider.dart, mcp_tool_provider.dart, mcp_tool_registry.dart (superseded by DewToolCommand mixin) - Add tools/mcp_client.dart debug client for manual MCP server testing - Update .vscode/mcp.json with correct server config All 26 tests pass, dart analyze clean. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
19 lines
556 B
Dart
19 lines
556 B
Dart
import 'package:args/command_runner.dart';
|
|
import 'package:dew_core/dew_core.dart';
|
|
import 'package:dew_kanban/dew_kanban.dart' as kanban;
|
|
import 'package:dew_mcp/dew_mcp.dart' as mcp;
|
|
|
|
Future<void> main(List<String> args) async {
|
|
final commandRegistry = CommandRegistry();
|
|
|
|
kanban.registerCommands(commandRegistry);
|
|
mcp.registerCommands(commandRegistry);
|
|
|
|
final runner = CommandRunner<void>('dew', 'A project management tool.');
|
|
|
|
for (final command in commandRegistry.commands) {
|
|
runner.addCommand(command);
|
|
}
|
|
|
|
await runner.run(args);
|
|
}
|