server/zzz_rpc_actions.ts

RPC actions for zzz — thin adapter from unified handlers to fuz_app's RpcAction format.

Binds create_zzz_action_handlers(backend) once and pairs each handler with its spec for create_rpc_endpoint. All business logic lives in server/zzz_action_handlers.ts.

Declarations
#

2 declarations

view source

create_zzz_rpc_actions
#

server/zzz_rpc_actions.ts view source

(deps: ZzzRpcDeps): RpcAction[]

Create all zzz RPC actions.

Returns RpcAction[] for create_rpc_endpoint. Each handler is built once at boot from create_zzz_action_handlers(backend); the handlers close over backend and receive fuz_app's unified ActionContext directly — no per-call adapter shim.

fuz_app's protocol actions (heartbeat, cancel) are excluded — cancel is remote_notification (filtered by kind), and heartbeat's handler lives in fuz_app's protocol_actions bundle (WS liveness only), so HTTP RPC doesn't expose it.

BackendActionHandlers is keyed by BackendRequestResponseMethod, which is generated from all_action_specs — so every non-protocol request_response spec is guaranteed at compile time to have a handler. The cast below is the unavoidable bridge from string to that union.

deps

returns

RpcAction[]

ZzzRpcDeps
#

server/zzz_rpc_actions.ts view source

ZzzRpcDeps

Dependencies for creating zzz RPC actions.

backend

type Backend

extra_actions

Extra (spec, handler) pairs to register alongside zzz's production actions — used by integration tests to opt in _test_* specs via ZZZ_ENABLE_TEST_ACTIONS. Production callers leave this empty.

type ReadonlyArray<RpcAction>

Depends on
#

Imported by
#