Skip to content

Commit a36fa4d

Browse files
committed
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
1 parent 824ce4d commit a36fa4d

25 files changed

Lines changed: 130 additions & 60 deletions

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

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -210,26 +210,8 @@ Retrieve the latest commit from a GitHub repository
210210

211211
| Parameter | Type | Description |
212212
| --------- | ---- | ----------- |
213-
| `commit` | object | Core commit data |
214-
| ↳ `url` | string | Commit API URL |
215-
| ↳ `message` | string | Commit message |
216-
| ↳ `comment_count` | number | Number of comments |
217-
| ↳ `author` | object | Git actor \(author/committer\) |
218-
| ↳ `name` | string | Name |
219-
| ↳ `email` | string | Email address |
220-
| ↳ `date` | string | Timestamp \(ISO 8601\) |
221-
| ↳ `committer` | object | Git actor \(author/committer\) |
222-
| ↳ `name` | string | Name |
223-
| ↳ `email` | string | Email address |
224-
| ↳ `date` | string | Timestamp \(ISO 8601\) |
225-
| ↳ `tree` | object | Tree object |
226-
| ↳ `sha` | string | Tree SHA |
227-
| ↳ `url` | string | Tree API URL |
228-
| ↳ `verification` | object | Signature verification |
229-
| ↳ `verified` | boolean | Whether signature is verified |
230-
| ↳ `reason` | string | Verification reason |
231-
| ↳ `signature` | string | GPG signature |
232-
| ↳ `payload` | string | Signed payload |
213+
| `sha` | string | Commit SHA |
214+
| `html_url` | string | GitHub web URL |
233215
| `author` | object | GitHub user object |
234216
| ↳ `login` | string | GitHub username |
235217
| ↳ `id` | number | User ID |
@@ -248,8 +230,6 @@ Retrieve the latest commit from a GitHub repository
248230
| ↳ `html_url` | string | Profile page URL |
249231
| ↳ `type` | string | User or Organization |
250232
| ↳ `site_admin` | boolean | GitHub staff indicator |
251-
| `sha` | string | Commit SHA |
252-
| `html_url` | string | GitHub web URL |
253233

254234
</ReferenceDetails>
255235

@@ -2726,7 +2706,7 @@ Compare two commits or branches to see the diff, commits between them, and chang
27262706
| `base` | string | Yes | Base branch/tag/SHA for comparison |
27272707
| `head` | string | Yes | Head branch/tag/SHA for comparison |
27282708
| `per_page` | number | No | Commits per page \(max 100\). Setting per_page or page paginates the commit list, and changed files are returned only on page 1. Leave both unset to get up to 250 commits and every changed file in one response. |
2729-
| `page` | number | No | Page of the commit list. Changed files are returned only on page 1. Leave unset \(with per_page\) for a single unpaginated comparison. |
2709+
| `page` | number | No | Page of the commit list. Changed files are returned only on page 1. Omit both page and per_page to get up to 250 commits in one response. |
27302710

27312711
#### Output
27322712

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ List incidents from incident.io. Returns a list of incidents with their details
7474

7575
### incident.io Incidents Create
7676

77-
Create a new incident in incident.io. Requires idempotency_key and visibility. Optionally accepts severity, name, summary, type, and status.
77+
Create a new incident in incident.io. Requires idempotency_key and visibility. Optionally accepts name, summary, severity_id, incident_type_id, and incident_status_id.
7878

7979
<ReferenceDetails>
8080

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1636,7 +1636,7 @@ List all customers in Linear
16361636

16371637
### Linear Create Customer Request
16381638

1639-
Create a customer request (need) in Linear. Assign to customer, set urgency (priority: 0 = Not important, 1 = Important), and optionally link to an issue.
1639+
Create a customer request (need) in Linear. Assign to customer, set urgency (priority: 0 = Not important, 1 = Important), and link it to an issue (required for API calls).
16401640

16411641
<ReferenceDetails>
16421642

@@ -2453,7 +2453,7 @@ Update a project status in Linear
24532453

24542454
</ReferenceDetails>
24552455

2456-
### Linear Archive Project Status
2456+
### Linear Delete Project Status
24572457

24582458
Archive a project status in Linear (Linear does not support deleting one). The status must have no active projects and must not be the last status of its type.
24592459

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2606,8 +2606,8 @@ Remove user or regular-channel access to a standalone canvas. Channel-granted ac
26062606
| Parameter | Type | Required | Description |
26072607
| --------- | ---- | -------- | ----------- |
26082608
| `canvas_id` | string | Yes | Canvas ID |
2609-
| `user_ids` | json | No | One Slack user ID to remove, as \["U123"\] or U123. Omit channel_ids. |
2610-
| `channel_ids` | json | No | One Slack channel ID to remove, as \["C123"\] or C123. Omit user_ids. |
2609+
| `user_ids` | json | No | One Slack user ID to remove, as \["U123"\] or U123. |
2610+
| `channel_ids` | json | No | One Slack channel ID to remove, as \["C123"\] or C123. |
26112611

