pub struct DynamicEndpointRoute {Show 16 fields
pub flow_name: String,
pub endpoint_name: String,
pub source_file: String,
pub source: String,
pub transport: String,
pub transport_explicit: bool,
pub keepalive: String,
pub implicit_transport: String,
pub body_type: String,
pub output_type: String,
pub requires_capabilities: Vec<String>,
pub replay_enabled: bool,
pub transport_dialect: String,
pub has_algebraic_stream_effect: bool,
pub backend: String,
pub path_params: Vec<String>,
}Expand description
Metadata stored per registered dynamic route. Populated at deploy
time from AxonEndpointDefinition; consulted at request time by
the fallback handler to dispatch to the correct flow with the
correct transport semantics.
Fields§
§flow_name: StringThe flow name the axonendpoint’s execute: field declared.
endpoint_name: StringThe axonendpoint name (for diagnostic + audit).
source_file: StringSource file the axonendpoint was deployed from. Used by the negotiation classifier (Fase 30.e + Fase 31.d) for source-text dual-signal predicate.
source: StringFull source of the deployed program. Required for runtime
transport inference (Fase 31.b produces_stream predicate).
transport: Stringtransport: field verbatim — one of {json, sse, ndjson} per
Fase 30 D2; empty string when omitted (Fase 31.b
transport_explicit == false path).
transport_explicit: boolWas transport: explicitly declared in source (Fase 31.b)?
keepalive: Stringkeepalive: field per Fase 30 D6; empty when omitted.
implicit_transport: StringInferred transport per Fase 31.b D1 ("sse" / "json" /
empty if pre-compute).
body_type: String§Fase 32.c — Declared body type per body: field on the source
axonendpoint. Empty string when omitted (D9 backwards-compat —
the fallback handler skips body-schema validation entirely).
When non-empty, the value is looked up in
ServerState.dynamic_types at request time and the request body
is validated against the resolved TypeSchema before the flow
dispatch. Schema mismatch returns 400 Bad Request with a
structured BodyValidationError.
output_type: String§Fase 32.d — Declared output type per output: field on the
source axonendpoint. Empty string when omitted (D9 backwards-
compat — the fallback handler skips output-schema validation).
When non-empty, the flow’s response body is validated against
the resolved TypeSchema BEFORE returning to the client.
Per OWASP, validation failure returns a GENERIC 500 to the
client + records the full diagnostic in audit_log so the
adopter can fix the FLOW without schema details leaking to
potentially malicious clients.
Output validation only fires when the response Content-Type is
application/json — SSE/ndjson streams are token-by-token and
cannot be validated against a static type at the wire layer
(a future fase may add per-event validation for typed streams).
requires_capabilities: Vec<String>§Fase 32.g — Declared capability slugs the request bearer must
hold for the endpoint to dispatch. Empty vec means “no auth
gate” (D9 backwards-compat). The runtime checks
declared_requires ⊆ token_capabilities (AND semantics — every
declared capability must be present). On missing capability
the fallback handler returns 403 Forbidden with structured
{error: "missing_capability", required, have, ...} so the
client knows precisely which capability is needed.
replay_enabled: bool§Fase 32.h — Effective replay-binding boolean resolved at
deploy time. true ⟹ every successful 2xx POST/PUT response
is recorded in ServerState.axonendpoint_replay keyed by
trace_id. Default is method-derived (POST/PUT → true;
GET/DELETE → false); an explicit replay: true | false
declaration overrides.
transport_dialect: String§Fase 33.z.k.b (v1.28.0) — Selected SSE wire-format dialect.
Populated when the source declares transport: sse(<dialect>).
Closed catalog from AXONENDPOINT_TRANSPORT_DIALECTS:
{axon, openai, anthropic}. Empty string when the source
declared a non-SSE transport, bare transport: sse without
parens, or omitted transport: entirely.
Copied from AxonEndpointDefinition.transport_dialect at
route construction. The runtime resolves the effective
dialect via type_checker::resolve_effective_dialect() —
when this field is empty, the algebraic-effect predicate
drives the Q1 default (openai for tool-streaming flows,
axon for type-annotation-only).
has_algebraic_stream_effect: bool§Fase 33.z.k.1 (v1.27.1) — Algebraic-effect override predicate.
true when execute_flow references a tool that declares
effects: <stream:<policy>>. Copied verbatim from
AxonEndpointDefinition.has_algebraic_stream_effect (computed
by axon_frontend::type_checker::compute_implicit_transports).
Used by classify_dynamic_route_wire to OVERRIDE the v1.22.0
D6 backwards-compat gate. A tool with a declared stream effect
is a LANGUAGE-LEVEL commitment to streaming (algebraic effect
is part of the type), not a client preference. The runtime
honors the commitment without requiring an Accept: text/event-stream header (D4 negotiation) or the strict-mode
runtime flag (D6). D3 explicit transport: json opt-out still
wins above this override.
backend: String§Fase 36.e (D3) — the route’s declared execution backend.
Resolved at deploy time: the axonendpoint backend: field
(Fase 36.d, AxonEndpointDefinition.backend) if the source
declared one; otherwise the deploy-request backend
(DeployRequest.backend) when that was set to an explicit,
concrete value (deploy_handler fills it as a deploy-scoped
default for every route that did not declare its own).
Empty string "" ≡ “not declared” — the route resolves its
backend at request time down the Fase 36 D1 precedence ladder
(server default → environment-available auto; honest failure
if nothing real resolves). When non-empty this value is rung 2
of that ladder (EndpointDeclared).
(D3 frames this as an “optional backend”; the struct realizes
“optional” via its uniform empty-string-sentinel convention —
shared with every sibling field — rather than introducing a
lone Option<String>.)
path_params: Vec<String>§Fase 37.y (D1) — Path-parameter names extracted from the
route’s path string (mirrors AxonEndpointDefinition.path_params).
Empty Vec when the path has no {name} placeholders. Used by
match_path_template to (a) gate template matching only on
routes that DECLARED placeholders and (b) skip the linear scan
for legacy (placeholder-less) routes that go through the fast
exact-string lookup path (D5 backwards-compat — pre-37.y route
performance preserved).
Trait Implementations§
Source§impl Clone for DynamicEndpointRoute
impl Clone for DynamicEndpointRoute
Source§fn clone(&self) -> DynamicEndpointRoute
fn clone(&self) -> DynamicEndpointRoute
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for DynamicEndpointRoute
impl RefUnwindSafe for DynamicEndpointRoute
impl Send for DynamicEndpointRoute
impl Sync for DynamicEndpointRoute
impl Unpin for DynamicEndpointRoute
impl UnsafeUnpin for DynamicEndpointRoute
impl UnwindSafe for DynamicEndpointRoute
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more