Core Architecture & Invariant CI / validate (push) Successful in 15s
- Add ARCHITECTURE.md documenting canonical present-state M1 topology, components, boundaries, and ADR index - Add ROADMAP.md recording M1 (#1-#4) completion and M2 (#5, #11) trajectory - Extract Alternatives A-E from docs/designs/lg-smtv-mcp.md into docs/adr/0001-0005 MADR records - Update README.md milestone status (#1-#4 merged on main, #5/#11 in M2) and Documentation links - Reconcile docs/designs/lg-smtv-mcp.md module statuses, FrameCapturer seam, and KeysResult/TextResult.image_bytes
1.4 KiB
1.4 KiB
ADR-0001: Streamable HTTP Daemon with Stdio Fallback
- Status: Accepted
- Date: 2026-11-15
- Deciders: kiskaadee
Context and Problem Statement
One-shot CLI scripts against an LG webOS TV incur ~8–10s per step in repeated wss://:3001 TLS + register handshakes, getPointerInputSocket acquisition, and SSH setup, and cannot maintain subscribe state streams across tool calls.
Decision Outcome
Chosen option: "Run lg-smtv-mcp primarily as a persistent streamable-http ASGI daemon (with stdio supported for local test harnesses)", because a long-lived daemon keeps SSAP, subscribe state, and pointer/capture sessions warm while BearerAuthMiddleware and TransportSecuritySettings secure LAN access.
Consequences
- Positive: Eliminates per-step TLS/SSAP handshake overhead, preserves
subscribecache (volume,muted,sound_output,foreground_app), and serializesui_lockacross concurrent calls. - Negative: Requires
MCP_BEARER_TOKENconfiguration and daemon lifecycle management (serve/SIGHUP) when deployed over HTTP.
Alternatives Considered
- Single-process
stdioper client only: Rejected because each client session spawns a fresh process, repeating handshakes and contending for the TV's single pointer socket.
Related Decisions
- Documented in docs/designs/lg-smtv-mcp.md (Alternative A).