26122612
#### Output
26132613

‎apps/sim/blocks/blocks/gitlab.test.ts‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,13 @@ describe('GitLabBlock access operations', () => {
9595
})
9696
})
9797

98+
const blockParams = block.tools.config?.params
99+
if (!blockParams) throw new Error('GitLab block has no params mapper')
100+
const mapParams = blockParams
101+
98102
/** Runs the mapper the way a tool call does: model/stored args with no operation, which arrives in context. */
99103
function mapToolCall(operation: string, args: Record<string, unknown>) {
100-
return block.tools.config.params?.({ accessToken: 'pat', ...args }, { operation })
104+
return mapParams({ accessToken: 'pat', ...args }, { operation })
101105
}
102106

103107
describe('GitLabBlock mapper on tool calls', () => {
@@ -171,7 +175,7 @@ describe('GitLabBlock mapper on tool calls', () => {
171175
})
172176

173177
it('does not apply tool-named fallbacks on the canvas', () => {
174-
const canvas = block.tools.config.params?.({
178+
const canvas = mapParams({
175179
accessToken: 'pat',
176180
operation: 'gitlab_list_merge_requests',
177181
projectId: '1',
@@ -182,7 +186,7 @@ describe('GitLabBlock mapper on tool calls', () => {
182186

183187
it('keeps create-only advanced values saved under another operation off update and merge requests', () => {
184188
const canvas = (operation: string, extra: Record<string, unknown>) =>
185-
block.tools.config.params?.({
189+
mapParams({
186190
accessToken: 'pat',
187191
operation,
188192
projectId: '1',
@@ -294,7 +298,7 @@ describe('GitLabBlock mapper on tool calls', () => {
294298
})
295299

296300
it('leaves a blank canvas field unsent on update operations', () => {
297-
const result = block.tools.config.params?.({
301+
const result = mapParams({
298302
accessToken: 'pat',
299303
operation: 'gitlab_update_issue',
300304
projectId: '1',

‎apps/sim/blocks/blocks/slack-workflow-operations.test.ts‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,22 @@ describe('Slack workflow operations in the existing block', () => {
5858
).toEqual({ credential: 'bot', channel_id: 'C1', bookmark_id: 'Bk1', emoji: '' })
5959
expect(() => mapParams({ operation: 'list_files', slack_list_files_count: 'many' })).toThrow()
6060
expect(() =>
61-
mapParams({ operation: 'share_canvas', slack_share_canvas_user_ids: 'invalid JSON' })
61+
mapParams({
62+
operation: 'revoke_list_access',
63+
slack_revoke_list_access_user_ids: 'invalid JSON',
64+
})
6265
).toThrow()
6366
})
67+
68+
it("passes a Slack ID list's comma-separated form through for the tool to parse", () => {
69+
expect(
70+
mapParams({
71+
operation: 'get_team_dnd_info',
72+
apiBotCredentialId: 'bot',
73+
slack_get_team_dnd_info_users: 'U1,U2',
74+
})
75+
).toEqual({ credential: 'bot', users: 'U1,U2' })
76+
})
6477
})
6578

6679
describe('Slack custom-app permissions', () => {

‎apps/sim/blocks/blocks/slack-workflow-operations.ts‎

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ interface SlackWorkflowField {
1818
dependsOn?: string[]
1919
default?: string
2020
allowEmpty?: boolean
21+
/** A Slack ID list: Slack's comma-separated form (`U1,U2`) is passed through for the tool to parse. */
22+
idList?: boolean
2123
basic?: boolean
2224
min?: number
2325
max?: number
@@ -215,6 +217,7 @@ export const SLACK_WORKFLOW_OPERATIONS: readonly SlackWorkflowOperation[] = [
215217
param: 'user_ids',
216218
title: 'User IDs',
217219
type: 'json',
220+
idList: true,
218221
required: false,
219222
},
220223
{
@@ -223,6 +226,7 @@ export const SLACK_WORKFLOW_OPERATIONS: readonly SlackWorkflowOperation[] = [
223226
param: 'channel_ids',
224227
title: 'Channel IDs',
225228
type: 'json',
229+
idList: true,
226230
required: false,
227231
},
228232
],
@@ -246,6 +250,7 @@ export const SLACK_WORKFLOW_OPERATIONS: readonly SlackWorkflowOperation[] = [
246250
param: 'user_ids',
247251
title: 'User IDs',
248252
type: 'json',
253+
idList: true,
249254
required: false,
250255
},
251256
{
@@ -254,6 +259,7 @@ export const SLACK_WORKFLOW_OPERATIONS: readonly SlackWorkflowOperation[] = [
254259
param: 'channel_ids',
255260
title: 'Channel IDs',
256261
type: 'json',
262+
idList: true,
257263
required: false,
258264
},
259265
],
@@ -374,6 +380,7 @@ export const SLACK_WORKFLOW_OPERATIONS: readonly SlackWorkflowOperation[] = [
374380
param: 'users',
375381
title: 'User IDs',
376382
type: 'json',
383+
idList: true,
377384
required: false,
378385
},
379386
{
@@ -946,13 +953,15 @@ export const SLACK_WORKFLOW_OPERATIONS: readonly SlackWorkflowOperation[] = [
946953
param: 'channels',
947954
title: 'Default Channel IDs',
948955
type: 'json',
956+
idList: true,
949957
required: false,
950958
},
951959
{
952960
id: 'slack_create_user_group_additional_channels',
953961
param: 'additional_channels',
954962
title: 'Additional Channel IDs',
955963
type: 'json',
964+
idList: true,
956965
required: false,
957966
},
958967
{
@@ -1022,13 +1031,15 @@ export const SLACK_WORKFLOW_OPERATIONS: readonly SlackWorkflowOperation[] = [
10221031
param: 'channels',
10231032
title: 'Default Channel IDs',
10241033
type: 'json',
1034+
idList: true,
10251035
required: false,
10261036
},
10271037
{
10281038
id: 'slack_update_user_group_additional_channels',
10291039
param: 'additional_channels',
10301040
title: 'Additional Channel IDs',
10311041
type: 'json',
1042+
idList: true,
10321043
required: false,
10331044
},
10341045
{
@@ -1195,13 +1206,15 @@ export const SLACK_WORKFLOW_OPERATIONS: readonly SlackWorkflowOperation[] = [
11951206
param: 'users',
11961207
title: 'User IDs',
11971208
type: 'json',
1209+
idList: true,
11981210
required: true,
11991211
},
12001212
{
12011213
id: 'slack_update_user_group_members_additional_channels',
12021214
param: 'additional_channels',
12031215
title: 'Additional Channel IDs',
12041216
type: 'json',
1217+
idList: true,
12051218
required: false,
12061219
},
12071220
{
@@ -1260,6 +1273,7 @@ export const SLACK_WORKFLOW_OPERATIONS: readonly SlackWorkflowOperation[] = [
12601273
param: 'users',
12611274
title: 'User IDs',
12621275
type: 'json',
1276+
idList: true,
12631277
required: true,
12641278
},
12651279
{
@@ -1442,8 +1456,15 @@ export function mapSlackWorkflowParams(
14421456
if (isEmpty && toolCallArg(context, params[field.param]) !== undefined) continue
14431457
const value = isEmpty ? field.default : raw
14441458
if (value === undefined) continue
1445-
if (field.type === 'json') result[field.param] = parseOptionalJsonInput(value, field.title)
1446-
else if (field.type === 'number')
1459+
if (field.type === 'json') {
1460+
const csvIdList =
1461+
field.idList === true &&
1462+
typeof value === 'string' &&
1463+
value.trim() !== '' &&
1464+
!/^\s*[[{"]/.test(value)
1465+
if (csvIdList) result[field.param] = value
1466+
else result[field.param] = parseOptionalJsonInput(value, field.title)
1467+
} else if (field.type === 'number')
14471468
result[field.param] = parseOptionalNumberInput(value, field.title, {
14481469
integer: true,
14491470
min: field.min,

‎apps/sim/blocks/blocks/slack.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1993,7 +1993,7 @@ Return ONLY the integer Unix timestamp - no explanations, no quotes, no extra te
19931993
baseParams.accessToken = botToken
19941994
}
19951995
} else {
1996-
baseParams.credential = oauthCredential ?? toolCallArg(context, params.credential)
1996+
baseParams.credential = oauthCredential
19971997
}
19981998

19991999
switch (operation) {

‎apps/sim/lib/internal/slack/operations.test.ts‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,14 @@ describe('Slack operations', () => {
102102
)
103103

104104
const result = await executeSlackGetChannelHistoryOperation(
105-
{ accessToken: 'token', channel: 'C1', limit: 999, maxPages: 10000 },
105+
{
106+
authMethod: 'oauth',
107+
accessToken: 'token',
108+
botToken: '',
109+
channel: 'C1',
110+
limit: 999,
111+
maxPages: 10000,
112+
},
106113
new AbortController().signal
107114
)
108115

‎apps/sim/tools/github/compare_commits.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export const compareCommitsTool: ToolConfig<CompareCommitsParams, CompareCommits
9292
required: false,
9393
visibility: 'user-or-llm',
9494
description:
95-
'Page of the commit list. Changed files are returned only on page 1. Leave unset (with per_page) for a single unpaginated comparison.',
95+
'Page of the commit list. Changed files are returned only on page 1. Omit both page and per_page to get up to 250 commits in one response.',
9696
},
9797
apiKey: {
9898
type: 'string',

0 commit comments

Comments
 (0)