| Name | Type | Description |
|---|---|---|
project_root* | Path | Project root used for project precedence. |
workspace_trusted* | bool | Whether project-scoped hooks may be loaded. |
config_dir | Path | None | Default: NoneAlternate user config directory. |
paths | Sequence[Path] | None | Default: None |
documents | Sequence[tuple[HooksSource, JsonValue]] | Default: () |
document_diagnostics | Sequence[HookDiagnostic] | Default: () |
Load, validate, merge, and hash Hooks v2 configuration.
Explicit trusted source paths in precedence order (highest first). When omitted, project hooks are included only for trusted workspaces, followed by user hooks.
Already-decoded plugin documents with their provenance, merged after every file source so they hold the least authority. Validated here, so a malformed one is reported rather than dropped.
Diagnostics the caller collected while producing
documents, carried into the load result.