feat(temporal): add Temporal integration with workflow, schedule, and task queue tools#4976
Conversation
… task queue tools
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Runtime: Twenty new tools under Product surface: A Docs: New Reviewed by Cursor Bugbot for commit ef53b1b. Configure here. |
|
@greptile |
|
@cursor review |
Greptile SummaryThis PR adds a full Temporal integration (20 tools) over Temporal's HTTP API, covering workflow lifecycle management (start, signal, signal-with-start, query, update, describe, list, count, history, cancel, terminate, reset), task queue introspection, and schedule management (create, list, describe, pause, unpause, trigger, delete). Inputs and results use Temporal's
Confidence Score: 5/5Safe to merge; all 20 tools have correct Temporal HTTP API field names, URL structures, payload encoding, and request ID coverage. The implementation is a large but well-structured addition. Request bodies use the correct camelCase proto field names (verified against the Temporal HTTP gateway route bindings), json/plain payload encoding is correct, and every write operation that carries a request_id proto field includes one. The only finding is a module-level Buffer.from call in utils.ts that could break in edge runtimes, but tools execute server-side in this project so it poses no practical risk today. apps/sim/tools/temporal/utils.ts — the top-level Buffer.from call is worth addressing for future portability. Important Files Changed
Sequence DiagramsequenceDiagram
participant User as User/LLM
participant Block as Temporal Block
participant Tool as Tool Config
participant Utils as utils.ts
participant Server as Temporal HTTP API
User->>Block: Select operation + params
Block->>Tool: Resolve tool by operation
Tool->>Utils: temporalNamespaceUrl / temporalWorkflowUrl / temporalScheduleUrl
Tool->>Utils: temporalRequestHeaders (Bearer token if apiKey)
Tool->>Utils: parseJsonArgs / parseJsonPayloadMap (encode payloads)
Tool->>Utils: generateId() → requestId
Tool->>Server: "POST/GET/DELETE /api/v1/namespaces/{ns}/workflows/{id}/..."
Note over Tool,Server: Accept: application/json+no-payload-shorthand
Server-->>Tool: JSON response (full payload objects)
Tool->>Utils: parseTemporalResponse (error on non-2xx)
Tool->>Utils: decodePayload / decodePayloads / decodePayloadMap
Tool->>Utils: mapExecutionInfo / mapHistoryEvent / stripEnumPrefix
Tool-->>Block: Typed output (workflowId, runId, result, …)
Block-->>User: Output data
Reviews (5): Last reviewed commit: "improvement(temporal): send requestId on..." | Re-trigger Greptile |
|
@greptile The update_workflow finding was based on a misread of the proto — |
|
@greptile Pushed ef53b1b adding |
|
@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 ef53b1b. Configure here.
|
@greptile Your latest summary appears to have analyzed the pre-fix tree — as of the reviewed commit ef53b1b, |
Summary
json/plainpayload encoding; responses requestapplication/json+no-payload-shorthandso payloads always decode deterministicallyMANUAL-CONTENT), generated action tables, and BlockMeta templates/skillsType of Change
Testing
Typecheck, biome, and check:api-validation pass; endpoints, request/response field names, and payload encoding cross-checked against the Temporal API protos and server HTTP marshaler
Checklist