|
| 1 | +# Comfy CLI / MCP parity proposal |
| 2 | + |
| 3 | +## Goal |
| 4 | +Bring comfy-java-sdk to parity with the documented Comfy CLI and the first-party local comfy-mcp surface while preserving one business contract across feature/1.0.x, feature/2.0.x and feature/3.0.x. |
| 5 | + |
| 6 | +## Sources of truth |
| 7 | +- https://docs.comfy.org/agent-tools/cli |
| 8 | +- https://docs.comfy.org/comfy-cli/getting-started |
| 9 | +- https://docs.comfy.org/comfy-cli/reference |
| 10 | +- https://docs.comfy.org/agent-tools/mcp |
| 11 | +- https://docs.comfy.org/agent-tools/skills |
| 12 | +- https://github.com/Comfy-Org/comfy-cli |
| 13 | +- https://github.com/Comfy-Org/comfy-mcp |
| 14 | +- https://github.com/Comfy-Org/comfy-skills |
| 15 | +- easy-4-java/codex-java-sdk hardening patterns |
| 16 | + |
| 17 | +## Branch contract |
| 18 | +All three feature branches expose the same Java-level business operations and tests. Only runtime baseline differences are allowed: |
| 19 | +- 1.0.x: Java 8 / Jackson 2 |
| 20 | +- 2.0.x: Java 17 / Jackson 2 |
| 21 | +- 3.0.x: Java 21 / Jackson 3 / Maven 4 |
| 22 | + |
| 23 | +## Scope |
| 24 | +1. Expand typed CLI wrappers for setup, cloud auth, routing, lifecycle, generate, workflows, jobs, templates, nodes, models, transfer, skills and tracking. |
| 25 | +2. Preserve raw execute(...) and generic MCP callTool(...) escape hatches. |
| 26 | +3. Add JSON envelope parsing and a doctor/environment report. |
| 27 | +4. Harden subprocess execution: independent probe timeout, literal executable handling, bounded captures, UTF-8, environment merge. |
| 28 | +5. Harden MCP stdio lifecycle: state machine, stderr draining, request timeout cleanup, write-failure cleanup, process reaping and idempotent close. |
| 29 | +6. Add typed convenience methods for stable first-party local comfy-mcp tools. |
| 30 | +7. Extend MCP content handling beyond text while retaining raw JSON. |
| 31 | +8. Add branch-equivalent tests and production-readiness review. |
| 32 | + |
| 33 | +## Non-goals |
| 34 | +- Reimplement Comfy CLI business logic in Java. |
| 35 | +- Freeze beta partner-model flags. Dynamic model-specific flags remain extensible. |
| 36 | +- Replace comfy-mcp with a Java MCP server. |
0 commit comments