feat(client): net primitives — DmResponse, NarrateResult, DmTransport, ProxyConfig

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-10 09:54:03 -05:00
parent b4d22f5c5f
commit 18a18820fe
10 changed files with 126 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
class_name DmTransport
extends RefCounted
## The network seam. DmService talks to this, never to HTTPRequest directly, so
## the loop logic is testable with an injected fake. Concrete transports
## override post_json. The base returns a failed response (rather than assert())
## so a missing override is a loud, catchable failure in tests.
func post_json(_path: String, _body: Dictionary) -> DmResponse:
push_error("DmTransport.post_json must be overridden")
return DmResponse.failed("transport not implemented")