Skip to content

Commit bc48d10

Browse files
authored
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
1 parent 384df70 commit bc48d10

93 files changed

Lines changed: 2563 additions & 970 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/docs/content/docs/integrations/greptile.mdx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Greptile
3-
description: AI-powered codebase search and Q&A
3+
description: Index repositories and check indexing status with Greptile
44
integration:
55
type: "greptile"
66
color: "#181C1E"
@@ -15,13 +15,13 @@ import { ReferenceDetails } from "@/components/ui/reference-details"
1515

1616
## Use the block [#usage-instructions]
1717

18-
Query and search codebases using natural language with Greptile. Get AI-generated answers about your code, find relevant files, and understand complex codebases.
18+
Index repositories with Greptile and check their indexing status. Greptile has retired its natural-language query and search endpoints, so the Query operation is no longer offered.
1919

2020
## Actions
2121

2222
### Greptile Query
2323

24-
Query repositories in natural language and get answers with relevant code references. Greptile uses AI to understand your codebase and answer questions.
24+
Retired: Greptile removed the POST /v2/query endpoint (it returns 404) with no documented replacement, so this call fails. Kept so saved workflows still load.
2525

2626
<ReferenceDetails>
2727

‎apps/docs/content/docs/integrations/kalshi.mdx‎

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -722,18 +722,18 @@ Create a new order on a Kalshi prediction market
722722
| `side` | string | Yes | Side of the order: "yes" or "no" |
723723
| `action` | string | Yes | Action type: "buy" or "sell" |
724724
| `count` | string | No | Number of contracts to trade \(e.g., "10", "100"\). Provide count or countFp |
725-
| `type` | string | No | Order type: "limit" or "market" \(default: "limit"\) |
725+
| `type` | string | No | Order type: "limit" \(default\). Kalshi no longer accepts "market" orders; set a price instead |
726726
| `yesPrice` | string | No | Yes price in cents \(1-99\) |
727727
| `noPrice` | string | No | No price in cents \(1-99\) |
728728
| `yesPriceDollars` | string | No | Yes price in dollars \(e.g., "0.56"\) |
729729
| `noPriceDollars` | string | No | No price in dollars \(e.g., "0.56"\) |
730730
| `clientOrderId` | string | No | Custom order identifier |
731731
| `expirationTs` | string | No | Unix timestamp for order expiration |
732-
| `timeInForce` | string | No | Time in force: 'fill_or_kill', 'good_till_canceled', 'immediate_or_cancel' |
733-
| `buyMaxCost` | string | No | Maximum cost in cents \(auto-enables fill_or_kill\) |
732+
| `timeInForce` | string | No | Time in force: 'good_till_canceled' \(default\), 'fill_or_kill', or 'immediate_or_cancel' |
733+
| `buyMaxCost` | string | No | No longer supported by Kalshi: set a limit price and count with timeInForce fill_or_kill instead |
734734
| `postOnly` | string | No | Set to 'true' for maker-only orders |
735735
| `reduceOnly` | string | No | Set to 'true' for position reduction only |
736-
| `selfTradePreventionType` | string | No | Self-trade prevention: 'taker_at_cross' or 'maker' |
736+
| `selfTradePreventionType` | string | No | Self-trade prevention: 'taker_at_cross' \(default\) or 'maker' |
737737
| `orderGroupId` | string | No | Associated order group ID |
738738
| `countFp` | string | No | Count in fixed-point for fractional contracts |
739739
| `cancelOrderOnPause` | string | No | Set to 'true' to cancel order on market pause |
@@ -743,7 +743,7 @@ Create a new order on a Kalshi prediction market
743743

