You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(mcp): stream workflow task status (ENG-161) (#309)
* feat(mcp): implement experimental tasks API for streaming workflow status to chat
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
* fix(mcp): correct terminal status transition in monitorWorkflowRun
storeTaskResult refuses to update a task already in a terminal state.
Previously, updateTaskStatus was called first (setting the task to
'completed'/'failed'), then storeTaskResult would throw with an
internal error, causing the client to receive a -32603 McpError.
Fix: skip updateTaskStatus for terminal workflow states and let
storeTaskResult perform the terminal status transition itself.
Only call updateTaskStatus for non-terminal (working) states.
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
* test(e2e): fix studio-mcp-agent run_workflow prompt to ensure non-empty response
The AI agent test was producing an empty text response because the
prompt didn't explicitly request a textual summary. Updated the prompt
to ask for a summary of the final output message so the agent always
returns a non-empty response.
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
* test(e2e): add studio-mcp-tasks E2E test for MCP Task API streaming
Adds a new E2E test that validates the full MCP task lifecycle via
StreamableHTTPClientTransport:
- Connects to /studio-mcp with API key auth
- Calls run_workflow using the experimental callToolStream API
- Asserts taskCreated, taskStatus, and result messages are received
- Verifies the result contains workflow output and no errors
Also removes the scratch test-mcp-server.ts file used for local
debugging during development.
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
* test(unit): update monitorWorkflowRun assertions for terminal status fix
updateTaskStatus is no longer called for terminal states (COMPLETED/
FAILED/CANCELLED) — storeTaskResult handles the terminal transition.
Update unit test expectations to reflect this behaviour.
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
---------
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
0 commit comments