pyfcstm.entry.simulate.events
Event candidate helpers for simulate CLI commands and completion.
This module keeps the events command and REPL completer aligned when they
summarize the current runtime state. The helpers intentionally remain a thin
presentation layer: final event applicability is still decided by
SimulationRuntime.cycle().
POST_EXIT_CONTINUATION_LABEL
- pyfcstm.entry.simulate.events.POST_EXIT_CONTINUATION_LABEL = 'post-exit continuation'
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
get_current_event_display_items
- pyfcstm.entry.simulate.events.get_current_event_display_items(runtime) List[Tuple[str, str | None]][source]
Return event display rows for the runtime’s current state.
The result preserves the legacy
(full_path, short_name)shape used bypyfcstm.entry.simulate.display.StateDisplay. Direct leaf events use the event’s short name as before. Parent-level continuation candidates usepost-exit continuationas the display label and keep the full event path in the second column.- Parameters:
runtime (SimulationRuntime) – Simulation runtime to inspect.
- Returns:
Event display rows.
- Return type:
List[Tuple[str, Optional[str]]]
get_current_event_completion_items
- pyfcstm.entry.simulate.events.get_current_event_completion_items(runtime) List[Tuple[str, str]][source]
Return
(event_text, display_meta)pairs for REPL event completion.Direct events expose both full-path and short-name completions. Continuation candidates expose only their full path so users can pass the unambiguous parent-scoped event to
cycle.- Parameters:
runtime (SimulationRuntime) – Simulation runtime to inspect.
- Returns:
Completion text and metadata pairs.
- Return type:
List[Tuple[str, str]]