744744
| Parameter | Type | Description |
745745
| --------- | ---- | ----------- |
746-
| `order` | object | The created order object with full API response fields |
746+
| `order` | object | The created order. Kalshi reports only its ID and fill counts on create; the direction, price and settings are the ones this request sent, and fields Kalshi no longer reports are null |
747747
| ↳ `order_id` | string | Order ID |
748748
| ↳ `user_id` | string | User ID |
749749
| ↳ `client_order_id` | string | Client order ID |
@@ -791,12 +791,13 @@ Cancel an existing order on Kalshi
791791
| Parameter | Type | Required | Description |
792792
| --------- | ---- | -------- | ----------- |
793793
| `orderId` | string | Yes | Order ID to cancel \(e.g., "abc123-def456-ghi789"\) |
794+
| `ticker` | string | No | Market ticker of the order \(e.g., "KXBTC-24DEC31"\), so the cancel reaches the order's exchange shard. Leave empty to look it up from the order first |
794795

795796
#### Output
796797

797798
| Parameter | Type | Description |
798799
| --------- | ---- | ----------- |
799-
| `order` | object | The canceled order object with full API response fields |
800+
| `order` | object | The canceled order. Kalshi now returns only order_id and client_order_id on cancel, so the other fields are null |
800801
| ↳ `order_id` | string | Order ID |
801802
| ↳ `user_id` | string | User ID |
802803
| ↳ `client_order_id` | string | Client order ID |
@@ -851,7 +852,7 @@ Modify the price or quantity of an existing order on Kalshi
851852
| `action` | string | Yes | Action type: "buy" or "sell" |
852853
| `clientOrderId` | string | No | Original client-specified order ID |
853854
| `updatedClientOrderId` | string | No | New client-specified order ID after amendment |
854-
| `count` | string | No | Updated quantity for the order \(e.g., "10", "100"\) |
855+
| `count` | string | No | New total contracts for the order: already filled plus desired resting \(e.g., "10"\). Leave empty to keep the current total, only if the order hasn't just changed; Kalshi's order reads can briefly lag |
855856
| `yesPrice` | string | No | Updated yes price in cents \(1-99\) |
856857
| `noPrice` | string | No | Updated no price in cents \(1-99\) |
857858
| `yesPriceDollars` | string | No | Updated yes price in dollars \(e.g., "0.56"\) |
@@ -862,7 +863,7 @@ Modify the price or quantity of an existing order on Kalshi
862863

863864
| Parameter | Type | Description |
864865
| --------- | ---- | ----------- |
865-
| `old_order` | object | The original order object before amendment |
866+
| `old_order` | object | The order before the amend when it was read first \(an amend with no count or price\); otherwise only order_id is known |
866867
| ↳ `order_id` | string | Order ID |
867868
| ↳ `user_id` | string | User ID |
868869
| ↳ `ticker` | string | Market ticker |
@@ -872,9 +873,13 @@ Modify the price or quantity of an existing order on Kalshi
872873
| ↳ `type` | string | Order type \(limit/market\) |
873874
| ↳ `yes_price` | number | Yes price in cents |
874875
| ↳ `no_price` | number | No price in cents |
876+
| ↳ `yes_price_dollars` | string | Yes price in dollars |
877+
| ↳ `no_price_dollars` | string | No price in dollars |
875878
| ↳ `action` | string | Action \(buy/sell\) |
876879
| ↳ `count` | number | Number of contracts |
877880
| ↳ `remaining_count` | number | Remaining contracts |
881+
| ↳ `fill_count_fp` | string | Filled count \(fixed-point\) |
882+
| ↳ `remaining_count_fp` | string | Remaining count \(fixed-point\) |
878883
| ↳ `created_time` | string | Order creation time |
879884
| ↳ `expiration_time` | string | Order expiration time |
880885
| ↳ `order_group_id` | string | Order group ID |
@@ -891,7 +896,7 @@ Modify the price or quantity of an existing order on Kalshi
891896
| ↳ `stop_loss_order_id` | string | Stop loss order ID |
892897
| ↳ `amend_count` | number | Amend count |
893898
| ↳ `amend_taker_fill_count` | number | Amend taker fill count |
894-
| `order` | object | The amended order object with full API response fields |
899+
| `order` | object | The amended order: order_id, client_order_id and counts from Kalshi, with the direction, price and total count this amend sent; fields Kalshi no longer reports are null |
895900
| ↳ `order_id` | string | Order ID |
896901
| ↳ `user_id` | string | User ID |
897902
| ↳ `ticker` | string | Market ticker |
@@ -901,9 +906,13 @@ Modify the price or quantity of an existing order on Kalshi
901906
| ↳ `type` | string | Order type \(limit/market\) |
902907
| ↳ `yes_price` | number | Yes price in cents |
903908
| ↳ `no_price` | number | No price in cents |
909+
| ↳ `yes_price_dollars` | string | Yes price in dollars |
910+
| ↳ `no_price_dollars` | string | No price in dollars |
904911
| ↳ `action` | string | Action \(buy/sell\) |
905912
| ↳ `count` | number | Number of contracts |
906913
| ↳ `remaining_count` | number | Remaining contracts |
914+
| ↳ `fill_count_fp` | string | Contracts filled by this amend \(fixed-point\) |
915+
| ↳ `remaining_count_fp` | string | Remaining count \(fixed-point\) |
907916
| ↳ `created_time` | string | Order creation time |
908917
| ↳ `expiration_time` | string | Order expiration time |
909918
| ↳ `order_group_id` | string | Order group ID |

