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
22 lines
1.4 KiB
Markdown
22 lines
1.4 KiB
Markdown
# 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 `subscribe` cache (`volume`, `muted`, `sound_output`, `foreground_app`), and serializes `ui_lock` across concurrent calls.
|
||
- Negative: Requires `MCP_BEARER_TOKEN` configuration and daemon lifecycle management (`serve` / `SIGHUP`) when deployed over HTTP.
|
||
|
||
## Alternatives Considered
|
||
- Single-process `stdio` per 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](../designs/lg-smtv-mcp.md) (Alternative A).
|