-
Notifications
You must be signed in to change notification settings - Fork 3.7k
improvement(deployments): bugfixes for run-block, airtable + external sub management #5680
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: staging
Are you sure you want to change the base?
Changes from all commits
6382eb5
ff0aed0
cf11ff1
233b307
bcc53f3
341b7e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,13 @@ import { | |
| type Tool, | ||
| } from '@modelcontextprotocol/sdk/types.js' | ||
| import { db } from '@sim/db' | ||
| import { workflow, workflowMcpServer, workflowMcpTool, workspace } from '@sim/db/schema' | ||
| import { | ||
| workflow, | ||
| workflowDeploymentVersion, | ||
| workflowMcpServer, | ||
| workflowMcpTool, | ||
| workspace, | ||
| } from '@sim/db/schema' | ||
| import { createLogger } from '@sim/logger' | ||
| import { and, asc, eq, gt, isNull, sql } from 'drizzle-orm' | ||
| import { type NextRequest, NextResponse } from 'next/server' | ||
|
|
@@ -751,8 +757,19 @@ async function handleToolsCall( | |
| } | ||
|
|
||
| const [wf] = await db | ||
| .select({ isDeployed: workflow.isDeployed, workspaceId: workflow.workspaceId }) | ||
| .select({ | ||
| isDeployed: workflow.isDeployed, | ||
| workspaceId: workflow.workspaceId, | ||
| deploymentVersionId: workflowDeploymentVersion.id, | ||
| }) | ||
| .from(workflow) | ||
| .leftJoin( | ||
| workflowDeploymentVersion, | ||
| and( | ||
| eq(workflowDeploymentVersion.workflowId, workflow.id), | ||
| eq(workflowDeploymentVersion.isActive, true) | ||
| ) | ||
| ) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. MCP still trusts isDeployed flagMedium Severity This change joins the active Additional Locations (1)Reviewed by Cursor Bugbot for commit 341b7e3. Configure here. |
||
| .where(and(eq(workflow.id, tool.workflowId), isNull(workflow.archivedAt))) | ||
| .limit(1) | ||
|
icecrasher321 marked this conversation as resolved.
|
||
| const abortedAfterWorkflowLookup = callerAbortedJsonRpcResponse(id, abortSignal) | ||
|
|
@@ -813,6 +830,7 @@ async function handleToolsCall( | |
| input: params.arguments || {}, | ||
| triggerType: 'mcp', | ||
| includeFileBase64: false, | ||
| ...(wf.deploymentVersionId ? { deploymentVersionId: wf.deploymentVersionId } : {}), | ||
| }) | ||
| assertKnownSizeWithinLimit( | ||
| Buffer.byteLength(workflowRequestBody, 'utf-8'), | ||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.