Expand description
Event bridge: consume greentic.agentic.request.v1 from NATS, invoke the
local agentic-worker runtime via the AgentDispatchInvoker seam, and
publish greentic.agentic.response.v1 echoing the correlation id.
This is the agentic-side counterpart of the runner’s agentic.call flow
node (out-of-process path, “Option C”): the runner publishes a dispatch
request; this bridge runs one agentic step and publishes the reply.
Unlike sorx-event-bridge, this crate lives inside the runner workspace and
pins the same greentic-types lineage as the runner, so the wire contract is
SHARED from greentic_types::runtime_dispatch rather than mirrored by hand.
Re-exports§
pub use jetstream::run_bridge_jetstream;
Modules§
- jetstream
- JetStream durability for the agentic dispatch consumer: a
greentic-agenticstream bindsgreentic.agentic.request.v1; a durable pull consumeragentic-workers(explicit ack) lets aw-serve replicas share the queue and lets KEDA scale on consumer lag.
Structs§
- Invoke
Outcome - Result of invoking the local agentic-worker runtime for one dispatch.
Constants§
- RUNTIME_
NAME - Runtime name for the agentic worker; selects the request/response subjects
greentic.agentic.request.v1/greentic.agentic.response.v1.
Traits§
- Agent
Dispatch Invoker - Seam over the actual agentic-worker invocation. The production impl wraps
greentic_aw_runtime::AgentRuntime; tests use a stub.
Functions§
- build_
response - Invoke and build the response (no NATS I/O). Errors map to an error response.
- handle_
message - Handle one request message end-to-end: decode, invoke, publish response.
- request_
topic - Request topic/subject for a runtime, e.g.
greentic.sorla.request.v1. - response_
topic - Response topic/subject for a runtime, e.g.
greentic.sorla.response.v1. - run_
bridge - Subscribe to
greentic.agentic.request.v1and serve forever (one spawned task per message).