from_config(
cls,
config: HooksConfig,
*,
diagnostics: tuple[HookDiagnostic, ...]| Name | Type | Description |
|---|---|---|
config* | HooksConfig | Validated Hooks v2 configuration. |
diagnostics | tuple[HookDiagnostic, ...] | Default: ()Diagnostics retained from configuration loading. |
snapshot_id | str | None | Default: None |
Build an immutable runtime snapshot from validated configuration.
Invalid matcher groups are rejected at compile time with a warning diagnostic; their handlers are never added to the snapshot.
Optional precomputed canonical hash. When omitted, it
is derived from config.