Result
POST /harness/result endpoint — drain-loop nudge from agents.
Classes:
-
ResultNudge–Request body for POST /harness/result.
Functions:
-
get_drain_event–Retrieve the drain asyncio.Event from the app state.
-
harness_result–Signal the drain loop that a completed task result is ready.
ResultNudge
pydantic-model
¶
Bases: BaseModel
Request body for POST /harness/result.
Attributes:
Parameters:
-
task_id(str) –
Show JSON schema:
Fields:
-
task_id(str)
get_drain_event
¶
Retrieve the drain asyncio.Event from the app state.
Parameters:
-
request(Request) –The incoming FastAPI request.
Returns:
-
Event | None–The drain asyncio.Event, or None if not yet initialized.
harness_result
async
¶
harness_result(body: ResultNudge, drain_event: Event | None = Depends(get_drain_event)) -> Response
Signal the drain loop that a completed task result is ready.
Parameters:
-
body(ResultNudge) –Request body containing the completed task ID.
-
drain_event(Event | None, default:Depends(get_drain_event)) –Drain loop event from app state (injected).
Returns:
-
Response–202 Accepted.