Skip to content

src/dazzle_back/runtime/hook_registry.py

Generated: 2026-03-30T04:38:47.369098+00:00

Commit: 615f1354a103

Language: python

Scope: dazzle_back

Purpose

Service hook registry for project-level lifecycle extensions (v0.29.0).

Discovers Python hook files in the project hooks/ directory, validates declaration headers, and registers them with entity services for pre/post lifecycle interception.

Hook files use declaration headers::

# dazzle:se...

Key Exports

  • HookDescriptor
  • HookRegistry
  • discover_hooks
  • build_registry
  • register
  • get_hooks
  • count
  • summary

Dependencies

Imports

  • __future__.annotations
  • importlib.util
  • logging
  • re
  • sys
  • collections.abc.Callable
  • dataclasses.dataclass
  • dataclasses.field
  • pathlib.Path
  • typing.Any

Event Interactions

None detected.

Invariants and Assumptions

No invariants documented.

Tests

  • tests/unit/test_hook_registry.py
  • tests/integration/test_runtime_e2e.py
  • tests/integration/test_runtime_pipeline.py
  • tests/unit/test_runtime_test_routes.py
  • tests/unit/test_runtime_services.py

Notes

This page was automatically generated by tools/gen_reference_docs.py.