build_tools.syllable_walk_web.api.pipeline

Pipeline API handlers for the web application.

Handles pipeline start, status, cancel, and run listing.

Functions

handle_start(body, state)

Handle POST /api/pipeline/start.

handle_status(state)

Handle GET /api/pipeline/status.

handle_cancel(state)

Handle POST /api/pipeline/cancel.

handle_runs(state[, patch])

Handle GET /api/pipeline/runs.

Module Contents

build_tools.syllable_walk_web.api.pipeline.handle_start(body, state)[source]

Handle POST /api/pipeline/start.

Starts a new pipeline run in a background thread.

Parameters:
Returns:

Immediate response with job ID and status.

Return type:

dict[str, Any]

build_tools.syllable_walk_web.api.pipeline.handle_status(state)[source]

Handle GET /api/pipeline/status.

Returns current pipeline job status with log lines.

Parameters:

state (build_tools.syllable_walk_web.state.ServerState) – Global server state.

Returns:

Job status dict.

Return type:

dict[str, Any]

build_tools.syllable_walk_web.api.pipeline.handle_cancel(state)[source]

Handle POST /api/pipeline/cancel.

Cancels the running pipeline job.

Parameters:

state (build_tools.syllable_walk_web.state.ServerState) – Global server state.

Returns:

Confirmation dict.

Return type:

dict[str, Any]

build_tools.syllable_walk_web.api.pipeline.handle_runs(state, patch=None)[source]

Handle GET /api/pipeline/runs.

Lists discovered pipeline runs. When patch is "a" or "b" and a per-patch corpus directory is configured, runs are discovered from that directory instead of output_base.

Parameters:
Returns:

Dict with runs list.

Return type:

dict[str, Any]