Skip to main content

Module handlers

Module handlers 

Source
Expand description

Transport-agnostic dev-server handlers. Transport-agnostic dev-server handlers over the REAL engine, store, and event stream.

Every operation here drives the same production engine surface the public transports drive — there is no dev-only engine and no execution path whose semantics diverge from production (CN4):

  • trigger_run starts a workflow through the same crate::api::handlers::workflows::start path /workflows/start uses, and returns the firehose subscription a client uses to watch the run live over the existing /events/stream WebSocket (no second stream is built);
  • register_mock installs an opt-in per-run activity mock in the shared ActivityMockRegistry the engine’s dispatcher already consults — the engine is untouched;
  • replay_run re-drives a failed run by reading its recorded start (workflow type and input) from the real store and starting a fresh run of the same workflow through the real engine — no mock-only re-execution.

Structs§

RegisterMockRequest
Request to install an opt-in per-run activity mock.
RegisterMockResponse
Acknowledgement of an installed mock.
ReplayRunRequest
Request to replay a failed run through the real engine.
ReplayRunResponse
The fresh run started to replay a failed one.
StreamSubscription
The per-workflow subscription frame for the existing event-stream socket.
TriggerRunRequest
Request to trigger a fresh workflow run from the dev server.
TriggerRunResponse
The started run plus the firehose subscription that streams its events.

Enums§

MockOutcome
Outcome a per-run activity mock should produce.

Functions§

register_mock
Installs an opt-in per-run activity mock for one run, without changing the engine.
replay_run
Replays a failed run by re-driving it through the real engine and store.
trigger_run
Triggers a run and returns the existing-firehose subscription for it.