Expand description
Phase 96 — daemon-side plugin poller router.
Plugins declare [plugin.poller] kinds = [...] in their
nexo-plugin.toml. The daemon’s poller runner consults this
router for every job in pollers.yaml: if the job’s kind
belongs to a registered plugin, the router builds the broker
request topic <broker_topic_prefix>.tick and forwards the tick
payload via JSON-RPC; the subprocess replies with the same
TickAck shape the in-process trait returns.
Mirrors crate::plugin_admin / crate::plugin_http:
interior-mutability via RwLock so the daemon can construct
an empty router at boot and populate it AFTER plugin manifests
load + supervisor wires.
Structs§
- Ephemeral
Poller Proxy - Phase 96.E — daemon-side
Pollerimpl that spawns a fresh subprocess per tick, drives the tick over stdio JSON-RPC, kills the child on reply. Used when the plugin manifest declareslifecycle = "ephemeral". - Plugin
Poller Handle - One registered plugin’s poller capability.
- Plugin
Poller Proxy - Daemon-side
Pollerimpl that proxies every tick to a subprocess plugin via broker JSON-RPC. Registered with the runner alongside in-tree builtins so the runner sees a single homogeneous registry. - Plugin
Poller Router - Daemon-side router. Looks up which plugin owns a
kindand forwards tick requests via broker JSON-RPC. - Tick
Reply - Plugin reply to a tick request. Wire-compatible with
TickAckbut carries cursor as base64 so the message survives any text-only broker transport. - Tick
Request - JSON-RPC tick request payload. The plugin subprocess receives
this verbatim and replies with
TickReply.
Enums§
Functions§
- build_
tick_ request - Build the JSON-RPC tick request from runner inputs. Pure fn so the caller (or a future test harness) can exercise the wire shape without a broker.
- encode_
cursor - forward_
tick - Forward a tick request to the plugin via broker JSON-RPC. Caller
owns the
TickRequestconstruction so this fn can be a thin IO wrapper. Returns the parsedTickReply; conversion toTickAckis the runner’s concern. - spawn_
ephemeral_ tick - Spawn the binary, write the tick request to stdin, read one JSON line from stdout, await exit, classify the reply.