actions/action_event_types.ts

Action event type definitions — state machine constants and environment interface.

view source

Declarations
#

9 declarations

action_event_phase_by_kind
#

actions/action_event_types.ts view source

Record<"request_response" | "remote_notification" | "local_call", readonly ("send_request" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive" | "execute")[]>

type Record<ActionKind, readonly ActionEventPhase[]>

import {action_event_phase_by_kind} from '@fuzdev/fuz_app/actions/action_event_types.js';

action_event_phase_transitions
#

actions/action_event_types.ts view source

Record<"send_request" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive" | "execute", "send_request" | "receive_request" | ... 7 more ... | null>

type Record<ActionEventPhase, "send_request" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive" | "execute" | null>

import {action_event_phase_transitions} from '@fuzdev/fuz_app/actions/action_event_types.js';

action_event_step_transitions
#

ActionEventEnvironment
#

actions/action_event_types.ts view source

ActionEventEnvironment import type {ActionEventEnvironment} from '@fuzdev/fuz_app/actions/action_event_types.js';

executor

type ActionExecutor

readonly

lookup_action_handler

type (method: string, phase: "send_request" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive" | "execute"): ((event: any) => any) | undefined

method

type string

phase

returns ((event: any) => any) | undefined

lookup_action_spec

type (method: string): { method: string; initiator: "frontend" | "backend" | "both"; side_effects: boolean; input: ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>; ... 7 more ...; rate_limit?: "both" | ... 2 more ... | undefined; } | { ...; } | { ...; } | undefined

method

type string

log?

Where dispatch diagnostics go — failed sends, rejected or failing inbound notifications and requests. Unset falls back to console_action_log; null silences them.

type Logger | null

readonly

ActionEventStep
#

actions/action_event_types.ts view source

value + type

"initial" | "parsed" | "handling" | "handled" | "failed"

type "initial" | "parsed" | "handling" | "handled" | "failed"

import {ActionEventStep} from '@fuzdev/fuz_app/actions/action_event_types.js';

ActionExecutor
#

ActionLog
#

actions/action_event_types.ts view source

ActionLog import type {ActionLog} from '@fuzdev/fuz_app/actions/action_event_types.js';

The logging surface the action dispatch path uses.

external types

Pick<Logger, 'error' | 'warn' | 'debug'>

console_action_log
#

actions/action_event_types.ts view source

ActionLog import {console_action_log} from '@fuzdev/fuz_app/actions/action_event_types.js';

Fallback log for environments that leave log unset: warnings and errors go to console, so a notification that fails to parse or a handler that throws is visible rather than silently dropped; per-message debug chatter is discarded. A plain console adapter rather than a Logger so it's safe in any runtime, the browser included.

resolve_action_log
#

Depends on
#

Imported by
#