-
Notifications
You must be signed in to change notification settings - Fork 14
feat(temporal): implement tool mode orchestration and MCP server support #214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ents ENG-95 - Add PortBindingType and bindingType to ComponentPortMetadata - Add AgentToolConfig and agentTool to ComponentUiMetadata - Create tool-helpers.ts with isAgentCallable, getToolSchema, getCredentialInputIds, getActionInputIds, getToolName, getToolDescription, getToolMetadata - Add comprehensive tests for all helper functions (14 tests) Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9ca7a7e610
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| export const RegisterToolRequestSchema = z.object({ | ||
| runId: z.string(), | ||
| nodeId: z.string(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Align tool registration node identifier field
RegisterToolRequestSchema requires nodeId, but the worker’s registerToolActivity posts RegisterToolActivityInput with nodeRef (sent verbatim in the JSON body). Because nodeId is missing, the Zod validation will reject the request and tool registrations will 400, so tool-mode nodes never get stored in the registry. The backend should accept nodeRef (or the worker should send nodeId) so the internal endpoint can validate successfully.
Useful? React with 👍 / 👎.
| const result = await component.execute( | ||
| { inputs: mergedInputs as any, params: {} as any }, | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use node parameters when executing component tools
callComponentTool invokes component.execute with params: {}, which drops the workflow node’s configured parameters. Any tool backed by a component that depends on params (for example core.mcp.tools.http requires endpoint) will execute with undefined/default values and produce incorrect results or failures. This should load the node params from the run/version (or persist them in the registry) and pass them into execute just like the normal workflow runner does.
Useful? React with 👍 / 👎.
| async execute() { | ||
| // The Docker runner handles execution. | ||
| // At runtime, the workflow engine will resolve the dynamic endpoint. | ||
| return { | ||
| endpoint: 'http://localhost:8080', // Placeholder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Start MCP server instead of returning placeholder
core.mcp.server.execute returns a hard-coded http://localhost:8080 and never invokes the Docker runner, so no MCP server container is actually launched. Workflows that use this component will try to connect to a non-existent endpoint. This component needs to call runComponentWithRunner (or otherwise start the container) and return the real bound endpoint instead of a placeholder.
Useful? React with 👍 / 👎.
…itecture Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
ENG-96
- Create ToolRegistryService with Redis-backed storage
- Implement registerComponentTool, registerRemoteMcp, registerLocalMcp
- Implement getToolsForRun, getTool, getToolByName, getToolCredentials
- Implement areAllToolsReady for agent readiness check
- Implement cleanupRun for workflow completion cleanup
- Encrypt credentials using existing SecretsEncryptionService
- Redis key pattern: mcp:run:{runId}:tools (Hash, TTL 1hr)
- Add McpModule to app imports
- Add comprehensive tests (8 tests passing)
Note: Temporal activities (registerToolActivity, waitForToolsActivity, etc.)
will be added in a follow-up as they reside in the worker package.
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
9ca7a7e to
3b44d78
Compare
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
3b44d78 to
c513293
Compare
Summary
toolmode. These nodes register their metadata and credentials in the Tool Registry and pause until an agent call is received.core.mcp.servercomponent, allowing workflows to dynamically include external Model Context Protocol tool sources.toolCallCompletedSignalto allow the MCP Gateway to notify waiting workflows when an autonomous agent has finished invoking a tool.{ activePorts: ... }for better compatibility with the workflow scheduler and fixed a pre-existing argument bug in human input expiration.Stacked on: #213 (ENG-98)