symfonic.platform.wire¶
wire ¶
Values on the wire, and the domain values they name.
Split from :mod:symfonic.platform.transport, which is the router itself. The
router decides who may ask; this decides what a header, a query parameter or
a stored record looks like as JSON. Neither needs to change when the other
does, and one of them is the file a deployment reads when it wants to know what
the API returns.
MemoryIdentityRefused ¶
Bases: MemoryContractError
The declaration raised, returned no MemoryScope, or left the request tenant.
NativeScopeRouteRefused ¶
Bases: MemoryContractError
A v0-only route refused a scope whose Agent composes v1; nothing was read.
declared_identity ¶
Bind the router's memory_identity for one request's handlers.
kind_of ¶
The event's kind as a plain string, whatever type carries it.
memory_layer ¶
The memory layer a query parameter names, or None for every layer.
Source code in src/symfonic/platform/wire.py
memory_scope ¶
The positional v0 memory scope the remaining HTTP routes name.
Delegated rather than converted here: the memory package owns the one
translation between the two spellings of a scope, and a second one in a
transport is how they drift. These ports still address v0 storage, so
when the router's memory_identity declares that the host's Agent
composes kind-aware v1 for scope, the route refuses (CORE-171) before
reading or changing a positional namespace that Agent never wrote.
Source code in src/symfonic/platform/wire.py
record_body ¶
One stored record as JSON a browser can render.
Source code in src/symfonic/platform/wire.py
record_scope ¶
The memory identity record listing, point read and delete address (CORE-171).
Positional v0, as every route has always used, unless the router was
built with memory_identity: then exactly the scope that declaration
says the host's Agent composes, so a read or delete reaches the row that
Agent wrote -- kind-aware v1 included -- and no positional row that only
shares its ids. A declaration that raises, returns anything but a
MemoryScope, or roots it at another tenant than the request's is
refused (MemoryIdentityRefused) before any store call.
Source code in src/symfonic/platform/wire.py
scope_for_tenant ¶
The scope a tenant header names.
One level, because a header names a tenant and nothing deeper. A router that read a principal or a session from headers too would be deriving authorisation from something the caller controls, which is the platform's own rule about where a scope may come from.
Source code in src/symfonic/platform/wire.py
text_of ¶
Whatever the turn produced, as text a JSON body can carry.
Structural rather than typed: the router is a mapper and must not learn the result type, which differs between a run and a stream chunk and is free to gain fields without this file changing.