server/zzz_action_handlers.ts

Unified action handler factory for zzz.

create_zzz_action_handlers(backend) is the single source of truth for all 23 request_response handlers. Both HTTP RPC and WebSocket dispatch call into the same map. The Backend is closed over at construction time — handlers receive fuz_app's unified ActionContext (auth, db, request_id, notify, signal) without any context extension.

Declarations
#

2 declarations

view source

create_zzz_action_handlers
#

server/zzz_action_handlers.ts view source

(backend: Backend): BackendActionHandlers

Build the 23 request_response handlers bound to a zzz Backend.

Logic sourced from the RPC versions (cleaner than the old WS handlers — no Deno-only bug in provider_update_api_key, no console.log noise).

backend

type Backend

returns

BackendActionHandlers

get_action_handler
#

server/zzz_action_handlers.ts view source

(handlers: BackendActionHandlers, method: string): ActionHandler | undefined

Look up a handler in the typed map by method name.

Centralizes the unavoidable string-key → typed-handler cast that both transports (zzz_rpc_actions.ts, register_websocket_actions.ts) need. Returns undefined for methods the factory doesn't produce — e.g., fuz_app's cancel (handler lives in protocol_actions) or notification specs (no request_response handler).

handlers

method

type string

returns

ActionHandler | undefined

Depends on
#

Imported by
#