From f2654223b78c26193af89f3b19fb2b13494a13d2 Mon Sep 17 00:00:00 2001 From: waleed Date: Thu, 2 Jul 2026 00:46:28 -0700 Subject: [PATCH 1/8] fix(vercel): align integration with live Vercel REST API docs - add missing teamId/slug scoping to 29 tools (deployments, checks, projects, env vars) - add DNS SRV/HTTPS record support (nested srv/https objects) to create/update_dns_record - add decrypt/gitBranch filters to get_env_vars, autoUpdate to rerequest_check - add redirect param to create_alias, comment to create_dns_record - add missing customNameservers/userId/teamId/transferStartedAt fields to list_domains output - wire pagination filters (limit/since/until/search/app) into block subBlocks for list_deployments, list_teams, list_team_members, list_dns_records, list_project_domains - wire previously-unexposed tool params into block UI: withGitRepoInfo, gitSource, forceNew, externalId, rerequestable, output, direction, follow - fix duplicate projectId subBlock id collision between list_deployments and other project-scoped operations - fix teamId scope field incorrectly hidden for check operations --- apps/sim/blocks/blocks/vercel.ts | 800 +++++++++++++++++- apps/sim/tools/vercel/add_project_domain.ts | 7 + apps/sim/tools/vercel/cancel_deployment.ts | 7 + apps/sim/tools/vercel/create_alias.ts | 17 +- apps/sim/tools/vercel/create_check.ts | 7 + apps/sim/tools/vercel/create_deployment.ts | 7 + apps/sim/tools/vercel/create_dns_record.ts | 77 +- apps/sim/tools/vercel/create_env_var.ts | 7 + apps/sim/tools/vercel/create_project.ts | 7 + apps/sim/tools/vercel/delete_deployment.ts | 7 + apps/sim/tools/vercel/delete_env_var.ts | 7 + apps/sim/tools/vercel/delete_project.ts | 7 + apps/sim/tools/vercel/get_check.ts | 7 + apps/sim/tools/vercel/get_deployment.ts | 7 + .../sim/tools/vercel/get_deployment_events.ts | 7 + apps/sim/tools/vercel/get_env_vars.ts | 22 + apps/sim/tools/vercel/get_project.ts | 7 + apps/sim/tools/vercel/list_checks.ts | 7 + .../sim/tools/vercel/list_deployment_files.ts | 7 + apps/sim/tools/vercel/list_deployments.ts | 7 + apps/sim/tools/vercel/list_domains.ts | 16 + apps/sim/tools/vercel/list_project_domains.ts | 7 + apps/sim/tools/vercel/list_projects.ts | 21 + apps/sim/tools/vercel/pause_project.ts | 7 + apps/sim/tools/vercel/promote_deployment.ts | 7 + .../sim/tools/vercel/remove_project_domain.ts | 7 + apps/sim/tools/vercel/rerequest_check.ts | 14 + apps/sim/tools/vercel/types.ts | 56 +- apps/sim/tools/vercel/unpause_project.ts | 7 + apps/sim/tools/vercel/update_check.ts | 7 + apps/sim/tools/vercel/update_dns_record.ts | 71 +- apps/sim/tools/vercel/update_env_var.ts | 7 + apps/sim/tools/vercel/update_project.ts | 7 + .../sim/tools/vercel/update_project_domain.ts | 7 + .../sim/tools/vercel/verify_project_domain.ts | 7 + 35 files changed, 1244 insertions(+), 32 deletions(-) diff --git a/apps/sim/blocks/blocks/vercel.ts b/apps/sim/blocks/blocks/vercel.ts index 65e0513c63b..b432227ebcc 100644 --- a/apps/sim/blocks/blocks/vercel.ts +++ b/apps/sim/blocks/blocks/vercel.ts @@ -103,7 +103,7 @@ export const VercelBlock: BlockConfig = { }, { - id: 'projectId', + id: 'deploymentsProjectId', title: 'Project ID', type: 'short-input', placeholder: 'Filter by project ID or name (optional)', @@ -137,6 +137,38 @@ export const VercelBlock: BlockConfig = { condition: { field: 'operation', value: 'list_deployments' }, mode: 'advanced', }, + { + id: 'deploymentsApp', + title: 'App Name', + type: 'short-input', + placeholder: 'Filter by deployment name (optional)', + condition: { field: 'operation', value: 'list_deployments' }, + mode: 'advanced', + }, + { + id: 'deploymentsSince', + title: 'Since', + type: 'short-input', + placeholder: 'Only deployments created after this timestamp, in ms (optional)', + condition: { field: 'operation', value: 'list_deployments' }, + mode: 'advanced', + }, + { + id: 'deploymentsUntil', + title: 'Until', + type: 'short-input', + placeholder: 'Only deployments created before this timestamp, in ms (optional)', + condition: { field: 'operation', value: 'list_deployments' }, + mode: 'advanced', + }, + { + id: 'deploymentsLimit', + title: 'Limit', + type: 'short-input', + placeholder: 'Maximum number of deployments to return (optional)', + condition: { field: 'operation', value: 'list_deployments' }, + mode: 'advanced', + }, { id: 'deploymentId', title: 'Deployment ID', @@ -165,6 +197,64 @@ export const VercelBlock: BlockConfig = { ], }, }, + { + id: 'withGitRepoInfo', + title: 'Include Git Repo Info', + type: 'dropdown', + options: [ + { label: 'No', id: 'false' }, + { label: 'Yes', id: 'true' }, + ], + condition: { field: 'operation', value: 'get_deployment' }, + mode: 'advanced', + }, + { + id: 'eventsDirection', + title: 'Direction', + type: 'dropdown', + options: [ + { label: 'Forward (default)', id: '' }, + { label: 'Forward', id: 'forward' }, + { label: 'Backward', id: 'backward' }, + ], + condition: { field: 'operation', value: 'get_deployment_events' }, + mode: 'advanced', + }, + { + id: 'eventsFollow', + title: 'Follow Live Events', + type: 'dropdown', + options: [ + { label: 'No', id: '' }, + { label: 'Yes', id: '1' }, + ], + condition: { field: 'operation', value: 'get_deployment_events' }, + mode: 'advanced', + }, + { + id: 'eventsLimit', + title: 'Limit', + type: 'short-input', + placeholder: 'Maximum number of events to return, -1 for all (optional)', + condition: { field: 'operation', value: 'get_deployment_events' }, + mode: 'advanced', + }, + { + id: 'eventsSince', + title: 'Since', + type: 'short-input', + placeholder: 'Timestamp to start pulling build logs from (optional)', + condition: { field: 'operation', value: 'get_deployment_events' }, + mode: 'advanced', + }, + { + id: 'eventsUntil', + title: 'Until', + type: 'short-input', + placeholder: 'Timestamp to stop pulling build logs at (optional)', + condition: { field: 'operation', value: 'get_deployment_events' }, + mode: 'advanced', + }, { id: 'name', title: 'Project Name', @@ -201,6 +291,25 @@ export const VercelBlock: BlockConfig = { condition: { field: 'operation', value: 'create_deployment' }, mode: 'advanced', }, + { + id: 'deploymentGitSource', + title: 'Git Source', + type: 'code', + placeholder: '{"type":"github","repo":"owner/repo","ref":"main"}', + condition: { field: 'operation', value: 'create_deployment' }, + mode: 'advanced', + }, + { + id: 'deploymentForceNew', + title: 'Force New Deployment', + type: 'dropdown', + options: [ + { label: 'No', id: '' }, + { label: 'Yes', id: '1' }, + ], + condition: { field: 'operation', value: 'create_deployment' }, + mode: 'advanced', + }, { id: 'search', @@ -210,6 +319,14 @@ export const VercelBlock: BlockConfig = { condition: { field: 'operation', value: 'list_projects' }, mode: 'advanced', }, + { + id: 'projectsFrom', + title: 'From', + type: 'short-input', + placeholder: "Continuation token from the previous response's nextFrom output (optional)", + condition: { field: 'operation', value: 'list_projects' }, + mode: 'advanced', + }, { id: 'projectId', title: 'Project ID', @@ -307,6 +424,14 @@ export const VercelBlock: BlockConfig = { mode: 'advanced', }, + { + id: 'projectDomainsLimit', + title: 'Limit', + type: 'short-input', + placeholder: 'Maximum number of domains to return (optional)', + condition: { field: 'operation', value: 'list_project_domains' }, + mode: 'advanced', + }, { id: 'domainName', title: 'Domain', @@ -351,7 +476,7 @@ export const VercelBlock: BlockConfig = { title: 'Redirect To', type: 'short-input', placeholder: 'Target domain to redirect to (optional)', - condition: { field: 'operation', value: 'update_project_domain' }, + condition: { field: 'operation', value: ['update_project_domain', 'add_project_domain'] }, mode: 'advanced', }, { @@ -365,7 +490,7 @@ export const VercelBlock: BlockConfig = { { label: '307 (Temporary)', id: '307' }, { label: '308 (Permanent)', id: '308' }, ], - condition: { field: 'operation', value: 'update_project_domain' }, + condition: { field: 'operation', value: ['update_project_domain', 'add_project_domain'] }, mode: 'advanced', }, { @@ -373,7 +498,15 @@ export const VercelBlock: BlockConfig = { title: 'Git Branch', type: 'short-input', placeholder: 'Git branch to link the domain to (optional)', - condition: { field: 'operation', value: 'update_project_domain' }, + condition: { field: 'operation', value: ['update_project_domain', 'add_project_domain'] }, + mode: 'advanced', + }, + { + id: 'dnsRecordsLimit', + title: 'Limit', + type: 'short-input', + placeholder: 'Maximum number of records to return (optional)', + condition: { field: 'operation', value: 'list_dns_records' }, mode: 'advanced', }, @@ -422,6 +555,41 @@ export const VercelBlock: BlockConfig = { condition: { field: 'operation', value: ['create_env_var', 'update_env_var'] }, mode: 'advanced', }, + { + id: 'envGitBranch', + title: 'Git Branch', + type: 'short-input', + placeholder: 'Git branch to associate with the variable (requires preview target)', + condition: { field: 'operation', value: ['create_env_var', 'update_env_var'] }, + mode: 'advanced', + }, + { + id: 'envComment', + title: 'Comment', + type: 'short-input', + placeholder: 'Context for this variable (max 500 chars)', + condition: { field: 'operation', value: ['create_env_var', 'update_env_var'] }, + mode: 'advanced', + }, + { + id: 'envVarsDecrypt', + title: 'Decrypt Values', + type: 'dropdown', + options: [ + { label: 'No', id: 'false' }, + { label: 'Yes', id: 'true' }, + ], + condition: { field: 'operation', value: 'get_env_vars' }, + mode: 'advanced', + }, + { + id: 'envVarsGitBranch', + title: 'Git Branch', + type: 'short-input', + placeholder: 'Filter by git branch (requires preview target)', + condition: { field: 'operation', value: 'get_env_vars' }, + mode: 'advanced', + }, { id: 'recordName', @@ -445,6 +613,7 @@ export const VercelBlock: BlockConfig = { { label: 'ALIAS', id: 'ALIAS' }, { label: 'SRV', id: 'SRV' }, { label: 'CAA', id: 'CAA' }, + { label: 'HTTPS', id: 'HTTPS' }, ], condition: { field: 'operation', value: 'create_dns_record' }, required: { field: 'operation', value: 'create_dns_record' }, @@ -454,8 +623,132 @@ export const VercelBlock: BlockConfig = { title: 'Value', type: 'short-input', placeholder: 'Record value (e.g., IP address)', + condition: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: ['SRV', 'HTTPS'], not: true }, + }, + required: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: ['SRV', 'HTTPS'], not: true }, + }, + }, + { + id: 'srvTarget', + title: 'SRV Target', + type: 'short-input', + placeholder: 'Target hostname for the SRV record', + condition: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'SRV' }, + }, + required: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'SRV' }, + }, + }, + { + id: 'srvWeight', + title: 'SRV Weight', + type: 'short-input', + placeholder: 'Weight for the SRV record', + condition: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'SRV' }, + }, + required: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'SRV' }, + }, + }, + { + id: 'srvPort', + title: 'SRV Port', + type: 'short-input', + placeholder: 'Port for the SRV record', + condition: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'SRV' }, + }, + required: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'SRV' }, + }, + }, + { + id: 'srvPriority', + title: 'SRV Priority', + type: 'short-input', + placeholder: 'Priority for the SRV record', + condition: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'SRV' }, + }, + required: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'SRV' }, + }, + }, + { + id: 'httpsTarget', + title: 'HTTPS Target', + type: 'short-input', + placeholder: 'Target hostname for the HTTPS record', + condition: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'HTTPS' }, + }, + required: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'HTTPS' }, + }, + }, + { + id: 'httpsPriority', + title: 'HTTPS Priority', + type: 'short-input', + placeholder: 'Priority for the HTTPS record', + condition: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'HTTPS' }, + }, + required: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'HTTPS' }, + }, + }, + { + id: 'httpsParams', + title: 'HTTPS Params', + type: 'short-input', + placeholder: 'Optional service parameters (e.g., "alpn=h2,h3")', + condition: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'HTTPS' }, + }, + mode: 'advanced', + }, + { + id: 'recordComment', + title: 'Comment', + type: 'short-input', + placeholder: 'Context for this DNS record (max 500 chars)', condition: { field: 'operation', value: 'create_dns_record' }, - required: { field: 'operation', value: 'create_dns_record' }, + mode: 'advanced', }, { id: 'recordId', @@ -496,7 +789,11 @@ export const VercelBlock: BlockConfig = { title: 'Value', type: 'short-input', placeholder: 'New record value — leave blank to keep', - condition: { field: 'operation', value: 'update_dns_record' }, + condition: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: ['SRV', 'HTTPS'], not: true }, + }, }, { id: 'updateRecordTtl', @@ -514,6 +811,114 @@ export const VercelBlock: BlockConfig = { condition: { field: 'operation', value: 'update_dns_record' }, mode: 'advanced', }, + { + id: 'updateSrvTarget', + title: 'SRV Target', + type: 'short-input', + placeholder: 'Target hostname for the SRV record', + condition: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'SRV' }, + }, + required: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'SRV' }, + }, + }, + { + id: 'updateSrvWeight', + title: 'SRV Weight', + type: 'short-input', + placeholder: 'Weight for the SRV record', + condition: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'SRV' }, + }, + required: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'SRV' }, + }, + }, + { + id: 'updateSrvPort', + title: 'SRV Port', + type: 'short-input', + placeholder: 'Port for the SRV record', + condition: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'SRV' }, + }, + required: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'SRV' }, + }, + }, + { + id: 'updateSrvPriority', + title: 'SRV Priority', + type: 'short-input', + placeholder: 'Priority for the SRV record', + condition: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'SRV' }, + }, + required: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'SRV' }, + }, + }, + { + id: 'updateHttpsTarget', + title: 'HTTPS Target', + type: 'short-input', + placeholder: 'Target hostname for the HTTPS record', + condition: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'HTTPS' }, + }, + required: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'HTTPS' }, + }, + }, + { + id: 'updateHttpsPriority', + title: 'HTTPS Priority', + type: 'short-input', + placeholder: 'Priority for the HTTPS record', + condition: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'HTTPS' }, + }, + required: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'HTTPS' }, + }, + }, + { + id: 'updateHttpsParams', + title: 'HTTPS Params', + type: 'short-input', + placeholder: 'Optional service parameters (e.g., "alpn=h2,h3")', + condition: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'HTTPS' }, + }, + mode: 'advanced', + }, { id: 'updateRecordComment', title: 'Comment', @@ -547,6 +952,14 @@ export const VercelBlock: BlockConfig = { condition: { field: 'operation', value: 'create_alias' }, required: { field: 'operation', value: 'create_alias' }, }, + { + id: 'aliasRedirect', + title: 'Redirect To', + type: 'short-input', + placeholder: 'Hostname to 307-redirect the alias to (optional)', + condition: { field: 'operation', value: 'create_alias' }, + mode: 'advanced', + }, { id: 'edgeConfigId', @@ -708,6 +1121,44 @@ export const VercelBlock: BlockConfig = { ], condition: { field: 'operation', value: 'update_check' }, }, + { + id: 'checkExternalId', + title: 'External ID', + type: 'short-input', + placeholder: 'External identifier for the check (optional)', + condition: { field: 'operation', value: ['create_check', 'update_check'] }, + mode: 'advanced', + }, + { + id: 'checkRerequestable', + title: 'Rerequestable', + type: 'dropdown', + options: [ + { label: 'No', id: 'false' }, + { label: 'Yes', id: 'true' }, + ], + condition: { field: 'operation', value: 'create_check' }, + mode: 'advanced', + }, + { + id: 'checkOutput', + title: 'Output', + type: 'code', + placeholder: '{"metrics":{"FCP":{"value":1200,"source":"web-vitals"}}}', + condition: { field: 'operation', value: 'update_check' }, + mode: 'advanced', + }, + { + id: 'checkAutoUpdate', + title: 'Auto Update', + type: 'dropdown', + options: [ + { label: 'No', id: 'false' }, + { label: 'Yes', id: 'true' }, + ], + condition: { field: 'operation', value: 'rerequest_check' }, + mode: 'advanced', + }, { id: 'teamIdParam', @@ -732,25 +1183,113 @@ export const VercelBlock: BlockConfig = { condition: { field: 'operation', value: 'list_team_members' }, mode: 'advanced', }, + { + id: 'teamMembersLimit', + title: 'Limit', + type: 'short-input', + placeholder: 'Maximum number of members to return (optional)', + condition: { field: 'operation', value: 'list_team_members' }, + mode: 'advanced', + }, + { + id: 'teamMembersSince', + title: 'Since', + type: 'short-input', + placeholder: 'Only members added since this timestamp, in ms (optional)', + condition: { field: 'operation', value: 'list_team_members' }, + mode: 'advanced', + }, + { + id: 'teamMembersUntil', + title: 'Until', + type: 'short-input', + placeholder: 'Only members added until this timestamp, in ms (optional)', + condition: { field: 'operation', value: 'list_team_members' }, + mode: 'advanced', + }, + { + id: 'teamMembersSearch', + title: 'Search', + type: 'short-input', + placeholder: 'Search members by name, username, or email (optional)', + condition: { field: 'operation', value: 'list_team_members' }, + mode: 'advanced', + }, + { + id: 'teamsLimit', + title: 'Limit', + type: 'short-input', + placeholder: 'Maximum number of teams to return (optional)', + condition: { field: 'operation', value: 'list_teams' }, + mode: 'advanced', + }, + { + id: 'teamsSince', + title: 'Since', + type: 'short-input', + placeholder: 'Only teams created since this timestamp, in ms (optional)', + condition: { field: 'operation', value: 'list_teams' }, + mode: 'advanced', + }, + { + id: 'teamsUntil', + title: 'Until', + type: 'short-input', + placeholder: 'Only teams created until this timestamp, in ms (optional)', + condition: { field: 'operation', value: 'list_teams' }, + mode: 'advanced', + }, { id: 'teamId', title: 'Team ID (Scope)', type: 'short-input', placeholder: 'Team ID to scope request (optional)', + condition: { + field: 'operation', + value: ['get_team', 'list_team_members', 'get_user', 'list_teams'], + not: true, + }, + mode: 'advanced', + }, + { + id: 'teamSlug', + title: 'Team Slug (Scope)', + type: 'short-input', + placeholder: 'Team slug to scope request, alternative to Team ID (optional)', condition: { field: 'operation', value: [ - 'get_team', - 'list_team_members', - 'get_user', + 'add_project_domain', + 'create_env_var', + 'create_project', + 'delete_env_var', + 'delete_project', + 'get_env_vars', + 'get_project', + 'list_project_domains', + 'list_projects', + 'pause_project', + 'remove_project_domain', + 'unpause_project', + 'update_env_var', + 'update_project_domain', + 'update_project', + 'verify_project_domain', + 'create_deployment', + 'get_deployment', + 'list_deployments', + 'cancel_deployment', + 'delete_deployment', + 'promote_deployment', + 'get_deployment_events', + 'list_deployment_files', 'create_check', 'get_check', 'list_checks', 'update_check', 'rerequest_check', ], - not: true, }, mode: 'advanced', }, @@ -829,23 +1368,59 @@ export const VercelBlock: BlockConfig = { const { apiKey, operation, + deploymentsProjectId, + deploymentsApp, + deploymentsSince, + deploymentsUntil, + deploymentsLimit, redeployId, deployTarget, + deploymentGitSource, + deploymentForceNew, + withGitRepoInfo, + eventsDirection, + eventsFollow, + eventsLimit, + eventsSince, + eventsUntil, projectName, domainName, + dnsRecordsLimit, + projectDomainsLimit, envKey, envValue, envTarget, envType, + envGitBranch, + envComment, + envVarsDecrypt, + envVarsGitBranch, + projectsFrom, + teamSlug, recordName, recordType, recordValue, recordId, + srvTarget, + srvWeight, + srvPort, + srvPriority, + httpsTarget, + httpsPriority, + httpsParams, + recordComment, updateRecordName, updateRecordType, updateRecordValue, updateRecordTtl, updateRecordMxPriority, + updateSrvTarget, + updateSrvWeight, + updateSrvPort, + updateSrvPriority, + updateHttpsTarget, + updateHttpsPriority, + updateHttpsParams, updateRecordComment, updateDomainRedirect, updateDomainRedirectStatusCode, @@ -853,6 +1428,7 @@ export const VercelBlock: BlockConfig = { aliasId, aliasDeploymentId, aliasName, + aliasRedirect, edgeConfigId, edgeConfigSlug, edgeConfigItems, @@ -868,25 +1444,69 @@ export const VercelBlock: BlockConfig = { checkDetailsUrl, checkStatus, checkConclusion, + checkExternalId, + checkRerequestable, + checkOutput, + checkAutoUpdate, teamIdParam, memberRole, + teamMembersLimit, + teamMembersSince, + teamMembersUntil, + teamMembersSearch, + teamsLimit, + teamsSince, + teamsUntil, ...rest } = params - const base = { ...rest, apiKey } + const base = { ...rest, apiKey, ...(teamSlug ? { slug: teamSlug } : {}) } switch (operation) { + case 'list_deployments': + return { + ...base, + ...(deploymentsProjectId ? { projectId: deploymentsProjectId } : {}), + ...(deploymentsApp ? { app: deploymentsApp } : {}), + ...(deploymentsSince ? { since: Number(deploymentsSince) } : {}), + ...(deploymentsUntil ? { until: Number(deploymentsUntil) } : {}), + ...(deploymentsLimit ? { limit: Number(deploymentsLimit) } : {}), + } + case 'get_deployment': + return { ...base, ...(withGitRepoInfo ? { withGitRepoInfo } : {}) } + case 'get_deployment_events': + return { + ...base, + ...(eventsDirection ? { direction: eventsDirection } : {}), + ...(eventsFollow ? { follow: Number(eventsFollow) } : {}), + ...(eventsLimit ? { limit: Number(eventsLimit) } : {}), + ...(eventsSince ? { since: Number(eventsSince) } : {}), + ...(eventsUntil ? { until: Number(eventsUntil) } : {}), + } case 'create_deployment': return { ...base, ...(redeployId ? { deploymentId: redeployId } : {}), ...(deployTarget ? { target: deployTarget } : {}), + ...(deploymentGitSource ? { gitSource: deploymentGitSource } : {}), + ...(deploymentForceNew ? { forceNew: deploymentForceNew } : {}), } case 'create_project': return { ...base, name: projectName } case 'update_project': return base + case 'list_projects': + return { ...base, ...(projectsFrom ? { from: projectsFrom } : {}) } case 'add_project_domain': + return { + ...base, + domain: domainName, + ...(updateDomainRedirect ? { redirect: updateDomainRedirect } : {}), + ...(updateDomainRedirectStatusCode + ? { redirectStatusCode: Number(updateDomainRedirectStatusCode) } + : {}), + ...(updateDomainGitBranch ? { gitBranch: updateDomainGitBranch } : {}), + } case 'remove_project_domain': case 'verify_project_domain': return { ...base, domain: domainName } @@ -896,7 +1516,7 @@ export const VercelBlock: BlockConfig = { domain: domainName, ...(updateDomainRedirect ? { redirect: updateDomainRedirect } : {}), ...(updateDomainRedirectStatusCode - ? { redirectStatusCode: updateDomainRedirectStatusCode } + ? { redirectStatusCode: Number(updateDomainRedirectStatusCode) } : {}), ...(updateDomainGitBranch ? { gitBranch: updateDomainGitBranch } : {}), } @@ -907,9 +1527,32 @@ export const VercelBlock: BlockConfig = { case 'add_domain': return { ...base, name: domainName } case 'list_dns_records': - return { ...base, domain: domainName } + return { + ...base, + domain: domainName, + ...(dnsRecordsLimit ? { limit: Number(dnsRecordsLimit) } : {}), + } + case 'list_project_domains': + return { + ...base, + ...(projectDomainsLimit ? { limit: Number(projectDomainsLimit) } : {}), + } case 'create_dns_record': - return { ...base, domain: domainName, recordName, recordType, value: recordValue } + return { + ...base, + domain: domainName, + recordName, + recordType, + ...(recordValue ? { value: recordValue } : {}), + ...(srvTarget ? { srvTarget } : {}), + ...(srvWeight ? { srvWeight: Number(srvWeight) } : {}), + ...(srvPort ? { srvPort: Number(srvPort) } : {}), + ...(srvPriority ? { srvPriority: Number(srvPriority) } : {}), + ...(httpsTarget ? { httpsTarget } : {}), + ...(httpsPriority ? { httpsPriority: Number(httpsPriority) } : {}), + ...(httpsParams ? { httpsParams } : {}), + ...(recordComment ? { comment: recordComment } : {}), + } case 'delete_dns_record': return { ...base, domain: domainName, recordId } case 'update_dns_record': @@ -921,10 +1564,31 @@ export const VercelBlock: BlockConfig = { ...(updateRecordValue ? { value: updateRecordValue } : {}), ...(updateRecordTtl ? { ttl: updateRecordTtl } : {}), ...(updateRecordMxPriority ? { mxPriority: updateRecordMxPriority } : {}), + ...(updateSrvTarget ? { srvTarget: updateSrvTarget } : {}), + ...(updateSrvWeight ? { srvWeight: Number(updateSrvWeight) } : {}), + ...(updateSrvPort ? { srvPort: Number(updateSrvPort) } : {}), + ...(updateSrvPriority ? { srvPriority: Number(updateSrvPriority) } : {}), + ...(updateHttpsTarget ? { httpsTarget: updateHttpsTarget } : {}), + ...(updateHttpsPriority ? { httpsPriority: Number(updateHttpsPriority) } : {}), + ...(updateHttpsParams ? { httpsParams: updateHttpsParams } : {}), ...(updateRecordComment ? { comment: updateRecordComment } : {}), } + case 'get_env_vars': + return { + ...base, + ...(envVarsDecrypt ? { decrypt: envVarsDecrypt === 'true' } : {}), + ...(envVarsGitBranch ? { gitBranch: envVarsGitBranch } : {}), + } case 'create_env_var': - return { ...base, key: envKey, value: envValue, target: envTarget, type: envType } + return { + ...base, + key: envKey, + value: envValue, + target: envTarget, + type: envType, + ...(envGitBranch ? { gitBranch: envGitBranch } : {}), + ...(envComment ? { comment: envComment } : {}), + } case 'update_env_var': return { ...base, @@ -932,12 +1596,19 @@ export const VercelBlock: BlockConfig = { ...(envValue ? { value: envValue } : {}), ...(envTarget ? { target: envTarget } : {}), ...(envType ? { type: envType } : {}), + ...(envGitBranch ? { gitBranch: envGitBranch } : {}), + ...(envComment ? { comment: envComment } : {}), } case 'get_alias': case 'delete_alias': return { ...base, aliasId } case 'create_alias': - return { ...base, deploymentId: aliasDeploymentId, alias: aliasName } + return { + ...base, + deploymentId: aliasDeploymentId, + alias: aliasName, + ...(aliasRedirect ? { redirect: aliasRedirect } : {}), + } case 'get_edge_config': case 'get_edge_config_items': case 'delete_edge_config': @@ -964,10 +1635,18 @@ export const VercelBlock: BlockConfig = { blocking: checkBlocking === 'true', ...(checkPath ? { path: checkPath } : {}), ...(checkDetailsUrl ? { detailsUrl: checkDetailsUrl } : {}), + ...(checkExternalId ? { externalId: checkExternalId } : {}), + ...(checkRerequestable ? { rerequestable: checkRerequestable === 'true' } : {}), } case 'get_check': - case 'rerequest_check': return { ...base, deploymentId: checkDeploymentId, checkId } + case 'rerequest_check': + return { + ...base, + deploymentId: checkDeploymentId, + checkId, + ...(checkAutoUpdate ? { autoUpdate: checkAutoUpdate === 'true' } : {}), + } case 'list_checks': return { ...base, deploymentId: checkDeploymentId } case 'update_check': @@ -980,11 +1659,28 @@ export const VercelBlock: BlockConfig = { ...(checkConclusion ? { conclusion: checkConclusion } : {}), ...(checkPath ? { path: checkPath } : {}), ...(checkDetailsUrl ? { detailsUrl: checkDetailsUrl } : {}), + ...(checkExternalId ? { externalId: checkExternalId } : {}), + ...(checkOutput ? { output: checkOutput } : {}), } case 'get_team': return { ...base, teamId: teamIdParam } case 'list_team_members': - return { ...base, teamId: teamIdParam, ...(memberRole ? { role: memberRole } : {}) } + return { + ...base, + teamId: teamIdParam, + ...(memberRole ? { role: memberRole } : {}), + ...(teamMembersLimit ? { limit: Number(teamMembersLimit) } : {}), + ...(teamMembersSince ? { since: Number(teamMembersSince) } : {}), + ...(teamMembersUntil ? { until: Number(teamMembersUntil) } : {}), + ...(teamMembersSearch ? { search: teamMembersSearch } : {}), + } + case 'list_teams': + return { + ...base, + ...(teamsLimit ? { limit: Number(teamsLimit) } : {}), + ...(teamsSince ? { since: Number(teamsSince) } : {}), + ...(teamsUntil ? { until: Number(teamsUntil) } : {}), + } default: return base } @@ -995,6 +1691,10 @@ export const VercelBlock: BlockConfig = { operation: { type: 'string', description: 'Operation to perform' }, apiKey: { type: 'string', description: 'Vercel access token' }, projectId: { type: 'string', description: 'Project ID or name' }, + deploymentsProjectId: { + type: 'string', + description: 'Filter deployments by project ID or name', + }, deploymentId: { type: 'string', description: 'Deployment ID or hostname' }, name: { type: 'string', description: 'Project name' }, projectName: { type: 'string', description: 'New project name' }, @@ -1002,27 +1702,67 @@ export const VercelBlock: BlockConfig = { redeployId: { type: 'string', description: 'Deployment ID to redeploy' }, target: { type: 'string', description: 'Target environment filter' }, deployTarget: { type: 'string', description: 'Deployment target environment' }, + deploymentGitSource: { type: 'string', description: 'JSON git source for the deployment' }, + deploymentForceNew: { type: 'string', description: 'Whether to force a new deployment' }, + withGitRepoInfo: { type: 'string', description: 'Whether to include git repo info' }, + eventsDirection: { type: 'string', description: 'Order of deployment events' }, + eventsFollow: { type: 'string', description: 'Whether to follow live deployment events' }, + eventsLimit: { type: 'string', description: 'Maximum number of deployment events to return' }, + eventsSince: { type: 'string', description: 'Only events after this timestamp' }, + eventsUntil: { type: 'string', description: 'Only events before this timestamp' }, state: { type: 'string', description: 'Deployment state filter' }, search: { type: 'string', description: 'Project search query' }, + projectsFrom: { type: 'string', description: 'Pagination continuation token' }, + deploymentsApp: { type: 'string', description: 'Filter deployments by deployment name' }, + deploymentsSince: { type: 'string', description: 'Only deployments after this timestamp' }, + deploymentsUntil: { type: 'string', description: 'Only deployments before this timestamp' }, + deploymentsLimit: { type: 'string', description: 'Maximum number of deployments to return' }, framework: { type: 'string', description: 'Project framework' }, buildCommand: { type: 'string', description: 'Build command' }, outputDirectory: { type: 'string', description: 'Output directory' }, installCommand: { type: 'string', description: 'Install command' }, domainName: { type: 'string', description: 'Domain name' }, + dnsRecordsLimit: { type: 'string', description: 'Maximum number of DNS records to return' }, + projectDomainsLimit: { + type: 'string', + description: 'Maximum number of project domains to return', + }, envId: { type: 'string', description: 'Environment variable ID' }, envKey: { type: 'string', description: 'Environment variable key' }, envValue: { type: 'string', description: 'Environment variable value' }, envTarget: { type: 'string', description: 'Target environments' }, envType: { type: 'string', description: 'Variable type' }, + envGitBranch: { type: 'string', description: 'Git branch for the environment variable' }, + envComment: { type: 'string', description: 'Comment for the environment variable' }, + envVarsDecrypt: { type: 'string', description: 'Whether to return decrypted values' }, + envVarsGitBranch: { type: 'string', description: 'Filter environment variables by git branch' }, recordName: { type: 'string', description: 'DNS record name' }, recordType: { type: 'string', description: 'DNS record type' }, recordValue: { type: 'string', description: 'DNS record value' }, recordId: { type: 'string', description: 'DNS record ID' }, + srvTarget: { type: 'string', description: 'Target hostname for SRV records' }, + srvWeight: { type: 'string', description: 'Weight for SRV records' }, + srvPort: { type: 'string', description: 'Port for SRV records' }, + srvPriority: { type: 'string', description: 'Priority for SRV records' }, + httpsTarget: { type: 'string', description: 'Target hostname for HTTPS records' }, + httpsPriority: { type: 'string', description: 'Priority for HTTPS records' }, + httpsParams: { type: 'string', description: 'Optional service parameters for HTTPS records' }, + recordComment: { type: 'string', description: 'Comment for the new DNS record' }, updateRecordName: { type: 'string', description: 'Updated DNS record name' }, updateRecordType: { type: 'string', description: 'Updated DNS record type' }, updateRecordValue: { type: 'string', description: 'Updated DNS record value' }, updateRecordTtl: { type: 'string', description: 'Updated DNS record TTL' }, updateRecordMxPriority: { type: 'string', description: 'Updated MX record priority' }, + updateSrvTarget: { type: 'string', description: 'Updated target hostname for SRV records' }, + updateSrvWeight: { type: 'string', description: 'Updated weight for SRV records' }, + updateSrvPort: { type: 'string', description: 'Updated port for SRV records' }, + updateSrvPriority: { type: 'string', description: 'Updated priority for SRV records' }, + updateHttpsTarget: { type: 'string', description: 'Updated target hostname for HTTPS records' }, + updateHttpsPriority: { type: 'string', description: 'Updated priority for HTTPS records' }, + updateHttpsParams: { + type: 'string', + description: 'Updated service parameters for HTTPS records', + }, updateRecordComment: { type: 'string', description: 'Updated DNS record comment' }, updateDomainRedirect: { type: 'string', description: 'Project domain redirect target' }, updateDomainRedirectStatusCode: { @@ -1033,12 +1773,24 @@ export const VercelBlock: BlockConfig = { aliasId: { type: 'string', description: 'Alias ID' }, aliasDeploymentId: { type: 'string', description: 'Deployment ID for alias' }, aliasName: { type: 'string', description: 'Alias domain' }, + aliasRedirect: { type: 'string', description: 'Hostname to 307-redirect the alias to' }, edgeConfigId: { type: 'string', description: 'Edge Config ID' }, edgeConfigSlug: { type: 'string', description: 'Edge Config slug' }, edgeConfigItems: { type: 'string', description: 'Edge Config items JSON' }, teamId: { type: 'string', description: 'Team ID for scoping' }, + teamSlug: { type: 'string', description: 'Team slug for scoping (alternative to Team ID)' }, teamIdParam: { type: 'string', description: 'Team ID parameter' }, memberRole: { type: 'string', description: 'Team member role filter' }, + teamMembersLimit: { type: 'string', description: 'Maximum number of team members to return' }, + teamMembersSince: { type: 'string', description: 'Only members added since this timestamp' }, + teamMembersUntil: { type: 'string', description: 'Only members added until this timestamp' }, + teamMembersSearch: { + type: 'string', + description: 'Search team members by name, username, or email', + }, + teamsLimit: { type: 'string', description: 'Maximum number of teams to return' }, + teamsSince: { type: 'string', description: 'Only teams created since this timestamp' }, + teamsUntil: { type: 'string', description: 'Only teams created until this timestamp' }, webhookId: { type: 'string', description: 'Webhook ID' }, webhookUrl: { type: 'string', description: 'Webhook URL' }, webhookEvents: { type: 'string', description: 'Comma-separated event names' }, @@ -1051,6 +1803,13 @@ export const VercelBlock: BlockConfig = { checkDetailsUrl: { type: 'string', description: 'URL for check details' }, checkStatus: { type: 'string', description: 'Check status' }, checkConclusion: { type: 'string', description: 'Check conclusion' }, + checkExternalId: { type: 'string', description: 'External identifier for the check' }, + checkRerequestable: { type: 'string', description: 'Whether the check can be rerequested' }, + checkOutput: { type: 'string', description: 'JSON check output metrics' }, + checkAutoUpdate: { + type: 'string', + description: 'Whether to mark the check as running immediately on rerequest', + }, }, outputs: { deployments: { @@ -1189,6 +1948,11 @@ export const VercelBlock: BlockConfig = { type: 'boolean', description: 'Whether more results are available', }, + nextFrom: { + type: 'string', + description: 'Continuation token to pass as From to fetch the next page of projects', + condition: { field: 'operation', value: 'list_projects' }, + }, }, } diff --git a/apps/sim/tools/vercel/add_project_domain.ts b/apps/sim/tools/vercel/add_project_domain.ts index a89492bad5f..1e38aa00145 100644 --- a/apps/sim/tools/vercel/add_project_domain.ts +++ b/apps/sim/tools/vercel/add_project_domain.ts @@ -56,12 +56,19 @@ export const vercelAddProjectDomainTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelAddProjectDomainParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v10/projects/${params.projectId.trim()}/domains${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/cancel_deployment.ts b/apps/sim/tools/vercel/cancel_deployment.ts index e9a9150aece..d28af1cb9e2 100644 --- a/apps/sim/tools/vercel/cancel_deployment.ts +++ b/apps/sim/tools/vercel/cancel_deployment.ts @@ -32,12 +32,19 @@ export const vercelCancelDeploymentTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelCancelDeploymentParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v12/deployments/${params.deploymentId.trim()}/cancel${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/create_alias.ts b/apps/sim/tools/vercel/create_alias.ts index 8146005c0ec..57ca4ff3c42 100644 --- a/apps/sim/tools/vercel/create_alias.ts +++ b/apps/sim/tools/vercel/create_alias.ts @@ -27,6 +27,13 @@ export const vercelCreateAliasTool: ToolConfig ({ - alias: params.alias.trim(), - }), + body: (params: VercelCreateAliasParams) => { + const body: Record = { alias: params.alias.trim() } + if (params.redirect != null && params.redirect !== '') { + body.redirect = params.redirect.trim() + } + return body + }, }, transformResponse: async (response: Response) => { diff --git a/apps/sim/tools/vercel/create_check.ts b/apps/sim/tools/vercel/create_check.ts index 68c7f9b8b34..6f4ce6cd68b 100644 --- a/apps/sim/tools/vercel/create_check.ts +++ b/apps/sim/tools/vercel/create_check.ts @@ -62,12 +62,19 @@ export const vercelCreateCheckTool: ToolConfig { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v1/deployments/${params.deploymentId.trim()}/checks${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/create_deployment.ts b/apps/sim/tools/vercel/create_deployment.ts index a167ccc5cde..8fecd6fd339 100644 --- a/apps/sim/tools/vercel/create_deployment.ts +++ b/apps/sim/tools/vercel/create_deployment.ts @@ -64,6 +64,12 @@ export const vercelCreateDeploymentTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { @@ -71,6 +77,7 @@ export const vercelCreateDeploymentTool: ToolConfig< const query = new URLSearchParams() if (params.forceNew) query.set('forceNew', params.forceNew) if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v13/deployments${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/create_dns_record.ts b/apps/sim/tools/vercel/create_dns_record.ts index fdb64c93c24..a4ba09b76ef 100644 --- a/apps/sim/tools/vercel/create_dns_record.ts +++ b/apps/sim/tools/vercel/create_dns_record.ts @@ -40,9 +40,9 @@ export const vercelCreateDnsRecordTool: ToolConfig< }, value: { type: 'string', - required: true, + required: false, visibility: 'user-or-llm', - description: 'The value of the DNS record', + description: 'The value of the DNS record (not used for SRV/HTTPS records)', }, ttl: { type: 'number', @@ -56,6 +56,54 @@ export const vercelCreateDnsRecordTool: ToolConfig< visibility: 'user-or-llm', description: 'Priority for MX records', }, + srvTarget: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Target hostname for SRV records (required when recordType is SRV)', + }, + srvWeight: { + type: 'number', + required: false, + visibility: 'user-or-llm', + description: 'Weight for SRV records (required when recordType is SRV)', + }, + srvPort: { + type: 'number', + required: false, + visibility: 'user-or-llm', + description: 'Port for SRV records (required when recordType is SRV)', + }, + srvPriority: { + type: 'number', + required: false, + visibility: 'user-or-llm', + description: 'Priority for SRV records (required when recordType is SRV)', + }, + httpsTarget: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Target hostname for HTTPS records (required when recordType is HTTPS)', + }, + httpsPriority: { + type: 'number', + required: false, + visibility: 'user-or-llm', + description: 'Priority for HTTPS records (required when recordType is HTTPS)', + }, + httpsParams: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Optional service parameters for HTTPS records (e.g. "alpn=h2,h3")', + }, + comment: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'A comment to add context on what this DNS record is for (max 500 characters)', + }, teamId: { type: 'string', required: false, @@ -77,13 +125,32 @@ export const vercelCreateDnsRecordTool: ToolConfig< 'Content-Type': 'application/json', }), body: (params: VercelCreateDnsRecordParams) => { + const type = params.recordType.trim().toUpperCase() const body: Record = { name: params.recordName.trim(), - type: params.recordType.trim(), - value: params.value.trim(), + type, } if (params.ttl != null) body.ttl = params.ttl - if (params.mxPriority != null) body.mxPriority = params.mxPriority + + if (type === 'SRV') { + body.srv = { + target: params.srvTarget?.trim(), + weight: params.srvWeight, + port: params.srvPort, + priority: params.srvPriority, + } + } else if (type === 'HTTPS') { + body.https = { + target: params.httpsTarget?.trim(), + priority: params.httpsPriority, + ...(params.httpsParams ? { params: params.httpsParams.trim() } : {}), + } + } else { + if (params.value != null) body.value = params.value.trim() + if (type === 'MX' && params.mxPriority != null) body.mxPriority = params.mxPriority + } + + if (params.comment != null && params.comment !== '') body.comment = params.comment return body }, }, diff --git a/apps/sim/tools/vercel/create_env_var.ts b/apps/sim/tools/vercel/create_env_var.ts index c7dc3c65661..75681ac1e3d 100644 --- a/apps/sim/tools/vercel/create_env_var.ts +++ b/apps/sim/tools/vercel/create_env_var.ts @@ -65,12 +65,19 @@ export const vercelCreateEnvVarTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelCreateEnvVarParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v10/projects/${params.projectId.trim()}/env${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/create_project.ts b/apps/sim/tools/vercel/create_project.ts index b05e4b83617..fc8933762a1 100644 --- a/apps/sim/tools/vercel/create_project.ts +++ b/apps/sim/tools/vercel/create_project.ts @@ -59,12 +59,19 @@ export const vercelCreateProjectTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelCreateProjectParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v11/projects${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/delete_deployment.ts b/apps/sim/tools/vercel/delete_deployment.ts index b2989b7f81c..175ace93e1b 100644 --- a/apps/sim/tools/vercel/delete_deployment.ts +++ b/apps/sim/tools/vercel/delete_deployment.ts @@ -32,12 +32,19 @@ export const vercelDeleteDeploymentTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelDeleteDeploymentParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const id = params.deploymentId.trim() if (id.includes('.')) { query.set('url', id) diff --git a/apps/sim/tools/vercel/delete_env_var.ts b/apps/sim/tools/vercel/delete_env_var.ts index 1c2f7f0ece4..75c54490baa 100644 --- a/apps/sim/tools/vercel/delete_env_var.ts +++ b/apps/sim/tools/vercel/delete_env_var.ts @@ -35,12 +35,19 @@ export const vercelDeleteEnvVarTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelDeleteEnvVarParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v9/projects/${params.projectId.trim()}/env/${params.envId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/delete_project.ts b/apps/sim/tools/vercel/delete_project.ts index 7e04e41cd8c..5165966ae1a 100644 --- a/apps/sim/tools/vercel/delete_project.ts +++ b/apps/sim/tools/vercel/delete_project.ts @@ -29,12 +29,19 @@ export const vercelDeleteProjectTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelDeleteProjectParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v9/projects/${params.projectId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/get_check.ts b/apps/sim/tools/vercel/get_check.ts index a02fda8a5c4..a169806b5bc 100644 --- a/apps/sim/tools/vercel/get_check.ts +++ b/apps/sim/tools/vercel/get_check.ts @@ -32,12 +32,19 @@ export const vercelGetCheckTool: ToolConfig { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v1/deployments/${params.deploymentId.trim()}/checks/${params.checkId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/get_deployment.ts b/apps/sim/tools/vercel/get_deployment.ts index 248c25346f4..2c656267b30 100644 --- a/apps/sim/tools/vercel/get_deployment.ts +++ b/apps/sim/tools/vercel/get_deployment.ts @@ -35,6 +35,12 @@ export const vercelGetDeploymentTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { @@ -42,6 +48,7 @@ export const vercelGetDeploymentTool: ToolConfig< const query = new URLSearchParams() if (params.withGitRepoInfo) query.set('withGitRepoInfo', params.withGitRepoInfo) if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v13/deployments/${params.deploymentId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/get_deployment_events.ts b/apps/sim/tools/vercel/get_deployment_events.ts index 5bffa02eb7a..0848cd72ada 100644 --- a/apps/sim/tools/vercel/get_deployment_events.ts +++ b/apps/sim/tools/vercel/get_deployment_events.ts @@ -62,6 +62,12 @@ export const vercelGetDeploymentEventsTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { @@ -73,6 +79,7 @@ export const vercelGetDeploymentEventsTool: ToolConfig< if (params.since !== undefined) query.set('since', String(params.since)) if (params.until !== undefined) query.set('until', String(params.until)) if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v3/deployments/${params.deploymentId.trim()}/events${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/get_env_vars.ts b/apps/sim/tools/vercel/get_env_vars.ts index 00e8c735a79..30750f9d9df 100644 --- a/apps/sim/tools/vercel/get_env_vars.ts +++ b/apps/sim/tools/vercel/get_env_vars.ts @@ -20,18 +20,40 @@ export const vercelGetEnvVarsTool: ToolConfig { const query = new URLSearchParams() + if (params.decrypt) query.set('decrypt', 'true') + if (params.gitBranch) query.set('gitBranch', params.gitBranch.trim()) if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v10/projects/${params.projectId.trim()}/env${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/get_project.ts b/apps/sim/tools/vercel/get_project.ts index 4fa8f3c401f..51c4fb801e0 100644 --- a/apps/sim/tools/vercel/get_project.ts +++ b/apps/sim/tools/vercel/get_project.ts @@ -26,12 +26,19 @@ export const vercelGetProjectTool: ToolConfig { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v9/projects/${params.projectId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/list_checks.ts b/apps/sim/tools/vercel/list_checks.ts index 6329c6300b4..7575e0e6901 100644 --- a/apps/sim/tools/vercel/list_checks.ts +++ b/apps/sim/tools/vercel/list_checks.ts @@ -26,12 +26,19 @@ export const vercelListChecksTool: ToolConfig { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v1/deployments/${params.deploymentId.trim()}/checks${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/list_deployment_files.ts b/apps/sim/tools/vercel/list_deployment_files.ts index c44c8e01b5b..edfda1f3f34 100644 --- a/apps/sim/tools/vercel/list_deployment_files.ts +++ b/apps/sim/tools/vercel/list_deployment_files.ts @@ -32,12 +32,19 @@ export const vercelListDeploymentFilesTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelListDeploymentFilesParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v6/deployments/${params.deploymentId.trim()}/files${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/list_deployments.ts b/apps/sim/tools/vercel/list_deployments.ts index e5e739d346f..be179952f4a 100644 --- a/apps/sim/tools/vercel/list_deployments.ts +++ b/apps/sim/tools/vercel/list_deployments.ts @@ -69,6 +69,12 @@ export const vercelListDeploymentsTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { @@ -82,6 +88,7 @@ export const vercelListDeploymentsTool: ToolConfig< if (params.until) query.set('until', String(params.until)) if (params.limit) query.set('limit', String(params.limit)) if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v7/deployments${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/list_domains.ts b/apps/sim/tools/vercel/list_domains.ts index c5ff697c920..b3662aecce8 100644 --- a/apps/sim/tools/vercel/list_domains.ts +++ b/apps/sim/tools/vercel/list_domains.ts @@ -65,6 +65,10 @@ export const vercelListDomainsTool: ToolConfig { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) if (params.limit) query.set('limit', String(params.limit)) const qs = query.toString() return `https://api.vercel.com/v9/projects/${params.projectId.trim()}/domains${qs ? `?${qs}` : ''}` diff --git a/apps/sim/tools/vercel/list_projects.ts b/apps/sim/tools/vercel/list_projects.ts index 12465171716..c50e29ec6e1 100644 --- a/apps/sim/tools/vercel/list_projects.ts +++ b/apps/sim/tools/vercel/list_projects.ts @@ -29,12 +29,25 @@ export const vercelListProjectsTool: ToolConfig< visibility: 'user-or-llm', description: 'Maximum number of projects to return', }, + from: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: + "Continuation token for pagination, taken from the previous response's pagination.next value. Query only projects updated after this timestamp or continuation token.", + }, teamId: { type: 'string', required: false, visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { @@ -42,7 +55,9 @@ export const vercelListProjectsTool: ToolConfig< const query = new URLSearchParams() if (params.search) query.set('search', params.search) if (params.limit) query.set('limit', String(params.limit)) + if (params.from) query.set('from', params.from.trim()) if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v10/projects${qs ? `?${qs}` : ''}` }, @@ -69,6 +84,7 @@ export const vercelListProjectsTool: ToolConfig< projects, count: projects.length, hasMore: data.pagination?.next != null, + nextFrom: data.pagination?.next ?? null, }, } }, @@ -96,5 +112,10 @@ export const vercelListProjectsTool: ToolConfig< type: 'boolean', description: 'Whether more projects are available', }, + nextFrom: { + type: 'string', + description: 'Continuation token to pass as `from` to fetch the next page', + optional: true, + }, }, } diff --git a/apps/sim/tools/vercel/pause_project.ts b/apps/sim/tools/vercel/pause_project.ts index e7e56f6b976..746291914f9 100644 --- a/apps/sim/tools/vercel/pause_project.ts +++ b/apps/sim/tools/vercel/pause_project.ts @@ -29,12 +29,19 @@ export const vercelPauseProjectTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelPauseProjectParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v1/projects/${params.projectId.trim()}/pause${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/promote_deployment.ts b/apps/sim/tools/vercel/promote_deployment.ts index f2b07b81915..b472912715f 100644 --- a/apps/sim/tools/vercel/promote_deployment.ts +++ b/apps/sim/tools/vercel/promote_deployment.ts @@ -38,12 +38,19 @@ export const vercelPromoteDeploymentTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelPromoteDeploymentParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v10/projects/${params.projectId.trim()}/promote/${params.deploymentId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/remove_project_domain.ts b/apps/sim/tools/vercel/remove_project_domain.ts index e9b15caeb9e..26edc72faa6 100644 --- a/apps/sim/tools/vercel/remove_project_domain.ts +++ b/apps/sim/tools/vercel/remove_project_domain.ts @@ -38,12 +38,19 @@ export const vercelRemoveProjectDomainTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelRemoveProjectDomainParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v9/projects/${params.projectId.trim()}/domains/${params.domain.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/rerequest_check.ts b/apps/sim/tools/vercel/rerequest_check.ts index f0da658b586..dcd15a8ed78 100644 --- a/apps/sim/tools/vercel/rerequest_check.ts +++ b/apps/sim/tools/vercel/rerequest_check.ts @@ -35,12 +35,26 @@ export const vercelRerequestCheckTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, + autoUpdate: { + type: 'boolean', + required: false, + visibility: 'user-or-llm', + description: 'Whether to mark the check as running immediately on rerequest', + }, }, request: { url: (params: VercelRerequestCheckParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) + if (params.autoUpdate !== undefined) query.set('autoUpdate', String(params.autoUpdate)) const qs = query.toString() return `https://api.vercel.com/v1/deployments/${params.deploymentId.trim()}/checks/${params.checkId.trim()}/rerequest${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/types.ts b/apps/sim/tools/vercel/types.ts index 8e0f4f2b5ff..e23a5cbe91d 100644 --- a/apps/sim/tools/vercel/types.ts +++ b/apps/sim/tools/vercel/types.ts @@ -23,6 +23,7 @@ export interface VercelListDeploymentsParams { until?: number limit?: number teamId?: string + slug?: string } export interface VercelGetDeploymentParams { @@ -30,19 +31,23 @@ export interface VercelGetDeploymentParams { deploymentId: string withGitRepoInfo?: string teamId?: string + slug?: string } export interface VercelListProjectsParams { apiKey: string search?: string limit?: number + from?: string teamId?: string + slug?: string } export interface VercelGetProjectParams { apiKey: string projectId: string teamId?: string + slug?: string } export interface VercelCreateDeploymentParams { @@ -54,6 +59,7 @@ export interface VercelCreateDeploymentParams { gitSource?: string forceNew?: string teamId?: string + slug?: string } export interface VercelListDomainsParams { @@ -65,7 +71,10 @@ export interface VercelListDomainsParams { export interface VercelGetEnvVarsParams { apiKey: string projectId: string + decrypt?: boolean + gitBranch?: string teamId?: string + slug?: string } export interface VercelListDeploymentsResponse extends ToolResponse { @@ -139,6 +148,7 @@ export interface VercelListProjectsResponse extends ToolResponse { }> count: number hasMore: boolean + nextFrom: string | null } } @@ -189,6 +199,10 @@ export interface VercelListDomainsResponse extends ToolResponse { boughtAt: number | null transferredAt: number | null creator: VercelDomainCreator | null + customNameservers: string[] + userId: string | null + teamId: string | null + transferStartedAt: number | null }> count: number hasMore: boolean @@ -216,6 +230,7 @@ export interface VercelCancelDeploymentParams { apiKey: string deploymentId: string teamId?: string + slug?: string } export interface VercelCancelDeploymentResponse extends ToolResponse { @@ -234,6 +249,7 @@ export interface VercelDeleteDeploymentParams { apiKey: string deploymentId: string teamId?: string + slug?: string } export interface VercelDeleteDeploymentResponse extends ToolResponse { @@ -252,6 +268,7 @@ export interface VercelGetDeploymentEventsParams { since?: number until?: number teamId?: string + slug?: string } export interface VercelGetDeploymentEventsResponse extends ToolResponse { @@ -281,6 +298,7 @@ export interface VercelCreateEnvVarParams { gitBranch?: string comment?: string teamId?: string + slug?: string } export interface VercelCreateEnvVarResponse extends ToolResponse { @@ -308,6 +326,7 @@ export interface VercelUpdateEnvVarParams { gitBranch?: string comment?: string teamId?: string + slug?: string } export interface VercelUpdateEnvVarResponse extends ToolResponse { @@ -329,6 +348,7 @@ export interface VercelDeleteEnvVarParams { projectId: string envId: string teamId?: string + slug?: string } export interface VercelDeleteEnvVarResponse extends ToolResponse { @@ -341,6 +361,7 @@ export interface VercelListDeploymentFilesParams { apiKey: string deploymentId: string teamId?: string + slug?: string } export interface VercelListDeploymentFilesResponse extends ToolResponse { @@ -366,6 +387,7 @@ export interface VercelCreateProjectParams { outputDirectory?: string installCommand?: string teamId?: string + slug?: string } export interface VercelCreateProjectResponse extends ToolResponse { @@ -387,6 +409,7 @@ export interface VercelUpdateProjectParams { outputDirectory?: string installCommand?: string teamId?: string + slug?: string } export interface VercelUpdateProjectResponse extends ToolResponse { @@ -402,6 +425,7 @@ export interface VercelDeleteProjectParams { apiKey: string projectId: string teamId?: string + slug?: string } export interface VercelDeleteProjectResponse extends ToolResponse { @@ -414,6 +438,7 @@ export interface VercelPauseProjectParams { apiKey: string projectId: string teamId?: string + slug?: string } export interface VercelPauseProjectResponse extends ToolResponse { @@ -428,6 +453,7 @@ export interface VercelUnpauseProjectParams { apiKey: string projectId: string teamId?: string + slug?: string } export interface VercelUnpauseProjectResponse extends ToolResponse { @@ -442,6 +468,7 @@ export interface VercelListProjectDomainsParams { apiKey: string projectId: string teamId?: string + slug?: string limit?: number } @@ -472,6 +499,7 @@ export interface VercelAddProjectDomainParams { redirectStatusCode?: number gitBranch?: string teamId?: string + slug?: string } export interface VercelAddProjectDomainResponse extends ToolResponse { @@ -494,6 +522,7 @@ export interface VercelRemoveProjectDomainParams { projectId: string domain: string teamId?: string + slug?: string } export interface VercelRemoveProjectDomainResponse extends ToolResponse { @@ -587,9 +616,17 @@ export interface VercelCreateDnsRecordParams { domain: string recordName: string recordType: string - value: string + value?: string ttl?: number mxPriority?: number + srvTarget?: string + srvWeight?: number + srvPort?: number + srvPriority?: number + httpsTarget?: string + httpsPriority?: number + httpsParams?: string + comment?: string teamId?: string } @@ -816,6 +853,7 @@ export interface VercelCreateAliasParams { apiKey: string deploymentId: string alias: string + redirect?: string teamId?: string } @@ -997,6 +1035,7 @@ export interface VercelCreateCheckParams { externalId?: string rerequestable?: boolean teamId?: string + slug?: string } export interface VercelCheckResponse extends ToolResponse { @@ -1025,12 +1064,14 @@ export interface VercelGetCheckParams { deploymentId: string checkId: string teamId?: string + slug?: string } export interface VercelListChecksParams { apiKey: string deploymentId: string teamId?: string + slug?: string } export interface VercelListChecksResponse extends ToolResponse { @@ -1069,6 +1110,7 @@ export interface VercelUpdateCheckParams { path?: string output?: string teamId?: string + slug?: string } export interface VercelRerequestCheckParams { @@ -1076,6 +1118,8 @@ export interface VercelRerequestCheckParams { deploymentId: string checkId: string teamId?: string + slug?: string + autoUpdate?: boolean } export interface VercelRerequestCheckResponse extends ToolResponse { @@ -1092,6 +1136,13 @@ export interface VercelUpdateDnsRecordParams { type?: string ttl?: number mxPriority?: number + srvTarget?: string + srvWeight?: number + srvPort?: number + srvPriority?: number + httpsTarget?: string + httpsPriority?: number + httpsParams?: string comment?: string teamId?: string } @@ -1149,6 +1200,7 @@ export interface VercelUpdateProjectDomainParams { redirectStatusCode?: number gitBranch?: string teamId?: string + slug?: string } export interface VercelUpdateProjectDomainResponse extends ToolResponse { @@ -1171,6 +1223,7 @@ export interface VercelVerifyProjectDomainParams { projectId: string domain: string teamId?: string + slug?: string } export interface VercelVerifyProjectDomainResponse extends ToolResponse { @@ -1192,6 +1245,7 @@ export interface VercelPromoteDeploymentParams { projectId: string deploymentId: string teamId?: string + slug?: string } export interface VercelPromoteDeploymentResponse extends ToolResponse { diff --git a/apps/sim/tools/vercel/unpause_project.ts b/apps/sim/tools/vercel/unpause_project.ts index 39e195cbed4..afe7e01f1ac 100644 --- a/apps/sim/tools/vercel/unpause_project.ts +++ b/apps/sim/tools/vercel/unpause_project.ts @@ -29,12 +29,19 @@ export const vercelUnpauseProjectTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelUnpauseProjectParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v1/projects/${params.projectId.trim()}/unpause${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/update_check.ts b/apps/sim/tools/vercel/update_check.ts index c348ad754aa..486b118f097 100644 --- a/apps/sim/tools/vercel/update_check.ts +++ b/apps/sim/tools/vercel/update_check.ts @@ -74,12 +74,19 @@ export const vercelUpdateCheckTool: ToolConfig { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v1/deployments/${params.deploymentId.trim()}/checks/${params.checkId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/update_dns_record.ts b/apps/sim/tools/vercel/update_dns_record.ts index b84a3bb60eb..c2d85a8bdcc 100644 --- a/apps/sim/tools/vercel/update_dns_record.ts +++ b/apps/sim/tools/vercel/update_dns_record.ts @@ -56,6 +56,48 @@ export const vercelUpdateDnsRecordTool: ToolConfig< visibility: 'user-or-llm', description: 'Priority for MX records', }, + srvTarget: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Target hostname for SRV records (required together when updating SRV data)', + }, + srvWeight: { + type: 'number', + required: false, + visibility: 'user-or-llm', + description: 'Weight for SRV records (required together when updating SRV data)', + }, + srvPort: { + type: 'number', + required: false, + visibility: 'user-or-llm', + description: 'Port for SRV records (required together when updating SRV data)', + }, + srvPriority: { + type: 'number', + required: false, + visibility: 'user-or-llm', + description: 'Priority for SRV records (required together when updating SRV data)', + }, + httpsTarget: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Target hostname for HTTPS records (required together when updating HTTPS data)', + }, + httpsPriority: { + type: 'number', + required: false, + visibility: 'user-or-llm', + description: 'Priority for HTTPS records (required together when updating HTTPS data)', + }, + httpsParams: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Optional service parameters for HTTPS records (e.g. "alpn=h2,h3")', + }, comment: { type: 'string', required: false, @@ -85,16 +127,35 @@ export const vercelUpdateDnsRecordTool: ToolConfig< body: (params: VercelUpdateDnsRecordParams) => { const body: Record = {} if (params.name != null && params.name !== '') body.name = params.name - if (params.value != null && params.value !== '') body.value = params.value - if (params.type != null && params.type !== '') body.type = params.type + const type = + params.type != null && params.type !== '' ? params.type.trim().toUpperCase() : null + if (type != null) body.type = type if (params.ttl != null) { const ttl = Number(params.ttl) if (!Number.isNaN(ttl)) body.ttl = ttl } - if (params.mxPriority != null) { - const mxPriority = Number(params.mxPriority) - if (!Number.isNaN(mxPriority)) body.mxPriority = mxPriority + + if (type === 'SRV') { + body.srv = { + target: params.srvTarget?.trim(), + weight: params.srvWeight, + port: params.srvPort, + priority: params.srvPriority, + } + } else if (type === 'HTTPS') { + body.https = { + target: params.httpsTarget?.trim(), + priority: params.httpsPriority, + ...(params.httpsParams ? { params: params.httpsParams.trim() } : {}), + } + } else { + if (params.value != null && params.value !== '') body.value = params.value + if (type === 'MX' && params.mxPriority != null) { + const mxPriority = Number(params.mxPriority) + if (!Number.isNaN(mxPriority)) body.mxPriority = mxPriority + } } + if (params.comment != null && params.comment !== '') body.comment = params.comment return body }, diff --git a/apps/sim/tools/vercel/update_env_var.ts b/apps/sim/tools/vercel/update_env_var.ts index 15981e49877..d1ee50f99ef 100644 --- a/apps/sim/tools/vercel/update_env_var.ts +++ b/apps/sim/tools/vercel/update_env_var.ts @@ -71,12 +71,19 @@ export const vercelUpdateEnvVarTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelUpdateEnvVarParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v9/projects/${params.projectId.trim()}/env/${params.envId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/update_project.ts b/apps/sim/tools/vercel/update_project.ts index ee76b1c485e..f567024f93e 100644 --- a/apps/sim/tools/vercel/update_project.ts +++ b/apps/sim/tools/vercel/update_project.ts @@ -59,12 +59,19 @@ export const vercelUpdateProjectTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelUpdateProjectParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v9/projects/${params.projectId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/update_project_domain.ts b/apps/sim/tools/vercel/update_project_domain.ts index 050675160c2..76d3ca9b43b 100644 --- a/apps/sim/tools/vercel/update_project_domain.ts +++ b/apps/sim/tools/vercel/update_project_domain.ts @@ -56,12 +56,19 @@ export const vercelUpdateProjectDomainTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelUpdateProjectDomainParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v9/projects/${params.projectId.trim()}/domains/${params.domain.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/verify_project_domain.ts b/apps/sim/tools/vercel/verify_project_domain.ts index c1610018bbe..0ea5afe30fd 100644 --- a/apps/sim/tools/vercel/verify_project_domain.ts +++ b/apps/sim/tools/vercel/verify_project_domain.ts @@ -38,12 +38,19 @@ export const vercelVerifyProjectDomainTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelVerifyProjectDomainParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v9/projects/${params.projectId.trim()}/domains/${params.domain.trim()}/verify${qs ? `?${qs}` : ''}` }, From 8f6be1909b048fd6bf053a8d535b5469efa57372 Mon Sep 17 00:00:00 2001 From: waleed Date: Thu, 2 Jul 2026 00:59:16 -0700 Subject: [PATCH 2/8] fix(vercel): address review findings on DNS/deployment param handling - fix withGitRepoInfo 'No' dropdown sending withGitRepoInfo=false instead of omitting the param - remove redundant duplicate 'Forward' option from eventsDirection dropdown - fix mxPriority being silently dropped in update_dns_record when record type is left unset --- apps/sim/blocks/blocks/vercel.ts | 3 +-- apps/sim/tools/vercel/update_dns_record.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/sim/blocks/blocks/vercel.ts b/apps/sim/blocks/blocks/vercel.ts index b432227ebcc..1083db5d54e 100644 --- a/apps/sim/blocks/blocks/vercel.ts +++ b/apps/sim/blocks/blocks/vercel.ts @@ -202,7 +202,7 @@ export const VercelBlock: BlockConfig = { title: 'Include Git Repo Info', type: 'dropdown', options: [ - { label: 'No', id: 'false' }, + { label: 'No', id: '' }, { label: 'Yes', id: 'true' }, ], condition: { field: 'operation', value: 'get_deployment' }, @@ -214,7 +214,6 @@ export const VercelBlock: BlockConfig = { type: 'dropdown', options: [ { label: 'Forward (default)', id: '' }, - { label: 'Forward', id: 'forward' }, { label: 'Backward', id: 'backward' }, ], condition: { field: 'operation', value: 'get_deployment_events' }, diff --git a/apps/sim/tools/vercel/update_dns_record.ts b/apps/sim/tools/vercel/update_dns_record.ts index c2d85a8bdcc..1a9cb007de6 100644 --- a/apps/sim/tools/vercel/update_dns_record.ts +++ b/apps/sim/tools/vercel/update_dns_record.ts @@ -150,7 +150,7 @@ export const vercelUpdateDnsRecordTool: ToolConfig< } } else { if (params.value != null && params.value !== '') body.value = params.value - if (type === 'MX' && params.mxPriority != null) { + if (params.mxPriority != null) { const mxPriority = Number(params.mxPriority) if (!Number.isNaN(mxPriority)) body.mxPriority = mxPriority } From db0f105c65d9e40d843f3f82028edc55ddc4ecfe Mon Sep 17 00:00:00 2001 From: waleed Date: Thu, 2 Jul 2026 01:13:52 -0700 Subject: [PATCH 3/8] fix(vercel): fix pagination token type mismatch and clarify DNS update UX - fix list_projects nextFrom being stored as a number despite string typing, which threw TypeError on .trim() when chained into a follow-up list_projects call - clarify that the DNS update Value field has no effect on existing SRV/HTTPS records unless Record Type is explicitly reselected --- apps/sim/blocks/blocks/vercel.ts | 3 ++- apps/sim/tools/vercel/list_projects.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/sim/blocks/blocks/vercel.ts b/apps/sim/blocks/blocks/vercel.ts index 1083db5d54e..05288ebb9a8 100644 --- a/apps/sim/blocks/blocks/vercel.ts +++ b/apps/sim/blocks/blocks/vercel.ts @@ -787,7 +787,8 @@ export const VercelBlock: BlockConfig = { id: 'updateRecordValue', title: 'Value', type: 'short-input', - placeholder: 'New record value — leave blank to keep', + placeholder: + 'New record value — leave blank to keep. Has no effect if the existing record is SRV or HTTPS; explicitly set Record Type to update those.', condition: { field: 'operation', value: 'update_dns_record', diff --git a/apps/sim/tools/vercel/list_projects.ts b/apps/sim/tools/vercel/list_projects.ts index c50e29ec6e1..6cc5fb45fd1 100644 --- a/apps/sim/tools/vercel/list_projects.ts +++ b/apps/sim/tools/vercel/list_projects.ts @@ -84,7 +84,7 @@ export const vercelListProjectsTool: ToolConfig< projects, count: projects.length, hasMore: data.pagination?.next != null, - nextFrom: data.pagination?.next ?? null, + nextFrom: data.pagination?.next != null ? String(data.pagination.next) : null, }, } }, From 5e1b390ab8d0e0b070cab41a6657cbad9068d13d Mon Sep 17 00:00:00 2001 From: waleed Date: Thu, 2 Jul 2026 01:28:45 -0700 Subject: [PATCH 4/8] fix(vercel): fix zero-value SRV/HTTPS/MX numeric fields being dropped - SRV weight/port/priority, HTTPS priority, and MX priority use truthy checks that silently drop legitimate 0 values; switch to explicit empty/null checks - add missing MX Priority field to create_dns_record block UI (tool already required it for MX records but there was no way to set it) --- apps/sim/blocks/blocks/vercel.ts | 53 ++++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 9 deletions(-) diff --git a/apps/sim/blocks/blocks/vercel.ts b/apps/sim/blocks/blocks/vercel.ts index 05288ebb9a8..d5ea327faaa 100644 --- a/apps/sim/blocks/blocks/vercel.ts +++ b/apps/sim/blocks/blocks/vercel.ts @@ -633,6 +633,22 @@ export const VercelBlock: BlockConfig = { and: { field: 'recordType', value: ['SRV', 'HTTPS'], not: true }, }, }, + { + id: 'recordMxPriority', + title: 'MX Priority', + type: 'short-input', + placeholder: 'Priority for the MX record', + condition: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'MX' }, + }, + required: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'MX' }, + }, + }, { id: 'srvTarget', title: 'SRV Target', @@ -1401,6 +1417,7 @@ export const VercelBlock: BlockConfig = { recordType, recordValue, recordId, + recordMxPriority, srvTarget, srvWeight, srvPort, @@ -1544,12 +1561,19 @@ export const VercelBlock: BlockConfig = { recordName, recordType, ...(recordValue ? { value: recordValue } : {}), + ...(recordMxPriority !== '' && recordMxPriority != null + ? { mxPriority: Number(recordMxPriority) } + : {}), ...(srvTarget ? { srvTarget } : {}), - ...(srvWeight ? { srvWeight: Number(srvWeight) } : {}), - ...(srvPort ? { srvPort: Number(srvPort) } : {}), - ...(srvPriority ? { srvPriority: Number(srvPriority) } : {}), + ...(srvWeight !== '' && srvWeight != null ? { srvWeight: Number(srvWeight) } : {}), + ...(srvPort !== '' && srvPort != null ? { srvPort: Number(srvPort) } : {}), + ...(srvPriority !== '' && srvPriority != null + ? { srvPriority: Number(srvPriority) } + : {}), ...(httpsTarget ? { httpsTarget } : {}), - ...(httpsPriority ? { httpsPriority: Number(httpsPriority) } : {}), + ...(httpsPriority !== '' && httpsPriority != null + ? { httpsPriority: Number(httpsPriority) } + : {}), ...(httpsParams ? { httpsParams } : {}), ...(recordComment ? { comment: recordComment } : {}), } @@ -1563,13 +1587,23 @@ export const VercelBlock: BlockConfig = { ...(updateRecordType ? { type: updateRecordType } : {}), ...(updateRecordValue ? { value: updateRecordValue } : {}), ...(updateRecordTtl ? { ttl: updateRecordTtl } : {}), - ...(updateRecordMxPriority ? { mxPriority: updateRecordMxPriority } : {}), + ...(updateRecordMxPriority !== '' && updateRecordMxPriority != null + ? { mxPriority: updateRecordMxPriority } + : {}), ...(updateSrvTarget ? { srvTarget: updateSrvTarget } : {}), - ...(updateSrvWeight ? { srvWeight: Number(updateSrvWeight) } : {}), - ...(updateSrvPort ? { srvPort: Number(updateSrvPort) } : {}), - ...(updateSrvPriority ? { srvPriority: Number(updateSrvPriority) } : {}), + ...(updateSrvWeight !== '' && updateSrvWeight != null + ? { srvWeight: Number(updateSrvWeight) } + : {}), + ...(updateSrvPort !== '' && updateSrvPort != null + ? { srvPort: Number(updateSrvPort) } + : {}), + ...(updateSrvPriority !== '' && updateSrvPriority != null + ? { srvPriority: Number(updateSrvPriority) } + : {}), ...(updateHttpsTarget ? { httpsTarget: updateHttpsTarget } : {}), - ...(updateHttpsPriority ? { httpsPriority: Number(updateHttpsPriority) } : {}), + ...(updateHttpsPriority !== '' && updateHttpsPriority != null + ? { httpsPriority: Number(updateHttpsPriority) } + : {}), ...(updateHttpsParams ? { httpsParams: updateHttpsParams } : {}), ...(updateRecordComment ? { comment: updateRecordComment } : {}), } @@ -1740,6 +1774,7 @@ export const VercelBlock: BlockConfig = { recordType: { type: 'string', description: 'DNS record type' }, recordValue: { type: 'string', description: 'DNS record value' }, recordId: { type: 'string', description: 'DNS record ID' }, + recordMxPriority: { type: 'string', description: 'Priority for MX records' }, srvTarget: { type: 'string', description: 'Target hostname for SRV records' }, srvWeight: { type: 'string', description: 'Weight for SRV records' }, srvPort: { type: 'string', description: 'Port for SRV records' }, From 176ca4a414e7a994c858bbe9269c801c9df137d4 Mon Sep 17 00:00:00 2001 From: waleed Date: Thu, 2 Jul 2026 01:47:20 -0700 Subject: [PATCH 5/8] fix(vercel): fix stale cross-operation field leaks in block params - fix list_deployments/create_deployment/update_check/list_team_members/update_dns_record/update_env_var conditionally spreading into keys that collide with unrelated operations' non-destructured literal subBlock fields (projectId, deploymentId, target, name, search) - a stale value left over from switching operations in the UI would silently leak into the wrong tool call since the conditional spread only overrides when the current operation's own field has a value - fix now always assigns these keys directly so they deterministically override any stale base value --- apps/sim/blocks/blocks/vercel.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/sim/blocks/blocks/vercel.ts b/apps/sim/blocks/blocks/vercel.ts index d5ea327faaa..395c536214b 100644 --- a/apps/sim/blocks/blocks/vercel.ts +++ b/apps/sim/blocks/blocks/vercel.ts @@ -1483,7 +1483,7 @@ export const VercelBlock: BlockConfig = { case 'list_deployments': return { ...base, - ...(deploymentsProjectId ? { projectId: deploymentsProjectId } : {}), + projectId: deploymentsProjectId || undefined, ...(deploymentsApp ? { app: deploymentsApp } : {}), ...(deploymentsSince ? { since: Number(deploymentsSince) } : {}), ...(deploymentsUntil ? { until: Number(deploymentsUntil) } : {}), @@ -1503,8 +1503,8 @@ export const VercelBlock: BlockConfig = { case 'create_deployment': return { ...base, - ...(redeployId ? { deploymentId: redeployId } : {}), - ...(deployTarget ? { target: deployTarget } : {}), + deploymentId: redeployId || undefined, + target: deployTarget || undefined, ...(deploymentGitSource ? { gitSource: deploymentGitSource } : {}), ...(deploymentForceNew ? { forceNew: deploymentForceNew } : {}), } @@ -1583,7 +1583,7 @@ export const VercelBlock: BlockConfig = { return { ...base, recordId, - ...(updateRecordName ? { name: updateRecordName } : {}), + name: updateRecordName || undefined, ...(updateRecordType ? { type: updateRecordType } : {}), ...(updateRecordValue ? { value: updateRecordValue } : {}), ...(updateRecordTtl ? { ttl: updateRecordTtl } : {}), @@ -1628,7 +1628,7 @@ export const VercelBlock: BlockConfig = { ...base, ...(envKey ? { key: envKey } : {}), ...(envValue ? { value: envValue } : {}), - ...(envTarget ? { target: envTarget } : {}), + target: envTarget || undefined, ...(envType ? { type: envType } : {}), ...(envGitBranch ? { gitBranch: envGitBranch } : {}), ...(envComment ? { comment: envComment } : {}), @@ -1688,7 +1688,7 @@ export const VercelBlock: BlockConfig = { ...base, deploymentId: checkDeploymentId, checkId, - ...(checkName ? { name: checkName } : {}), + name: checkName || undefined, ...(checkStatus ? { status: checkStatus } : {}), ...(checkConclusion ? { conclusion: checkConclusion } : {}), ...(checkPath ? { path: checkPath } : {}), @@ -1706,7 +1706,7 @@ export const VercelBlock: BlockConfig = { ...(teamMembersLimit ? { limit: Number(teamMembersLimit) } : {}), ...(teamMembersSince ? { since: Number(teamMembersSince) } : {}), ...(teamMembersUntil ? { until: Number(teamMembersUntil) } : {}), - ...(teamMembersSearch ? { search: teamMembersSearch } : {}), + search: teamMembersSearch || undefined, } case 'list_teams': return { From e6a4c6ec3389ac2379825463d35d66b7d4da4adf Mon Sep 17 00:00:00 2001 From: waleed Date: Thu, 2 Jul 2026 08:37:49 -0700 Subject: [PATCH 6/8] feat(vercel): close remaining input/output completeness gaps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - add missing slug (team-slug) param to 13 domain/DNS/alias tools that were skipped in an earlier fix pass, matching the pattern used everywhere else in this integration - add rootDirectory, nodeVersion, devCommand params to create_project/update_project (verified against Vercel's live OpenAPI spec — high-value fields for monorepo support and runtime pinning) - surface rootDirectory/nodeVersion in get_project/list_projects outputs, since the API already returns them - wire all new fields into the block UI as advanced fields --- apps/sim/blocks/blocks/vercel.ts | 40 ++++++++++++++++++++++ apps/sim/tools/vercel/add_domain.ts | 7 ++++ apps/sim/tools/vercel/create_alias.ts | 7 ++++ apps/sim/tools/vercel/create_dns_record.ts | 7 ++++ apps/sim/tools/vercel/create_project.ts | 21 ++++++++++++ apps/sim/tools/vercel/delete_alias.ts | 7 ++++ apps/sim/tools/vercel/delete_dns_record.ts | 7 ++++ apps/sim/tools/vercel/delete_domain.ts | 7 ++++ apps/sim/tools/vercel/get_alias.ts | 7 ++++ apps/sim/tools/vercel/get_domain.ts | 7 ++++ apps/sim/tools/vercel/get_domain_config.ts | 7 ++++ apps/sim/tools/vercel/get_project.ts | 4 +++ apps/sim/tools/vercel/list_aliases.ts | 7 ++++ apps/sim/tools/vercel/list_dns_records.ts | 7 ++++ apps/sim/tools/vercel/list_domains.ts | 7 ++++ apps/sim/tools/vercel/list_projects.ts | 8 +++++ apps/sim/tools/vercel/types.ts | 23 +++++++++++++ apps/sim/tools/vercel/update_dns_record.ts | 7 ++++ apps/sim/tools/vercel/update_project.ts | 21 ++++++++++++ 19 files changed, 208 insertions(+) diff --git a/apps/sim/blocks/blocks/vercel.ts b/apps/sim/blocks/blocks/vercel.ts index 395c536214b..bea3783498f 100644 --- a/apps/sim/blocks/blocks/vercel.ts +++ b/apps/sim/blocks/blocks/vercel.ts @@ -422,6 +422,30 @@ export const VercelBlock: BlockConfig = { condition: { field: 'operation', value: ['create_project', 'update_project'] }, mode: 'advanced', }, + { + id: 'rootDirectory', + title: 'Root Directory', + type: 'short-input', + placeholder: 'Subdirectory of the repo to deploy from (optional)', + condition: { field: 'operation', value: ['create_project', 'update_project'] }, + mode: 'advanced', + }, + { + id: 'nodeVersion', + title: 'Node.js Version', + type: 'short-input', + placeholder: 'e.g. 22.x, 20.x, 18.x (optional)', + condition: { field: 'operation', value: ['create_project', 'update_project'] }, + mode: 'advanced', + }, + { + id: 'devCommand', + title: 'Dev Command', + type: 'short-input', + placeholder: 'Custom dev server command (optional)', + condition: { field: 'operation', value: ['create_project', 'update_project'] }, + mode: 'advanced', + }, { id: 'projectDomainsLimit', @@ -1305,6 +1329,19 @@ export const VercelBlock: BlockConfig = { 'list_checks', 'update_check', 'rerequest_check', + 'list_domains', + 'get_domain', + 'add_domain', + 'delete_domain', + 'get_domain_config', + 'list_dns_records', + 'create_dns_record', + 'update_dns_record', + 'delete_dns_record', + 'list_aliases', + 'get_alias', + 'create_alias', + 'delete_alias', ], }, mode: 'advanced', @@ -1755,6 +1792,9 @@ export const VercelBlock: BlockConfig = { buildCommand: { type: 'string', description: 'Build command' }, outputDirectory: { type: 'string', description: 'Output directory' }, installCommand: { type: 'string', description: 'Install command' }, + rootDirectory: { type: 'string', description: 'Root directory of the project' }, + nodeVersion: { type: 'string', description: 'Node.js version' }, + devCommand: { type: 'string', description: 'Dev command' }, domainName: { type: 'string', description: 'Domain name' }, dnsRecordsLimit: { type: 'string', description: 'Maximum number of DNS records to return' }, projectDomainsLimit: { diff --git a/apps/sim/tools/vercel/add_domain.ts b/apps/sim/tools/vercel/add_domain.ts index 060730693e9..6dfb910bac5 100644 --- a/apps/sim/tools/vercel/add_domain.ts +++ b/apps/sim/tools/vercel/add_domain.ts @@ -26,12 +26,19 @@ export const vercelAddDomainTool: ToolConfig { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v7/domains${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/create_alias.ts b/apps/sim/tools/vercel/create_alias.ts index 57ca4ff3c42..3534db975d9 100644 --- a/apps/sim/tools/vercel/create_alias.ts +++ b/apps/sim/tools/vercel/create_alias.ts @@ -40,12 +40,19 @@ export const vercelCreateAliasTool: ToolConfig { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v2/deployments/${params.deploymentId.trim()}/aliases${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/create_dns_record.ts b/apps/sim/tools/vercel/create_dns_record.ts index a4ba09b76ef..86ab6abd533 100644 --- a/apps/sim/tools/vercel/create_dns_record.ts +++ b/apps/sim/tools/vercel/create_dns_record.ts @@ -110,12 +110,19 @@ export const vercelCreateDnsRecordTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelCreateDnsRecordParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v2/domains/${params.domain.trim()}/records${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/create_project.ts b/apps/sim/tools/vercel/create_project.ts index fc8933762a1..8f077fa97bc 100644 --- a/apps/sim/tools/vercel/create_project.ts +++ b/apps/sim/tools/vercel/create_project.ts @@ -53,6 +53,24 @@ export const vercelCreateProjectTool: ToolConfig< visibility: 'user-or-llm', description: 'Custom install command', }, + rootDirectory: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Subdirectory of the repository the project lives in (for monorepos)', + }, + nodeVersion: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Node.js version to use (e.g. 22.x, 20.x, 18.x)', + }, + devCommand: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Custom dev server command', + }, teamId: { type: 'string', required: false, @@ -87,6 +105,9 @@ export const vercelCreateProjectTool: ToolConfig< if (params.buildCommand) body.buildCommand = params.buildCommand.trim() if (params.outputDirectory) body.outputDirectory = params.outputDirectory.trim() if (params.installCommand) body.installCommand = params.installCommand.trim() + if (params.rootDirectory) body.rootDirectory = params.rootDirectory.trim() + if (params.nodeVersion) body.nodeVersion = params.nodeVersion.trim() + if (params.devCommand) body.devCommand = params.devCommand.trim() return body }, }, diff --git a/apps/sim/tools/vercel/delete_alias.ts b/apps/sim/tools/vercel/delete_alias.ts index cc476199379..9bb6556a160 100644 --- a/apps/sim/tools/vercel/delete_alias.ts +++ b/apps/sim/tools/vercel/delete_alias.ts @@ -27,12 +27,19 @@ export const vercelDeleteAliasTool: ToolConfig { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v2/aliases/${params.aliasId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/delete_dns_record.ts b/apps/sim/tools/vercel/delete_dns_record.ts index 313df6192f9..397b71f2942 100644 --- a/apps/sim/tools/vercel/delete_dns_record.ts +++ b/apps/sim/tools/vercel/delete_dns_record.ts @@ -38,12 +38,19 @@ export const vercelDeleteDnsRecordTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelDeleteDnsRecordParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v2/domains/${params.domain.trim()}/records/${params.recordId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/delete_domain.ts b/apps/sim/tools/vercel/delete_domain.ts index dc2ab080cc8..4839eb173b3 100644 --- a/apps/sim/tools/vercel/delete_domain.ts +++ b/apps/sim/tools/vercel/delete_domain.ts @@ -29,12 +29,19 @@ export const vercelDeleteDomainTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelDeleteDomainParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v6/domains/${params.domain.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/get_alias.ts b/apps/sim/tools/vercel/get_alias.ts index 640b5e7b756..b0da8e89799 100644 --- a/apps/sim/tools/vercel/get_alias.ts +++ b/apps/sim/tools/vercel/get_alias.ts @@ -26,12 +26,19 @@ export const vercelGetAliasTool: ToolConfig { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v4/aliases/${params.aliasId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/get_domain.ts b/apps/sim/tools/vercel/get_domain.ts index 773581659ce..186fcc91e1f 100644 --- a/apps/sim/tools/vercel/get_domain.ts +++ b/apps/sim/tools/vercel/get_domain.ts @@ -26,12 +26,19 @@ export const vercelGetDomainTool: ToolConfig { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v5/domains/${params.domain.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/get_domain_config.ts b/apps/sim/tools/vercel/get_domain_config.ts index 14cbeb5d415..6ff50af4a5a 100644 --- a/apps/sim/tools/vercel/get_domain_config.ts +++ b/apps/sim/tools/vercel/get_domain_config.ts @@ -32,12 +32,19 @@ export const vercelGetDomainConfigTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelGetDomainConfigParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v6/domains/${params.domain.trim()}/config${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/get_project.ts b/apps/sim/tools/vercel/get_project.ts index 51c4fb801e0..f5255a5ebab 100644 --- a/apps/sim/tools/vercel/get_project.ts +++ b/apps/sim/tools/vercel/get_project.ts @@ -57,6 +57,8 @@ export const vercelGetProjectTool: ToolConfig @@ -157,6 +160,8 @@ export interface VercelGetProjectResponse extends ToolResponse { id: string name: string framework: string | null + rootDirectory: string | null + nodeVersion: string | null createdAt: number updatedAt: number link: { @@ -386,6 +391,9 @@ export interface VercelCreateProjectParams { buildCommand?: string outputDirectory?: string installCommand?: string + rootDirectory?: string + nodeVersion?: string + devCommand?: string teamId?: string slug?: string } @@ -408,6 +416,9 @@ export interface VercelUpdateProjectParams { buildCommand?: string outputDirectory?: string installCommand?: string + rootDirectory?: string + nodeVersion?: string + devCommand?: string teamId?: string slug?: string } @@ -535,6 +546,7 @@ export interface VercelGetDomainParams { apiKey: string domain: string teamId?: string + slug?: string } export interface VercelGetDomainResponse extends ToolResponse { @@ -562,6 +574,7 @@ export interface VercelAddDomainParams { apiKey: string name: string teamId?: string + slug?: string } export interface VercelAddDomainResponse extends ToolResponse { @@ -586,6 +599,7 @@ export interface VercelDeleteDomainParams { apiKey: string domain: string teamId?: string + slug?: string } export interface VercelDeleteDomainResponse extends ToolResponse { @@ -599,6 +613,7 @@ export interface VercelGetDomainConfigParams { apiKey: string domain: string teamId?: string + slug?: string } export interface VercelGetDomainConfigResponse extends ToolResponse { @@ -628,6 +643,7 @@ export interface VercelCreateDnsRecordParams { httpsParams?: string comment?: string teamId?: string + slug?: string } export interface VercelCreateDnsRecordResponse extends ToolResponse { @@ -642,6 +658,7 @@ export interface VercelListDnsRecordsParams { domain: string limit?: number teamId?: string + slug?: string } export interface VercelListDnsRecordsResponse extends ToolResponse { @@ -670,6 +687,7 @@ export interface VercelDeleteDnsRecordParams { domain: string recordId: string teamId?: string + slug?: string } export interface VercelDeleteDnsRecordResponse extends ToolResponse { @@ -809,6 +827,7 @@ export interface VercelListAliasesParams { domain?: string limit?: number teamId?: string + slug?: string } export interface VercelListAliasesResponse extends ToolResponse { @@ -833,6 +852,7 @@ export interface VercelGetAliasParams { apiKey: string aliasId: string teamId?: string + slug?: string } export interface VercelGetAliasResponse extends ToolResponse { @@ -855,6 +875,7 @@ export interface VercelCreateAliasParams { alias: string redirect?: string teamId?: string + slug?: string } export interface VercelCreateAliasResponse extends ToolResponse { @@ -870,6 +891,7 @@ export interface VercelDeleteAliasParams { apiKey: string aliasId: string teamId?: string + slug?: string } export interface VercelDeleteAliasResponse extends ToolResponse { @@ -1145,6 +1167,7 @@ export interface VercelUpdateDnsRecordParams { httpsParams?: string comment?: string teamId?: string + slug?: string } export interface VercelUpdateDnsRecordResponse extends ToolResponse { diff --git a/apps/sim/tools/vercel/update_dns_record.ts b/apps/sim/tools/vercel/update_dns_record.ts index 1a9cb007de6..92a3852b552 100644 --- a/apps/sim/tools/vercel/update_dns_record.ts +++ b/apps/sim/tools/vercel/update_dns_record.ts @@ -110,12 +110,19 @@ export const vercelUpdateDnsRecordTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelUpdateDnsRecordParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v1/domains/records/${params.recordId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/update_project.ts b/apps/sim/tools/vercel/update_project.ts index f567024f93e..ef0af58750a 100644 --- a/apps/sim/tools/vercel/update_project.ts +++ b/apps/sim/tools/vercel/update_project.ts @@ -53,6 +53,24 @@ export const vercelUpdateProjectTool: ToolConfig< visibility: 'user-or-llm', description: 'Custom install command', }, + rootDirectory: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Subdirectory of the repository the project lives in (for monorepos)', + }, + nodeVersion: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Node.js version to use (e.g. 22.x, 20.x, 18.x)', + }, + devCommand: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Custom dev server command', + }, teamId: { type: 'string', required: false, @@ -87,6 +105,9 @@ export const vercelUpdateProjectTool: ToolConfig< if (params.buildCommand) body.buildCommand = params.buildCommand.trim() if (params.outputDirectory) body.outputDirectory = params.outputDirectory.trim() if (params.installCommand) body.installCommand = params.installCommand.trim() + if (params.rootDirectory) body.rootDirectory = params.rootDirectory.trim() + if (params.nodeVersion) body.nodeVersion = params.nodeVersion.trim() + if (params.devCommand) body.devCommand = params.devCommand.trim() return body }, }, From 4d7f7498de027bfe1ec3da801112600367a92571 Mon Sep 17 00:00:00 2001 From: waleed Date: Thu, 2 Jul 2026 08:50:48 -0700 Subject: [PATCH 7/8] fix(vercel): fix remaining No->false truthy-string dropdown bugs - checkRerequestable, checkAutoUpdate, envVarsDecrypt dropdowns used id: 'false' for their No option (a truthy non-empty string), causing the conditional spread to always fire and explicitly send false instead of omitting the param - swept the whole file for this pattern; checkBlocking correctly keeps 'false' since it's a required field that's always sent directly, not conditionally --- apps/sim/blocks/blocks/vercel.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/sim/blocks/blocks/vercel.ts b/apps/sim/blocks/blocks/vercel.ts index bea3783498f..da35c717392 100644 --- a/apps/sim/blocks/blocks/vercel.ts +++ b/apps/sim/blocks/blocks/vercel.ts @@ -599,7 +599,7 @@ export const VercelBlock: BlockConfig = { title: 'Decrypt Values', type: 'dropdown', options: [ - { label: 'No', id: 'false' }, + { label: 'No', id: '' }, { label: 'Yes', id: 'true' }, ], condition: { field: 'operation', value: 'get_env_vars' }, @@ -1174,7 +1174,7 @@ export const VercelBlock: BlockConfig = { title: 'Rerequestable', type: 'dropdown', options: [ - { label: 'No', id: 'false' }, + { label: 'No', id: '' }, { label: 'Yes', id: 'true' }, ], condition: { field: 'operation', value: 'create_check' }, @@ -1193,7 +1193,7 @@ export const VercelBlock: BlockConfig = { title: 'Auto Update', type: 'dropdown', options: [ - { label: 'No', id: 'false' }, + { label: 'No', id: '' }, { label: 'Yes', id: 'true' }, ], condition: { field: 'operation', value: 'rerequest_check' }, From 7b1fe84cc17a86a68344ad53d79ce5fe9ad7447b Mon Sep 17 00:00:00 2001 From: waleed Date: Thu, 2 Jul 2026 10:06:25 -0700 Subject: [PATCH 8/8] fix(vercel): fix silent project-rename leak in update_project - update_project had no dedicated rename field and just returned base directly, so a stale value from create_deployment's unrelated 'name' subBlock (Project Name for the deployment) could silently flow through and rename a project on update - add a dedicated 'New Project Name' field for update_project, wired with a direct override so it always takes precedence over any stale leaked value --- apps/sim/blocks/blocks/vercel.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/sim/blocks/blocks/vercel.ts b/apps/sim/blocks/blocks/vercel.ts index da35c717392..b754122b061 100644 --- a/apps/sim/blocks/blocks/vercel.ts +++ b/apps/sim/blocks/blocks/vercel.ts @@ -380,6 +380,14 @@ export const VercelBlock: BlockConfig = { condition: { field: 'operation', value: 'create_project' }, required: { field: 'operation', value: 'create_project' }, }, + { + id: 'updateProjectName', + title: 'New Project Name', + type: 'short-input', + placeholder: 'Rename the project (optional — leave blank to keep)', + condition: { field: 'operation', value: 'update_project' }, + mode: 'advanced', + }, { id: 'framework', title: 'Framework', @@ -1437,6 +1445,7 @@ export const VercelBlock: BlockConfig = { eventsSince, eventsUntil, projectName, + updateProjectName, domainName, dnsRecordsLimit, projectDomainsLimit, @@ -1548,7 +1557,7 @@ export const VercelBlock: BlockConfig = { case 'create_project': return { ...base, name: projectName } case 'update_project': - return base + return { ...base, name: updateProjectName || undefined } case 'list_projects': return { ...base, ...(projectsFrom ? { from: projectsFrom } : {}) } case 'add_project_domain': @@ -1769,6 +1778,7 @@ export const VercelBlock: BlockConfig = { deploymentId: { type: 'string', description: 'Deployment ID or hostname' }, name: { type: 'string', description: 'Project name' }, projectName: { type: 'string', description: 'New project name' }, + updateProjectName: { type: 'string', description: 'Renamed project name for update_project' }, project: { type: 'string', description: 'Project ID override' }, redeployId: { type: 'string', description: 'Deployment ID to redeploy' }, target: { type: 'string', description: 'Target environment filter' },