handlers

Workflow-specific alignment handlers: init

Initialize Handler

Fetches VAD data from the alignment service and stores in state.


source

AlignInitResult


def AlignInitResult(
    args:VAR_POSITIONAL, kwargs:VAR_KEYWORD
):

Result from pure alignment init handler.

Contains domain-specific data for the combined layer wrapper to use when building cross-domain OOB elements (shared chrome, alignment status).

Router Initialization

Creates the workflow router with the init route.


source

init_workflow_router


def init_workflow_router(
    state_store:SQLiteWorkflowStateStore, # The workflow state store
    workflow_id:str, # The workflow identifier
    source_service:SourceService, # Service for fetching source blocks
    alignment_service:AlignmentService, # Service for VAD analysis
    prefix:str, # Route prefix (e.g., "/workflow/align/workflow")
    urls:AlignmentUrls, # URL bundle (populated after routes defined)
    handler_init:Callable=None, # Optional wrapped init handler
)->Tuple: # (router, route_dict)

Initialize workflow routes for alignment.

Accepts optional handler override for wrapping with cross-domain coordination (e.g., shared chrome, alignment status OOB updates).