bridge.bootstrap.register_handler module

bridge.bootstrap.register_handler module#

Decorator for registering a handler for a PipelineGoal. Ensures wiring is initialized before execution, then routes calls into the configured pipeline graph.

bridge.bootstrap.register_handler.register_handler(goal, *, auto_wire=True, force_wire=False)[source]#

Register a handler function for a specific pipeline goal. Automatically ensures the registry wiring is initialized before the handler runs. Decorator function.

Parameters:
  • goal (PipelineGoal) – The pipeline goal to register the handler for.

  • auto_wire (bool, optional) – If True, automatically wire the registry before running the handler (default: True).

  • force_wire (bool, optional) – If True, re-initialize wiring even if already initialized (default: False).

Raises:

ValueError – If a handler is already registered for the specified goal.