‎apps/docs/content/docs/integrations/ketch.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Retrieve consent status for a data subject. Returns the current consent preferen
4545
| `purposes` | object | Map of purpose codes to consent status and legal basis |
4646
| ↳ `allowed` | string | Consent status for the purpose: "true" or "false" |
4747
| ↳ `legalBasisCode` | string | Legal basis code \(e.g., "consent_optin", "consent_optout", "disclosure", "other"\) |
48-
| `vendors` | array | TCF vendor IDs returned with the consent record |
48+
| `vendors` | array | List of vendor IDs for which the user has opted out \(deprecated by Ketch in favor of vendorConsents\) |
4949

5050
</ReferenceDetails>
5151

‎apps/docs/content/docs/integrations/onepassword.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ List all vaults accessible by the Connect token or Service Account
4646
| ↳ `attributeVersion` | number | Vault attribute version |
4747
| ↳ `contentVersion` | number | Vault content version |
4848
| ↳ `items` | number | Number of items in the vault |
49-
| ↳ `type` | string | Vault type \(USER_CREATED, PERSONAL, EVERYONE, or TRANSFER\) |
49+
| ↳ `type` | string | Vault type \(USER_CREATED, PERSONAL, EVERYONE, TRANSFER, or UNSUPPORTED\) |
5050
| ↳ `createdAt` | string | Creation timestamp |
5151
| ↳ `updatedAt` | string | Last update timestamp |
5252

@@ -78,7 +78,7 @@ Get details of a specific vault by ID
7878
| `attributeVersion` | number | Vault attribute version |
7979
| `contentVersion` | number | Vault content version |
8080
| `items` | number | Number of items in the vault |
81-
| `type` | string | Vault type \(USER_CREATED, PERSONAL, EVERYONE, or TRANSFER\) |
81+
| `type` | string | Vault type \(USER_CREATED, PERSONAL, EVERYONE, TRANSFER, or UNSUPPORTED\) |
8282
| `createdAt` | string | Creation timestamp |
8383
| `updatedAt` | string | Last update timestamp |
8484

‎apps/docs/content/docs/integrations/pinecone.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Search for similar text in a Pinecone index
129129
| Parameter | Type | Required | Description |
130130
| --------- | ---- | -------- | ----------- |
131131
| `indexHost` | string | Yes | Full Pinecone index host URL \(e.g., "https://my-index-abc123.svc.pinecone.io") |
132-
| `namespace` | string | No | Namespace to search in \(e.g., "documents", "embeddings"\) |
132+
| `namespace` | string | Yes | Namespace to search in \(e.g., "documents", "embeddings"\) |
133133
| `searchQuery` | string | Yes | Text to search for |
134134
| `topK` | string | No | Number of results to return \(e.g., "10", "25"\) |
135135
| `fields` | array | No | Fields to return in the results |

‎apps/docs/content/docs/integrations/wealthbox.mdx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ Read content from a Wealthbox task
184184

185185
### Write Wealthbox Task
186186

187-
Create or update a Wealthbox task
187+
Create a Wealthbox task
188188

189189
<ReferenceDetails>
190190

