Skip to content

config

config

Core configuration dataclass.

Classes:

CoreConfig dataclass

CoreConfig(max_plugins: int = 100, hook_precaching: str = 'on_core_start', capability_collision: str = 'last_wins_with_warning', capability_selection: str = 'last_registered', capability_missing: str = 'raise', capability_access: str = 'open', tick_rate: int = 1000, tick_slip_threshold: int = 5, tick_precision: str = 'sleep', tick_busy_wait_us: int = 200, tick_catchup: str = 'skip', plugin_configs: dict[str, dict[str, Any]] = dict())

Core system configuration.

All configuration is validated on creation. Core(**kwargs) forwards its keyword arguments straight to this dataclass, so every field below is also a valid Core keyword argument.

Attributes:

  • max_plugins (int) –

    Maximum number of plugins, enforced by the registry at registration time.

  • hook_precaching (str) –

    Hook precaching mode — "disabled" or "on_core_start".

  • capability_collision (str) –

    Policy when two plugins provide the same capability — "error_on_conflict", "first_wins", or "last_wins_with_warning".

  • capability_selection (str) –

    Which provider get_capability() returns from a provider list — "first_registered" or "last_registered".

  • capability_missing (str) –

    Behavior when a requested capability has no provider — "raise" or "return_none".

  • capability_access (str) –

    Access posture (RFC 0001) — "open", "declared", or "sealed".

  • tick_rate (int) –

    Ticks per second (1000 Hz = 1 ms precision).

  • tick_slip_threshold (int) –

    Emit core.tick_slip when slip reaches this many tick periods.

  • tick_precision (str) –

    Clock wait strategy — "sleep" or "hybrid".

  • tick_busy_wait_us (int) –

    Microseconds of busy-wait in hybrid precision mode.

  • tick_catchup (str) –

    Behavior after a stall — "skip" jumps to the current boundary, "burst" replays every missed tick.

  • plugin_configs (dict[str, dict[str, Any]]) –

    Per-plugin configuration namespaces.