from_config(
cls,
config: HooksConfig,
*,
groups: Mapping[HookEvent, Sequence[SourcedGroup]] | Name | Type | Description |
|---|---|---|
config* | HooksConfig | Validated Hooks v2 configuration. |
groups | Mapping[HookEvent, Sequence[SourcedGroup]] | None | Default: NoneMatcher groups with source provenance. Plain configurations use a source with no environment overlay. |
diagnostics | tuple[HookDiagnostic, ...] | Default: () |
snapshot_id | str | None | Default: None |
Build an immutable runtime snapshot from validated configuration.
Invalid matcher groups become diagnostics and are excluded.
Diagnostics retained from configuration loading.
Optional precomputed canonical hash. When omitted, it
is derived from config.