Skip to content

fix(blocks): read the mapper operation from the tool-call context in aws and infra blocks - #10075

Merged
waleedlatif1 merged 4 commits into
stagingfrom
sweep2/m1
Nov 16, 2026
Merged

waleedlatif1 merged 4 commits into
stagingfrom
sweep2/m1

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Moves every block mapper for the AWS and infrastructure blocks onto mapperOperation (added in #10070), so the operation is read from the tool-call context. These integrations were validated in earlier sweeps, so this PR covers the mapper fix plus any defects found while tracing it.

  • params.operation is undefined when a block runs as an Agent tool, in Pi or in Human-in-the-loop, so until now these mappers skipped their per-operation renames and coercions on those paths. Each newly live branch keeps the model's own args (via toolCallArg), accepts already-typed values, and never overwrites an arg with undefined.
  • Canvas requests for saved workflows are unchanged, except for the fixes listed below. No ids were renamed or removed.
  • The check:mapper-operation baseline shrinks for every block fixed here, and generated tool metadata and docs are regenerated.

Release notes

Athena

  • As an Agent tool (or in Pi / Human-in-the-loop), Athena now runs through the block mapper instead of failing it and falling back to raw params. Named-query name/description, prepared-statement workgroup/statement, data catalog name, and workgroup lookups are taken from the model's args. maxResults strings are coerced to numbers and resultReuseEnabled strings to booleans. Saved canvas workflows are unchanged.

Azure Data Explorer

  • As an Agent tool (or in Pi / Human-in-the-loop), Azure Data Explorer now runs through the operation mapper. Ingest From Query still keeps the model's mode and async values. Blank optional strings are dropped, and readOnly/ifExists strings are normalized to booleans. Saved canvas workflows are unchanged.

Cloudflare

  • As an Agent tool (or in Pi / Human-in-the-loop), Cloudflare now applies the operation-specific cleanup. Purge Cache with purge_everything=true drops the files/tags/hosts/prefixes targets, which Cloudflare rejects in combination with it. Update DNS Record drops blank content/name/comment. Model-supplied record types and other aliased params are preserved. Saved canvas workflows are unchanged.

CloudFormation

  • As an Agent tool (or in Pi / Human-in-the-loop), CloudFormation now runs through the block mapper instead of failing it and falling back to raw params. Create Change Set keeps the model's description and tags. JSON-string parameters/tags are parsed, and limit/timeout strings are coerced to numbers. Saved canvas workflows are unchanged.

CloudTrail

  • As an Agent tool (or in Pi / Human-in-the-loop), CloudTrail now runs through the block mapper instead of failing it and falling back to raw params. Get Trail and Get Trail Status use the model's trail name, and numeric/boolean string inputs are normalized. Saved canvas workflows are unchanged.

CloudWatch

  • As an Agent tool (or in Pi / Human-in-the-loop), CloudWatch now applies the block's coercions: limit/retention parsed, comma-separated log group and alarm names split, and epoch times turned into numbers. The mapper no longer fails with "Invalid CloudWatch operation: undefined" and falls back to raw params. Get Metric Statistics and Put Metric Data take namespace, period, statistics, and value from the model's args. Saved canvas workflows are unchanged.

CodePipeline

  • As an Agent tool (or in Pi / Human-in-the-loop), CodePipeline now applies the block's coercions (maxResults, pipeline version, abandon) and no longer fails with "Invalid CodePipeline operation: undefined". Approve/Reject sends the model's token, status, and summary, and Disable Stage Transition sends the model's reason. Saved canvas workflows are unchanged.

CrowdStrike

  • As an Agent tool (or in Pi / Human-in-the-loop), CrowdStrike now passes the model's optional arguments through. Before, every optional argument (filter, limit, sort, offset, q, compositeIds, ids, deviceIds, indicators, comment, and others) was cleared to undefined. Host and host-group actions now send the model's actionName, and Delete Indicators sends the model's filter. Saved canvas workflows are unchanged.

Dagster

  • As an Agent tool (or in Pi / Human-in-the-loop), Dagster now applies the block's own fields saved on the tool row: Materialize Assets job name, List Runs job filter/cursor, Get Run Logs limit, List Assets prefix/limit/cursor, and Report Asset event type/partition keys/description. Values the model supplies are still used when those fields are empty.

Daytona

  • As an Agent tool (or in Pi / Human-in-the-loop), Daytona (legacy and v2) now forwards fields saved on the tool row that were dropped before: sandbox name, env vars, labels, user, run env, cwd, upload file/name, directory path, Git clone repository URL/path/branch/credentials, and list filters. Numeric fields saved as strings are now coerced. The model's own url/path for Git clone are kept.

DynamoDB

  • As an Agent tool (or in Pi / Human-in-the-loop), DynamoDB (legacy and v2) now forwards fields saved on the tool row that were dropped before: keys, projection expressions, attribute names/values, condition/update expressions, limits, index names, consistent read, segments, and return values. Values the model supplies for projectionExpression, indexName, and consistentRead are kept.

Dynatrace

  • As an Agent tool (or in Pi / Human-in-the-loop), Dynatrace (both versions) now runs the block's per-operation mapping, so fields filled in on the agent's tool row reach the API. Before, they were dropped on tool calls. Examples: tag key/value, mute reason/comment, settings value/external ID, SLO definition fields, synthetic monitor filters, sort/fields selectors, log query, event properties, and batch metadata. When a tool-row field is blank, the model's own value for that param is still used.
  • Unmute operations used as Agent tools now always send reason AFFECTED, the only value Dynatrace accepts for unmute.
  • SLO create/update as an Agent tool now defaults evaluationType to AGGREGATE when neither the row nor the model sets it.
  • List synthetic monitors with the "Any" enabled filter sends no enabled param, unless the model passes a boolean.

Fivetran

  • As an Agent tool (or in Pi / Human-in-the-loop), Pause Connection and Resume Connection now actually set paused=true or paused=false, and clear every other update setting, matching the canvas. Before, the operation was not seen on tool calls, so the update tool was sent without the paused state.
  • Other Fivetran operations now apply the block's coercions on tool calls: string booleans and numbers are converted for syncFrequency, paused, runSetupTests, trust flags, force, limit, list_users filters, and similar fields. Model-supplied service, config, name, schemas, enabled, and tables are still forwarded unchanged for create destination, create group, update schema config, update connection schema, and update connection table. Saved canvas workflows are unchanged.

Google BigQuery

  • As an Agent tool (or in Pi / Human-in-the-loop), Create Dataset and Create Table now send the dataset ID, location, and table ID filled in on the tool row (newDatasetId, datasetLocation, newTableId). Before, those fields were ignored on tool calls.

Grafana

  • As an Agent tool (or in Pi / Human-in-the-loop), Grafana now uses the per-operation field mapping (folder UID, alert title, contact point name/type/settings, annotation IDs and times as numbers, list paging as numbers, and so on). The model's own queries, folderUid, parentUid, and ruleGroup are kept when the row leaves those fields blank. Before, the block mapping could leave them out or replace them.

AWS IAM

  • As an Agent tool (or in Pi / Human-in-the-loop), AWS IAM now applies the block's coercions: Simulate Principal Policy context entries stored as JSON text (Condition Context Keys) are parsed into an array, maxItems is parsed to an integer (sent as maxResults for simulate), and tags are serialized on Create User/Role. Update Access Key keeps the model's status when the row has none.

AWS Identity Center

  • As an Agent tool (or in Pi / Human-in-the-loop), Identity Center now parses maxResults to an integer and sends the row's account filter as accountId on List Account Assignments. The model's accountId is kept when no filter is stored.

Infisical

  • As an Agent tool (or in Pi / Human-in-the-loop), Infisical now sends the row's secret version (as a number) on Get Secret and the row's new secret value on Update Secret.

Jupyter

  • As an Agent tool (or in Pi / Human-in-the-loop), Jupyter now runs the mapping for the chosen operation. The parameters the tool receives are unchanged, and saved canvas workflows behave exactly as before.

Lambda

  • As an Agent tool (or in Pi / Human-in-the-loop), Lambda now works for every operation. Before, the block mapper threw "Invalid Lambda operation: undefined" on every agent call and the tool got raw arguments. Now number and boolean values are converted, comma lists are split, JSON fields are parsed, and filter patterns given as objects are sent as JSON strings.

Logfire

  • As an Agent tool (or in Pi / Human-in-the-loop), Logfire now runs the mapping for the chosen operation. The parameters the tool receives are unchanged, and saved canvas workflows behave exactly as before.

LogRocket

  • As an Agent tool (or in Pi / Human-in-the-loop), LogRocket now runs the mapping for the chosen operation. The parameters the tool receives are unchanged, and saved canvas workflows behave exactly as before.

Modal

  • As an Agent tool (or in Pi / Human-in-the-loop), Chat Completion now sends maxTokens, temperature, and topP as numbers when the model passes them as strings. Call Function keeps the URL the model supplies.

New Relic

  • As an Agent tool (or in Pi / Human-in-the-loop), New Relic now runs each operation's mapping. Nothing changes on the wire, because the tools and the param decoder already coerced these values. Canvas behavior is unchanged.

PlanetScale

  • As an Agent tool (or in Pi / Human-in-the-loop), PlanetScale (legacy) list_backups and list_deploy_requests now keep the state filter the model sent. Before, it was overwritten with undefined.

Railway

  • As an Agent tool (or in Pi / Human-in-the-loop), Railway (legacy) now sends yes/no options set in the tool row (prDeploys, ephemeral, skipInitialDeploys, stageInitialChanges, skipDeploys) as booleans. Before, they went to Railway as the strings true/false. The model's own args are still forwarded unchanged.

RDS

  • As an Agent tool (or in Pi / Human-in-the-loop), RDS now runs each operation's mapping. Nothing changes on the wire, because the tools and the param decoder already coerced these values. Canvas behavior is unchanged.

S3

  • As an Agent tool (or in Pi / Human-in-the-loop), S3 (legacy and v2) now runs the operation the agent picked instead of falling back to get_object. Before, every non-get_object call failed the mapper with "S3 Object URL is required" and went to the tool unmapped. Now delete_objects uses the model's keys, presigned_url accepts the model's method and contentType, put_object normalizes the attached file and keeps metadata, and list_buckets / head_object / create_bucket keep the model's prefix, continuationToken, versionId, and acl.

AWS Secrets Manager

  • As an Agent tool (or in Pi / Human-in-the-loop), Secrets Manager now sends the fields typed in the tool row under their block names: Create Secret tags, list filters, and coerced numbers and toggles. Tags the model supplies are kept.
  • maxResults, recoveryWindowInDays, and automaticallyAfterDays typed as text are converted to numbers. The forceDelete, rotateImmediately, and includePlannedDeletion toggles become booleans. JSON tags and tagKeys are parsed for Tag/Untag Resource.

Amazon SES

  • As an Agent tool (or in Pi / Human-in-the-loop), SES now sends the fields typed in the tool row: the reply-to on Send Templated Email and Send Bulk Email, the new configuration set name, and the page size as a number. A reply-to or configuration set name the model supplies is kept.
  • pageSize is converted to a number on the list operations. The reputationMetricsEnabled and sendingEnabled toggles become booleans on Create Configuration Set. JSON emailTags are parsed.

SFTP

  • As an Agent tool (or in Pi / Human-in-the-loop), each SFTP call now runs its own operation's handling instead of always using the Upload handling.
  • Create Directory now creates parent directories by default (recursive=true). Before, it always sent recursive=false. It honors the "Create Parent Directories" setting (default on).
  • Download encoding now defaults to utf-8.

Splunk

  • As an Agent tool (or in Pi / Human-in-the-loop), Splunk now sends the saved search or alert name picked in the tool row. A name or search filter the model supplies is kept.
  • Switch values (triggerActions, forceDispatch, enableLookups, allowPartialResults, addSummaryToMetadata) become real booleans, and numeric fields (count, offset, maxCount, autoCancel, and others) are converted to numbers.

Amazon SQS

  • As an Agent tool (or in Pi / Human-in-the-loop), SQS now sends the fields typed in the tool row under their block names (batch entries, queue attributes and tags, receive visibility timeout, move-task max results), parses JSON message bodies and attributes, and coerces whole-number fields.
  • Integer fields such as delaySeconds, maxNumberOfMessages, and waitTimeSeconds are validated and converted to numbers. JSON fields under tool names (data, messageAttributes, messageAttributeNames, and others) are parsed.

SSH

  • As an Agent tool (or in Pi / Human-in-the-loop), SSH operations other than Execute Command now run their own operation's parameter mapping. Before, every call used the Execute Command mapping. The model's path, remotePath, workingDirectory, type, mode, permissions, and recursive arguments are kept, and maxSize, interpreter, and recursive get their defaults and coercion. Saved canvas workflows are unchanged.

AWS Systems Manager

  • As an Agent tool (or in Pi / Human-in-the-loop), Systems Manager now coerces the model's arguments the way the canvas does: JSON strings for names, instanceIds, targets, parameters, and filters are parsed, maxResults and executionTimeoutSeconds become numbers, and true/false strings become booleans. Before, they reached the tool raw. Saved canvas workflows are unchanged.

Stagehand

  • As an Agent tool (or in Pi / Human-in-the-loop), Run Agent now uses the agent parameter mapping (maxSteps coerced to a number) instead of the extract mapping. Saved canvas workflows are unchanged.

AWS STS

  • As an Agent tool (or in Pi / Human-in-the-loop), STS now parses a string durationSeconds to an integer, as the canvas already did. Saved canvas workflows are unchanged.

Supabase

  • As an Agent tool (or in Pi / Human-in-the-loop), Supabase runs the operation-specific Edge Function and update-bucket handling. The model's body, headers, method, and isPublic are unchanged. Saved canvas workflows are unchanged.

Tailscale

  • As an Agent tool (or in Pi / Human-in-the-loop), Set DNS Nameservers (legacy block) now sends the nameservers the model supplied. Before, they were always dropped, so the call failed.
  • Create Auth Key (legacy block) now sends the model's description and expirySeconds (both were always dropped before). Unset reusable/ephemeral/preauthorized now get the block defaults, and true/false strings are converted to booleans.
  • The legacy block now applies the block's switch defaults and boolean conversion for Authorize Device, Update Device Key, Set DNS Preferences, List Auth Keys, and Get ACL, and keeps the model's role filter on List Users.

Temporal

  • As an Agent tool (or in Pi / Human-in-the-loop), Temporal now picks up the block's saved fields that use their own names: List/Count Workflows query, Get Workflow History page size/token, Create Schedule cron/interval/timezone/notes/paused, and List Schedules query/page size/token. Before, a tool call skipped the field-name mapping, so these saved values were dropped. Args the model supplies are still used when the field is blank.
  • Numeric strings such as timeouts, page sizes, and workflowTaskFinishEventId are converted to numbers. A Create Schedule call where the model sends paused as "false" no longer creates a paused schedule.

Textract

  • As an Agent tool (or in Pi / Human-in-the-loop), Textract (v2/v3) now runs the selected operation. Before, Analyze Expense and Analyze ID rows went through the Analyze Document path, so a URL document threw and the block's field mapping was skipped. Analyze ID now routes to the Analyze ID request.
  • Feature types the model picks are now kept alongside the row's toggles instead of being replaced. Analyze Document keeps the feature types the model chose; before, they were replaced with ['QUERIES'] when the model also sent queries.

Tinybird

  • As an Agent tool (or in Pi / Human-in-the-loop), Tinybird now runs the selected operation. Before, every operation except Send Events failed the mapper's Data Source/Data check and fell back to raw params. Append Data Source accepts the model's url.

TinyFish

  • As an Agent tool (or in Pi / Human-in-the-loop), List Runs now forwards a Goal Filter set on the tool row. The model's own goal is still kept.

Trigger.dev

  • As an Agent tool (or in Pi / Human-in-the-loop v2), Trigger.dev no longer wipes the model's arguments. Before, the mapper set every param (taskIdentifier, status, tags, pageSize, data, delay, idempotencyKey, version, period/from/to, page, and so on) to undefined on every tool call.
  • Fields stored on the row under dedicated ids (for example Deployment Status and Waitpoint Data) are now renamed onto the tool params.

Vercel

  • As an Agent tool (or in Pi / Human-in-the-loop), Vercel now applies the row's dedicated fields for the selected operation, such as Domain, Project ID, Team ID, Check Deployment ID, and Env Var key/value/target/type. Before, these were never mapped on tool calls. The model's own args still fill any field the row leaves blank.
  • Create Check on an Agent tool call now always sends blocking as a boolean: the string true becomes true and a missing value becomes false.

Review follow-ups

  • CloudWatch Get Metric Statistics: the canvas now accepts Extended Statistics without Statistics. It used to throw "Statistics is required".
  • Azure Data Explorer (legacy block): if an Agent tool row has "Run in background" switched off, the model can no longer turn it on.
  • Tinybird append and SFTP make-directory used as Agent tools now keep the model's format and recursive: false.

Testing

  • Each integration (or batch of blocks) was fixed by one agent and then reviewed by independent adversarial reviewers until it came back clean. Integrations got a vendor-spec/auth lens and a canvas-vs-tool-call/backward-compat lens; batches got the canvas-vs-tool-call lens.
  • Regression tests call each mapper the way the Agent path does, params(modelArgs, { operation }) without an operation in params, and were confirmed to fail on the pre-fix code.
  • Ran the touched test files, biome, check:mapper-operation, check:explicit-any, check:tool-metadata, check:docs, check:docs-manifest, check:block-successors, check:deployment-config, check:canvas-sentences, check:test-patterns, check:utils, check:comment-hygiene, check:source-conventions and check:integration-catalog locally. CI runs type-check and the full suite.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 16, 2026 1:12am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The PR appears safe to merge.

Summary

Updates AWS and infrastructure block mappers to read the selected operation from tool-call context.

  • AWS tool calls use the selected action and keep the model’s inputs.
  • Cloud and security tool calls keep the selected action and the model’s fields.
  • Data and monitoring tools use saved settings and model arguments together.
  • Developer and network tools map each call using its selected action.
  • Other tool calls run their selected mapper without losing model arguments.
  • The mapper-operation baseline no longer lists the blocks fixed here.

Reviews (2) · Last reviewed commit: "fix(blocks): keep model format, recursiv..." · Reviewed by Greptile

Comment thread apps/sim/blocks/blocks/tinybird.ts Resolved
Comment thread apps/sim/blocks/blocks/sftp.ts Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 80 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/blocks/blocks/ssh.ts Resolved
Comment thread apps/sim/blocks/blocks/ssm.ts Resolved
Comment thread apps/sim/blocks/blocks/cloudwatch.ts Resolved
Comment thread apps/sim/blocks/blocks/grafana.ts Resolved
Comment thread apps/sim/blocks/blocks/modal.ts Resolved
Comment thread apps/sim/blocks/blocks/railway.ts Resolved
Comment thread apps/sim/blocks/blocks/crowdstrike.ts Resolved
Comment thread apps/sim/blocks/blocks/fivetran.ts Resolved
Comment thread apps/sim/blocks/blocks/s3.ts Resolved
Comment thread apps/sim/blocks/blocks/sftp.ts Resolved
…tool calls

- tinybird append: fall back to the model's format before the csv default
- sftp mkdir: fall back to the model's recursive before the default
- cloudwatch get_metric_statistics: accept and normalize extendedStatistics from either source
- azure data explorer ingest: an explicitly disabled Run in background stays off
- cloudwatch/codepipeline tests: narrow the mapper so test-types passes
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 80 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 43aac92 into staging Nov 16, 2026
84 checks passed
@waleedlatif1
waleedlatif1 deleted the sweep2/m1 branch November 16, 2026 03:59

This branch was previously deployed

1 inactive deployment
Preview — b14c870e Deployed Nov 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant