docs(openapi): add Human in the Loop API endpoints#4079
docs(openapi): add Human in the Loop API endpoints#4079waleedlatif1 merged 3 commits intostagingfrom
Conversation
Add HITL pause/resume endpoints to the OpenAPI spec covering the full workflow pause lifecycle: listing paused executions, inspecting pause details, and resuming with input. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview Introduces new schemas ( Reviewed by Cursor Bugbot for commit 149ad9f. Configure here. |
Greptile SummaryThis PR adds OpenAPI documentation for five new Human in the Loop endpoints covering listing paused executions, retrieving execution detail, and resuming executions with input. The 403 and 500 gaps identified in the previous review round have been addressed. A few minor spec gaps remain. Confidence Score: 5/5Safe to merge — documentation-only change with no runtime impact; remaining findings are P2 spec completeness improvements. All blocking gaps from the previous review round (missing 403 and explicit 500 responses) have been resolved. The two remaining findings are minor omissions: a missing implicit 500 on one GET endpoint and the undocumented streaming response variant (consistent with the existing executeWorkflow spec pattern). Neither affects correctness of the implementation or blocks merge. apps/docs/openapi.json — POST resume streaming response and GET paused/{executionId} 500 entry.
|
| Filename | Overview |
|---|---|
| apps/docs/openapi.json | Adds five HITL endpoints with six new schemas; 403 and explicit 500 gaps from prior review are addressed; minor gap remains: GET /api/workflows/{id}/paused/{executionId} is missing a 500 entry, and the streaming response for POST resume is undocumented. |
Sequence Diagram
sequenceDiagram
participant Client
participant API
participant PauseResumeManager
Client->>API: GET /api/workflows/{id}/paused
API->>PauseResumeManager: listPausedExecutions()
PauseResumeManager-->>API: PausedExecutionSummary[]
API-->>Client: 200 { pausedExecutions: [...] }
Client->>API: GET /api/workflows/{id}/paused/{executionId}
API->>PauseResumeManager: getPausedExecutionDetail()
PauseResumeManager-->>API: PausedExecutionDetail | null
API-->>Client: 200 PausedExecutionDetail / 404
Client->>API: GET /api/resume/{workflowId}/{executionId}
API->>PauseResumeManager: getPausedExecutionDetail()
PauseResumeManager-->>API: PausedExecutionDetail | null
API-->>Client: 200 PausedExecutionDetail / 404 / 500
Client->>API: GET /api/resume/{workflowId}/{executionId}/{contextId}
API->>PauseResumeManager: getPauseContextDetail()
PauseResumeManager-->>API: PauseContextDetail | null
API-->>Client: 200 PauseContextDetail / 404
Client->>API: POST /api/resume/{workflowId}/{executionId}/{contextId}
API->>PauseResumeManager: enqueueOrStartResume()
alt queued
API-->>Client: 200 { status: queued, queuePosition }
else sync
API-->>Client: 200 ResumeResult
else stream
API-->>Client: 200 text/event-stream (SSE — undocumented)
else async
API-->>Client: 202 AsyncExecutionResult
else fire-and-forget
API-->>Client: 200 { status: started }
end
Reviews (2): Last reviewed commit: "lint" | Re-trigger Greptile
Address PR review feedback: add missing 403 Forbidden response to all HITL endpoints (from validateWorkflowAccess), and 500 responses to resume endpoints that have explicit error paths. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 149ad9f. Configure here.
Summary
PausedExecutionSummary,PausedExecutionDetail,PausePoint,PauseContextDetail,ResumeQueueEntry,ResumeResultparallelScope/loopScopefields for pause points in parallel branches and loopsType of Change
Testing
Validated JSON structure, all
$reftargets resolve, verified against source route handlers and TypeScript interfacesChecklist