Registry
@rotorsoft/act-root / act/src / Registry
Type Alias: Registry<TSchemaReg, TEvents, TActions, TStateNames>
Registry<
TSchemaReg,TEvents,TActions,TStateNames> =object
Defined in: libs/act/src/types/registry.ts:85
Registry of all actions and events for a domain.
Type Parametersโ
TSchemaRegโ
TSchemaReg extends SchemaRegister<TActions>
State schemas.
TEventsโ
TEvents extends Schemas
Event schemas.
TActionsโ
TActions extends Schemas
Action schemas.
TStateNamesโ
TStateNames extends string = string
Union of registered state name literals. Threaded
by Act from the builder's TStateMap so the per-state lookup
methods narrow state_name to the actual set of registered states
instead of accepting any string. Defaults to string so loose
references like Registry<any, any, any> keep working.
Propertiesโ
actionsโ
readonlyactions:{ [TKey in keyof TActions]: State<TSchemaReg[TKey], TEvents, TActions> }
Defined in: libs/act/src/types/registry.ts:91
Map of action names to state definitions.
autoclose_archiverโ
readonlyautoclose_archiver: (state_name) => ((stream,head) =>Promise<void>) |null
Defined in: libs/act/src/types/registry.ts:127
Lookup of the .archives(fn) declaration per state name. Returns
null when the state didn't declare an archiver โ the cycle
truncates without an archive step, matching the default behavior
of explicit app.close({ stream }) calls. Threaded into
CloseTarget.archive only when present.
Parametersโ
state_nameโ
TStateNames
Returnsโ
((stream, head) => Promise<void>) | null
autoclose_policyโ
readonlyautoclose_policy: (state_name) => ((stream,head,count) =>boolean) |null
Defined in: libs/act/src/types/registry.ts:111
Lookup of the .autocloses(predicate) declaration per state name.
Returns null when the state opted out of online close โ the
orchestrator's autoclose cycle skips states with a null policy
so the per-cycle cost is paid only by opt-in states.
Parametersโ
state_nameโ
TStateNames
Returnsโ
((stream, head, count) => boolean) | null
deprecated_eventsโ
readonlydeprecated_events: (state_name) =>ReadonlySet<string>
Defined in: libs/act/src/types/registry.ts:104
Lookup of deprecated event names per state
name. Derived from the _v<digits> versioning convention at build
time: for each state, every event whose base name has a
higher-numbered sibling is "deprecated." Returns an empty set for
states with no deprecation in scope. The framework surfaces
deprecations once at build time (static .emit("X") targeting a
deprecated name throws; a single startup advisory enumerates every
legacy event in scope) โ there is intentionally no runtime warn on
dynamic emits, so the build-time advisory is the only channel.
Exposed here for callers that want to layer their own warning
policy on top.
Parametersโ
state_nameโ
TStateNames
Returnsโ
ReadonlySet<string>
disclosure_predicateโ
readonlydisclosure_predicate: (state_name) => ((event,actor) =>boolean) |null
Defined in: libs/act/src/types/registry.ts:96
Lookup of the .discloses(predicate)
declaration per state name. Returns null when no predicate was set
(framework default-deny).
Parametersโ
state_nameโ
TStateNames
Returnsโ
((event, actor) => boolean) | null
eventsโ
readonlyevents:EventRegister<TEvents>
Defined in: libs/act/src/types/registry.ts:94
Map of event names to event registration info.
sensitive_fieldsโ
readonlysensitive_fields: (event_name) => readonlystring[]
Defined in: libs/act/src/types/registry.ts:95
Lookup of sensitive(...)-marked fields per
event name. Derived once at build time. Returns the empty array for
unknown events.
Parametersโ
event_nameโ
string
Returnsโ
readonly string[]