Skip to main content
Version: Current

ActLifecycleEvents

@rotorsoft/act-root


@rotorsoft/act-root / act/src / ActLifecycleEvents

Type Alias: ActLifecycleEvents<_TSchemaReg, TEvents, TActions>

ActLifecycleEvents<_TSchemaReg, TEvents, TActions> = object

Defined in: libs/act/src/act.ts:137

Lifecycle events emitted by Act, mapped to their payload type. Drives the typing of emit / on / off โ€” the event-name argument narrows its payload at the call site.

The first parameter is kept (unused) for arity compatibility: committed carries snapshots of whichever state each action targeted, so its honest element type is Snapshot<Schema, TEvents> โ€” the register map itself was never the shape of any snapshot's state.

Type Parametersโ€‹

_TSchemaRegโ€‹

_TSchemaReg extends SchemaRegister<TActions>

TEventsโ€‹

TEvents extends Schemas

TActionsโ€‹

TActions extends Schemas

Propertiesโ€‹

ackedโ€‹

acked: Lease[]

Defined in: libs/act/src/act.ts:143


blockedโ€‹

blocked: BlockedLease[]

Defined in: libs/act/src/act.ts:144


closedโ€‹

closed: CloseResult

Defined in: libs/act/src/act.ts:146


committedโ€‹

committed: Snapshot<Schema, TEvents>[]

Defined in: libs/act/src/act.ts:142


errorโ€‹

error: object

Defined in: libs/act/src/act.ts:182

A store operation failed during the drain loop (ACT-984). Fires on every failed drain cycle โ€” typically a StoreError from a degraded backend โ€” carrying the orchestrator circuit breaker's state after the failure (open means the drain loop has backed off and will retry after the cooldown). Listen to alert on a degraded store; the framework logs the same error regardless. Emitted only when a listener is registered (Node's EventEmitter throws on an unhandled "error").

circuitโ€‹

circuit: CircuitState

errorโ€‹

error: unknown


forgottenโ€‹

forgotten: object

Defined in: libs/act/src/act.ts:172

A stream's sensitive-data payload was wiped via Act.forget. Fires exactly once per successful forget(stream) call โ€” idempotent second calls (no PII left on the stream) return eventCount: 0 and do NOT re-emit. Apps that never call forget() never see this event.

Listeners use it for the compliance side of GDPR / CCPA: audit log, downstream cache busts, projection-side wipes that the framework doesn't reach (e.g., search indexes, ETL caches). The framework's own cache is invalidated by forget() itself before the event fires.

atโ€‹

at: Date

eventCountโ€‹

eventCount: number

streamโ€‹

stream: string


notifiedโ€‹

notified: StoreNotification

Defined in: libs/act/src/act.ts:160

A different process committed an event to the same backing store.

Fires only when the configured store implements Store.notify and there is at least one registered reaction. The orchestrator uses the same signal internally to wake settle() โ€” listeners get the raw payload for SSE fan-out, dashboards, and audit logs.

Local commits do not fire notified (use committed for those): stores self-filter their own writes so this channel has a clean cross-process semantic.


settledโ€‹

settled: Drain<TEvents>

Defined in: libs/act/src/act.ts:145