637 Commits
Author SHA1 Message Date
Waleed 8ea9ffc07b feat(mcp): add code mode to the Sim MCP server (#10204)
* feat(mcp): add code mode to the Sim MCP server

* fix(mcp): stop queued code-mode calls at run end, bound error output, and type union bodies

* fix(mcp): render closed empty objects as Record<string, never>

* fix(mcp): render tuples and open objects in generated contract types
2026-11-19 09:15:13 -08:00
Waleed cda94995e5 feat(usage): serve organization activity from an hourly rollup (#10200)
* feat(usage): serve organization activity from an hourly rollup

* fix(usage): type the rollup marking hook, bump the chart version

* fix(usage): address review: replica lag, retention marks, deferred chats, bounded housekeeping

* fix(usage): measure replica lag with the pass's own lease as heartbeat
2026-11-18 21:40:02 -08:00
Waleed ad8ff86014 feat(search): manage sources and permission uploads through the CLI (#10197)
* feat(search): manage sources and permission uploads through the CLI

* fix(search): align source operations and complete CLI imports

* fix(cli): preserve upload errors and support early Node 20

* fix(cli): retain structured upload errors and retry guidance
2026-11-18 18:12:59 -08:00
Waleed bc48d10a68 fix(integrations): close follow-ups from the integration validation audits (#10183)
* fix(integrations): close follow-ups from the integration validation audits

* fix(integrations): type the polymarket activity test params

* fix(integrations): stub fetch for every spotify library test

* fix(integrations): migrate kalshi create and amend to the v2 order api, address review

* fix(integrations): keep the kalshi book-side helper module-private

* fix(integrations): route kalshi cancels by ticker and harden the read-first order writes

* fix(integrations): keep every legacy kalshi order key on v1 write outputs
2026-11-18 14:12:35 -08:00
Waleed dcc536973e fix(integrations): validate polymarket, kalshi, sftp, ssh, smtp, jupyter and temporal (#10181)
* fix(integrations): validate polymarket, kalshi, sftp, ssh, smtp, jupyter and temporal

* fix(integrations): honor negative position filters, type the new tests, and prove STARTTLS against a real SMTP server

* fix(sftp): decode each escape run once and join upload names without decoding again

* fix(sftp): reject a trailing parent segment in remote paths

* fix(integrations): ignore null and empty timestamps in Kalshi settlements and Polymarket activity

* fix(polymarket): reject a non-numeric activity timestamp and keep start=0 as full history

* fix(polymarket): mark the next-page cursor output nullable

* chore(integrations): regenerate artifacts after rebase
2026-11-18 12:55:30 -08:00
Waleed 1997d0a1a5 fix(integrations): validate spotify, buffer (#10175)
* fix(integrations): validate spotify, buffer

* fix(integrations): cap spotify playlist items limit at 50 and drop buffer tests for rejected output enums

* fix(integrations): keep spotify get playlist tracks on the read endpoint that serves any public playlist

* fix(integrations): batch spotify library requests up to each tool's old id limit, restore playlist tracks limit, list new buffer channel actions

* fix(integrations): honor cancellation in later spotify library batches, report the exact rejected id range, reject unknown follow types

* fix(integrations): reject spotify uris of another type, fail on invalid library check chunks, describe partial batch failures

* chore(integrations): regenerate artifacts after rebase
2026-11-18 12:53:04 -08:00
Waleed a24b401b45 fix(integrations): validate ashby (#10167)
* fix(integrations): validate ashby

* fix(integrations): type the ashby test helpers against the tool's own params

* fix(integrations): send ashby get_job's flag only when it is a boolean and shrink the test-types baseline
2026-11-18 11:58:28 -08:00
Waleed 41b11cd4f8 fix(gitlab): scale group discovery and permission-aware search (#10138)
* fix(gitlab): scale group discovery and permission-aware search

* fix(gitlab): validate combined permission uploads before saving

* fix(gitlab): clarify byte limits and use browser file fixtures
2026-11-17 10:56:31 -08:00
Waleed 7e7a0c82ba fix(ci): restore ESM checks and synchronize docs searches (#10139) 2026-11-17 10:45:28 -08:00
Waleed d54ce94e95 improvement(ci): reuse bounded compiler state for acceptance builds (#10127) 2026-11-17 01:27:13 -08:00
Waleed 9a8b002d70 improvement(ci): scope reviewed root audits to their checks (#10121)
* improvement(ci): scope reviewed root audits to their checks

* chore(ci): clarify audit-only runner allocation
2026-11-16 22:43:41 -08:00
Waleed 165c3db6ec fix(library): attribute sim counts by clause and table row, not capitalized words (#10115)
* fix(library): attribute sim counts by clause and table row, not capitalized words

* fix(library): handle colon lists, parenthetical comparisons, relative clauses, prefixes, and linked names in sim-count

* fix(library): keep sim relative clauses attached, anchor parenthetical comparisons to sim, and detect pipe-less table rows

* fix(library): remove sim-count comparison asides for any subject and keep counted openers

* fix(library): keep sim-count comparison spans inside their sentence

* refactor(library): read sim-count comparisons as their own clauses instead of deleting them

* fix(library): split sim-count contrasts nested in comparisons, keep count lists together, and end sentences before closing quotes

* fix(library): start sim-count clauses only at a new capitalized subject and tell count lists from new clauses

* fix(library): check sim claims in feature-first table cells and treat digit product names as new subjects

* docs(library): describe sim-count table cells and new-subject clauses accurately
2026-11-16 20:43:01 -08:00
Waleed 9b8d72d10c improvement(library): check sim's integration counts against the catalog (#10113)
* improvement(library): hold sim's integration, action, and trigger counts to the catalog in check:library-content

* fix(library): match bold and title-cased sim counts, and track code fences by length
2026-11-16 19:03:37 -08:00
Waleed 77ce46129a fix(resume): capture pause block names and keep the resume page off the execution snapshot (#10104)
* fix(resume): stop shipping the execution snapshot to the resume page

* improvement(resume): capture pause block names at pause time and keep display reads off the snapshot
2026-11-16 17:44:28 -08:00
Waleed 1dc07deea6 fix(integrations): validate dynamics 365, zoho desk, rippling, okta, sailpoint and snowflake (#10072)
* fix(integrations): sweep2 v2 — read the mapper operation from the tool-call context and validate integrations against vendor specs

* chore: regenerate tool metadata, docs and ratchet baselines

* refactor: simplify and clean up the sweep changes

* fix(integrations): address review on dynamics 365, okta, rippling, zoho desk and snowflake

- dynamics 365: blank canvas Outcome falls back to won
- okta: list_user_groups pages with after/limit and returns nextCursor/hasMore
- rippling: nextCursor output inlined (nullable) so docs list it; create record rejects blank data; cursor placeholder names the query cursor
- zoho desk: restore sharedDepartments maxItems 10 on update_ticket
- test types: narrow the okta url builder and snowflake mapper in new tests

* fix(okta): mark list_user_groups nullable group fields as nullable

* chore: regenerate tool metadata and mapper baseline after rebase

* fix(microsoft-dynamics-365): render owner type and id on agent tool rows

List Owners and Assign Record read ownerType/ownerId, which are block-only
fields a tool row never rendered or stored, so every agent, Pi and HITL call
failed with 'Owner type is required'. Mark both user-only so rows store them;
canvas behavior is unchanged.

* chore: regenerate tool metadata after rebase

* fix(microsoft-dynamics-365): keep a blank close outcome failing instead of assuming won

* chore: regenerate tool metadata and mapper baseline after merging staging
2026-11-15 19:25:14 -08:00
Waleed 5729416ca6 fix(blocks): read the mapper operation from the tool-call context in j–z blocks (#10078)
* fix(integrations): sweep2 m4 — read the mapper operation from the tool-call context and validate integrations against vendor specs

* chore: regenerate tool metadata, docs and ratchet baselines

* refactor: simplify and clean up the sweep changes

* fix(blocks): type the sweep2 m4 mapper tests and stripe JSON spreads for test-types

* fix(rocketlane): send only the saved time source when a tool call also names another

* chore: regenerate tool metadata and mapper baseline after merging staging
2026-11-15 19:24:25 -08:00
Waleed a86f4c2e44 fix(blocks): read the mapper operation from the tool-call context in internal and a–i blocks (#10077)
* fix(integrations): sweep2 m3 — read the mapper operation from the tool-call context and validate integrations against vendor specs

* chore: regenerate tool metadata, docs and ratchet baselines

* refactor: simplify and clean up the sweep changes

* fix(blocks): keep tool-row conflictTarget, parse affinity rank/winRate args, fix CI type and canonical-id checks

Table upsert keeps a tool row's conflictTarget when conflictColumn is unset; affinity parses model rank/winRate through the same numeric validation; instantly treats a whitespace interestValue as empty on tool calls; file reads the model folderPath via its canonical folderRef; dub's mapper context is optional; buffer test typing; shrink the test-types baseline for ashby.

* fix(blocks): fall back to model args for empty carousel media, blank share emails, and boolean enabled filters

* chore: shrink the mapper-operation baseline after rebasing onto staging

* fix(blocks): keep a numeric zero table limit and drop the model authType when disabling sharing

* fix(blocks): send one folder target on File append/edit tool calls

On a tool call the mapper result is spread over the merged row and model params, so a model
folderPaths survived beside the row's folderPath (or the model's own folderPath) and the file
contract refused the pair. Clear whichever folder arg the resolved target did not set.

* chore: regenerate tool metadata and mapper baseline after merging staging
2026-11-15 19:23:37 -08:00
Waleed 41c840c581 fix(blocks): read the mapper operation from the tool-call context in google, microsoft and atlassian blocks (#10076)
* fix(integrations): sweep2 m2 — read the mapper operation from the tool-call context and validate integrations against vendor specs

* chore: regenerate tool metadata, docs and ratchet baselines

* refactor: simplify and clean up the sweep changes

* fix(integrations): resolve referenced files in the legacy slides image source and keep empty trello descriptions on tool calls

* fix(trello): drop blank card descriptions again so a cleared saved field never erases one

* chore: re-ratchet the mapper-operation baseline onto staging

* chore: regenerate tool metadata and mapper baseline after merging staging
2026-11-15 19:22:53 -08:00
Waleed 2ed6201b7a fix(integrations): validate github, gitlab, linear, slack, pagerduty, incident.io, sentry and datadog (#10071)
* fix(integrations): sweep2 v1 — read the mapper operation from the tool-call context and validate integrations against vendor specs

* chore: regenerate tool metadata, docs and ratchet baselines

* fix(incidentio): keep the creator mapper module-private

* refactor: simplify and clean up the sweep changes

* fix(integrations): address v1 review findings and CI failures

- keep the Linear project-status tool's display name so its docs anchor survives
- pass Slack's comma-separated ID lists through the workflow-block mapper
- reject '..' segments in GitHub content paths; only exact dot-segment GitLab ids
- reject non-array commits in Sentry release create
- mark nullable outputs (Linear dueDate/status, GitHub latest commit v2)
- align descriptions with the vendor contracts (incident.io, Slack, GitHub, Linear)
- drop a dead credential fallback the canonical-param check flags; fix test types

* fix(integrations): keep latest-commit v2 docs, mark Linear project lifecycle timestamps nullable

Inline the v2 commit output so the docs generator still documents it, and shrink the unused-exports baseline now that COMMIT_DATA_OUTPUT_PROPERTIES is imported.

* chore: regenerate tool metadata and mapper baseline after rebase onto staging
2026-11-15 19:21:01 -08:00
Waleed 0ea25f479e fix(integrations): validate twilio, sendgrid, resend, mailgun, discord, telegram and whatsapp (#10073)
* fix(integrations): sweep2 v3 — read the mapper operation from the tool-call context and validate integrations against vendor specs

* chore: regenerate tool metadata, docs and ratchet baselines

* refactor: simplify and clean up the sweep changes

* fix(integrations): address v3 review findings

- twilio: trim account SID and From number once, mark sender/recipient outputs nullable, make From optional on the block when a Messaging Service is used
- discord: truncate fractional limits, reject more than one message cursor, mark nullable outputs
- telegram: only keep spoiler spans, drop NUL so input cannot alias a protected segment, mark optional animation fields, fall back to model poll options when the stored field is blank
- resend: clamp list limit to 1-100, sentence covers segment or audience, nullable broadcast outputs
- mailgun: clamp events limit to 300
- twilio voice: nextPageToken nullable
- fix test-types errors in twilio and whatsapp tests

* fix(integrations): clamp twilio voice page size, mark discord user avatar nullable

* fix(discord): match get_user output nullability to the User object

* chore: regenerate tool metadata and mapper-operation baseline after rebase
2026-11-15 17:44:35 -08:00
Waleed c7abe25a67 fix(integrations): validate shopify, brex, ramp, zoom, calendly, cal.com, typeform, webflow and wordpress (#10074)
* fix(integrations): sweep2 v4 — read the mapper operation from the tool-call context and validate integrations against vendor specs

* chore: regenerate tool metadata, docs and ratchet baselines

* refactor: simplify and clean up the sweep changes

* fix(integrations): address v4 review findings

- wordpress: reject unparseable term IDs instead of dropping them, map date explicitly, type search ids as number | string
- typeform: keep filename whitespace when building the file download URL
- brex: reject a limit buffer percentage outside Brex's 0-100 integer range
- calcom: type bookingUrl, hidden and ownerId on event type responses
- tests: call tool builders through ToolConfig instead of a type assertion
2026-11-15 17:28:58 -08:00
Waleed 43aac9244b fix(blocks): read the mapper operation from the tool-call context in aws and infra blocks (#10075)
* fix(integrations): sweep2 m1 — read the mapper operation from the tool-call context and validate integrations against vendor specs

* chore: regenerate tool metadata, docs and ratchet baselines

* refactor: simplify and clean up the sweep changes

* fix(blocks): keep model format, recursive and extended statistics on 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
2026-11-15 17:24:46 -08:00
Waleed 41a5f38fd4 fix(blocks): read the mapper operation from the tool-call context and ratchet raw reads (#10070)
* fix(blocks): read the mapper operation from the tool-call context and ratchet raw reads

A block's tools.config.params mapper gets the operation only as context.operation on a tool
call (Agent tool rows, Pi, Human v2), so branches on params.operation take the no-operation
path there. Add mapperOperation(params, context), move the mappers that already fell back to
context onto it, and add check:mapper-operation, a per-file ratchet over the remaining
raw reads (505 in 173 files) so they can only shrink.

* fix(blocks): return an empty string from mapperOperation when no operation is set

* fix(audits): track helper argument positions, destructured rests, helper results, and shadowed names in check:mapper-operation; drop _operation strips

* fix(audits): refuse to raise the mapper-operation baseline and alias only helper results that carry their input

* fix(audits): follow local copies when deciding whether a helper returns its params
2026-11-15 15:12:58 -08:00
Waleed bc438fc0f8 fix(realtime): keep admin block locks out of write-role graph replaces (#10062)
* fix(realtime): keep admin block locks out of write-role graph replaces

batch-add-blocks and replace-state (realtime) and every HTTP state-replace door wrote workflow_blocks.locked from the payload, so a write member could clear an admin-only lock and then edit or delete the block. A shared helper now keeps protected blocks, their incoming edges and loop config as stored during a full replace and writes every other block unlocked; batch-add skips protected blocks and blocks nested under a locked ancestor and never writes the lock flag.

* fix(realtime): guard locked loop config and re-sync clients when locks win

batch-add-blocks loops/parallels and subflow updates could rewrite a locked container's config. When persistence keeps lock-protected state over a payload, the room is told to reload instead of receiving the rejected payload.

* fix(realtime): cascade orphaned locked children and keep preserved edge ids

A replace that removes an unlocked container now removes its locked children too, matching a direct delete, instead of saving a dangling parentId. Preserved protected edges win by id, so a retargeted edge cannot duplicate one and abort the save. Skipped subflow updates re-sync the room like the other lock-reconciled writes.

* fix(realtime): refuse whole pasted subtrees under a locked ancestor

batch-add-blocks checks each added block against the graph as it will land, so a rejected container's new children and loop/parallel config are refused with it, and an edge refused for targeting a locked block re-syncs the room.
2026-11-14 15:12:24 -08:00
Waleed 77c9e26cee improvement(egress): route workspace requests through the organization's egress gateway (#10040) 2026-11-14 01:19:48 -08:00
Waleed 4b4a78bc28 fix(files): keep Markdown tables readable while scrolling (#10041)
* fix(files): keep Markdown tables readable while scrolling

* fix(files): track Markdown overlays during table scrolling

* fix(files): contain wrapped inline code in WebKit

* fix(files): preserve short Markdown table layout

* fix(files): clean up Markdown fixtures after API failures
2026-11-14 00:49:11 -08:00
Waleed e4d8673b27 fix(integrations): address release review findings on the integration sweep (#10039)
* fix(integrations): validate Asana limits, Intercom snooze times, and Mailchimp template ids, clamp Airtable page size, accept Mailchimp batch arrays, and keep the Mailchimp email type option on update

* fix(integrations): resolve the tool-call operation in the QuickBooks, SAP Concur, Attio, Intercom, Notion, Box, and HubSpot mappers

* refactor(integrations): share the Intercom params mapper, reuse the boolean and JSON input helpers, and drop duplicated test helpers

* fix(mailchimp): leave the email type option unchanged when its stored value is null

* fix(integrations): seed the Mailchimp email type option per operation and tighten presence checks for Intercom, Airtable, Dropbox, and QuickBooks inputs

* fix(integrations): seed the Mailchimp email type option from the operation's first option and validate the Intercom ticket snooze on tool calls

* fix(mailchimp): seed the email type option per operation, keep Keep current outside create, and default an unset create value to true

* fix(integrations): lead the Intercom role and Pipedrive deal status with No change in agent tool rows

* fix(integrations): parse the Mailchimp update email type option like create, drop its block-level required, and keep a zero Asana limit for validation

* fix(asana): treat a whitespace-only limit field as blank on tool calls
2026-11-13 22:24:45 -08:00
Waleed 7246075ba2 fix(integrations): validate monday, asana, clickup, airtable, notion, supabase, amplitude, box, docusign, and dropbox (#10030)
* fix(monday): expose items_page cursor pagination on get items

* fix(asana): send assignee/offset on task lists, add search limit, keep agent args in the block mapper

* fix(clickup): keep model args on agent tool calls, add task date filters and lastPage

* fix(airtable): accept already-parsed JSON inputs on tool calls and add list records pagination, page size, and view

* fix(notion): split long text into 2000-char rich text objects and paginate read page content

* fix(supabase): accept PostgREST-form and multi-column order-by, read primary/foreign keys from PostgREST OpenAPI markers

* fix(amplitude): send the second segmentation group-by as a repeated g and add the e2 second event

* fix(box): request the fields Box omits by default, add marker pagination for folder listings, keep the agent's folder name, and guard path ids

* fix(docusign): page envelope and template lists, ignore missing signing anchors, and guard envelope path ids

* fix(dropbox): read the nested existing shared link and page list folder and search with cursors

* fix(integrations): keep per-operation pagination values from leaking across operations and keep blank canvas custom field values

* fix(docusign): note that freeform signing can be disabled per account

* chore(docs): regenerate integration docs, catalog, and tool metadata

* chore(notion): replace non-null assertions in tests and shrink the explicit-any baseline

* fix(integrations): fail loudly on partial Notion reads, validate Asana limits and assignee, accept cursor-only Dropbox paging, normalize Supabase order modifiers, and mark nullable pagination outputs

* fix(box): mark nextMarker nullable
2026-11-13 18:45:24 -08:00
Waleed 56893cb622 fix(integrations): validate zendesk, pipedrive, and intercom against vendor specs (#10028)
* fix(zendesk): align search, merge, and bulk update requests with the Support API and expose missing block fields

* fix(pipedrive): move activity writes and pipeline listing to API v2, send lead visible_to as a string, guard path ids

* fix(intercom): snooze via the manage-conversation endpoint, coerce snoozed_until, guard path ids, add user/lead recipient types

* fix(integrations): default Intercom message recipients to a documented type, accept boolean done on Pipedrive updates, keep the Pipedrive file_type output

* chore(docs): regenerate integration docs, catalog, and tool metadata

* chore(lint): shrink the explicit-any baseline

* fix(integrations): keep quoted Zendesk search text, require org names on create, validate Intercom snooze timestamps, and tighten Pipedrive outputs

* fix(intercom): label the message recipient id for users, leads, and contacts
2026-11-13 18:34:13 -08:00
Waleed 769e6cfb37 improvement(chat): show background task and scheduled job turns as messages (#10032)
* improvement(chat): show background task and scheduled job turns as messages

* fix(chat): refresh automated turn workflow names and use shared label styles

* chore(chat): shrink the text-size-literal baseline
2026-11-13 18:21:19 -08:00
Waleed edb779961a fix(knowledge,files): count knowledge base documents per base and index the modified-order file list (#10026) 2026-11-13 17:30:20 -08:00
Waleed 07330aed35 fix(blocks): keep agent-supplied tool args that block mappers remap from dedicated fields (#10006)
* fix(blocks): keep agent-supplied tool args that block mappers remap from dedicated fields

* fix(blocks): gate every agent fallback on the call context, type the new mapper tests

* chore(types): shrink test-types baseline for the fixed block tests
2026-11-13 12:54:55 -08:00
Waleed cfc408321e improvement(executor): run the Agent block on the shared model-fallback walk (#9982)
* improvement(executor): run the Agent block on the shared model-fallback walk

* fix(executor): type the agent test block log so the ratchet shrinks
2026-11-12 21:03:36 -08:00
Waleed 90f5b00a1a fix(docker): ship the realtime and migrations images with runtime dependencies only (#9983)
Bun's --omit=dev skips the root's devDependencies but still installs every
workspace member, each member's devDependencies, and the optional peers the
lockfile can satisfy. Both images therefore carried drizzle-kit (with its
bundled esbuild binaries), vitest, vite and tsx, and the esbuild Go binaries
account for nearly all of their HIGH/CRITICAL scanner findings.

scripts/prune-production-workspace.ts narrows a turbo prune to the members the
target reaches through dependencies, optionalDependencies or a tsconfig extends,
and strips devDependencies from the root and the kept members. The migrations
image gains a dev stage that keeps drizzle-kit for the dev environment's
db:push; its final stage, which every other environment builds, runs db:migrate
with runtime dependencies only.
2026-11-12 20:54:00 -08:00
Waleed b266bd9822 fix(integrations): final review pass for the Atlassian and AWS sweeps (#9961)
* fix(atlassian): address final review

Make Jira search heavy fields (ADF description, custom fields, attachments,
links, subtasks) opt-in through fields, move transformIssueData into jira/utils,
keep AQL order by splitting at parenthesis depth 0, let the object-types /flat
fallback never add a failure, send next=true with Confluence search cursors, and
harden Trello ID lists, Jira parent, and Confluence comment ids for agent calls.

* fix(aws): address final review

Share the optional-boolean parse through @sim/utils/coerce toBooleanFromInput,
the IAM tags schema through iam-shared, and the SES message-tag schema through
ses-shared. Accept SES email tags as a JSON string from agent calls, name the
field on Secrets Manager JSON errors, accept JSON-array IAM tag strings and skip
null tag values, and reject a JSON-object Textract query string.

* fix(integrations): address review on the final pass

Treat only a leading [ as a JSON Textract query list, reject JSON-array IAM tag
strings and SES email-tag strings that do not parse to valid entries, name
Secrets Manager tag JSON errors, restore the JSM list TSDoc placement, and
shrink the explicit-any baseline after the Jira mapper move.

* fix(integrations): reject JSON-object Textract queries only when they parse, keep null IAM tag values as empty

* fix(textract): use isRecordLike for the JSON-object query check
2026-11-12 15:40:57 -08:00
Waleed 9866b65cd2 fix(atlassian): validate Jira, Confluence, JSM, Bitbucket, Trello against vendor docs (#9950)
* fix(atlassian): validate Jira, Confluence, JSM, Bitbucket, Trello against vendor docs

Fixes JSM Assets AQL search returning no objects (legacy request/response
shape), adds missing documented params and dropped response fields across the
suite, and routes path IDs through safeUrlPathSegment. All changes are additive:
no param, subBlock, operation, tool id, or output is removed or retyped.

* fix(atlassian): address review findings

Keep trailing AQL and CQL order by clauses after scoped filters, honor escaped
quotes, reject JSM approvalStatus/organizationId outside their ownership modes,
move Trello card outputs into types.ts so the docs render them, and drop the
now-unused Confluence COMMENTS_OUTPUT.

* fix(atlassian): send Trello update ID lists comma-separated and tighten output types

PUT /cards/{id} documents idLabels/idMembers as comma-separated strings.
Treat a whitespace-only Jira parent as unset, mark nullable Trello card
outputs, document the new Trello types, and type the Confluence search test.

* fix(trello): mark every optional card output field nullable

* fix(jira): keep explicit assignee ahead of customFields and accept string includeAttachments
2026-11-12 14:31:24 -08:00
Waleed 143fe02872 fix(microsoft): validate Microsoft integrations, return dropped fields and expose missing params (#9949)
* fix(microsoft): validate Microsoft integrations, return dropped fields and expose missing params

Sweeps Outlook, Teams, OneDrive, Word, SharePoint, Excel, Planner, Intune,
Entra ID, Power BI, Dataverse, Dynamics 365, Azure DevOps, and Azure Data
Explorer against the Microsoft API references. Outlook read/search and the
Outlook trigger now return Bcc, Reply-To, internetMessageId, flags, and
categories. All changes are additive: no param, subBlock, operation, tool id,
or output is removed or retyped.

* fix(microsoft): address review — Outlook poller retries, SharePoint filter guard, opt-in Entra manager

* fix(microsoft): address review round 2 — Dataverse nextLink table binding, offboarding roles, SharePoint hidden filters

* fix(microsoft): Teams Get Message sender falls back to bot name; clarify SharePoint site search scope

* fix(microsoft): zero-drift fixes from verification — dedicated subBlock ids, restored legacy outputs and caps

* fix(microsoft): reserve ADX table envelopes up front, log skipped Outlook attachments, tighten SharePoint upload path

* fix(microsoft): shared toStringOrNull in AzDO mapper, null relations when unexpanded, per-file SharePoint name errors
2026-11-12 14:11:09 -08:00
Waleed 285727966b fix(google): validate Workspace integrations, return dropped fields and expose missing params (#9947)
* fix(google): validate Workspace integrations, return dropped fields and expose missing params

Gmail read/search/thread/draft and the Gmail trigger now return Cc, Bcc,
Reply-To, Message-ID, In-Reply-To, References, snippet, and internalDate.
Sweeps Calendar, Meet, Drive, Docs, Sheets, Slides, Forms, Contacts, Tasks,
Groups, and Vault against the Google API references. All changes are
additive: no param, subBlock, operation, tool id, or output is removed or
retyped.

* fix(google): address review findings and CI audits

- Vault shared drives use sharedDrivesOption; reject unprocessed scope outside Mail/Groups
- Sheets: reject COLUMNS reads with a row filter, guard v1 spreadsheet ids, expose includeValuesInResponse on v2 writes
- Groups list sends userKey exclusive of customer; Drive caps the metadata error body
- Slides reads WordArt text and marks nullable outputs; Calendar validates raw reminder minutes and exposes the list time zone
- Contacts rejects year 0000; Gmail labels output typed as json; audit and baseline fixes

* chore(google): regenerate tool metadata after rebase

* fix(google): tighten Docs tab/number parsing, normalize Slides soft breaks, reuse jsonResponse helper
2026-11-12 12:41:55 -08:00
Waleed 33734384d6 feat(aws-marketplace): bill a listing's LLM usage to AWS through a per-period metering tally (#9921) 2026-11-12 10:05:53 -08:00
Waleed ef7bc52246 feat(credentials): saved PostgreSQL, MySQL, and SQL Server connections (#9929)
* refactor(credentials): share the owner-scoped service-account secret read

Oracle Database's saved-connection lookup now reads its row through one
owner-scoped helper, so the saved database connections that follow bind
to their owner and provider the same way instead of copying the query.

* feat(credentials): saved PostgreSQL, MySQL, and SQL Server connections

Adds three service-account providers (postgresql-, mysql-, and
mssql-service-account) that store a database connection: host, port,
database, login, password, and the SSL mode or SQL Server encrypt and
trust-certificate settings. Saving proves the connection with SELECT 1
through each family's own query operation, so host validation and IP
pinning match a real run, and only then encrypts it; driver errors are
never surfaced. The connection is read back inside the tool operation,
bound to the run's workspace or organization, by
withSavedDatabaseConnection, which replaces every connection field in the
call so a caller or model cannot steer a shared credential.

One client-safe descriptor table drives the provider ids, required
fields, provider catalog, token resolvers, secret builders, and a shared
connect modal.

* feat(database-tools): run PostgreSQL, MySQL, and SQL Server tools on a saved connection

Every PostgreSQL, MySQL, and SQL Server tool now declares an optional
service-account credential policy (required: false), so its inline
connection fields keep working unchanged and a saved connection can stand
in for them. The executor authorizes the selected credential and passes
it through trusted context; the family's operation handler, wrapped by
withSavedDatabaseConnection, reads the stored connection bound to the
run's owner and replaces every connection field before parsing. The
providers resolve inside the operation, like AWS, so they join
OPERATION_RESOLVED_CREDENTIAL_PROVIDERS.

A real-Postgres integration test saves a connection (SELECT 1 through
the guarded path), refuses one the server rejects, runs a query on the
saved connection whatever fields the call carries, and refuses it to
another workspace and once revoked.

* feat(blocks): credential-only PostgreSQL, MySQL, and SQL Server blocks

postgresql_v2, mysql_v2, and mssql_v2 spread their legacy blocks and swap
the connection fields (host, port, database, username, password, and SSL
mode or SQL Server encrypt and trust-certificate settings) for a saved
connection picker through withSavedCredential. Their canvas sentences
drop the database clause the block no longer holds.

The legacy blocks change only by hideFromToolbar and a legacy sunset
pointing at the successor, so existing workflows keep their inline
connection fields and run exactly as before. Generated block successors,
docs, icon maps, and deployment metadata are regenerated.

* docs(integrations): set up saved PostgreSQL, MySQL, and SQL Server connections

Each page's intro now explains adding a saved connection, how Sim proves
it before saving, what every SSL mode or SQL Server TLS setting does in
the runtime's drivers, and that existing workflows keep their inline
connection fields.

* refactor(database-tools): wrap SQL families at registration and derive saved-connection schemas from the operations

- Register the PostgreSQL, MySQL, and SQL Server families through
  registerSavedDatabaseFamily, which applies withSavedDatabaseConnection and
  records each tool id's service. A registry test now fails when a tool that
  names a saved database connection runs outside a wrapped family, the case
  the saved-credential contract skips for operation-resolved providers.
- Build the stored connection schemas from each operation's own connection
  schema (bounds tightened, strict), so the TLS values and defaults have one
  source. Stored blobs decode exactly as before.
- Reuse the SQL Server default connection timeout instead of repeating it,
  and parse a submitted connection once.
- Unit tests prove save-then-run round trips and drive refusals through the
  run wrapper; the workspace and revocation cases stay in the integration
  test, which now runs through the registered operation.

* fix(credentials): describe saved-connection TLS modes as the drivers apply them

- MySQL Required verifies the certificate chain but not the host name (like
  VERIFY_CA), and both Preferred and Required refuse a server without TLS.
- SQL Server Encrypt connection requests TLS; a server that does not support
  encryption gets an unencrypted session rather than an error.
- PostgreSQL Preferred can be downgraded by an on-path attacker, so the hint
  and docs steer to Required when the server supports TLS.
- Picker options are keyed by each operation schema's value type, so a mode
  the operations add or drop fails to compile instead of drifting.

* refactor(credentials): derive stored database connection fields and credential-supplied params from one list

The stored v1 schema now picks exactly the descriptor's login and TLS fields
out of each operation schema instead of extending the whole schema, and the
tools' credentialSuppliedParams come from the same list. An operation field
added later can no longer change the stored blob, get pinned on every run,
or stay visible on the credential-only block.

* fix(credentials): validate the saved-connection port in the form and carry TLS tradeoffs into the provider catalog

The connection modal now refuses a port that is not a whole number from 1 to
65535 and says so beside the field, instead of a generic verify failure. The
v2 provider catalog hint for saved PostgreSQL, MySQL, and SQL Server
connections now includes each transport-security field's tradeoff, so API
callers see what Preferred, Encrypt, and Trust server certificate give up.
The integration fixture decodes the database name from TEST_DATABASE_URL.

* docs(credentials): document the database connection provider id helpers

* fix(credentials): keep an encryption failure on a verified database connection a server error

* docs(credentials): document the database connection descriptor and id types

* docs(databases): describe the PostgreSQL, MySQL and SQL Server connection setting types
2026-11-12 08:25:34 -08:00
Waleed ff166c1a56 feat(credentials): saved credentials for Amplitude, Kalshi, Splunk, CB Insights, Railway, and Qdrant; fix Kalshi Ed25519 signing (#9927)
* fix(kalshi): sign requests with Ed25519 keys, the type Kalshi generates by default

Kalshi picks the verification algorithm from the registered public key: Ed25519 over the
pre-sign text, or RSA-PSS SHA-256 for an RSA key. The signer always passed the sha256 digest
and PSS padding, which Node and Bun refuse for an Ed25519 key, so every authenticated call
with a default key failed before it was sent. The key type is now read from the parsed key
(a PKCS#8 RSA key shares the Ed25519 PEM header), and any other key type is refused.

* feat(amplitude): saved project credential and a credential-only Amplitude block

An Amplitude credential holds a project's API key, secret key, and data residency region,
verified by listing the project's events on the region's Dashboard REST host with the Basic
key pair the tools send (Amplitude answers 403 for either key being invalid). The region and
key shapes are checked before any request. Each tool group maps only the params it declares:
analytics tools take both keys and the region, ingestion tools the API key and region, and
User Profile the secret key. The legacy block keeps its inline keys and is hidden from the
toolbar in favor of amplitude_v2.

* feat(kalshi): saved API key credential and a credential-only Kalshi block

A Kalshi credential holds an API key ID and its private key, verified by a free balance read
signed the way the tools sign every authenticated call; a key that cannot sign or a key ID that
would break the header is refused before any request. The tools that sign requests map the
key ID and private key from the credential, while market data stays public, so kalshi_v3
shows the credential picker only on account and trading operations. Token credential fields
gain an optional multiline flag so the connect form keeps a pasted PEM key's line breaks.
kalshi and kalshi_v2 keep their inline keys and now point at kalshi_v3.

* feat(splunk): saved authentication token credential and a credential-only Splunk block

A Splunk credential holds an authentication token and the management URL, verified by reading
authentication/current-context (documented, no capability needed) through the guarded egress
with the URL normalized as the tools build it; an answer without a user context is not taken as
proof, and certificate verification is never relaxed. The tools send the token whenever one is
set, so the credential policy marks the inline username and password as replaced by the token:
tokenCredentialOAuth gains an optional list of such params, and the saved-credential contract
accepts any token-filled param (not only accessToken) beside them. splunk keeps its inline
connection fields and points at splunk_v2.

* feat(cbinsights): saved API client credential and a credential-only CB Insights block

A CB Insights credential holds the client ID and secret, verified by exchanging them at
POST /v2/authorize, the call the tools make before their first request; a success without a
token is not taken as proof, and the error body is never logged. The tools keep minting and
caching their own token per run, so the credential fills the same client ID and secret they
take inline. The lookup's profileUrl is request data sent to api.cbinsights.com, recorded as
such in the saved-credential contract. cbinsights keeps its inline client fields and points at
cbinsights_v2.

* chore(audits): shrink the unused-exports baseline for exports now in use

The Kalshi signer is exercised by its tests and the CB Insights API base by the saved
credential check, so neither is unused any more.

* test(credentials): cover a token-replaced sign-in whose token fills a param other than accessToken

The saved-credential contract now accepts any credentialParams entry filled with the token beside
tokenReplacesParams (Splunk's authToken), and names that in its error.

* feat(railway): saved token credential, type-aware, and a credential-only Railway block

A Railway credential holds a token, its type (account, workspace, or project), and for a
workspace token the workspace ID. Each type is verified with the read Railway documents for its
scope, since `me` answers only an account token: an account token reads `me`, a workspace token
reads its workspace by ID (passed as a GraphQL variable), and a project token reads
`projectToken` with the Project-Access-Token header the tools send for it. A GraphQL error or a
body without the queried object is not taken as proof. The tools receive the token and its type,
so a project token keeps its own header.

Token credential fields gain an optional flag: an optional field is left out of the required
create fields, the connect form does not require it and omits it when blank, and the secret
builder stores it only when set. Existing descriptors declare no optional field, so their
required fields and stored secrets are unchanged. railway keeps its inline token and points at
railway_v2.

* feat(qdrant): saved API key credential bound to its instance URL, and a credential-only Qdrant block

A Qdrant credential holds a database API key and the instance URL, verified by listing
collections (a read every key may run; a collection-scoped key sees a filtered list) with the
api-key header the tools send, through the guarded egress with the URL normalized as the tools
build it. An answer without a collection list is not taken as proof. The tools receive the key
and the verified URL, so a run reaches only that instance. qdrant keeps its inline URL and
optional key, which a self-hosted instance without an API key still needs, and points at
qdrant_v2.

The successor test matrix counts a field repeated per operation (Qdrant's URL) once.

* fix(credentials): honor an optional domain field in the token secret builder

The optional flag was honored by the create contract and connect form for any
field, but the secret builder only applied it to the workspace ID and still
required any domain field. Derive both the same way, and store a domain only
when it is required or supplied. No descriptor marks a domain optional today,
so stored secrets are unchanged.

* fix(amplitude): send both saved keys to User Profile over Basic auth

Amplitude's User Profile API documents only Basic authentication with the
project API key and secret key. A saved Amplitude credential now fills the API
key too, and the tool sends Basic auth whenever an API key is present. Inline
calls that pass only the secret key keep the Api-Key header they sent before.

* test(kalshi): keep only the signer cases that guard the key-type fix

Drop the PKCS#1, query-string, literal newline and auth-header cases, which
restate unchanged behavior or repeat the validator's Ed25519 check.

* docs(amplitude): note that User Profile sends both saved keys in the v2 block TSDoc

* fix(railway): require the workspace ID in the connect form once the token type is workspace

* chore(audits): re-record the tool-registry boundary baseline for the new credential validators

* fix(amplitude): default the saved credential's data residency to us
2026-11-12 07:25:04 -08:00
Waleed d5e98fac3c feat(credentials): regional and instance hosts for saved LaunchDarkly, LangSmith, New Relic, Square, SendGrid, Hex, and Sentry credentials (#9926)
* feat(credentials): add defaulted region fields to token credentials and LaunchDarkly EU and federal instances

A token credential's connection field can now declare a fixed option set
(rendered as a dropdown) and a default value. The default is what a create
that omits the field gets, and what a credential saved before the field
existed resolves to, so existing credentials and API callers keep the host
they always used. A reconnect that leaves the field blank keeps the stored
value instead of falling back to the default.

LaunchDarkly is the first provider to use it: the access token is checked at,
and every LaunchDarkly tool sends it to, the commercial, EU
(app.eu.launchdarkly.com), or federal (app.launchdarkly.us) instance it was
created in. Runs without a saved credential keep the commercial host.

* feat(langsmith): verify and run saved LangSmith keys in their region

A LangSmith API key only authenticates in the region its organization lives
in. The saved credential now carries that region (GCP US by default, or GCP
EU, GCP APAC, AWS US, or Azure US), and the key check and every LangSmith
tool use its documented API host. Credentials saved before, and runs without
a saved credential, stay on api.smith.langchain.com.

* feat(new-relic): add the JP data center to saved keys, tools, and the legacy block

New Relic now documents a Japan region whose NerdGraph endpoint is
api.jp.newrelic.com. Saved User API keys can be verified and run there, the
tools route jp to it, and the legacy block's region dropdown offers it. The
saved key's region field is now a dropdown. Unknown region values still fall
back to the US endpoint, as workflows saved before regions expect.

* feat(square): verify and run saved Square tokens in the sandbox

Square credentials and resources of one environment cannot be used in the
other. The saved credential now carries its environment (production by
default, or sandbox), and the token check, every Square tool, and the catalog
image upload operation call connect.squareup.com or
connect.squareupsandbox.com accordingly. Credentials saved before, and runs
without a saved credential, stay on production.

* feat(sendgrid): verify and run saved keys of EU regional subusers on the EU host

SendGrid serves regional subusers in the EU from api.eu.sendgrid.com. The
saved credential now carries its region (global by default, or eu), and the
key check, every SendGrid tool, and the mail send operation use that host.
Credentials saved before, and runs without a saved credential, stay on
api.sendgrid.com. The connect modal notes that Marketing Campaigns actions
are not available to EU subusers.

* feat(hex): verify and run saved Hex tokens on the workspace's hex.tech host

Hex serves EU multi-tenant, HIPAA multi-tenant, and single-tenant workspaces
from their own hex.tech host instead of app.hex.tech. The saved credential
now carries that host (app.hex.tech by default), accepting only a single
label under hex.tech so a token is only ever sent to Hex, and the token check
and every Hex tool use it. Credentials saved before, and runs without a saved
credential, stay on app.hex.tech.

* test(credentials): type the regional host tests and keep region option types module-private

* feat(sentry): verify and run saved Sentry tokens in their data storage region

Sentry serves organizations whose data is stored in the EU from de.sentry.io,
and its organization list is per region. The saved credential now carries
its region (us by default, or de), and the token check and every Sentry tool
call sentry.io or de.sentry.io accordingly. Credentials saved before, and
runs without a saved credential, stay on sentry.io.

* feat(credentials): report a defaulted region field's default in the provider catalog

The v2 provider catalog marked a defaulted region, instance, or host field optional without
saying what it defaults to. Each field now carries an additive optional defaultValue, and the
OpenAPI document and CLI client are regenerated.

* docs(square): say a saved credential can hold a sandbox access token

* fix(credentials): keep default-region token credentials as they were and share region definitions

- A credential on its provider's default region or host keeps the bare service display name,
  and a vendor region host that fails to resolve is reported as the vendor being unavailable,
  not a typed host that was not found.
- defaultValue is honored on the domain field only; providerWorkspaceId keeps its required,
  non-defaulted handling everywhere, so a blank reconnect can never reset it.
- One defineCredentialRegions factory now holds each vendor's region ids, hosts, labels,
  default, API base, and hidden tool param (LaunchDarkly, LangSmith, New Relic, SendGrid,
  Sentry, Square); the internal SendGrid and Square schemas validate against it, and the New
  Relic descriptor and block take their options from it.
- One isTokenServiceAccountFieldRequired predicate replaces the inline defaulted-is-optional
  checks.
- Hex refuses its known non-workspace hex.tech labels (status, learn, docs, www, help,
  community, blog), and the pattern's comment no longer claims more than it guarantees.
- Drops a mock-only and two pass-through tests; adds Sentry to the default-region tables.

* test(credentials): guard a named reconnect region against the stored one

Fold the named-region reconnect case into the blank-reconnect table as a
contrast row on a credential stored in eu, so it fails if a reconnect
always keeps the stored region.

* test(credentials): drop the repeated mock reset in the legacy region tests
2026-11-12 05:08:13 -08:00
Waleed f947d95a8f feat(credentials): audit fixes and non-OAuth auth for CrowdStrike, Datadog, Gong, PlanetScale, SailPoint, ServiceNow, Zendesk, ZoomInfo, Shopify, Atlassian, Linear and Twilio (#9911)
* fix(credentials): accept permission-scoped AgentMail keys at connect

A valid AgentMail key that lacks inbox_read or is scoped to a pod or inbox
gets a 403 coded missing_permission or forbidden on the inbox listing, and
was refused as invalid. Accept a coded 403 as proof of the key, and keep
rejecting the gateway's bare Forbidden and the key-naming 401 codes.

* fix(credentials): offer Atlassian API tokens for the Bitbucket saved credential

Bitbucket takes an Atlassian API token created for Bitbucket as a Bearer
token, so the existing repository read already verifies one. Say so in the
connect copy and setup guide, and note that app passwords no longer work.

* fix(credentials): ask for a reconnect when a Microsoft app certificate can no longer sign

An expired or unreadable stored certificate failed before any request reached
Entra, carried no status, and was reported at run time as the provider being
temporarily unavailable (502). Local configuration failures now classify as
invalid_credentials, and only an unreachable Entra keeps provider_unavailable.
Saving also refuses a certificate that is not valid yet.

* fix(credentials): warn that saved Infisical access tokens expire

Sim stores the machine identity access token as pasted and never renews
it, so it stops at its Access Token TTL (30 days by default). Tell users
to set a long TTL and Max TTL, and not an Access Token Period, which needs
renewal each period.

* fix(credentials): retry keyless Microsoft token requests while a federated credential propagates

Entra can refuse a new federated identity credential with AADSTS70021 for
several minutes after it is added, even after a token was issued, and
Microsoft asks callers to retry. A run now retries that refusal (and
AADSTS700213) twice with jittered backoff before reporting it; the save-time
subject-pin probe, which expects the refusal, is unchanged.

* fix(infisical): keep the instance URL out of the model's reach and normalize it like a saved credential

The legacy Infisical tools let the model set baseUrl, so a prompt-injected
agent call could send the inline Infisical token to any public host. baseUrl
is now user-only (matching Grafana and Upstash), and inline instance URLs go
through the same normalizer the saved-credential validator stores, which moves
from the validator module into input-validation so tools can share it.

* feat(credentials): accept HubSpot service keys for the saved HubSpot credential

HubSpot stopped new legacy private apps on October 26, 2026 and points
direct integrations at service keys, which are Bearer tokens for the same
REST APIs. The connect copy now asks for a service key or an existing
private app token. The token-info route covers only private apps, so a
non-transient refusal there defers to the Account Information API, and that
fallback accepts a 403 only with a JSON body, so a firewall page never
passes as a live token. Both checks refuse redirects.

* feat(credentials): accept Microsoft app credentials for Intune

Every Intune operation the block offers (managed devices, detected apps,
compliance policies and their device statuses, device configurations, and the
sync, restart, remote lock, and retire actions) documents application
permissions in Microsoft Graph v1.0, so the Intune picker now lists Microsoft
app credentials and the resolver mints a Graph token for them. OAuth Intune
connections are unchanged. The setup docs name the application permissions
each operation needs.

* fix(credentials): refuse rotating Slack tokens for custom bot credentials

A Slack app with token rotation on issues xoxe.-prefixed tokens that expire
in 12 hours and can only be refreshed with the app's client ID and secret,
which Sim never holds. Such a token passed auth.test at connect and failed
every run after. Refuse xoxe tokens up front with a message that asks for
the xoxb- token of an app with rotation off.

* docs(credentials): correct the Devin key check comment to match Devin's docs

Devin documents 401 for an invalid key and one 403 for both a key outside
the organization and a key without ViewOrgSessions. Behavior is unchanged:
nothing documented separates the two 403s, so a 403 still rejects.

* fix(credentials): refuse redirects in every per-vendor saved-key check

The shared token-check engine already refuses redirects, but the per-vendor
validators followed them. Fetch keeps custom headers such as x-api-key and
X-Shopify-Access-Token on a cross-origin redirect, so a redirected check
would hand the key to another host. Every per-vendor check now refuses a
redirect, which surfaces as the provider being unavailable.

* fix(credentials): treat a Webflow token that reaches no site as the user's error

GET /v2/sites lists every site the token can access, so an empty list is a
token the user must replace, not a retryable outage. A token that reaches
several sites is no longer pinned to whichever site the list returns first.

* feat(credentials): pick and connect Google service accounts for Vertex AI

The Vertex AI runtime already resolves Google service account credentials,
keyless or JSON key, but the Google Cloud Account picker on model blocks only
listed OAuth accounts, so a saved service account could be used only by
pasting its ID in advanced mode. Vertex AI now names google-service-account
as its service-account provider, and its picker lists both kinds with a
connect action for each, so the keyless option is offered for Vertex.
Existing OAuth selections and the advanced credential ID field are unchanged.

* fix(copilot): let Copilot pass a saved credential to hybrid tools

Copilot's integration schema only offered credentialId for tools that require
OAuth, so a tool that takes an inline key or an optional saved credential always
demanded the inline secret and the gateway never forwarded a saved credential.
On the copilot surface those tools now declare an optional credentialId and stop
requiring the params a saved credential supplies; the workflow surface and
OAuth-required tools are unchanged. The executor now rejects a Copilot call to
such a tool that sends neither, instead of calling the provider without a key.

* fix(credentials): report a NerdGraph error answer as New Relic being unavailable

New Relic refuses an unknown or wrong-region User key with a 401, so a 200
whose errors array left the fixed actor query unanswered is NerdGraph
failing, not a verdict on the key. Report it as provider_unavailable
instead of telling the user their key is wrong. A 200 with no user and no
errors still rejects.

* fix(aws): refuse S3 presigned URLs that outlive the saved role session signing them

A presigned URL signed with STS credentials stops working when the role session
ends, whatever expiry it asks for, but the S3 tool reported the requested expiry.
Resolved sessions now carry the STS expiration, and presigning with a saved
assume_role or oidc_role credential refuses an expiry past the session's end
with a 400 that names the remaining time and the session duration. Long-lived
access keys and inline keys are unchanged.

* fix(guardrails): resolve the hallucination check's Vertex credential like every other model call

The hallucination check looked the Vertex credential up as a raw account ID,
so a saved credential (whose ID is a credential row, OAuth or Google service
account) resolved no token and the scoring call ran without one. It now uses
the shared Vertex resolver, which handles credential rows, Google service
accounts, and the legacy account IDs the old lookup accepted, and fails the
check instead of calling the model when the credential cannot be resolved.

* fix(aws): report transient STS failures on a saved credential as 503, not a denial

Every failure to resolve a saved AWS credential came back as a 403, so an STS
outage, throttling, or STS failing to reach Sim's OIDC issuer (IDPCommunicationError)
read as a permission problem and was never retried. Failures STS models as
retryable, throttling, STS 5xx, and network errors now return 503; real denials
(AccessDenied, invalid or expired identity tokens, rejected claims) stay 403.
No extra retry loop is added: the pinned STS client already retries
IDPCommunicationError and throttling up to three times with backoff.

* fix(databricks): report an unreachable workspace at token mint as provider_unavailable

A connection failure, timeout, or refused redirect while minting a run's
Databricks token escaped as a raw fetch error, which the executor reported as a
generic 401 and whose cause can carry connection details. It is now a 502
DatabricksCredentialError, which resolves to provider_unavailable; a cancelled
run still rethrows its abort, and personal access tokens are unaffected.

* feat(credentials): connect Shopify Dev Dashboard apps with client credentials

Shopify Dev Dashboard apps never reveal an Admin API token, so the Shopify
saved credential gains a client-credentials mode beside the pasted shpat_
token. A credential saved with authMethod client_credentials stores the
client ID, secret, and store domain; execution mints the 24-hour token at
the store's /admin/oauth/access_token endpoint.

Shopify does not document whether a new token retires earlier ones, so
every saved credential for one app and store shares a single token kept
under an advisory lock in client_credential_token, instead of minting per
worker. shop_not_permitted surfaces as grant_not_permitted with copy that
names the same-organization requirement.

Pasted-token credentials, their blob, and their resolution are unchanged;
the minted-token cache in the credential service is factored out so the
client-credential providers and this mode share it.

* fix(credentials): keep keyless off when a pinned workload identity issuer has an unserved path

Sim serves workload identity discovery and keys only under /oidc/workload, and
clouds fetch <issuer>/.well-known/openid-configuration, so a WORKLOAD_IDENTITY_ISSUER
with any other path advertised keyless credentials that no cloud could verify. A
pinned issuer must now have the /oidc/workload path (its host may differ), or
keyless stays off with a log line naming the requirement. The default issuer
derived from the app URL is unchanged, and the self-hosting and AWS credential
docs state the requirement.

* feat(credentials): saved CrowdStrike API client credential and credential-only block

A CrowdStrike credential holds a Falcon API client id and secret, the cloud
(from the existing Falcon cloud allowlist), and an optional MSSP member CID.
The minter posts them to the cloud's /oauth2/token with redirects refused and
returns the token with its expires_in lifetime (30 minutes when unusable)
and the cloud, which the credential cache keys by credential id and secret
fingerprint, so changing the cloud or secret re-mints.

- clientCredentialOAuth: a policy for tools that mint their own token from
  inline client credentials. The credential fills the hidden accessToken and
  the region param; tokenReplacesParams names the inline secrets the token
  replaces, and the saved-credential contract check accepts exactly those.
- crowdstrike_v2 is the credential-only successor; the legacy block keeps
  its inline client id, secret, and cloud and is hidden from the toolbar.
- The operation uses a credential's token as is. Inline credentials now
  reuse a cached token (keyed by cloud, client id, and secret hash) until a
  minute before it expires, and a 401 drops it so the next run re-mints.
- Client-credential mints can bind a domain (the cloud), carried through
  the token cache to tools.

* fix(credentials): accept only documented scoped-key answers from AgentMail and New Relic

AgentMail now proves a key only on the two 403 codes its docs give for a
valid key with the wrong scope (missing_permission, forbidden); a suspended
account, a gateway deny, and any other refusal reject the key.

New Relic reports an outage only for NerdGraph errors in the server classes
its own client retries; BAD_API_KEY and unclassified errors reject the key.

* fix(credentials): settle HubSpot service keys on the account-info route

A token-info 200 without a portal now falls back to account-info instead of
failing as an outage, and a token-info 401 falls back only for pat- keys, so
other tokens keep being rejected there as before. The vendor-JSON 403 check
moves to one shared helper.

* docs(credentials): align HubSpot, Infisical, and Bitbucket saved-key copy with vendor docs

* feat(credentials): saved Zendesk credentials with client credentials or an API token

Zendesk gets a zendesk-service-account credential with two sign-ins: a
confidential OAuth client exchanged through the client-credentials grant
(POST /oauth/tokens, JSON, an explicit read or read write scope, a one-hour
expires_in), or an agent email and API token sent as the documented
email/token Basic credential. The subdomain is normalized and must match
^[a-z0-9][a-z0-9-]*$ before any request, and connecting requires
users/me to answer with a real (non-anonymous) agent or admin.

The credential resolves to its token, its subdomain as domain, and
authStyle basic for the API-token sign-in. zendesk_v2 is the
credential-only successor; every Zendesk tool reads the token through one
header helper and takes its subdomain from the credential. The legacy
zendesk block and its inline email, API token, and subdomain keep signing
in exactly as before.

* feat(credentials): PlanetScale saved service token credential

A PlanetScale credential holds a service token and its ID, verified by
listing the organizations the token reaches with the same ID:token
Authorization the tools send; a JSON 403 is a valid token without that
read. Every PlanetScale tool accepts it, the selectors gain saved-credential
twins that read the pair from the credential, and planetscale_v2 is the
credential-only successor. The legacy block keeps its inline inputs.

* feat(credentials): Gong saved access key credential

A Gong credential holds an access key and its secret, verified by listing
workspaces on api.gong.io with the Basic key:secret the tools send. Gong
documents its 403 for this read without telling a bad key from a missing
permission, so any refusal rejects. Every Gong tool accepts the credential
and gong_v2 is the credential-only successor; the legacy block keeps its
inline inputs.

* feat(credentials): ServiceNow saved username and password credential

A ServiceNow credential holds an instance, a username, and its password,
verified by reading one user id from the Table API with the Basic auth the
tools send. The instance is reduced to the https origin of a
ServiceNow-owned host before anything is sent, and the check goes through
the guarded egress; 401 rejects, a JSON 403 is a login its ACLs limit, and
only a Table API result list proves the login. Every ServiceNow tool
accepts the credential, servicenow_v3 is the credential-only successor, and
servicenow and servicenow_v2 keep their inline inputs as legacy blocks.

* feat(credentials): Twilio API key mode for the saved Twilio credential

The Twilio credential and every Twilio tool now also take an API key, as
the key SID and secret joined by a colon (SKxxx:secret), the exact Basic
username and password Twilio documents for a key, while the URL keeps the
Account SID. A key is verified by listing one of the account's phone
numbers, a read a Standard key may make, since only Main keys and auth
tokens may read the Accounts resource. Stored auth-token credentials and
inline auth tokens keep their shape and their account-resource check; a
value with a colon that is not a key pair is refused before any request.

* fix(credentials): retry only the documented Entra propagation refusal, within the shared mint deadline

AADSTS700213 is Microsoft's documented case-sensitive federated credential
mismatch, not a propagation refusal, so a mismatched keyless credential no
longer makes three token requests per run. The AADSTS70021 retries now stop
when a slow answer would push the run past the 30 s deadline that concurrent
runs sharing the mint wait for. The Microsoft app service list is declared
once for both its type and the resolver's check, and the Intune and Vertex
copy names the app credential and the Google service account.

* feat(credentials): Atlassian service-account OAuth 2.0 credentials

An Atlassian service account can now connect with its OAuth 2.0
credential (client ID and secret) as well as a scoped API token. Saved
with authMethod client_credentials, the credential stores the client
credentials, the site, its cloudId from tenant_info, and the product;
execution mints a 60-minute token at auth.atlassian.com with the client
credentials grant and calls api.atlassian.com/ex/{product}/{cloudId}
exactly as a scoped token does. Connecting proves the minted token
against the product's current-user endpoint.

Atlassian documents these credentials for Jira and Confluence only, so
other products are refused. It does not say whether a new token retires
earlier ones, so every saved credential for one OAuth client shares one
coordinated token. Scoped-token credentials, their blob, and their
resolution are unchanged; the identity request now refuses redirects.

* feat(credentials): saved Datadog API and application key credential and credential-only block

A Datadog credential holds the site (from the DATADOG_SITES allowlist), the
API key, and the application key. Datadog authenticates every request with
the two static headers, so the "mint" resolves the API key as the token, the
application key beside it, and the site as the credential's domain.

- Save verifies the API key with GET https://api.{site}/api/v1/validate,
  sending DD-API-KEY alone, redirects refused: 403 is invalid_credentials,
  and a 200 must report valid: true. The application key is not probed:
  Datadog publishes no reference for an application-key check, and any other
  read would reject a correctly scoped key with a permission 403. Keys with
  control characters or whitespace are refused before any request.
- Credential resolution carries a new applicationKey field (credential
  cache, token payload contract, executor credentialParams source), and the
  Assistant registers it as a resolved secret beside the token.
- Every Datadog tool takes the saved credential: the credential fills apiKey,
  applicationKey (where the tool sends it), and site, overriding caller values.
- datadog_v2 is the credential-only successor; the legacy block keeps its
  inline keys and site and is hidden from the toolbar. withSavedCredential
  accepts condition: null for a picker shown in every operation when the
  replaced fields show differently.

* fix(aws): bound S3 presigned URLs by the role session's duration, not its time left

The presign guard compared the requested expiry with the seconds left before the
STS session ended, floored. A session is minted for each call, so by the time the
guard runs the STS round trip has used part of it and a default 3600s session
reports 3599s left, which refused the default 3600s expiry for every saved
assume_role or oidc_role credential on default settings.

Resolved sessions now carry the duration Sim requested from STS, and the guard
refuses only an expiry longer than that duration. The reported expiresAt is
clamped to the session's end, so it is never later than the time the URL stops
working. The session lookup that the signer and the guard share is one helper.

* fix(aws): classify wrapped STS socket failures as transient with the shared network-error helper

isTransientAwsFailure kept its own list of socket codes and checked only the top-level code, so a socket failure the SDK request handler wrapped in a cause, or an undici code, was reported as a 403 denial instead of a 503. It now uses isRetryableNetworkError, which walks the cause chain and errno.

* feat(credentials): connect Linear OAuth apps with client credentials

The Linear saved credential gains a client-credentials mode beside the
personal API key. Saved with authMethod client_credentials, it stores the
app's client ID and secret and mints an app-actor token at
api.linear.app/oauth/token with the fixed scope read,write, so two
credentials for one app never request different scopes (which Linear
treats as replacing the app's tokens). Linear documents that tokens with
the same scopes coexist, so each worker caches its own, and a token is
reused for at most an hour so one revoked early is replaced quickly.

A client-credentials token acts as the app, so connecting falls back to
the workspace (organization.id) as the principal when Linear returns no
viewer. The connect copy warns that requesting a token replaces an
existing authorization-code installation of the app and that rotating
the secret invalidates its tokens. Personal API keys and Linear OAuth
credentials are unchanged.

* fix(credentials): warn instead of turning keyless off for a pinned issuer on another path

Refusing a pinned WORKLOAD_IDENTITY_ISSUER whose path was not exactly
/oidc/workload turned keyless off on upgrade for a deployment that routes a
different issuer path to Sim through a proxy, and it also refused pinning the
default issuer of a path-prefixed app URL, which the default itself accepts.
Trust policies name the issuer, so those operators could only recover by
recreating the identity provider and every trust policy.

A pinned issuer whose path ends in /oidc/workload is now accepted the same way
the default is. Any other path logs a warning that clouds can verify its tokens
only if a proxy routes it to /oidc/workload; saving a keyless credential still
proves the route end to end. The https, port, query, and fragment refusals are
unchanged, and the docs describe the rule.

* fix(copilot): exempt a hybrid tool's key only when the hosted key applies to the call

The Copilot credential check waived a hybrid tool's hosted key param whenever the deployment was hosted, but injectHostedKeyIfNeeded skips the hosted key when the tool's hosting.enabled predicate rejects the params, so such a call could reach the provider with neither a key nor a saved credential. Both now use one hostedKeyMayFill predicate. No hybrid tool declares hosting today, so this is latent.

* fix(databricks): stop repeating 'Try again' when the save-time probe cannot reach the workspace

The unreachable-workspace error ended in 'Try again.', and the federation-policy check that wraps it adds its own, so a save showed 'Try again. Try again.'. The low-level message now only names the failure.

* fix(credentials): refuse redirects by default in fetchProvider

Every fetchProvider caller sends a secret, and fetch replays custom headers
and 307/308 bodies to whatever host a redirect names. Default the helper to
redirect: 'error' so validators and client-credential mints inherit it, and
drop the per-call copies this branch had added.

* fix(credentials): settle a HubSpot key account-info refuses with a contacts read

HubSpot documents service keys only against its CRM REST routes, not the
token-info or account-info routes. When account-info answers 401, confirm
on a one-contact read, where a 200 or JSON 403 proves the key is live and a
401 rejects it.

* test(security): move the typed base URL normalizer test next to input-validation

normalizeHttpBaseUrl and refuseUnsafeTypedUrl moved from the token validator module into input-validation; their test now lives with them.

* feat(credentials): saved SailPoint API client credential and credential-only block

A SailPoint credential holds a tenant plus an API client or personal access
token client id and secret. The minter shares the legacy block's token
exchange (now requestSailPointToken in lib/internal/sailpoint/client: the
client_credentials grant at the tenant's /oauth/token, redirects refused,
bounded 429 retries, and a SailPointAuthError carrying the status), so 4xx
maps to invalid_credentials and 5xx, throttling, or network failures to
provider_unavailable. The token lifetime comes from expires_in.

- The tenant is normalized to {tenant}.api.identitynow.com, the host
  SailPoint documents for API and token calls, from a tenant name, the API
  host, or the tenant's UI URL. Anything else (other domains, credentials,
  ports, more than one tenant label) is refused before the secret is sent.
  The legacy block's inline tenants, including identitynowgov.com hosts,
  are unchanged.
- The credential fills the hidden accessToken and the tenant (its API host);
  the operation sends that token as is and never re-mints it on a 401.
  Inline credentials keep their cached token and single 401 refresh.
- sailpoint_v2 is the credential-only successor; the legacy block keeps its
  inline tenant, client id, and secret and is hidden from the toolbar.

* feat(credentials): saved ZoomInfo client credentials and credential-only block

A ZoomInfo credential holds a client credentials app's client id and secret.
The tools already authenticate with that grant (Basic auth at
api.zoominfo.com/gtm/oauth/v1/token), so the minter shares the legacy
block's exchange, now requestZoomInfoToken: a refusal throws
ZoomInfoTokenError, which the operation answers exactly as before (HTTP 500
naming the provider status) and the minter maps to invalid_credentials for a
4xx or provider_unavailable for throttling, 5xx, or network failures.

- Save verifies by minting a token only; the token endpoint uses no credits
  and no data endpoint is called. Granted scopes are recorded as metadata.
- A client id with a colon or control characters is refused before any
  request, since it would corrupt the Basic credential.
- The token exchange and API calls refuse redirects (maxRedirects: 0); both
  go only to the fixed api.zoominfo.com host.
- The credential fills the tools' hidden accessToken, which replaces the
  inline client id and secret; zoominfo_v2 is the credential-only successor,
  and the legacy block keeps its inline credentials and is hidden from the
  toolbar. Search filters named like hosts are recorded as request data in
  the saved-credential contract check.

* refactor(gong): share one Basic auth header builder between the tools and the credential check

* fix(credentials): stop accepting an undocumented PlanetScale 403 as proof of a service token

PlanetScale documents 401 for a bad token and 404 for missing access, but gives no meaning to a 403 from listing organizations, so a JSON 403 now rejects like any other refusal. The token ID is checked in the account-id normalizer with the same printable, colon-free rule the tools' header builder applies.

* test(credentials): prove refused saved-credential hosts never reach the guarded egress fetch

The steer cases asserted only on the global fetch stub, but ServiceNow sends through the guarded egress transport, so its 'before sending the key' half never ran. Both transports now answer, so only the refusal can keep the key unsent.

* fix(credentials): tell ServiceNow and Gong users which hosts the saved credential supports

ServiceNow custom URLs are aliases of the instance's original service-now.com address, so the help text points custom-URL tenants there; on-premises instances are named as unsupported. Gong's help text names the fixed api.gong.io host the tools call.

* docs(credentials): document the in-band Twilio API key form and hint a half-entered key pair

The saved Twilio credential keeps an API key in the auth-token field as SKxxx:secret, Twilio's documented Basic username and password for a key. The provider id now records that choice and warns that a consumer needing the account auth token itself, such as webhook signature validation, must refuse a key pair. The connect form shows a hint while an SK value is not a complete SID:secret pair.

* fix(credentials): share the CrowdStrike token exchange and report a wrong Falcon cloud

- Legacy inline tokens are also dropped on a 403, so a scope granted after a
  failed run applies on the next one, as it did before tokens were cached.
- The saved-credential minter and the legacy path call one exchange,
  requestCrowdStrikeToken; the legacy path keeps following redirects.
- The minter never follows a redirect and reports one as invalid_credentials
  naming the API client's cloud from X-Cs-Region, instead of a provider outage.
- Drop the unused instanceUrl param and cap a saved-credential accessToken.

* fix(credentials): expire shared client-credentials tokens the provider rejects

A token served from the shared client_credential_token row was never expired
early, so a Shopify or Atlassian token revoked before its stated expiry kept
being served, and reconnecting with the same secret got the same dead token.

- invalidateCoordinatedClientToken expires exactly the rejected token
- saving or reconnecting re-mints once when the provider rejects the served token
- a 401 from a tool call on a service-account credential expires the token
- expired failure memos are swept by the shared coordinator, which Vanta now reuses
- drop the Atlassian product check that could never refuse anything

* fix(credentials): report a mistyped SailPoint tenant as not found and share site lists

- A SailPoint tenant host that does not resolve (ENOTFOUND) is site_not_found,
  not a provider outage; a transient resolver failure stays provider_unavailable.
- The tenant normalizer refuses `api`, SailPoint's own API domain, in every
  input form instead of minting at api.api.identitynow.com.
- Datadog site labels and the isDatadogSite guard live once in tools/datadog and
  serve the block, the connect modal, and the minter; CrowdStrike cloud labels
  derive from the cloud ids.

* fix(credentials): drop the unverified ZoomInfo token-credits claim and cap saved tokens

ZoomInfo's client-credentials docs do not say whether a token request uses
credits, so the docs and comments describe only what Sim does: connecting
requests a token and calls no data endpoint. A saved-credential accessToken is
capped at 16 KiB like SailPoint's.

* fix(credentials): share one Linear client-credentials token per app

Linear asks clients to reuse a token until shortly before it expires and to
request a new one after a 401, and caps an app at 1,000 tokens per workspace
through cleanup. Each worker minted a new 30-day token every hour instead.
Linear now goes through the coordinated token for its full lifetime, and the
401 path replaces it early; every token grant now coordinates, so the grant
registry maps providers straight to minters.

* fix(credentials): keep a credential's client-credentials mode on reconnect

A reconnect that sent only a new client secret for a Shopify, Linear, or
Atlassian client-credentials credential was routed to the pasted-token
builder and failed. The stored mode now carries forward unless the reconnect
sends a token. The connect modals no longer preselect a mode on reconnect, so
the admin restates it instead of silently switching modes.

* docs(credentials): align Zendesk, Linear, and Shopify copy with vendor docs

- mark Zendesk API tokens as deprecated by Zendesk in the picker, hint, and docs
- warn that a Linear client-credentials request with other scopes revokes tokens
- say where Shopify's 24-hour token is kept instead of claiming it is never stored
- reword comments that stated undocumented Linear and Zendesk behavior as fact

* fix(credentials): drop exports that only their own module uses

* fix(credentials): keep shared tokens on scope 401s and rate-limit tool-call expiry

A 401 whose body reports a scope mismatch (Atlassian's 'Unauthorized; scope
does not match', RFC 6750 insufficient_scope) comes with a valid token, so it
no longer expires the application's shared token. A tool-call rejection also
leaves a token minted within the last minute in service, so a call that keeps
failing re-mints at most once a minute. Connect-time identity proofs still
expire a rejected token unconditionally.

* fix(credentials): replace the shared Linear client-credentials token daily

Linear tokens live 30 days, but a revocation that does not surface as a 401
would otherwise keep a dead token in service until then. Same-scope tokens
coexist, so a daily replacement leaves in-flight calls valid.

* chore(credentials): regenerate block successors, tool metadata, deployment config, integration docs, OpenAPI and CLI API for credential auth wave 2

* test(credentials): drive the slow Entra answer from the propagation suite's fake clock

* fix(credentials): declare the Zendesk email and API token as replaced by the saved credential's token

* test(credentials): wait for the slow Entra answer with the shared sleep helper

* fix(crowdstrike): mint a new token for each legacy inline request again

The inline token cache held a Falcon token for up to 29 minutes, so a token
Falcon had since revoked or rescoped failed the next run. Legacy blocks mint
per request as they did before the saved credential.

* fix(credentials): drop a saved client-credential token a provider refuses

Internal operations such as CrowdStrike and SailPoint answer 401 or 403
when the provider refuses a saved credential's token. The executor now
drops that token from the per-instance cache so the next call mints a
replacement instead of reusing it until it nears expiry.

* test(credentials): serve the stored coordinated token until it is invalidated

The coordinated-token mock minted on every call, so the revoked Atlassian
token test passed with the invalidation removed. The mock now keeps one
token per application until invalidated.

* refactor(credentials): share one client-credentials token exchange

Atlassian, Linear, and Shopify each carried the same form POST, refusal
mapping, payload check, and lifetime cap. They now call one
exchangeClientCredentialsGrant, tested once, and keep only their URL,
extra fields, lifetime cap, and Shopify's refusal classifier.

* fix(credentials): read and decrypt a client-credentials secret once per resolution

Token providers and Atlassian read and decrypted the stored secret to pick
its mode, then read and decrypted it again to mint. The mode read now
carries into the mint, and both blob parsers share one mode check.

* refactor(credentials): share the credential-text check across minters

Fivetran, ZoomInfo, and Datadog each carried the same empty, control
character, and size check. They now call one assertCredentialText, with
Datadog also refusing spaces.

* refactor(zendesk): encode the API-token Basic credential in one place

The saved-credential minter and the tools each built the
{email}/token:{apiToken} Basic value. Both now call
zendeskApiTokenCredential, so the saved and inline sign-ins cannot differ.

* refactor(tools): declare the saved-credential token param once

CrowdStrike, ZoomInfo, and SailPoint tools each repeated the hidden
accessToken param a saved credential fills. They now use
savedCredentialTokenParam, with the same descriptions.

* fix(tools): name a missing credential field without naming Datadog

The generic credential-field labels named Datadog for applicationKey, so
any other tool mapping it would blame a Datadog key. Labels now carry
their article and stay provider-neutral.

* fix(security): redact Datadog application keys in logged inputs

No key-name pattern matched applicationKey, so a key typed into the
legacy Datadog block showed in plaintext in execution input logs.

* fix(credentials): match the Atlassian OAuth 2.0 hints to what Atlassian supports

In client-credentials mode the Jira client ID hint said one credential
covers Jira Service Management, which Atlassian does not list for OAuth
2.0 credentials. It now points Service Management at a scoped API token.
Also corrects the reconnect note on clientCredentials.preferred.

* refactor(credentials): share the client ID and secret fields across connect forms

The Atlassian and token-provider forms each built the client-credentials
fields, and only one labelled its secret input for assistive tech. Both
now render ClientCredentialsFields.

* docs(credentials): describe the saved credentials on their setup-guide pages

The PlanetScale, ServiceNow, Gong, and Twilio pages are the connect
modal's setup guides but still described only the legacy inline inputs.
Each now says how to add the credential, the hosts it accepts, and that
earlier blocks keep their inline values. SailPoint v2 names both the PAT
and the client-credentials API client.

* test(credentials): mock credential-service through the central @sim/testing mock

* fix(sailpoint): accept government tenant hosts on the saved credential, as the earlier block does

* fix(servicenow): accept custom and self-hosted https instance URLs on the saved credential, as the earlier block does

* fix(credentials): type the new test fixtures, unexport file-local types, and regenerate CLI docs

* fix(credentials): drop refused local tokens, keep exact ServiceNow passwords, and refuse non-http URL forms

- Forget a client-credential token cached on this instance when an external
  request answers 401, alongside expiring the coordinated token.
- Add preserveWhitespace to token descriptor fields; ServiceNow passwords keep
  their surrounding spaces through the connect form, contracts, and builder.
  Contracts no longer trim apiToken; Atlassian and GitLab builders trim it.
- Refuse any scheme other than http(s), and protocol-relative or backslash
  authorities, in the shared typed-URL helpers while bare host:port still works.
- Refuse client-credentials extra fields that would replace grant_type,
  client_id, or client_secret.
- Report a Datadog validate answer without a boolean valid field as a provider
  fault rather than invalid credentials.

* fix(credentials): report an aborted grant refusal as the abort, and keep the CrowdStrike cloud required

* fix(credentials): name a dropped connection separately from a malformed token response
2026-11-11 16:21:17 -08:00
Waleed 5bbf4e748b feat(api): failing block on polled runs, deployed input schema, paused-runs list, and applied limits (#9906)
* feat(api): attribute polled run failures, deployed input schema, paused-run list, and applied run limits

- GET /v2/workflows/{id}/runs/{runId} reads the failing block back from the run's
  recorded trace, withheld when the viewer's permission group hides execution data
- GET /v2/workflows/{id} adds inputSchema for the active deployment's API run input
- GET /v2/workflows/runs/paused lists a workspace's runs waiting on human input,
  projecting pause points exactly as the run detail does
- Execute responses report executionTimeoutSeconds; GET /v2/billing/status adds plan limits

* fix(api): respect the paused-run page cap in the CLI and keep waiting pause points under the cap

- CLI generator carries a numeric field's contract maximum; the pager never requests
  a page above it while still paging to the caller's total --limit
- Pause point cap keeps points not yet resumed before resumed history, so a run that
  paused again is never listed without its waiting point (run detail and paused list)

* improvement(api): reuse FailedTraceBlock and sort pause points once when capping

* fix(api): custom-block trace boundary, legacy pause point arrays, and list point selection

- A custom block is an opaque trace boundary for failing-block attribution
- The paused-run list reads object and legacy array pause_points
- The list selects waiting human points before the per-run cap, reads points in
  waves that stop once the page budget is spent, and shares one waiting predicate
- Resume response schemas omit executionTimeoutSeconds
- Drop a non-null assertion from the CLI page cap test

* fix(api): attribute concurrent failures to the stored error's block and never fail a workflow read on its deployment

- Failing-block attribution prefers the span the stored error names, else the
  failure that ended first, else none; the block error prefix has one owner
- The workflow read degrades inputSchema to null when the deployment cannot be
  read or its schema has an unexpected shape
- Integration cases for time-only, archived, and cross-workspace exclusion

* fix(api): consistent trace walk, block-named error attribution, required applied timeout, and ungated input schema

- Failing-block attribution walks spans as hasUnhandledError does, through
  successful blocks, with one shared successful-boundary rule
- An error message headed by the failing block's name is attributed to it even
  when the name reads as a run-level failure
- executionTimeoutSeconds is required (nullable) on Execute workflow responses
- The workflow read takes inputSchema from the active version row, not isDeployed
- Pause cap wording: unresolved points are kept in preference, listed earliest first
- Regenerate the CLI API the previous contract wording left stale

* fix(api): parse resume responses with the resume schema in e2e scripts and regenerate the CLI API on staging

- Stop-after and pinned-execute e2e scripts parse resume responses with
  v2ResumeWorkflowDataSchema, which omits executionTimeoutSeconds
- Regenerate the CLI API against the merged staging contracts

* fix(api): parse the stop-after e2e resume helper's response with the resume schema
2026-11-11 15:52:59 -08:00
Waleed 3d8996f0e6 feat(api): workflow outline, workspace schedules list, clearer v2 errors, and catalog value types (#9905)
* feat(api): add traceId and field paths to v2 errors, name the read-only key remedy

* feat(api): publish declared value types on block catalog fields

* feat(api): add workflow outline and workspace schedules reads to v2

* fix(api): type declared catalog inputs as block params and regenerate the docs manifest

* fix(api): compare member responses without their per-request traceId

* improvement(api): tidy catalog field projection default and integration test comment

* docs(api): say the outline's derived fields come from values state already returns
2026-11-11 14:26:20 -08:00
Waleed ba66dfd6b7 feat(api): agent identity on v2 meta, scoped CLI pairing keys, and v2 workspace rename (#9904)
* feat(api): agent identity on v2 meta, scoped CLI pairing keys, and v2 workspace rename

- GET /api/v2/meta adds keyId, userId, workspaceId and links {openapi, docs, mcp};
  existing fields unchanged. The API catalog shares the same link source.
- CLI pairing login accepts --read-only and --expires-in <days>. The request rides
  the approval URL, is shown on the approval card, is recorded with the approval
  and applied at mint; the unauthenticated poll cannot set either. The poll echoes
  access and expiresAt, and the CLI refuses to store a key that does not match
  what was asked (an older server mints full access). The signed-out login bounce
  now keeps scope, workspace, access and expiry instead of dropping them.
  sim whoami shows the key's expiry and bound workspace.
- POST /api/v2/credentials/connections returns draftId. Opening a connection link
  that is unknown, expired or another account's now explains to sign in as the
  creating account, without saying which case applied.
- PATCH /api/v2/workspaces/{workspaceId} renames a workspace or changes its logo
  through the existing workspaces.identity.update operation, widened to personal
  API keys and OAuth tokens (api:write); Admin still required, workspace keys
  still denied. Workspace update operations move into the operations registry.
- Regenerated OpenAPI, MCP catalog, CLI client and CLI docs.

* fix(cli-auth): pass route context in the new approve and poll tests

* test(mcp): expect the identity fields getMeta now returns

* fix(workspaces): count members before the rename so a failed count never hides a committed update

* improvement(cli-auth): reuse the api-key access schema and tidy handoff validation

* fix(api): publish the workspace PATCH body rules and check CLI-minted keys exactly

- PATCH /v2/workspaces/{id}: the body schema publishes minProperties 1, and
  logoUrl is a pattern (root-relative path or https URL, protocol-relative
  refused) instead of an unpublished refine.
- sim login refuses a minted key whose access or expiry differs from the
  request in either direction, with the expiry checked against the requested
  days within a clock tolerance.
- sim workspaces update --logo-url documents that clearing the logo goes
  through the API or MCP.
2026-11-11 14:26:02 -08:00
Waleed c844be83ac docs(api): guide for building and running workflows with the API (#9901)
* docs(api): add a guide for building and running workflows with the API

* docs(api): point the workflow guide at the Sim skills

* docs(api): pass only the operations array to the CLI in the workflow guide

* docs(api): keep polling while a run is redacting
2026-11-11 14:15:58 -08:00
Waleed a716b1b3ef chore(deps): bump turbo to 2.11.10 (#9903)
* chore(deps): bump turbo to 2.11.10

* docs(ci): describe the Turborepo 2.11 task-level planner flag
2026-11-11 14:10:09 -08:00
Waleed 9ab4e6f470 feat(credentials): keyless Snowflake, Microsoft app-only and Google keyless, GitHub and Bitbucket tokens, DocuSign JWT (#9869)
* feat(credentials): keyless Snowflake connections through workload identity federation

A Snowflake connection can now trust Sim's OIDC issuer instead of holding a
programmatic access token. Sim signs a short-lived token (audience
snowflakecomputing.com) for the credential's own random subject; the customer
creates a SERVICE user with WORKLOAD_IDENTITY = (TYPE = OIDC ISSUER SUBJECT).

- Save verifies by minting a token and running the identity statement at the
  pinned account host through the guarded egress path; Snowflake's refusals
  keep the shared codes (invalid_credentials, site_not_found,
  provider_unavailable). Subjects bind to their creator like AWS/Databricks.
- Runtime: the resolver returns authStyle 'snowflake-workload-identity' for a
  keyless credential, and the tools and selectors send Bearer WIF.OIDC.<token>
  with the WORKLOAD_IDENTITY_FEDERATION token type. authStyle and domain are
  authoritative on every Snowflake tool, so a caller can no longer choose the
  token type or steer the account host of a saved credential.
- PAT credentials resolve and verify exactly as before.
- Connect dialog offers the keyless service user with the CREATE USER
  statement; it falls back to the token dialog where keyless is unavailable.
- Docs: Snowflake connections page with keyless setup, troubleshooting, and
  the 60-minute Snowflake key cache on signing-key rotation.

* fix(snowflake): run Cortex Analyst SQL with the resolved credential and reopen keyless reconnects as keyless

Cortex Analyst's "run the SQL" went through a nested snowflake_execute_sql
call carrying the already-resolved token and host. With authStyle and domain
now authoritative, the executor cleared both before the nested call, so it
failed for every credential (and a keyless token would have been sent as a
PAT). The generated SQL now runs as one guarded statement request built from
the parent call's credential-derived host, token, and token type, through the
same requestTarget egress the tool transport uses, with redirects refused.

The Snowflake connect dialog opened every reconnect on the programmatic
access token. The workload-identity prepare call now takes the reconnected
credential and reports whether it is keyless (only to an admin of that
credential in the same workspace), and the dialog opens on that mode.

Docs: the 60-minute wait applies before signing with a new key; removing the
old key needs 10 minutes with keyless Snowflake connections.

* fix(snowflake): cancel Cortex Analyst's generated SQL with the run

The generated SQL used to run as a nested tool call, which inherited the run's
abort signal; running it directly dropped that. postProcess now receives the
executor's effective abort signal as an optional fourth argument (the same
signal the tool's own request used), and Cortex Analyst forwards it to the DNS
check, the guarded fetch, and the response read. Other tools' postProcess
hooks are unchanged.

* feat(credentials): saved GitHub personal access tokens and Bitbucket access tokens

GitHub: a saved personal access token credential (fine-grained or classic),
verified against api.github.com/user with the tools' own headers. GitHub's
workflow block authenticates with an inline token rather than OAuth, so it
follows the token-block pattern: github_v3 is the credential-only successor
of github_v2, which stays exactly as it was, marked legacy and hidden from the
toolbar. Every GitHub tool declares the optional saved-token policy; inline
tokens keep working. The GitHub App installation credential (Search) is a
separate service and is untouched: the Assistant still projects GitHub tools
onto the person's connected GitHub account, and Search policy now follows the
visible GitHub block (github_v3).

Bitbucket: a workspace, project, or repository access token as a second
option next to OAuth (the Linear pattern), verified by listing one repository
of the typed workspace on api.bitbucket.org; the slug is validated so it
cannot steer the path. List Workspaces needs a signed-in user, so it now
refuses a saved access token before any request.

Also: isHostNotFound no longer lets an outer error code mask ENOTFOUND on its
cause.

* fix(credentials): close wave 2a review findings on GitHub and Bitbucket tokens

- The GitHub token service is `github-token`, so it no longer shares an id
  with the GitHub sign-in provider: parseProvider and getProviderIdFromServiceId
  answer for sign-in exactly as before, and a token-only service is never
  marked connected from a sign-in account whose id prefixes it.
- Suggested connect rows offer each integration once and count it connected
  when any of its services' OAuth or service-account credentials is saved
  (GitHub's Search App and saved tokens share one integration).
- Assistant GitHub calls bind through the connected-account policy the
  Assistant projects (the person's github-repositories OAuth account) in the
  token resolver too, on both the ordinary and managed paths; workflow runs
  and saved workspace tokens are unaffected.
- Bitbucket verification reads one repository (`workspace/repository`), the
  request Atlassian documents for workspace, project, and repository access
  tokens alike; listing a workspace is not documented for repository tokens.
- prepare-workload-identity test uses the central credentials-access mock.

* feat(credentials): DocuSign JWT Grant credentials next to OAuth

A saved DocuSign credential that authenticates with JWT Grant (an
integration key, an impersonated user ID, the app's RSA private key, and an
environment), offered as a second option beside the existing OAuth
connection, which is unchanged.

The minter signs an RS256 assertion (iss = integration key, sub = user,
aud = the environment's authentication host without a scheme, scope
"signature impersonation"), exchanges it at that host's /oauth/token, then
reads /oauth/userinfo on the same host to bind the pinned account (or the
user's default) and returns its eSignature REST base. Both hosts come only
from the stored environment; a base_uri outside that environment's
docusign.net shape is never trusted with the token. GUIDs and the key are
checked before any request, and tokens are re-minted about 15 minutes
before they expire, as DocuSign advises.

DocuSign tools take the account base as an authoritative credential param,
so a caller can never supply it, and DocuSignClient skips its
deployment-host userinfo lookup when one is bound. OAuth tokens resolve
exactly as before.

Save-time failures map to consent_required (the connect modal shows the
exact consent URL for the key and environment) and account_not_found (a
pinned account the user does not belong to), alongside the shared
invalid_credentials and provider_unavailable codes.

* fix(credentials): close wave 2b review findings on DocuSign JWT Grant

- The DocuSign knowledge connector now honours a JWT Grant credential's
  bound account. The resolved token's instanceUrl reaches the connector as
  credentialInstanceUrl in the sync context (seeded on every path through
  syncContextForToken). The connector re-validates it with the same parser
  as DocuSignClient, lists and fetches from that account in the
  credential's environment, links envelopes to that environment's web app,
  and validates without asking the deployment host. A seeded value of the
  wrong shape fails closed. OAuth syncs are unchanged.
- RSA keys under 2048 bits are refused as invalid_credentials with copy
  that names the size, instead of jose's raw TypeError.
- A short expires_in no longer makes every call re-mint: the cached
  lifetime floors at six minutes while staying a minute under the real
  expiry.
- The connect modal shows the consent URL as a link with a copy button,
  and account_not_found says "pinned account" only when one was entered.

* feat(credentials): Microsoft Entra app-only credentials for Entra ID, SharePoint, Dataverse, and Dynamics 365

A saved Microsoft app credential (OAuth 2.0 client credentials) as an
additional option next to Microsoft OAuth, which is unchanged. One app
registration serves the four services whose tools run without a signed-in
user; Outlook, OneDrive, Excel, Word, Planner, and Teams never offer it and
token resolution refuses it for them (provider mismatch).

- Modes: client secret; certificate (PS256 client assertion with the
  certificate's x5t#S256 thumbprint, aud = the tenant token endpoint, 5-minute
  lifetime; key/certificate pairing, RSA size, and expiry checked before any
  request); keyless federated credential (a Sim workload-identity token for the
  credential's own subject, audience api://AzureADTokenExchange, subject bound
  to the saving user, refused if the app also accepts an unheld subject).
- The token resource comes from the tool's service, passed from the
  server-validated tool policy: Graph for Entra ID and SharePoint, the stored
  environment for Dataverse and Dynamics 365. Any other service is refused.
- The environment URL is stored on the credential (public-cloud Dynamics
  hosts, https root only). Dataverse tools take credentialType and instanceUrl
  as authoritative params; an app credential's request goes only to its own
  environment and a block environment that names another is refused. OAuth
  requests keep the block environment exactly as before. Dynamics 365 already
  matched instanceUrl against the block environment.
- Save check: a Graph token reading the app's own service principal (no
  permission needed), plus Dataverse WhoAmI when an environment is set. Entra
  AADSTS codes map to actionable copy; runtime failures keep the shared
  invalid_credentials / provider_unavailable split. Tokens cache per
  credential, resource, and stored-secret version in an LRU.
- Azure AD Reset password refuses app-only credentials: Graph does not
  support application permissions for resetPassword.
- Connect dialog with tenant ID, client ID, environment URL, and the
  issuer/audience/subject to paste; docs page with per-mode setup.

* fix(credentials): close wave 3 review findings on Microsoft app credentials

- SharePoint selectors (workspace and organization paths) and knowledge
  connectors now pass the service they resolve for (the selector's own
  serviceId, the connector's declared auth provider), so a Microsoft app
  credential browses SharePoint with a Graph token instead of being refused.
  The resolution option is renamed from toolService to service; it is only
  ever set from server-side policy.
- AADSTS700211 and 700212 are no longer mapped: Microsoft documents only
  70021 and 700213 for federated credential mismatches. Other keyless
  refusals still name the mismatch.
- DocuSign minter test mocks carry account_name, and the connector
  access-token test narrows its tokens with a guard instead of non-null
  assertions.

* feat(credentials): keyless Google Cloud credentials via Workload Identity Federation

A keyless mode of the existing Google service account credential
(google-service-account) for Google Cloud APIs. JSON-key credentials, their
connect flow, and their token minting are unchanged.

- Flow: Sim signs a short-lived token for the credential's own subject with
  aud = the customer's provider resource name
  (https://iam.googleapis.com/projects/<number>/locations/global/
  workloadIdentityPools/<pool>/providers/<provider>), exchanges it at
  sts.googleapis.com/v1/token (token-exchange, jwt subject token,
  cloud-platform scope, audience //iam.googleapis.com/...), then calls
  iamcredentials generateAccessToken for the service account with the tool's
  scopes and a 1h lifetime. Impersonation rather than direct federated access:
  some Cloud APIs reject federated tokens, and the service account keeps the
  same identity and roles a JSON key uses.
- Inputs validated against Google's documented formats before any request:
  numeric project number, pool/provider IDs (4-32 [a-z0-9-], no gcp-), and a
  user-managed *.iam.gserviceaccount.com email, so nothing can steer the STS
  audience or IAM URL. Requests never follow redirects.
- Scope: refuses domain-wide delegation (an impersonated user) and any service
  but BigQuery and Vertex AI before reading further or contacting Google, with
  a new shared unsupported_use code and copy pointing to a JSON key. Workspace
  blocks never offer the mode.
- Save check: STS exchange, impersonation, and tokeninfo (no IAM role or
  enabled API needed), plus a probe that a subject no credential holds cannot
  impersonate the service account. Subject bound to the saving user with the
  signed proof; kept across reconnects.
- STS/IAM failures map to actionable copy (provider settings, issuer
  reachability, the exact workloadIdentityUser binding) without Google's
  descriptions or any token; runtime keeps the invalid_credentials /
  provider_unavailable split. Tokens cache per credential, secret version, and
  scopes in an LRU.
- Per-credential audiences: audiences.ts gains google without a fixed
  audience; the setup response omits audience for it and reports a keyless
  reconnect. Connect dialog shows the issuer, audience, subject, and filled-in
  gcloud commands (pool, OIDC provider with attribute condition on the
  subject, IAM binding); docs section added.

* fix(credentials): close wave 4 review findings on keyless Google Cloud credentials

- Drop the tokeninfo check: a token from generateAccessToken already proves
  the provider accepted Sim's token and the impersonation binding, and
  tokeninfo puts a live token in a query string.
- Test that saving fails closed when the stray-subject pin probe hits an STS
  outage or an unreachable IAM endpoint.
- Pass --project=<project number> on all three gcloud setup commands, drop
  the unused Resource Manager API from the docs, and raise the shared
  validation error for an empty scope list.

* fix(credentials): keep Snowflake, Microsoft app, and Google keyless subjects unique

The subject-uniqueness scan from #9866 covered only AWS and Databricks. It now
also scans Snowflake, Microsoft app, and Google service account credentials,
so no two live credentials of an owner hold one keyless subject. Their keyed
secrets that carry no config (a Google JSON key, a Snowflake programmatic
access token) hold no subject and no longer read as unreadable. The three
keyless save paths report a newly bound subject so create checks it.

* fix(credentials): close round-1 CI and review findings on alt auth

- Knowledge connector tests expect the service now passed with Google
  service-account token requests; a new test proves a JSON-key mint signs the
  same request with or without it.
- Re-record the tool-registry-boundary baseline: the keyless Snowflake,
  Microsoft app, and Google modules add 5 modules behind credential-service,
  which tipped credit-usage past its allowance on top of staging's drift.
- Docs compatibility baseline: record the new code examples in the Google and
  Snowflake service account pages.
- Generate the Microsoft certificate test fixture at run time instead of
  committing a PEM key and certificate.
- A Microsoft app credential reconnect opens on keyless only when the stored
  credential is federated (the prepare step now reports it), like Snowflake;
  new connections still default to keyless.
- TSDoc on the Google project number, pool/provider ID, and service account
  email validators.

* fix(credentials): offer keyless Google setup only in a Google Cloud context

Reconnecting a keyless Google service account from a Workspace integration
(Gmail, Drive, ...) offered the keyless form, saving a credential that
integration can never use. The dialog now offers keyless only for a Google
Cloud service (new or reconnect) or on the credential's own page; from a
Workspace integration it explains the credential works only with BigQuery and
Vertex AI and does not save. The chat connect control passes its service so
it gets the same gate.

* test(credentials): match the stable part of the subject-in-use refusal
2026-11-10 18:50:27 -08:00
Waleed 411cc9cef8 fix(security): harden saved-credential, proxy egress, and keyless-mint paths from the release audit (#9865)
* fix(security): harden saved-credential, proxy egress, and response-cap paths from the release audit

- Refuse session callers resolving saved service-account secrets on POST /api/auth/oauth/token
- Refuse a proxied hostname when any resolved record is blocked (the proxy re-resolves)
- Apply the response cap to every body, not only decoded ones (undici's http proxy wrapper ignores maxResponseSize)
- Bind workload-identity subjects to their owner at mint time
- Bound Databricks token/identity JSON reads; refuse single-slash https:/ in typed URLs; case-insensitive Dynatrace /api/vN strip
- Twilio recordings: stay on the Twilio API origin and bound fetch concurrency
- Firecrawl: count crawl maxDepth below the start URL; stop sending unused search sources
- sim-setup reset refuses when Docker is installed but unreachable
- Remove the dead requireDeployment branch from workflow access middleware; reuse requireMutableWorkflow; move a misplaced TSDoc
- Docs: CONTRIBUTING setup via sim-setup, sim-setup README, Helm read-only-root mounts, proxy and NO_PROXY behavior, GitLab CSV body limit

* fix(security): stop queued Twilio recordings fetches on cancel, type token-route auth mocks, bump chart

- Twilio list calls takes the run's signal: queued recordings requests stop once it aborts, and fetch receives it
- Token route tests type the hybrid-auth mock through the real AuthResult and pass a route context
- Chart version 1.11.13 for the README and helper comment changes
2026-11-10 16:19:48 -08:00