Skip to main content

Module http

Module http 

Source
Expand description

Streamable-HTTP transport: a remote Context Graph Protocol provider reached by POSTing the envelope to its URL (SPEC.md §3 “remote providers: streamable HTTP”). The reference host uses request/response JSON — the Envelope as the POST body, one Envelope back as the response body — which any streamable-HTTP server satisfies; chunked frame streaming is a documented forward extension, not needed for the v1 shape.

Unlike stdio’s process isolation, an HTTP provider is remote by nature, so its egress posture is decided by the URL host and gated through the same crate::consent store at the crate::host::Host layer.

Structs§

Credential
A bearer credential a host uses to authenticate to a remote provider.
HttpProvider
A ContextProvider backed by a remote HTTP endpoint. Handshakes once on HttpProvider::connect and caches the negotiated identity + capabilities.

Functions§

refuse_insecure_transport
Refuse a plaintext transport to a non-loopback provider before any bytes leave the host (SPEC.md §4.2, C7): an http:// (not https://) URL whose host is not loopback would carry the query payload — and any bearer credential — across the network in cleartext. A loopback http:// target is allowed (the bytes never leave the machine); every https:// target is allowed. Called before the client is built or DNS is resolved, so a refusal short-circuits with zero network activity.