Per ADR-006: stdio and HTTP transports are mutually exclusive because they have opposite stdout discipline (stdio: JSON-RPC sink; HTTP: log channel). Changes: - Add clap ArgGroup with multiple(false) to enforce --stdio XOR --bind - Default to stdio mode when neither flag is specified - Change --bind from required String to Option<String> - Add ADR-006 reference to help text and doc comments - Add unit tests for CLI argument validation Acceptance criteria: - pdftract mcp → launches in stdio mode (default) - pdftract mcp --stdio → launches in stdio mode - pdftract mcp --bind ADDR → launches in HTTP+SSE mode - pdftract mcp --stdio --bind ADDR → exits 2 with clap conflict error - pdftract mcp --help shows mutual exclusivity note - Unit test verifies ArgGroup conflict on dual-transport invocation Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| conformance.rs | ||
| mcp-cli-args.rs | ||
| mcp-http.rs | ||
| mcp-stdio.rs | ||