Problem
Request context providers do not have mounting parity across framework-rendered surfaces.
The "Request context providers" section of docs/entry-conventions.md states that conventional providers mount for generated MCP and event routes. Routed CLI commands and rendered scripts can execute the same component tree without those provider values.
examples/audiobook-curator demonstrates the asymmetry: its catalog reads request-time library tooling context from a conventional provider when rendered as an MCP resource, while the same provider-dependent component tree cannot rely on that context when projected to routed CLI or rendered-script execution.
This makes rendering behavior depend on the entry surface even though all surfaces use the Agent request context.
Proposal
Run conventional request providers for routed CLI commands and rendered scripts using the same generated provider registry and deterministic ordering as generated MCP and event routes.
Each provider should receive the existing { invocation, signal } contract. Its returned value should mount at the same camel-cased key under (await agent()).providers, with provider failures retaining the current fail-closed behavior.
Why
- Gives shared component trees one request-context contract across framework surfaces.
- Prevents silent loss of provider-backed diagnostics in CLI and scripts.
- Avoids route-specific fallback wiring solely because the transport changed.
- Makes MCP-to-CLI projection preserve application context as well as route logic.
Acceptance criteria
- Routed CLI and rendered-script requests execute conventional providers once per request.
- Provider ordering, key derivation, cancellation, and fail-closed behavior match generated MCP routes.
invocation.kind remains surface-specific so providers can intentionally branch.
- Route-unit and executable tests cover provider values on MCP, routed CLI, and rendered scripts.
- Existing routes without providers remain behavior-compatible.
Problem
Request context providers do not have mounting parity across framework-rendered surfaces.
The "Request context providers" section of
docs/entry-conventions.mdstates that conventional providers mount for generated MCP and event routes. Routed CLI commands and rendered scripts can execute the same component tree without those provider values.examples/audiobook-curatordemonstrates the asymmetry: its catalog reads request-time library tooling context from a conventional provider when rendered as an MCP resource, while the same provider-dependent component tree cannot rely on that context when projected to routed CLI or rendered-script execution.This makes rendering behavior depend on the entry surface even though all surfaces use the Agent request context.
Proposal
Run conventional request providers for routed CLI commands and rendered scripts using the same generated provider registry and deterministic ordering as generated MCP and event routes.
Each provider should receive the existing
{ invocation, signal }contract. Its returned value should mount at the same camel-cased key under(await agent()).providers, with provider failures retaining the current fail-closed behavior.Why
Acceptance criteria
invocation.kindremains surface-specific so providers can intentionally branch.