@@ -202,12 +202,12 @@ Create or update a Wealthbox task
202202
| Parameter | Type | Description |
203203
| --------- | ---- | ----------- |
204204
| `success` | boolean | Operation success status |
205-
| `output` | object | Created or updated task data and metadata |
205+
| `output` | object | Created task data and metadata |
206206
| ↳ `task` | object | Raw task data from Wealthbox |
207207
| ↳ `success` | boolean | Operation success indicator |
208208
| ↳ `metadata` | object | Operation metadata |
209-
| ↳ `itemId` | string | ID of the created/updated task |
210-
| ↳ `taskId` | string | ID of the created/updated task |
209+
| ↳ `itemId` | string | ID of the created task |
210+
| ↳ `taskId` | string | ID of the created task |
211211
| ↳ `itemType` | string | Type of item \(task\) |
212212

213213
</ReferenceDetails>

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/tool-input.tsx‎

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,9 @@ function hasMultipleOperations(block: BlockConfig | undefined): boolean {
281281
* @param block - The block config to get operations for
282282
* @returns Array of operation options with label and id properties
283283
*/
284-
function getOperationOptions(block: BlockConfig | undefined): { label: string; id: string }[] {
284+
function getOperationOptions(
285+
block: BlockConfig | undefined
286+
): { label: string; id: string; hidden?: boolean }[] {
285287
if (!block || !block.tools?.access) return []
286288

287289
const operationSubBlock = block.subBlocks.find((sb) => sb.id === OPERATION_SUBBLOCK_ID)
@@ -290,7 +292,7 @@ function getOperationOptions(block: BlockConfig | undefined): { label: string; i
290292
operationSubBlock.type === 'dropdown' &&
291293
Array.isArray(operationSubBlock.options)
292294
) {
293-
return operationSubBlock.options as { label: string; id: string }[]
295+
return operationSubBlock.options as { label: string; id: string; hidden?: boolean }[]
294296
}
295297

296298
return block.tools.access.map((toolId) => {
@@ -612,8 +614,9 @@ export const ToolInput = memo(function ToolInput({
612614
const { getDeniedOperations } = useOperationAccess()
613615

614616
/**
615-
* A tool block's selectable operations paired with the ones the caller's
616-
* permission group denies.
617+
* A tool block's selectable operations paired with the ones the caller may not
618+
* pick: those the caller's permission group denies, and retired operations the
619+
* block keeps as `hidden` options so saved workflows stay valid.
617620
*
618621
* Both callers derive from this single result so they cannot drift: the
619622
* picker *removes* denied operations (it must never offer or default to one),
@@ -623,12 +626,14 @@ export const ToolInput = memo(function ToolInput({
623626
const getOperationChoices = useCallback(
624627
(block: BlockConfig | undefined) => {
625628
const options = getOperationOptions(block).filter((option) => option.id !== '')
629+
const denied = getDeniedOperations(
630+
block,
631+
options.map((option) => option.id)
632+
)
633+
const hiddenIds = options.filter((option) => option.hidden).map((option) => option.id)
626634
return {
627635
options,
628-
denied: getDeniedOperations(
629-
block,
630-
options.map((option) => option.id)
631-
),
636+
denied: hiddenIds.length > 0 ? new Set([...denied, ...hiddenIds]) : denied,
632637
}
633638
},
634639
[getDeniedOperations]

‎apps/sim/blocks/blocks/arxiv.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,15 @@ export const ArxivBlock: BlockConfig = {
171171
'Matching papers [{id, title, summary, authors, published, updated, link, pdfLink, categories, primaryCategory, comment, journalRef, doi}]',
172172
},
173173
totalResults: { type: 'number', description: 'Total results count' },
174+
query: { type: 'string', description: 'Executed search query (search)' },
174175
// Get Paper Details output
175176
paper: {
176177
type: 'json',
177178
description:
178179
'Paper details (id, title, summary, authors, published, updated, link, pdfLink, categories, primaryCategory, comment, journalRef, doi)',
179180
},
180181
// Get Author Papers output
182+
authorName: { type: 'string', description: 'Author searched (get author papers)' },
181183
authorPapers: {
182184
type: 'json',
183185
description:

‎apps/sim/blocks/blocks/aws-stale-inputs.test.ts‎

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -151,26 +151,29 @@ describe('AWS blocks keep stale subBlock values out of tool input', () => {
151151
})
152152

153153
it('a blank stored limit still lets an Agent call pass its own limit', () => {
154-
const sqs = SQSBlock.tools.config?.params?.(
155-
{
156-
...AWS,
157-
receiveVisibilityTimeout: '',
158-
visibilityTimeout: 30,
159-
moveTaskMaxResults: '',
160-
maxResults: 5,
161-
},
162-
{ operation: 'receive_message' }
163-
)
164-
expect(sqs?.visibilityTimeout).toBe(30)
165-
const moveTasks = SQSBlock.tools.config?.params?.(
166-
{ ...AWS, moveTaskMaxResults: '', maxResults: 5 },
167-
{ operation: 'list_message_move_tasks' }
168-
)
169-
expect(moveTasks?.maxResults).toBe(5)
170-
const ssm = SSMBlock.tools.config?.params?.(
171-
{ ...AWS, pathMaxResults: '', maxResults: 5 },
172-
{ operation: 'get_parameters_by_path' }
173-
)
174-
expect(ssm?.maxResults).toBe(5)
154+
const sqsInputs = {
155+
...AWS,
156+
receiveVisibilityTimeout: '',
157+
visibilityTimeout: 30,
158+
moveTaskMaxResults: '',
159+
maxResults: 5,
160+
}
161+
const sqs = {
162+
...sqsInputs,
163+
...SQSBlock.tools.config?.params?.(sqsInputs, { operation: 'receive_message' }),
164+
}
165+
expect(sqs.visibilityTimeout).toBe(30)
166+
const moveTaskInputs = { ...AWS, moveTaskMaxResults: '', maxResults: 5 }
167+
const moveTasks = {
168+
...moveTaskInputs,
169+
...SQSBlock.tools.config?.params?.(moveTaskInputs, { operation: 'list_message_move_tasks' }),
170+
}
171+
expect(moveTasks.maxResults).toBe(5)
172+
const ssmInputs = { ...AWS, pathMaxResults: '', maxResults: 5 }
173+
const ssm = {
174+
...ssmInputs,
175+
...SSMBlock.tools.config?.params?.(ssmInputs, { operation: 'get_parameters_by_path' }),
176+
}
177+
expect(ssm.maxResults).toBe(5)
175178
})
176179
})

‎apps/sim/blocks/blocks/dspy.ts‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,18 @@ import { isPlainRecord } from '@sim/utils/object'
22
import { DsPyIcon } from '@/components/icons'
33
import type { BlockConfig, BlockMeta } from '@/blocks/types'
44
import { IntegrationType } from '@/blocks/types'
5-
import { failToolCallOnError, mapperOperation } from '@/blocks/utils'
5+
import { failToolCallOnError, mapperOperation, parseOptionalJsonInput } from '@/blocks/utils'
66

77
/** Predict's Additional Inputs: a JSON object as text from the canvas, or an object from an agent. */
88
function parseAdditionalInputs(value: unknown): Record<string, unknown> | undefined {
9-
if (value === undefined || value === null) return undefined
10-
if (typeof value === 'string' && !value.trim()) return undefined
11-
let parsed: unknown = value
12-
if (typeof value === 'string') {
13-
try {
14-
parsed = JSON.parse(value)
15-
} catch {
16-
throw new Error('Additional Inputs must be valid JSON')
17-
}
9+
let parsed: unknown
10+
try {
11+
parsed = parseOptionalJsonInput(value, 'Additional Inputs')
12+
} catch {
13+
// Static on purpose: the parser's message quotes the input, which can hold a resolved secret.
14+
throw new Error('Additional Inputs must be valid JSON')
1815
}
16+
if (parsed === undefined) return undefined
1917
if (!isPlainRecord(parsed)) {
2018
throw new Error('Additional Inputs must be a JSON object')
2119
}

0 commit comments

Comments
 (0)