mirror of
https://github.com/simstudioai/sim.git
synced 2026-02-07 05:05:15 -05:00
Compare commits
48 Commits
fix/previe
...
v0.5.81
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a66d48add | ||
|
|
46822e91f3 | ||
|
|
2bb68335ee | ||
|
|
8528fbe2d2 | ||
|
|
31fdd2be13 | ||
|
|
028bc652c2 | ||
|
|
c6bf5cd58c | ||
|
|
11dc18a80d | ||
|
|
ab4e9dc72f | ||
|
|
1c58c35bd8 | ||
|
|
d63a5cb504 | ||
|
|
8bd5d41723 | ||
|
|
c12931bc50 | ||
|
|
e9c4251c1c | ||
|
|
cc2be33d6b | ||
|
|
45371e521e | ||
|
|
0ce0f98aa5 | ||
|
|
dff1c9d083 | ||
|
|
b09f683072 | ||
|
|
a8bb0db660 | ||
|
|
af82820a28 | ||
|
|
4372841797 | ||
|
|
5e8c843241 | ||
|
|
7bf3d73ee6 | ||
|
|
7ffc11a738 | ||
|
|
be578e2ed7 | ||
|
|
f415e5edc4 | ||
|
|
13a6e6c3fa | ||
|
|
f5ab7f21ae | ||
|
|
bfb6fffe38 | ||
|
|
4fbec0a43f | ||
|
|
585f5e365b | ||
|
|
3792bdd252 | ||
|
|
eb5d1f3e5b | ||
|
|
54ab82c8dd | ||
|
|
f895bf469b | ||
|
|
dd3209af06 | ||
|
|
b6ba3b50a7 | ||
|
|
b304233062 | ||
|
|
57e4b49bd6 | ||
|
|
e12dd204ed | ||
|
|
3d9d9cbc54 | ||
|
|
0f4ec962ad | ||
|
|
4827866f9a | ||
|
|
3e697d9ed9 | ||
|
|
4431a1a484 | ||
|
|
4d1a9a3f22 | ||
|
|
eb07a080fb |
@@ -320,7 +320,6 @@ Search for issues in Linear using full-text search
|
|||||||
| `teamId` | string | No | Filter by team ID |
|
| `teamId` | string | No | Filter by team ID |
|
||||||
| `includeArchived` | boolean | No | Include archived issues in search results |
|
| `includeArchived` | boolean | No | Include archived issues in search results |
|
||||||
| `first` | number | No | Number of results to return \(default: 50\) |
|
| `first` | number | No | Number of results to return \(default: 50\) |
|
||||||
| `after` | string | No | Cursor for pagination |
|
|
||||||
|
|
||||||
#### Output
|
#### Output
|
||||||
|
|
||||||
@@ -755,10 +754,6 @@ List all labels in Linear workspace or team
|
|||||||
| ↳ `name` | string | Label name |
|
| ↳ `name` | string | Label name |
|
||||||
| ↳ `color` | string | Label color \(hex\) |
|
| ↳ `color` | string | Label color \(hex\) |
|
||||||
| ↳ `description` | string | Label description |
|
| ↳ `description` | string | Label description |
|
||||||
| ↳ `isGroup` | boolean | Whether this label is a group |
|
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `team` | object | Team object |
|
| ↳ `team` | object | Team object |
|
||||||
| ↳ `id` | string | Team ID |
|
| ↳ `id` | string | Team ID |
|
||||||
| ↳ `name` | string | Team name |
|
| ↳ `name` | string | Team name |
|
||||||
@@ -785,10 +780,6 @@ Create a new label in Linear
|
|||||||
| ↳ `name` | string | Label name |
|
| ↳ `name` | string | Label name |
|
||||||
| ↳ `color` | string | Label color \(hex\) |
|
| ↳ `color` | string | Label color \(hex\) |
|
||||||
| ↳ `description` | string | Label description |
|
| ↳ `description` | string | Label description |
|
||||||
| ↳ `isGroup` | boolean | Whether this label is a group |
|
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `team` | object | Team object |
|
| ↳ `team` | object | Team object |
|
||||||
| ↳ `id` | string | Team ID |
|
| ↳ `id` | string | Team ID |
|
||||||
| ↳ `name` | string | Team name |
|
| ↳ `name` | string | Team name |
|
||||||
@@ -815,10 +806,6 @@ Update an existing label in Linear
|
|||||||
| ↳ `name` | string | Label name |
|
| ↳ `name` | string | Label name |
|
||||||
| ↳ `color` | string | Label color \(hex\) |
|
| ↳ `color` | string | Label color \(hex\) |
|
||||||
| ↳ `description` | string | Label description |
|
| ↳ `description` | string | Label description |
|
||||||
| ↳ `isGroup` | boolean | Whether this label is a group |
|
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `team` | object | Team object |
|
| ↳ `team` | object | Team object |
|
||||||
| ↳ `id` | string | Team ID |
|
| ↳ `id` | string | Team ID |
|
||||||
| ↳ `name` | string | Team name |
|
| ↳ `name` | string | Team name |
|
||||||
@@ -862,13 +849,9 @@ List all workflow states (statuses) in Linear
|
|||||||
| `states` | array | Array of workflow states |
|
| `states` | array | Array of workflow states |
|
||||||
| ↳ `id` | string | State ID |
|
| ↳ `id` | string | State ID |
|
||||||
| ↳ `name` | string | State name \(e.g., "Todo", "In Progress"\) |
|
| ↳ `name` | string | State name \(e.g., "Todo", "In Progress"\) |
|
||||||
| ↳ `description` | string | State description |
|
| ↳ `type` | string | State type \(unstarted, started, completed, canceled\) |
|
||||||
| ↳ `type` | string | State type \(triage, backlog, unstarted, started, completed, canceled\) |
|
|
||||||
| ↳ `color` | string | State color \(hex\) |
|
| ↳ `color` | string | State color \(hex\) |
|
||||||
| ↳ `position` | number | State position in workflow |
|
| ↳ `position` | number | State position in workflow |
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `team` | object | Team object |
|
| ↳ `team` | object | Team object |
|
||||||
| ↳ `id` | string | Team ID |
|
| ↳ `id` | string | Team ID |
|
||||||
| ↳ `name` | string | Team name |
|
| ↳ `name` | string | Team name |
|
||||||
@@ -894,17 +877,11 @@ Create a new workflow state (status) in Linear
|
|||||||
| --------- | ---- | ----------- |
|
| --------- | ---- | ----------- |
|
||||||
| `state` | object | The created workflow state |
|
| `state` | object | The created workflow state |
|
||||||
| ↳ `id` | string | State ID |
|
| ↳ `id` | string | State ID |
|
||||||
| ↳ `name` | string | State name \(e.g., "Todo", "In Progress"\) |
|
| ↳ `name` | string | State name |
|
||||||
| ↳ `description` | string | State description |
|
| ↳ `type` | string | State type |
|
||||||
| ↳ `type` | string | State type \(triage, backlog, unstarted, started, completed, canceled\) |
|
| ↳ `color` | string | State color |
|
||||||
| ↳ `color` | string | State color \(hex\) |
|
| ↳ `position` | number | State position |
|
||||||
| ↳ `position` | number | State position in workflow |
|
| ↳ `team` | object | Team this state belongs to |
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `team` | object | Team object |
|
|
||||||
| ↳ `id` | string | Team ID |
|
|
||||||
| ↳ `name` | string | Team name |
|
|
||||||
|
|
||||||
### `linear_update_workflow_state`
|
### `linear_update_workflow_state`
|
||||||
|
|
||||||
@@ -926,17 +903,10 @@ Update an existing workflow state in Linear
|
|||||||
| --------- | ---- | ----------- |
|
| --------- | ---- | ----------- |
|
||||||
| `state` | object | The updated workflow state |
|
| `state` | object | The updated workflow state |
|
||||||
| ↳ `id` | string | State ID |
|
| ↳ `id` | string | State ID |
|
||||||
| ↳ `name` | string | State name \(e.g., "Todo", "In Progress"\) |
|
| ↳ `name` | string | State name |
|
||||||
| ↳ `description` | string | State description |
|
| ↳ `type` | string | State type |
|
||||||
| ↳ `type` | string | State type \(triage, backlog, unstarted, started, completed, canceled\) |
|
| ↳ `color` | string | State color |
|
||||||
| ↳ `color` | string | State color \(hex\) |
|
| ↳ `position` | number | State position |
|
||||||
| ↳ `position` | number | State position in workflow |
|
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `team` | object | Team object |
|
|
||||||
| ↳ `id` | string | Team ID |
|
|
||||||
| ↳ `name` | string | Team name |
|
|
||||||
|
|
||||||
### `linear_list_cycles`
|
### `linear_list_cycles`
|
||||||
|
|
||||||
@@ -965,7 +935,6 @@ List cycles (sprints/iterations) in Linear
|
|||||||
| ↳ `endsAt` | string | End date \(ISO 8601\) |
|
| ↳ `endsAt` | string | End date \(ISO 8601\) |
|
||||||
| ↳ `completedAt` | string | Completion date \(ISO 8601\) |
|
| ↳ `completedAt` | string | Completion date \(ISO 8601\) |
|
||||||
| ↳ `progress` | number | Progress percentage \(0-1\) |
|
| ↳ `progress` | number | Progress percentage \(0-1\) |
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `team` | object | Team object |
|
| ↳ `team` | object | Team object |
|
||||||
| ↳ `id` | string | Team ID |
|
| ↳ `id` | string | Team ID |
|
||||||
| ↳ `name` | string | Team name |
|
| ↳ `name` | string | Team name |
|
||||||
@@ -992,7 +961,6 @@ Get a single cycle by ID from Linear
|
|||||||
| ↳ `endsAt` | string | End date \(ISO 8601\) |
|
| ↳ `endsAt` | string | End date \(ISO 8601\) |
|
||||||
| ↳ `completedAt` | string | Completion date \(ISO 8601\) |
|
| ↳ `completedAt` | string | Completion date \(ISO 8601\) |
|
||||||
| ↳ `progress` | number | Progress percentage \(0-1\) |
|
| ↳ `progress` | number | Progress percentage \(0-1\) |
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `team` | object | Team object |
|
| ↳ `team` | object | Team object |
|
||||||
| ↳ `id` | string | Team ID |
|
| ↳ `id` | string | Team ID |
|
||||||
| ↳ `name` | string | Team name |
|
| ↳ `name` | string | Team name |
|
||||||
@@ -1018,14 +986,9 @@ Create a new cycle (sprint/iteration) in Linear
|
|||||||
| ↳ `id` | string | Cycle ID |
|
| ↳ `id` | string | Cycle ID |
|
||||||
| ↳ `number` | number | Cycle number |
|
| ↳ `number` | number | Cycle number |
|
||||||
| ↳ `name` | string | Cycle name |
|
| ↳ `name` | string | Cycle name |
|
||||||
| ↳ `startsAt` | string | Start date \(ISO 8601\) |
|
| ↳ `startsAt` | string | Start date |
|
||||||
| ↳ `endsAt` | string | End date \(ISO 8601\) |
|
| ↳ `endsAt` | string | End date |
|
||||||
| ↳ `completedAt` | string | Completion date \(ISO 8601\) |
|
| ↳ `team` | object | Team this cycle belongs to |
|
||||||
| ↳ `progress` | number | Progress percentage \(0-1\) |
|
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `team` | object | Team object |
|
|
||||||
| ↳ `id` | string | Team ID |
|
|
||||||
| ↳ `name` | string | Team name |
|
|
||||||
|
|
||||||
### `linear_get_active_cycle`
|
### `linear_get_active_cycle`
|
||||||
|
|
||||||
@@ -1045,14 +1008,10 @@ Get the currently active cycle for a team
|
|||||||
| ↳ `id` | string | Cycle ID |
|
| ↳ `id` | string | Cycle ID |
|
||||||
| ↳ `number` | number | Cycle number |
|
| ↳ `number` | number | Cycle number |
|
||||||
| ↳ `name` | string | Cycle name |
|
| ↳ `name` | string | Cycle name |
|
||||||
| ↳ `startsAt` | string | Start date \(ISO 8601\) |
|
| ↳ `startsAt` | string | Start date |
|
||||||
| ↳ `endsAt` | string | End date \(ISO 8601\) |
|
| ↳ `endsAt` | string | End date |
|
||||||
| ↳ `completedAt` | string | Completion date \(ISO 8601\) |
|
| ↳ `progress` | number | Progress percentage |
|
||||||
| ↳ `progress` | number | Progress percentage \(0-1\) |
|
| ↳ `team` | object | Team this cycle belongs to |
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `team` | object | Team object |
|
|
||||||
| ↳ `id` | string | Team ID |
|
|
||||||
| ↳ `name` | string | Team name |
|
|
||||||
|
|
||||||
### `linear_create_attachment`
|
### `linear_create_attachment`
|
||||||
|
|
||||||
@@ -1375,12 +1334,8 @@ Create a new customer in Linear
|
|||||||
| ↳ `domains` | array | Associated domains |
|
| ↳ `domains` | array | Associated domains |
|
||||||
| ↳ `externalIds` | array | External IDs from other systems |
|
| ↳ `externalIds` | array | External IDs from other systems |
|
||||||
| ↳ `logoUrl` | string | Logo URL |
|
| ↳ `logoUrl` | string | Logo URL |
|
||||||
| ↳ `slugId` | string | Unique URL slug |
|
|
||||||
| ↳ `approximateNeedCount` | number | Number of customer needs |
|
| ↳ `approximateNeedCount` | number | Number of customer needs |
|
||||||
| ↳ `revenue` | number | Annual revenue |
|
|
||||||
| ↳ `size` | number | Organization size |
|
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
||||||
| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
||||||
|
|
||||||
### `linear_list_customers`
|
### `linear_list_customers`
|
||||||
@@ -1408,12 +1363,8 @@ List all customers in Linear
|
|||||||
| ↳ `domains` | array | Associated domains |
|
| ↳ `domains` | array | Associated domains |
|
||||||
| ↳ `externalIds` | array | External IDs from other systems |
|
| ↳ `externalIds` | array | External IDs from other systems |
|
||||||
| ↳ `logoUrl` | string | Logo URL |
|
| ↳ `logoUrl` | string | Logo URL |
|
||||||
| ↳ `slugId` | string | Unique URL slug |
|
|
||||||
| ↳ `approximateNeedCount` | number | Number of customer needs |
|
| ↳ `approximateNeedCount` | number | Number of customer needs |
|
||||||
| ↳ `revenue` | number | Annual revenue |
|
|
||||||
| ↳ `size` | number | Organization size |
|
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
||||||
| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
||||||
|
|
||||||
### `linear_create_customer_request`
|
### `linear_create_customer_request`
|
||||||
@@ -1529,12 +1480,8 @@ Get a single customer by ID in Linear
|
|||||||
| ↳ `domains` | array | Associated domains |
|
| ↳ `domains` | array | Associated domains |
|
||||||
| ↳ `externalIds` | array | External IDs from other systems |
|
| ↳ `externalIds` | array | External IDs from other systems |
|
||||||
| ↳ `logoUrl` | string | Logo URL |
|
| ↳ `logoUrl` | string | Logo URL |
|
||||||
| ↳ `slugId` | string | Unique URL slug |
|
|
||||||
| ↳ `approximateNeedCount` | number | Number of customer needs |
|
| ↳ `approximateNeedCount` | number | Number of customer needs |
|
||||||
| ↳ `revenue` | number | Annual revenue |
|
|
||||||
| ↳ `size` | number | Organization size |
|
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
||||||
| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
||||||
|
|
||||||
### `linear_update_customer`
|
### `linear_update_customer`
|
||||||
@@ -1566,12 +1513,8 @@ Update a customer in Linear
|
|||||||
| ↳ `domains` | array | Associated domains |
|
| ↳ `domains` | array | Associated domains |
|
||||||
| ↳ `externalIds` | array | External IDs from other systems |
|
| ↳ `externalIds` | array | External IDs from other systems |
|
||||||
| ↳ `logoUrl` | string | Logo URL |
|
| ↳ `logoUrl` | string | Logo URL |
|
||||||
| ↳ `slugId` | string | Unique URL slug |
|
|
||||||
| ↳ `approximateNeedCount` | number | Number of customer needs |
|
| ↳ `approximateNeedCount` | number | Number of customer needs |
|
||||||
| ↳ `revenue` | number | Annual revenue |
|
|
||||||
| ↳ `size` | number | Organization size |
|
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
||||||
| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
||||||
|
|
||||||
### `linear_delete_customer`
|
### `linear_delete_customer`
|
||||||
@@ -1617,8 +1560,8 @@ Create a new customer status in Linear
|
|||||||
| --------- | ---- | -------- | ----------- |
|
| --------- | ---- | -------- | ----------- |
|
||||||
| `name` | string | Yes | Customer status name |
|
| `name` | string | Yes | Customer status name |
|
||||||
| `color` | string | Yes | Status color \(hex code\) |
|
| `color` | string | Yes | Status color \(hex code\) |
|
||||||
| `description` | string | No | Status description |
|
|
||||||
| `displayName` | string | No | Display name for the status |
|
| `displayName` | string | No | Display name for the status |
|
||||||
|
| `description` | string | No | Status description |
|
||||||
| `position` | number | No | Position in status list |
|
| `position` | number | No | Position in status list |
|
||||||
|
|
||||||
#### Output
|
#### Output
|
||||||
@@ -1628,12 +1571,11 @@ Create a new customer status in Linear
|
|||||||
| `customerStatus` | object | The created customer status |
|
| `customerStatus` | object | The created customer status |
|
||||||
| ↳ `id` | string | Customer status ID |
|
| ↳ `id` | string | Customer status ID |
|
||||||
| ↳ `name` | string | Status name |
|
| ↳ `name` | string | Status name |
|
||||||
|
| ↳ `displayName` | string | Display name |
|
||||||
| ↳ `description` | string | Status description |
|
| ↳ `description` | string | Status description |
|
||||||
| ↳ `color` | string | Status color \(hex\) |
|
| ↳ `color` | string | Status color \(hex\) |
|
||||||
| ↳ `position` | number | Position in list |
|
| ↳ `position` | number | Position in list |
|
||||||
| ↳ `type` | string | Status type \(active, inactive\) |
|
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
||||||
| ↳ `updatedAt` | string | Last updated timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
||||||
|
|
||||||
### `linear_update_customer_status`
|
### `linear_update_customer_status`
|
||||||
@@ -1647,8 +1589,8 @@ Update a customer status in Linear
|
|||||||
| `statusId` | string | Yes | Customer status ID to update |
|
| `statusId` | string | Yes | Customer status ID to update |
|
||||||
| `name` | string | No | Updated status name |
|
| `name` | string | No | Updated status name |
|
||||||
| `color` | string | No | Updated status color |
|
| `color` | string | No | Updated status color |
|
||||||
| `description` | string | No | Updated description |
|
|
||||||
| `displayName` | string | No | Updated display name |
|
| `displayName` | string | No | Updated display name |
|
||||||
|
| `description` | string | No | Updated description |
|
||||||
| `position` | number | No | Updated position |
|
| `position` | number | No | Updated position |
|
||||||
|
|
||||||
#### Output
|
#### Output
|
||||||
@@ -1656,15 +1598,6 @@ Update a customer status in Linear
|
|||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ---- | ----------- |
|
| --------- | ---- | ----------- |
|
||||||
| `customerStatus` | object | The updated customer status |
|
| `customerStatus` | object | The updated customer status |
|
||||||
| ↳ `id` | string | Customer status ID |
|
|
||||||
| ↳ `name` | string | Status name |
|
|
||||||
| ↳ `description` | string | Status description |
|
|
||||||
| ↳ `color` | string | Status color \(hex\) |
|
|
||||||
| ↳ `position` | number | Position in list |
|
|
||||||
| ↳ `type` | string | Status type \(active, inactive\) |
|
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `updatedAt` | string | Last updated timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
|
||||||
|
|
||||||
### `linear_delete_customer_status`
|
### `linear_delete_customer_status`
|
||||||
|
|
||||||
@@ -1690,25 +1623,19 @@ List all customer statuses in Linear
|
|||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description |
|
||||||
| --------- | ---- | -------- | ----------- |
|
| --------- | ---- | -------- | ----------- |
|
||||||
| `first` | number | No | Number of statuses to return \(default: 50\) |
|
|
||||||
| `after` | string | No | Cursor for pagination |
|
|
||||||
|
|
||||||
#### Output
|
#### Output
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ---- | ----------- |
|
| --------- | ---- | ----------- |
|
||||||
| `pageInfo` | object | Pagination information |
|
|
||||||
| ↳ `hasNextPage` | boolean | Whether there are more results |
|
|
||||||
| ↳ `endCursor` | string | Cursor for the next page |
|
|
||||||
| `customerStatuses` | array | List of customer statuses |
|
| `customerStatuses` | array | List of customer statuses |
|
||||||
| ↳ `id` | string | Customer status ID |
|
| ↳ `id` | string | Customer status ID |
|
||||||
| ↳ `name` | string | Status name |
|
| ↳ `name` | string | Status name |
|
||||||
|
| ↳ `displayName` | string | Display name |
|
||||||
| ↳ `description` | string | Status description |
|
| ↳ `description` | string | Status description |
|
||||||
| ↳ `color` | string | Status color \(hex\) |
|
| ↳ `color` | string | Status color \(hex\) |
|
||||||
| ↳ `position` | number | Position in list |
|
| ↳ `position` | number | Position in list |
|
||||||
| ↳ `type` | string | Status type \(active, inactive\) |
|
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
||||||
| ↳ `updatedAt` | string | Last updated timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
||||||
|
|
||||||
### `linear_create_customer_tier`
|
### `linear_create_customer_tier`
|
||||||
@@ -1784,16 +1711,11 @@ List all customer tiers in Linear
|
|||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description |
|
||||||
| --------- | ---- | -------- | ----------- |
|
| --------- | ---- | -------- | ----------- |
|
||||||
| `first` | number | No | Number of tiers to return \(default: 50\) |
|
|
||||||
| `after` | string | No | Cursor for pagination |
|
|
||||||
|
|
||||||
#### Output
|
#### Output
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ---- | ----------- |
|
| --------- | ---- | ----------- |
|
||||||
| `pageInfo` | object | Pagination information |
|
|
||||||
| ↳ `hasNextPage` | boolean | Whether there are more results |
|
|
||||||
| ↳ `endCursor` | string | Cursor for the next page |
|
|
||||||
| `customerTiers` | array | List of customer tiers |
|
| `customerTiers` | array | List of customer tiers |
|
||||||
| ↳ `id` | string | Customer tier ID |
|
| ↳ `id` | string | Customer tier ID |
|
||||||
| ↳ `name` | string | Tier name |
|
| ↳ `name` | string | Tier name |
|
||||||
@@ -1839,14 +1761,6 @@ Create a new project label in Linear
|
|||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ---- | ----------- |
|
| --------- | ---- | ----------- |
|
||||||
| `projectLabel` | object | The created project label |
|
| `projectLabel` | object | The created project label |
|
||||||
| ↳ `id` | string | Project label ID |
|
|
||||||
| ↳ `name` | string | Label name |
|
|
||||||
| ↳ `description` | string | Label description |
|
|
||||||
| ↳ `color` | string | Label color \(hex\) |
|
|
||||||
| ↳ `isGroup` | boolean | Whether this label is a group |
|
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
|
||||||
|
|
||||||
### `linear_update_project_label`
|
### `linear_update_project_label`
|
||||||
|
|
||||||
@@ -1866,14 +1780,6 @@ Update a project label in Linear
|
|||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ---- | ----------- |
|
| --------- | ---- | ----------- |
|
||||||
| `projectLabel` | object | The updated project label |
|
| `projectLabel` | object | The updated project label |
|
||||||
| ↳ `id` | string | Project label ID |
|
|
||||||
| ↳ `name` | string | Label name |
|
|
||||||
| ↳ `description` | string | Label description |
|
|
||||||
| ↳ `color` | string | Label color \(hex\) |
|
|
||||||
| ↳ `isGroup` | boolean | Whether this label is a group |
|
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
|
||||||
|
|
||||||
### `linear_delete_project_label`
|
### `linear_delete_project_label`
|
||||||
|
|
||||||
@@ -1900,25 +1806,12 @@ List all project labels in Linear
|
|||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description |
|
||||||
| --------- | ---- | -------- | ----------- |
|
| --------- | ---- | -------- | ----------- |
|
||||||
| `projectId` | string | No | Optional project ID to filter labels for a specific project |
|
| `projectId` | string | No | Optional project ID to filter labels for a specific project |
|
||||||
| `first` | number | No | Number of labels to return \(default: 50\) |
|
|
||||||
| `after` | string | No | Cursor for pagination |
|
|
||||||
|
|
||||||
#### Output
|
#### Output
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ---- | ----------- |
|
| --------- | ---- | ----------- |
|
||||||
| `pageInfo` | object | Pagination information |
|
|
||||||
| ↳ `hasNextPage` | boolean | Whether there are more results |
|
|
||||||
| ↳ `endCursor` | string | Cursor for the next page |
|
|
||||||
| `projectLabels` | array | List of project labels |
|
| `projectLabels` | array | List of project labels |
|
||||||
| ↳ `id` | string | Project label ID |
|
|
||||||
| ↳ `name` | string | Label name |
|
|
||||||
| ↳ `description` | string | Label description |
|
|
||||||
| ↳ `color` | string | Label color \(hex\) |
|
|
||||||
| ↳ `isGroup` | boolean | Whether this label is a group |
|
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `updatedAt` | string | Last update timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
|
||||||
|
|
||||||
### `linear_add_label_to_project`
|
### `linear_add_label_to_project`
|
||||||
|
|
||||||
@@ -1974,16 +1867,6 @@ Create a new project milestone in Linear
|
|||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ---- | ----------- |
|
| --------- | ---- | ----------- |
|
||||||
| `projectMilestone` | object | The created project milestone |
|
| `projectMilestone` | object | The created project milestone |
|
||||||
| ↳ `id` | string | Project milestone ID |
|
|
||||||
| ↳ `name` | string | Milestone name |
|
|
||||||
| ↳ `description` | string | Milestone description |
|
|
||||||
| ↳ `projectId` | string | Project ID |
|
|
||||||
| ↳ `targetDate` | string | Target date \(YYYY-MM-DD\) |
|
|
||||||
| ↳ `progress` | number | Progress percentage \(0-1\) |
|
|
||||||
| ↳ `sortOrder` | number | Sort order within the project |
|
|
||||||
| ↳ `status` | string | Milestone status \(done, next, overdue, unstarted\) |
|
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
|
||||||
|
|
||||||
### `linear_update_project_milestone`
|
### `linear_update_project_milestone`
|
||||||
|
|
||||||
@@ -2003,16 +1886,6 @@ Update a project milestone in Linear
|
|||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ---- | ----------- |
|
| --------- | ---- | ----------- |
|
||||||
| `projectMilestone` | object | The updated project milestone |
|
| `projectMilestone` | object | The updated project milestone |
|
||||||
| ↳ `id` | string | Project milestone ID |
|
|
||||||
| ↳ `name` | string | Milestone name |
|
|
||||||
| ↳ `description` | string | Milestone description |
|
|
||||||
| ↳ `projectId` | string | Project ID |
|
|
||||||
| ↳ `targetDate` | string | Target date \(YYYY-MM-DD\) |
|
|
||||||
| ↳ `progress` | number | Progress percentage \(0-1\) |
|
|
||||||
| ↳ `sortOrder` | number | Sort order within the project |
|
|
||||||
| ↳ `status` | string | Milestone status \(done, next, overdue, unstarted\) |
|
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
|
||||||
|
|
||||||
### `linear_delete_project_milestone`
|
### `linear_delete_project_milestone`
|
||||||
|
|
||||||
@@ -2039,27 +1912,12 @@ List all milestones for a project in Linear
|
|||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description |
|
||||||
| --------- | ---- | -------- | ----------- |
|
| --------- | ---- | -------- | ----------- |
|
||||||
| `projectId` | string | Yes | Project ID to list milestones for |
|
| `projectId` | string | Yes | Project ID to list milestones for |
|
||||||
| `first` | number | No | Number of milestones to return \(default: 50\) |
|
|
||||||
| `after` | string | No | Cursor for pagination |
|
|
||||||
|
|
||||||
#### Output
|
#### Output
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ---- | ----------- |
|
| --------- | ---- | ----------- |
|
||||||
| `pageInfo` | object | Pagination information |
|
|
||||||
| ↳ `hasNextPage` | boolean | Whether there are more results |
|
|
||||||
| ↳ `endCursor` | string | Cursor for the next page |
|
|
||||||
| `projectMilestones` | array | List of project milestones |
|
| `projectMilestones` | array | List of project milestones |
|
||||||
| ↳ `id` | string | Project milestone ID |
|
|
||||||
| ↳ `name` | string | Milestone name |
|
|
||||||
| ↳ `description` | string | Milestone description |
|
|
||||||
| ↳ `projectId` | string | Project ID |
|
|
||||||
| ↳ `targetDate` | string | Target date \(YYYY-MM-DD\) |
|
|
||||||
| ↳ `progress` | number | Progress percentage \(0-1\) |
|
|
||||||
| ↳ `sortOrder` | number | Sort order within the project |
|
|
||||||
| ↳ `status` | string | Milestone status \(done, next, overdue, unstarted\) |
|
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
|
||||||
|
|
||||||
### `linear_create_project_status`
|
### `linear_create_project_status`
|
||||||
|
|
||||||
@@ -2081,16 +1939,6 @@ Create a new project status in Linear
|
|||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ---- | ----------- |
|
| --------- | ---- | ----------- |
|
||||||
| `projectStatus` | object | The created project status |
|
| `projectStatus` | object | The created project status |
|
||||||
| ↳ `id` | string | Project status ID |
|
|
||||||
| ↳ `name` | string | Status name |
|
|
||||||
| ↳ `description` | string | Status description |
|
|
||||||
| ↳ `color` | string | Status color \(hex\) |
|
|
||||||
| ↳ `indefinite` | boolean | Whether this status is indefinite |
|
|
||||||
| ↳ `position` | number | Position in list |
|
|
||||||
| ↳ `type` | string | Status type \(backlog, planned, started, paused, completed, canceled\) |
|
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `updatedAt` | string | Last updated timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
|
||||||
|
|
||||||
### `linear_update_project_status`
|
### `linear_update_project_status`
|
||||||
|
|
||||||
@@ -2112,16 +1960,6 @@ Update a project status in Linear
|
|||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ---- | ----------- |
|
| --------- | ---- | ----------- |
|
||||||
| `projectStatus` | object | The updated project status |
|
| `projectStatus` | object | The updated project status |
|
||||||
| ↳ `id` | string | Project status ID |
|
|
||||||
| ↳ `name` | string | Status name |
|
|
||||||
| ↳ `description` | string | Status description |
|
|
||||||
| ↳ `color` | string | Status color \(hex\) |
|
|
||||||
| ↳ `indefinite` | boolean | Whether this status is indefinite |
|
|
||||||
| ↳ `position` | number | Position in list |
|
|
||||||
| ↳ `type` | string | Status type \(backlog, planned, started, paused, completed, canceled\) |
|
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `updatedAt` | string | Last updated timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
|
||||||
|
|
||||||
### `linear_delete_project_status`
|
### `linear_delete_project_status`
|
||||||
|
|
||||||
@@ -2147,26 +1985,11 @@ List all project statuses in Linear
|
|||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description |
|
||||||
| --------- | ---- | -------- | ----------- |
|
| --------- | ---- | -------- | ----------- |
|
||||||
| `first` | number | No | Number of statuses to return \(default: 50\) |
|
|
||||||
| `after` | string | No | Cursor for pagination |
|
|
||||||
|
|
||||||
#### Output
|
#### Output
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ---- | ----------- |
|
| --------- | ---- | ----------- |
|
||||||
| `pageInfo` | object | Pagination information |
|
|
||||||
| ↳ `hasNextPage` | boolean | Whether there are more results |
|
|
||||||
| ↳ `endCursor` | string | Cursor for the next page |
|
|
||||||
| `projectStatuses` | array | List of project statuses |
|
| `projectStatuses` | array | List of project statuses |
|
||||||
| ↳ `id` | string | Project status ID |
|
|
||||||
| ↳ `name` | string | Status name |
|
|
||||||
| ↳ `description` | string | Status description |
|
|
||||||
| ↳ `color` | string | Status color \(hex\) |
|
|
||||||
| ↳ `indefinite` | boolean | Whether this status is indefinite |
|
|
||||||
| ↳ `position` | number | Position in list |
|
|
||||||
| ↳ `type` | string | Status type \(backlog, planned, started, paused, completed, canceled\) |
|
|
||||||
| ↳ `createdAt` | string | Creation timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `updatedAt` | string | Last updated timestamp \(ISO 8601\) |
|
|
||||||
| ↳ `archivedAt` | string | Archive timestamp \(ISO 8601\) |
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ interface CredentialSelectorProps {
|
|||||||
disabled?: boolean
|
disabled?: boolean
|
||||||
isPreview?: boolean
|
isPreview?: boolean
|
||||||
previewValue?: any | null
|
previewValue?: any | null
|
||||||
previewContextValues?: Record<string, unknown>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function CredentialSelector({
|
export function CredentialSelector({
|
||||||
@@ -44,7 +43,6 @@ export function CredentialSelector({
|
|||||||
disabled = false,
|
disabled = false,
|
||||||
isPreview = false,
|
isPreview = false,
|
||||||
previewValue,
|
previewValue,
|
||||||
previewContextValues,
|
|
||||||
}: CredentialSelectorProps) {
|
}: CredentialSelectorProps) {
|
||||||
const [showOAuthModal, setShowOAuthModal] = useState(false)
|
const [showOAuthModal, setShowOAuthModal] = useState(false)
|
||||||
const [editingValue, setEditingValue] = useState('')
|
const [editingValue, setEditingValue] = useState('')
|
||||||
@@ -69,11 +67,7 @@ export function CredentialSelector({
|
|||||||
canUseCredentialSets
|
canUseCredentialSets
|
||||||
)
|
)
|
||||||
|
|
||||||
const { depsSatisfied, dependsOn } = useDependsOnGate(blockId, subBlock, {
|
const { depsSatisfied, dependsOn } = useDependsOnGate(blockId, subBlock, { disabled, isPreview })
|
||||||
disabled,
|
|
||||||
isPreview,
|
|
||||||
previewContextValues,
|
|
||||||
})
|
|
||||||
const hasDependencies = dependsOn.length > 0
|
const hasDependencies = dependsOn.length > 0
|
||||||
|
|
||||||
const effectiveDisabled = disabled || (hasDependencies && !depsSatisfied)
|
const effectiveDisabled = disabled || (hasDependencies && !depsSatisfied)
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { Tooltip } from '@/components/emcn'
|
|||||||
import { SelectorCombobox } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/selector-combobox/selector-combobox'
|
import { SelectorCombobox } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/selector-combobox/selector-combobox'
|
||||||
import { useDependsOnGate } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate'
|
import { useDependsOnGate } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate'
|
||||||
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
|
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
|
||||||
import { resolvePreviewContextValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/utils'
|
|
||||||
import type { SubBlockConfig } from '@/blocks/types'
|
import type { SubBlockConfig } from '@/blocks/types'
|
||||||
import type { SelectorContext } from '@/hooks/selectors/types'
|
import type { SelectorContext } from '@/hooks/selectors/types'
|
||||||
|
|
||||||
@@ -34,9 +33,7 @@ export function DocumentSelector({
|
|||||||
previewContextValues,
|
previewContextValues,
|
||||||
})
|
})
|
||||||
const [knowledgeBaseIdFromStore] = useSubBlockValue(blockId, 'knowledgeBaseId')
|
const [knowledgeBaseIdFromStore] = useSubBlockValue(blockId, 'knowledgeBaseId')
|
||||||
const knowledgeBaseIdValue = previewContextValues
|
const knowledgeBaseIdValue = previewContextValues?.knowledgeBaseId ?? knowledgeBaseIdFromStore
|
||||||
? resolvePreviewContextValue(previewContextValues.knowledgeBaseId)
|
|
||||||
: knowledgeBaseIdFromStore
|
|
||||||
const normalizedKnowledgeBaseId =
|
const normalizedKnowledgeBaseId =
|
||||||
typeof knowledgeBaseIdValue === 'string' && knowledgeBaseIdValue.trim().length > 0
|
typeof knowledgeBaseIdValue === 'string' && knowledgeBaseIdValue.trim().length > 0
|
||||||
? knowledgeBaseIdValue
|
? knowledgeBaseIdValue
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/
|
|||||||
import { TagDropdown } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown'
|
import { TagDropdown } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown'
|
||||||
import { useSubBlockInput } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-input'
|
import { useSubBlockInput } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-input'
|
||||||
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
|
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
|
||||||
import { resolvePreviewContextValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/utils'
|
|
||||||
import { useAccessibleReferencePrefixes } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-accessible-reference-prefixes'
|
import { useAccessibleReferencePrefixes } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-accessible-reference-prefixes'
|
||||||
import type { SubBlockConfig } from '@/blocks/types'
|
import type { SubBlockConfig } from '@/blocks/types'
|
||||||
import { useKnowledgeBaseTagDefinitions } from '@/hooks/kb/use-knowledge-base-tag-definitions'
|
import { useKnowledgeBaseTagDefinitions } from '@/hooks/kb/use-knowledge-base-tag-definitions'
|
||||||
@@ -78,9 +77,7 @@ export function DocumentTagEntry({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const [knowledgeBaseIdFromStore] = useSubBlockValue(blockId, 'knowledgeBaseId')
|
const [knowledgeBaseIdFromStore] = useSubBlockValue(blockId, 'knowledgeBaseId')
|
||||||
const knowledgeBaseIdValue = previewContextValues
|
const knowledgeBaseIdValue = previewContextValues?.knowledgeBaseId ?? knowledgeBaseIdFromStore
|
||||||
? resolvePreviewContextValue(previewContextValues.knowledgeBaseId)
|
|
||||||
: knowledgeBaseIdFromStore
|
|
||||||
const knowledgeBaseId =
|
const knowledgeBaseId =
|
||||||
typeof knowledgeBaseIdValue === 'string' && knowledgeBaseIdValue.trim().length > 0
|
typeof knowledgeBaseIdValue === 'string' && knowledgeBaseIdValue.trim().length > 0
|
||||||
? knowledgeBaseIdValue
|
? knowledgeBaseIdValue
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import { SelectorCombobox } from '@/app/workspace/[workspaceId]/w/[workflowId]/c
|
|||||||
import { useDependsOnGate } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate'
|
import { useDependsOnGate } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate'
|
||||||
import { useForeignCredential } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-foreign-credential'
|
import { useForeignCredential } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-foreign-credential'
|
||||||
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
|
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
|
||||||
import { resolvePreviewContextValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/utils'
|
|
||||||
import { getBlock } from '@/blocks/registry'
|
import { getBlock } from '@/blocks/registry'
|
||||||
import type { SubBlockConfig } from '@/blocks/types'
|
import type { SubBlockConfig } from '@/blocks/types'
|
||||||
import { isDependency } from '@/blocks/utils'
|
import { isDependency } from '@/blocks/utils'
|
||||||
@@ -63,56 +62,42 @@ export function FileSelectorInput({
|
|||||||
|
|
||||||
const [domainValueFromStore] = useSubBlockValue(blockId, 'domain')
|
const [domainValueFromStore] = useSubBlockValue(blockId, 'domain')
|
||||||
|
|
||||||
const connectedCredential = previewContextValues
|
const connectedCredential = previewContextValues?.credential ?? blockValues.credential
|
||||||
? resolvePreviewContextValue(previewContextValues.credential)
|
const domainValue = previewContextValues?.domain ?? domainValueFromStore
|
||||||
: blockValues.credential
|
|
||||||
const domainValue = previewContextValues
|
|
||||||
? resolvePreviewContextValue(previewContextValues.domain)
|
|
||||||
: domainValueFromStore
|
|
||||||
|
|
||||||
const teamIdValue = useMemo(
|
const teamIdValue = useMemo(
|
||||||
() =>
|
() =>
|
||||||
previewContextValues
|
previewContextValues?.teamId ??
|
||||||
? resolvePreviewContextValue(previewContextValues.teamId)
|
resolveDependencyValue('teamId', blockValues, canonicalIndex, canonicalModeOverrides),
|
||||||
: resolveDependencyValue('teamId', blockValues, canonicalIndex, canonicalModeOverrides),
|
[previewContextValues?.teamId, blockValues, canonicalIndex, canonicalModeOverrides]
|
||||||
[previewContextValues, blockValues, canonicalIndex, canonicalModeOverrides]
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const siteIdValue = useMemo(
|
const siteIdValue = useMemo(
|
||||||
() =>
|
() =>
|
||||||
previewContextValues
|
previewContextValues?.siteId ??
|
||||||
? resolvePreviewContextValue(previewContextValues.siteId)
|
resolveDependencyValue('siteId', blockValues, canonicalIndex, canonicalModeOverrides),
|
||||||
: resolveDependencyValue('siteId', blockValues, canonicalIndex, canonicalModeOverrides),
|
[previewContextValues?.siteId, blockValues, canonicalIndex, canonicalModeOverrides]
|
||||||
[previewContextValues, blockValues, canonicalIndex, canonicalModeOverrides]
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const collectionIdValue = useMemo(
|
const collectionIdValue = useMemo(
|
||||||
() =>
|
() =>
|
||||||
previewContextValues
|
previewContextValues?.collectionId ??
|
||||||
? resolvePreviewContextValue(previewContextValues.collectionId)
|
resolveDependencyValue('collectionId', blockValues, canonicalIndex, canonicalModeOverrides),
|
||||||
: resolveDependencyValue(
|
[previewContextValues?.collectionId, blockValues, canonicalIndex, canonicalModeOverrides]
|
||||||
'collectionId',
|
|
||||||
blockValues,
|
|
||||||
canonicalIndex,
|
|
||||||
canonicalModeOverrides
|
|
||||||
),
|
|
||||||
[previewContextValues, blockValues, canonicalIndex, canonicalModeOverrides]
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const projectIdValue = useMemo(
|
const projectIdValue = useMemo(
|
||||||
() =>
|
() =>
|
||||||
previewContextValues
|
previewContextValues?.projectId ??
|
||||||
? resolvePreviewContextValue(previewContextValues.projectId)
|
resolveDependencyValue('projectId', blockValues, canonicalIndex, canonicalModeOverrides),
|
||||||
: resolveDependencyValue('projectId', blockValues, canonicalIndex, canonicalModeOverrides),
|
[previewContextValues?.projectId, blockValues, canonicalIndex, canonicalModeOverrides]
|
||||||
[previewContextValues, blockValues, canonicalIndex, canonicalModeOverrides]
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const planIdValue = useMemo(
|
const planIdValue = useMemo(
|
||||||
() =>
|
() =>
|
||||||
previewContextValues
|
previewContextValues?.planId ??
|
||||||
? resolvePreviewContextValue(previewContextValues.planId)
|
resolveDependencyValue('planId', blockValues, canonicalIndex, canonicalModeOverrides),
|
||||||
: resolveDependencyValue('planId', blockValues, canonicalIndex, canonicalModeOverrides),
|
[previewContextValues?.planId, blockValues, canonicalIndex, canonicalModeOverrides]
|
||||||
[previewContextValues, blockValues, canonicalIndex, canonicalModeOverrides]
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const normalizedCredentialId =
|
const normalizedCredentialId =
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import { SelectorCombobox } from '@/app/workspace/[workspaceId]/w/[workflowId]/c
|
|||||||
import { useDependsOnGate } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate'
|
import { useDependsOnGate } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate'
|
||||||
import { useForeignCredential } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-foreign-credential'
|
import { useForeignCredential } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-foreign-credential'
|
||||||
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
|
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
|
||||||
import { resolvePreviewContextValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/utils'
|
|
||||||
import type { SubBlockConfig } from '@/blocks/types'
|
import type { SubBlockConfig } from '@/blocks/types'
|
||||||
import { resolveSelectorForSubBlock } from '@/hooks/selectors/resolution'
|
import { resolveSelectorForSubBlock } from '@/hooks/selectors/resolution'
|
||||||
import { useCollaborativeWorkflow } from '@/hooks/use-collaborative-workflow'
|
import { useCollaborativeWorkflow } from '@/hooks/use-collaborative-workflow'
|
||||||
@@ -18,7 +17,6 @@ interface FolderSelectorInputProps {
|
|||||||
disabled?: boolean
|
disabled?: boolean
|
||||||
isPreview?: boolean
|
isPreview?: boolean
|
||||||
previewValue?: any | null
|
previewValue?: any | null
|
||||||
previewContextValues?: Record<string, unknown>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function FolderSelectorInput({
|
export function FolderSelectorInput({
|
||||||
@@ -27,13 +25,9 @@ export function FolderSelectorInput({
|
|||||||
disabled = false,
|
disabled = false,
|
||||||
isPreview = false,
|
isPreview = false,
|
||||||
previewValue,
|
previewValue,
|
||||||
previewContextValues,
|
|
||||||
}: FolderSelectorInputProps) {
|
}: FolderSelectorInputProps) {
|
||||||
const [storeValue] = useSubBlockValue(blockId, subBlock.id)
|
const [storeValue] = useSubBlockValue(blockId, subBlock.id)
|
||||||
const [credentialFromStore] = useSubBlockValue(blockId, 'credential')
|
const [connectedCredential] = useSubBlockValue(blockId, 'credential')
|
||||||
const connectedCredential = previewContextValues
|
|
||||||
? resolvePreviewContextValue(previewContextValues.credential)
|
|
||||||
: credentialFromStore
|
|
||||||
const { collaborativeSetSubblockValue } = useCollaborativeWorkflow()
|
const { collaborativeSetSubblockValue } = useCollaborativeWorkflow()
|
||||||
const { activeWorkflowId } = useWorkflowRegistry()
|
const { activeWorkflowId } = useWorkflowRegistry()
|
||||||
const [selectedFolderId, setSelectedFolderId] = useState<string>('')
|
const [selectedFolderId, setSelectedFolderId] = useState<string>('')
|
||||||
@@ -53,11 +47,7 @@ export function FolderSelectorInput({
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Central dependsOn gating
|
// Central dependsOn gating
|
||||||
const { finalDisabled } = useDependsOnGate(blockId, subBlock, {
|
const { finalDisabled } = useDependsOnGate(blockId, subBlock, { disabled, isPreview })
|
||||||
disabled,
|
|
||||||
isPreview,
|
|
||||||
previewContextValues,
|
|
||||||
})
|
|
||||||
|
|
||||||
// Get the current value from the store or prop value if in preview mode
|
// Get the current value from the store or prop value if in preview mode
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/
|
|||||||
import { TagDropdown } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown'
|
import { TagDropdown } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown'
|
||||||
import { useSubBlockInput } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-input'
|
import { useSubBlockInput } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-input'
|
||||||
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
|
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
|
||||||
import { resolvePreviewContextValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/utils'
|
|
||||||
import { useAccessibleReferencePrefixes } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-accessible-reference-prefixes'
|
import { useAccessibleReferencePrefixes } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-accessible-reference-prefixes'
|
||||||
import { useWorkflowState } from '@/hooks/queries/workflows'
|
import { useWorkflowState } from '@/hooks/queries/workflows'
|
||||||
|
|
||||||
@@ -38,8 +37,6 @@ interface InputMappingProps {
|
|||||||
isPreview?: boolean
|
isPreview?: boolean
|
||||||
previewValue?: Record<string, unknown>
|
previewValue?: Record<string, unknown>
|
||||||
disabled?: boolean
|
disabled?: boolean
|
||||||
/** Sub-block values from the preview context for resolving sibling sub-block values */
|
|
||||||
previewContextValues?: Record<string, unknown>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -53,13 +50,9 @@ export function InputMapping({
|
|||||||
isPreview = false,
|
isPreview = false,
|
||||||
previewValue,
|
previewValue,
|
||||||
disabled = false,
|
disabled = false,
|
||||||
previewContextValues,
|
|
||||||
}: InputMappingProps) {
|
}: InputMappingProps) {
|
||||||
const [mapping, setMapping] = useSubBlockValue(blockId, subBlockId)
|
const [mapping, setMapping] = useSubBlockValue(blockId, subBlockId)
|
||||||
const [storeWorkflowId] = useSubBlockValue(blockId, 'workflowId')
|
const [selectedWorkflowId] = useSubBlockValue(blockId, 'workflowId')
|
||||||
const selectedWorkflowId = previewContextValues
|
|
||||||
? resolvePreviewContextValue(previewContextValues.workflowId)
|
|
||||||
: storeWorkflowId
|
|
||||||
|
|
||||||
const inputController = useSubBlockInput({
|
const inputController = useSubBlockInput({
|
||||||
blockId,
|
blockId,
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import { type FilterFieldType, getOperatorsForFieldType } from '@/lib/knowledge/
|
|||||||
import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text'
|
import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text'
|
||||||
import { TagDropdown } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown'
|
import { TagDropdown } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown'
|
||||||
import { useSubBlockInput } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-input'
|
import { useSubBlockInput } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-input'
|
||||||
import { resolvePreviewContextValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/utils'
|
|
||||||
import { useAccessibleReferencePrefixes } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-accessible-reference-prefixes'
|
import { useAccessibleReferencePrefixes } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-accessible-reference-prefixes'
|
||||||
import type { SubBlockConfig } from '@/blocks/types'
|
import type { SubBlockConfig } from '@/blocks/types'
|
||||||
import { useKnowledgeBaseTagDefinitions } from '@/hooks/kb/use-knowledge-base-tag-definitions'
|
import { useKnowledgeBaseTagDefinitions } from '@/hooks/kb/use-knowledge-base-tag-definitions'
|
||||||
@@ -70,9 +69,7 @@ export function KnowledgeTagFilters({
|
|||||||
const overlayRefs = useRef<Record<string, HTMLDivElement>>({})
|
const overlayRefs = useRef<Record<string, HTMLDivElement>>({})
|
||||||
|
|
||||||
const [knowledgeBaseIdFromStore] = useSubBlockValue(blockId, 'knowledgeBaseId')
|
const [knowledgeBaseIdFromStore] = useSubBlockValue(blockId, 'knowledgeBaseId')
|
||||||
const knowledgeBaseIdValue = previewContextValues
|
const knowledgeBaseIdValue = previewContextValues?.knowledgeBaseId ?? knowledgeBaseIdFromStore
|
||||||
? resolvePreviewContextValue(previewContextValues.knowledgeBaseId)
|
|
||||||
: knowledgeBaseIdFromStore
|
|
||||||
const knowledgeBaseId =
|
const knowledgeBaseId =
|
||||||
typeof knowledgeBaseIdValue === 'string' && knowledgeBaseIdValue.trim().length > 0
|
typeof knowledgeBaseIdValue === 'string' && knowledgeBaseIdValue.trim().length > 0
|
||||||
? knowledgeBaseIdValue
|
? knowledgeBaseIdValue
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import { cn } from '@/lib/core/utils/cn'
|
|||||||
import { LongInput } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/long-input/long-input'
|
import { LongInput } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/long-input/long-input'
|
||||||
import { ShortInput } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/short-input/short-input'
|
import { ShortInput } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/short-input/short-input'
|
||||||
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
|
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
|
||||||
import { resolvePreviewContextValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/utils'
|
|
||||||
import type { SubBlockConfig } from '@/blocks/types'
|
import type { SubBlockConfig } from '@/blocks/types'
|
||||||
import { useMcpTools } from '@/hooks/mcp/use-mcp-tools'
|
import { useMcpTools } from '@/hooks/mcp/use-mcp-tools'
|
||||||
import { formatParameterLabel } from '@/tools/params'
|
import { formatParameterLabel } from '@/tools/params'
|
||||||
@@ -19,7 +18,6 @@ interface McpDynamicArgsProps {
|
|||||||
disabled?: boolean
|
disabled?: boolean
|
||||||
isPreview?: boolean
|
isPreview?: boolean
|
||||||
previewValue?: any
|
previewValue?: any
|
||||||
previewContextValues?: Record<string, unknown>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -49,19 +47,12 @@ export function McpDynamicArgs({
|
|||||||
disabled = false,
|
disabled = false,
|
||||||
isPreview = false,
|
isPreview = false,
|
||||||
previewValue,
|
previewValue,
|
||||||
previewContextValues,
|
|
||||||
}: McpDynamicArgsProps) {
|
}: McpDynamicArgsProps) {
|
||||||
const params = useParams()
|
const params = useParams()
|
||||||
const workspaceId = params.workspaceId as string
|
const workspaceId = params.workspaceId as string
|
||||||
const { mcpTools, isLoading } = useMcpTools(workspaceId)
|
const { mcpTools, isLoading } = useMcpTools(workspaceId)
|
||||||
const [toolFromStore] = useSubBlockValue(blockId, 'tool')
|
const [selectedTool] = useSubBlockValue(blockId, 'tool')
|
||||||
const selectedTool = previewContextValues
|
const [cachedSchema] = useSubBlockValue(blockId, '_toolSchema')
|
||||||
? resolvePreviewContextValue(previewContextValues.tool)
|
|
||||||
: toolFromStore
|
|
||||||
const [schemaFromStore] = useSubBlockValue(blockId, '_toolSchema')
|
|
||||||
const cachedSchema = previewContextValues
|
|
||||||
? resolvePreviewContextValue(previewContextValues._toolSchema)
|
|
||||||
: schemaFromStore
|
|
||||||
const [toolArgs, setToolArgs] = useSubBlockValue(blockId, subBlockId)
|
const [toolArgs, setToolArgs] = useSubBlockValue(blockId, subBlockId)
|
||||||
|
|
||||||
const selectedToolConfig = mcpTools.find((tool) => tool.id === selectedTool)
|
const selectedToolConfig = mcpTools.find((tool) => tool.id === selectedTool)
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { useEffect, useMemo, useState } from 'react'
|
|||||||
import { useParams } from 'next/navigation'
|
import { useParams } from 'next/navigation'
|
||||||
import { Combobox } from '@/components/emcn/components'
|
import { Combobox } from '@/components/emcn/components'
|
||||||
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
|
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
|
||||||
import { resolvePreviewContextValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/utils'
|
|
||||||
import type { SubBlockConfig } from '@/blocks/types'
|
import type { SubBlockConfig } from '@/blocks/types'
|
||||||
import { useMcpTools } from '@/hooks/mcp/use-mcp-tools'
|
import { useMcpTools } from '@/hooks/mcp/use-mcp-tools'
|
||||||
|
|
||||||
@@ -14,7 +13,6 @@ interface McpToolSelectorProps {
|
|||||||
disabled?: boolean
|
disabled?: boolean
|
||||||
isPreview?: boolean
|
isPreview?: boolean
|
||||||
previewValue?: string | null
|
previewValue?: string | null
|
||||||
previewContextValues?: Record<string, unknown>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function McpToolSelector({
|
export function McpToolSelector({
|
||||||
@@ -23,7 +21,6 @@ export function McpToolSelector({
|
|||||||
disabled = false,
|
disabled = false,
|
||||||
isPreview = false,
|
isPreview = false,
|
||||||
previewValue,
|
previewValue,
|
||||||
previewContextValues,
|
|
||||||
}: McpToolSelectorProps) {
|
}: McpToolSelectorProps) {
|
||||||
const params = useParams()
|
const params = useParams()
|
||||||
const workspaceId = params.workspaceId as string
|
const workspaceId = params.workspaceId as string
|
||||||
@@ -34,10 +31,7 @@ export function McpToolSelector({
|
|||||||
const [storeValue, setStoreValue] = useSubBlockValue(blockId, subBlock.id)
|
const [storeValue, setStoreValue] = useSubBlockValue(blockId, subBlock.id)
|
||||||
const [, setSchemaCache] = useSubBlockValue(blockId, '_toolSchema')
|
const [, setSchemaCache] = useSubBlockValue(blockId, '_toolSchema')
|
||||||
|
|
||||||
const [serverFromStore] = useSubBlockValue(blockId, 'server')
|
const [serverValue] = useSubBlockValue(blockId, 'server')
|
||||||
const serverValue = previewContextValues
|
|
||||||
? resolvePreviewContextValue(previewContextValues.server)
|
|
||||||
: serverFromStore
|
|
||||||
|
|
||||||
const label = subBlock.placeholder || 'Select tool'
|
const label = subBlock.placeholder || 'Select tool'
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import { SelectorCombobox } from '@/app/workspace/[workspaceId]/w/[workflowId]/c
|
|||||||
import { useDependsOnGate } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate'
|
import { useDependsOnGate } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate'
|
||||||
import { useForeignCredential } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-foreign-credential'
|
import { useForeignCredential } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-foreign-credential'
|
||||||
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
|
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
|
||||||
import { resolvePreviewContextValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/utils'
|
|
||||||
import { getBlock } from '@/blocks/registry'
|
import { getBlock } from '@/blocks/registry'
|
||||||
import type { SubBlockConfig } from '@/blocks/types'
|
import type { SubBlockConfig } from '@/blocks/types'
|
||||||
import { resolveSelectorForSubBlock } from '@/hooks/selectors/resolution'
|
import { resolveSelectorForSubBlock } from '@/hooks/selectors/resolution'
|
||||||
@@ -56,19 +55,14 @@ export function ProjectSelectorInput({
|
|||||||
return (workflowValues as Record<string, Record<string, unknown>>)[blockId] || {}
|
return (workflowValues as Record<string, Record<string, unknown>>)[blockId] || {}
|
||||||
})
|
})
|
||||||
|
|
||||||
const connectedCredential = previewContextValues
|
const connectedCredential = previewContextValues?.credential ?? blockValues.credential
|
||||||
? resolvePreviewContextValue(previewContextValues.credential)
|
const jiraDomain = previewContextValues?.domain ?? jiraDomainFromStore
|
||||||
: blockValues.credential
|
|
||||||
const jiraDomain = previewContextValues
|
|
||||||
? resolvePreviewContextValue(previewContextValues.domain)
|
|
||||||
: jiraDomainFromStore
|
|
||||||
|
|
||||||
const linearTeamId = useMemo(
|
const linearTeamId = useMemo(
|
||||||
() =>
|
() =>
|
||||||
previewContextValues
|
previewContextValues?.teamId ??
|
||||||
? resolvePreviewContextValue(previewContextValues.teamId)
|
resolveDependencyValue('teamId', blockValues, canonicalIndex, canonicalModeOverrides),
|
||||||
: resolveDependencyValue('teamId', blockValues, canonicalIndex, canonicalModeOverrides),
|
[previewContextValues?.teamId, blockValues, canonicalIndex, canonicalModeOverrides]
|
||||||
[previewContextValues, blockValues, canonicalIndex, canonicalModeOverrides]
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const serviceId = subBlock.serviceId || ''
|
const serviceId = subBlock.serviceId || ''
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { buildCanonicalIndex, resolveDependencyValue } from '@/lib/workflows/sub
|
|||||||
import { SelectorCombobox } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/selector-combobox/selector-combobox'
|
import { SelectorCombobox } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/selector-combobox/selector-combobox'
|
||||||
import { useDependsOnGate } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate'
|
import { useDependsOnGate } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate'
|
||||||
import { useForeignCredential } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-foreign-credential'
|
import { useForeignCredential } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-foreign-credential'
|
||||||
import { resolvePreviewContextValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/utils'
|
|
||||||
import { getBlock } from '@/blocks/registry'
|
import { getBlock } from '@/blocks/registry'
|
||||||
import type { SubBlockConfig } from '@/blocks/types'
|
import type { SubBlockConfig } from '@/blocks/types'
|
||||||
import { resolveSelectorForSubBlock, type SelectorResolution } from '@/hooks/selectors/resolution'
|
import { resolveSelectorForSubBlock, type SelectorResolution } from '@/hooks/selectors/resolution'
|
||||||
@@ -67,12 +66,9 @@ export function SheetSelectorInput({
|
|||||||
[blockValues, canonicalIndex, canonicalModeOverrides]
|
[blockValues, canonicalIndex, canonicalModeOverrides]
|
||||||
)
|
)
|
||||||
|
|
||||||
const connectedCredential = previewContextValues
|
const connectedCredential = previewContextValues?.credential ?? connectedCredentialFromStore
|
||||||
? resolvePreviewContextValue(previewContextValues.credential)
|
|
||||||
: connectedCredentialFromStore
|
|
||||||
const spreadsheetId = previewContextValues
|
const spreadsheetId = previewContextValues
|
||||||
? (resolvePreviewContextValue(previewContextValues.spreadsheetId) ??
|
? (previewContextValues.spreadsheetId ?? previewContextValues.manualSpreadsheetId)
|
||||||
resolvePreviewContextValue(previewContextValues.manualSpreadsheetId))
|
|
||||||
: spreadsheetIdFromStore
|
: spreadsheetIdFromStore
|
||||||
|
|
||||||
const normalizedCredentialId =
|
const normalizedCredentialId =
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { SelectorCombobox } from '@/app/workspace/[workspaceId]/w/[workflowId]/c
|
|||||||
import { useDependsOnGate } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate'
|
import { useDependsOnGate } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate'
|
||||||
import { useForeignCredential } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-foreign-credential'
|
import { useForeignCredential } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-foreign-credential'
|
||||||
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
|
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
|
||||||
import { resolvePreviewContextValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/utils'
|
|
||||||
import type { SubBlockConfig } from '@/blocks/types'
|
import type { SubBlockConfig } from '@/blocks/types'
|
||||||
import type { SelectorContext, SelectorKey } from '@/hooks/selectors/types'
|
import type { SelectorContext, SelectorKey } from '@/hooks/selectors/types'
|
||||||
|
|
||||||
@@ -59,15 +58,9 @@ export function SlackSelectorInput({
|
|||||||
const [botToken] = useSubBlockValue(blockId, 'botToken')
|
const [botToken] = useSubBlockValue(blockId, 'botToken')
|
||||||
const [connectedCredential] = useSubBlockValue(blockId, 'credential')
|
const [connectedCredential] = useSubBlockValue(blockId, 'credential')
|
||||||
|
|
||||||
const effectiveAuthMethod = previewContextValues
|
const effectiveAuthMethod = previewContextValues?.authMethod ?? authMethod
|
||||||
? resolvePreviewContextValue(previewContextValues.authMethod)
|
const effectiveBotToken = previewContextValues?.botToken ?? botToken
|
||||||
: authMethod
|
const effectiveCredential = previewContextValues?.credential ?? connectedCredential
|
||||||
const effectiveBotToken = previewContextValues
|
|
||||||
? resolvePreviewContextValue(previewContextValues.botToken)
|
|
||||||
: botToken
|
|
||||||
const effectiveCredential = previewContextValues
|
|
||||||
? resolvePreviewContextValue(previewContextValues.credential)
|
|
||||||
: connectedCredential
|
|
||||||
const [_selectedValue, setSelectedValue] = useState<string | null>(null)
|
const [_selectedValue, setSelectedValue] = useState<string | null>(null)
|
||||||
|
|
||||||
const serviceId = subBlock.serviceId || ''
|
const serviceId = subBlock.serviceId || ''
|
||||||
|
|||||||
@@ -332,7 +332,6 @@ function FolderSelectorSyncWrapper({
|
|||||||
dependsOn: uiComponent.dependsOn,
|
dependsOn: uiComponent.dependsOn,
|
||||||
}}
|
}}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
previewContextValues={previewContextValues}
|
|
||||||
/>
|
/>
|
||||||
</GenericSyncWrapper>
|
</GenericSyncWrapper>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -785,7 +785,6 @@ function SubBlockComponent({
|
|||||||
disabled={isDisabled}
|
disabled={isDisabled}
|
||||||
isPreview={isPreview}
|
isPreview={isPreview}
|
||||||
previewValue={previewValue}
|
previewValue={previewValue}
|
||||||
previewContextValues={isPreview ? subBlockValues : undefined}
|
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -821,7 +820,6 @@ function SubBlockComponent({
|
|||||||
disabled={isDisabled}
|
disabled={isDisabled}
|
||||||
isPreview={isPreview}
|
isPreview={isPreview}
|
||||||
previewValue={previewValue}
|
previewValue={previewValue}
|
||||||
previewContextValues={isPreview ? subBlockValues : undefined}
|
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -833,7 +831,6 @@ function SubBlockComponent({
|
|||||||
disabled={isDisabled}
|
disabled={isDisabled}
|
||||||
isPreview={isPreview}
|
isPreview={isPreview}
|
||||||
previewValue={previewValue}
|
previewValue={previewValue}
|
||||||
previewContextValues={isPreview ? subBlockValues : undefined}
|
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -856,7 +853,6 @@ function SubBlockComponent({
|
|||||||
disabled={isDisabled}
|
disabled={isDisabled}
|
||||||
isPreview={isPreview}
|
isPreview={isPreview}
|
||||||
previewValue={previewValue as any}
|
previewValue={previewValue as any}
|
||||||
previewContextValues={isPreview ? subBlockValues : undefined}
|
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -868,7 +864,6 @@ function SubBlockComponent({
|
|||||||
disabled={isDisabled}
|
disabled={isDisabled}
|
||||||
isPreview={isPreview}
|
isPreview={isPreview}
|
||||||
previewValue={previewValue as any}
|
previewValue={previewValue as any}
|
||||||
previewContextValues={isPreview ? subBlockValues : undefined}
|
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -880,7 +875,6 @@ function SubBlockComponent({
|
|||||||
disabled={isDisabled}
|
disabled={isDisabled}
|
||||||
isPreview={isPreview}
|
isPreview={isPreview}
|
||||||
previewValue={previewValue as any}
|
previewValue={previewValue as any}
|
||||||
previewContextValues={isPreview ? subBlockValues : undefined}
|
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -905,7 +899,6 @@ function SubBlockComponent({
|
|||||||
isPreview={isPreview}
|
isPreview={isPreview}
|
||||||
previewValue={previewValue as any}
|
previewValue={previewValue as any}
|
||||||
disabled={isDisabled}
|
disabled={isDisabled}
|
||||||
previewContextValues={isPreview ? subBlockValues : undefined}
|
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -941,7 +934,6 @@ function SubBlockComponent({
|
|||||||
disabled={isDisabled}
|
disabled={isDisabled}
|
||||||
isPreview={isPreview}
|
isPreview={isPreview}
|
||||||
previewValue={previewValue}
|
previewValue={previewValue}
|
||||||
previewContextValues={isPreview ? subBlockValues : undefined}
|
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -975,7 +967,6 @@ function SubBlockComponent({
|
|||||||
disabled={isDisabled}
|
disabled={isDisabled}
|
||||||
isPreview={isPreview}
|
isPreview={isPreview}
|
||||||
previewValue={previewValue as any}
|
previewValue={previewValue as any}
|
||||||
previewContextValues={isPreview ? subBlockValues : undefined}
|
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -987,7 +978,6 @@ function SubBlockComponent({
|
|||||||
disabled={isDisabled}
|
disabled={isDisabled}
|
||||||
isPreview={isPreview}
|
isPreview={isPreview}
|
||||||
previewValue={previewValue}
|
previewValue={previewValue}
|
||||||
previewContextValues={isPreview ? subBlockValues : undefined}
|
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
/**
|
|
||||||
* Extracts the raw value from a preview context entry.
|
|
||||||
*
|
|
||||||
* @remarks
|
|
||||||
* In the sub-block preview context, values are wrapped as `{ value: T }` objects
|
|
||||||
* (the full sub-block state). In the tool-input preview context, values are already
|
|
||||||
* raw. This function normalizes both cases to return the underlying value.
|
|
||||||
*
|
|
||||||
* @param raw - The preview context entry, which may be a raw value or a `{ value: T }` wrapper
|
|
||||||
* @returns The unwrapped value, or `null` if the input is nullish
|
|
||||||
*/
|
|
||||||
export function resolvePreviewContextValue(raw: unknown): unknown {
|
|
||||||
if (raw === null || raw === undefined) return null
|
|
||||||
if (typeof raw === 'object' && !Array.isArray(raw) && 'value' in raw) {
|
|
||||||
return (raw as Record<string, unknown>).value ?? null
|
|
||||||
}
|
|
||||||
return raw
|
|
||||||
}
|
|
||||||
@@ -491,13 +491,6 @@ export function useWorkflowExecution() {
|
|||||||
updateActiveBlocks(data.blockId, false)
|
updateActiveBlocks(data.blockId, false)
|
||||||
setBlockRunStatus(data.blockId, 'error')
|
setBlockRunStatus(data.blockId, 'error')
|
||||||
|
|
||||||
executedBlockIds.add(data.blockId)
|
|
||||||
accumulatedBlockStates.set(data.blockId, {
|
|
||||||
output: { error: data.error },
|
|
||||||
executed: true,
|
|
||||||
executionTime: data.durationMs || 0,
|
|
||||||
})
|
|
||||||
|
|
||||||
accumulatedBlockLogs.push(
|
accumulatedBlockLogs.push(
|
||||||
createBlockLogEntry(data, { success: false, output: {}, error: data.error })
|
createBlockLogEntry(data, { success: false, output: {}, error: data.error })
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -784,12 +784,8 @@ function PreviewEditorContent({
|
|||||||
? childWorkflowSnapshotState
|
? childWorkflowSnapshotState
|
||||||
: childWorkflowState
|
: childWorkflowState
|
||||||
const resolvedIsLoadingChildWorkflow = isExecutionMode ? false : isLoadingChildWorkflow
|
const resolvedIsLoadingChildWorkflow = isExecutionMode ? false : isLoadingChildWorkflow
|
||||||
const isBlockNotExecuted = isExecutionMode && !executionData
|
|
||||||
const isMissingChildWorkflow =
|
const isMissingChildWorkflow =
|
||||||
Boolean(childWorkflowId) &&
|
Boolean(childWorkflowId) && !resolvedIsLoadingChildWorkflow && !resolvedChildWorkflowState
|
||||||
!isBlockNotExecuted &&
|
|
||||||
!resolvedIsLoadingChildWorkflow &&
|
|
||||||
!resolvedChildWorkflowState
|
|
||||||
|
|
||||||
/** Drills down into the child workflow or opens it in a new tab */
|
/** Drills down into the child workflow or opens it in a new tab */
|
||||||
const handleExpandChildWorkflow = useCallback(() => {
|
const handleExpandChildWorkflow = useCallback(() => {
|
||||||
@@ -1196,7 +1192,7 @@ function PreviewEditorContent({
|
|||||||
<div ref={subBlocksRef} className='subblocks-section flex flex-1 flex-col overflow-hidden'>
|
<div ref={subBlocksRef} className='subblocks-section flex flex-1 flex-col overflow-hidden'>
|
||||||
<div className='flex-1 overflow-y-auto overflow-x-hidden'>
|
<div className='flex-1 overflow-y-auto overflow-x-hidden'>
|
||||||
{/* Not Executed Banner - shown when in execution mode but block wasn't executed */}
|
{/* Not Executed Banner - shown when in execution mode but block wasn't executed */}
|
||||||
{isBlockNotExecuted && (
|
{isExecutionMode && !executionData && (
|
||||||
<div className='flex min-w-0 flex-col gap-[8px] overflow-hidden border-[var(--border)] border-b px-[12px] py-[10px]'>
|
<div className='flex min-w-0 flex-col gap-[8px] overflow-hidden border-[var(--border)] border-b px-[12px] py-[10px]'>
|
||||||
<div className='flex items-center justify-between'>
|
<div className='flex items-center justify-between'>
|
||||||
<Badge variant='gray-secondary' size='sm' dot>
|
<Badge variant='gray-secondary' size='sm' dot>
|
||||||
@@ -1423,11 +1419,9 @@ function PreviewEditorContent({
|
|||||||
) : (
|
) : (
|
||||||
<div className='flex h-full items-center justify-center bg-[var(--surface-3)]'>
|
<div className='flex h-full items-center justify-center bg-[var(--surface-3)]'>
|
||||||
<span className='text-[13px] text-[var(--text-tertiary)]'>
|
<span className='text-[13px] text-[var(--text-tertiary)]'>
|
||||||
{isBlockNotExecuted
|
{isMissingChildWorkflow
|
||||||
? 'Not Executed'
|
? DELETED_WORKFLOW_LABEL
|
||||||
: isMissingChildWorkflow
|
: 'Unable to load preview'}
|
||||||
? DELETED_WORKFLOW_LABEL
|
|
||||||
: 'Unable to load preview'}
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -349,15 +349,7 @@ export function PreviewWorkflow({
|
|||||||
if (block.type === 'loop' || block.type === 'parallel') {
|
if (block.type === 'loop' || block.type === 'parallel') {
|
||||||
const isSelected = selectedBlockId === blockId
|
const isSelected = selectedBlockId === blockId
|
||||||
const dimensions = calculateContainerDimensions(blockId, workflowState.blocks)
|
const dimensions = calculateContainerDimensions(blockId, workflowState.blocks)
|
||||||
|
const subflowExecutionStatus = getSubflowExecutionStatus(blockId)
|
||||||
// Check for direct error on the subflow block itself (e.g., loop resolution errors)
|
|
||||||
// before falling back to children-derived status
|
|
||||||
const directExecution = blockExecutionMap.get(blockId)
|
|
||||||
const subflowExecutionStatus: ExecutionStatus | undefined =
|
|
||||||
directExecution?.status === 'error'
|
|
||||||
? 'error'
|
|
||||||
: (getSubflowExecutionStatus(blockId) ??
|
|
||||||
(directExecution ? (directExecution.status as ExecutionStatus) : undefined))
|
|
||||||
|
|
||||||
nodeArray.push({
|
nodeArray.push({
|
||||||
id: blockId,
|
id: blockId,
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import { executeWorkflowCore } from '@/lib/workflows/executor/execution-core'
|
|||||||
import { PauseResumeManager } from '@/lib/workflows/executor/human-in-the-loop-manager'
|
import { PauseResumeManager } from '@/lib/workflows/executor/human-in-the-loop-manager'
|
||||||
import { loadDeployedWorkflowState } from '@/lib/workflows/persistence/utils'
|
import { loadDeployedWorkflowState } from '@/lib/workflows/persistence/utils'
|
||||||
import { getWorkflowById } from '@/lib/workflows/utils'
|
import { getWorkflowById } from '@/lib/workflows/utils'
|
||||||
import { getBlock } from '@/blocks'
|
|
||||||
import { ExecutionSnapshot } from '@/executor/execution/snapshot'
|
import { ExecutionSnapshot } from '@/executor/execution/snapshot'
|
||||||
import type { ExecutionMetadata } from '@/executor/execution/types'
|
import type { ExecutionMetadata } from '@/executor/execution/types'
|
||||||
import { hasExecutionResult } from '@/executor/utils/errors'
|
import { hasExecutionResult } from '@/executor/utils/errors'
|
||||||
@@ -75,21 +74,8 @@ async function processTriggerFileOutputs(
|
|||||||
logger.error(`[${context.requestId}] Error processing ${currentPath}:`, error)
|
logger.error(`[${context.requestId}] Error processing ${currentPath}:`, error)
|
||||||
processed[key] = val
|
processed[key] = val
|
||||||
}
|
}
|
||||||
} else if (
|
|
||||||
outputDef &&
|
|
||||||
typeof outputDef === 'object' &&
|
|
||||||
(outputDef.type === 'object' || outputDef.type === 'json') &&
|
|
||||||
outputDef.properties
|
|
||||||
) {
|
|
||||||
// Explicit object schema with properties - recurse into properties
|
|
||||||
processed[key] = await processTriggerFileOutputs(
|
|
||||||
val,
|
|
||||||
outputDef.properties,
|
|
||||||
context,
|
|
||||||
currentPath
|
|
||||||
)
|
|
||||||
} else if (outputDef && typeof outputDef === 'object' && !outputDef.type) {
|
} else if (outputDef && typeof outputDef === 'object' && !outputDef.type) {
|
||||||
// Nested object in schema (flat pattern) - recurse with the nested schema
|
// Nested object in schema - recurse with the nested schema
|
||||||
processed[key] = await processTriggerFileOutputs(val, outputDef, context, currentPath)
|
processed[key] = await processTriggerFileOutputs(val, outputDef, context, currentPath)
|
||||||
} else {
|
} else {
|
||||||
// Not a file output - keep as is
|
// Not a file output - keep as is
|
||||||
@@ -419,23 +405,11 @@ async function executeWebhookJobInternal(
|
|||||||
const rawSelectedTriggerId = triggerBlock?.subBlocks?.selectedTriggerId?.value
|
const rawSelectedTriggerId = triggerBlock?.subBlocks?.selectedTriggerId?.value
|
||||||
const rawTriggerId = triggerBlock?.subBlocks?.triggerId?.value
|
const rawTriggerId = triggerBlock?.subBlocks?.triggerId?.value
|
||||||
|
|
||||||
let resolvedTriggerId = [rawSelectedTriggerId, rawTriggerId].find(
|
const resolvedTriggerId = [rawSelectedTriggerId, rawTriggerId].find(
|
||||||
(candidate): candidate is string =>
|
(candidate): candidate is string =>
|
||||||
typeof candidate === 'string' && isTriggerValid(candidate)
|
typeof candidate === 'string' && isTriggerValid(candidate)
|
||||||
)
|
)
|
||||||
|
|
||||||
if (!resolvedTriggerId) {
|
|
||||||
const blockConfig = getBlock(triggerBlock.type)
|
|
||||||
if (blockConfig?.category === 'triggers' && isTriggerValid(triggerBlock.type)) {
|
|
||||||
resolvedTriggerId = triggerBlock.type
|
|
||||||
} else if (triggerBlock.triggerMode && blockConfig?.triggers?.enabled) {
|
|
||||||
const available = blockConfig.triggers?.available?.[0]
|
|
||||||
if (available && isTriggerValid(available)) {
|
|
||||||
resolvedTriggerId = available
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (resolvedTriggerId) {
|
if (resolvedTriggerId) {
|
||||||
const triggerConfig = getTrigger(resolvedTriggerId)
|
const triggerConfig = getTrigger(resolvedTriggerId)
|
||||||
|
|
||||||
|
|||||||
@@ -810,29 +810,7 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
|
|||||||
placeholder: 'Number of items to return (default: 50)',
|
placeholder: 'Number of items to return (default: 50)',
|
||||||
condition: {
|
condition: {
|
||||||
field: 'operation',
|
field: 'operation',
|
||||||
value: [
|
value: ['linear_list_favorites'],
|
||||||
'linear_read_issues',
|
|
||||||
'linear_search_issues',
|
|
||||||
'linear_list_comments',
|
|
||||||
'linear_list_projects',
|
|
||||||
'linear_list_users',
|
|
||||||
'linear_list_teams',
|
|
||||||
'linear_list_labels',
|
|
||||||
'linear_list_workflow_states',
|
|
||||||
'linear_list_cycles',
|
|
||||||
'linear_list_attachments',
|
|
||||||
'linear_list_issue_relations',
|
|
||||||
'linear_list_favorites',
|
|
||||||
'linear_list_project_updates',
|
|
||||||
'linear_list_notifications',
|
|
||||||
'linear_list_customer_statuses',
|
|
||||||
'linear_list_customer_tiers',
|
|
||||||
'linear_list_customers',
|
|
||||||
'linear_list_customer_requests',
|
|
||||||
'linear_list_project_labels',
|
|
||||||
'linear_list_project_milestones',
|
|
||||||
'linear_list_project_statuses',
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// Pagination - After (for list operations)
|
// Pagination - After (for list operations)
|
||||||
@@ -843,29 +821,7 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
|
|||||||
placeholder: 'Cursor for pagination',
|
placeholder: 'Cursor for pagination',
|
||||||
condition: {
|
condition: {
|
||||||
field: 'operation',
|
field: 'operation',
|
||||||
value: [
|
value: ['linear_list_favorites'],
|
||||||
'linear_read_issues',
|
|
||||||
'linear_search_issues',
|
|
||||||
'linear_list_comments',
|
|
||||||
'linear_list_projects',
|
|
||||||
'linear_list_users',
|
|
||||||
'linear_list_teams',
|
|
||||||
'linear_list_labels',
|
|
||||||
'linear_list_workflow_states',
|
|
||||||
'linear_list_cycles',
|
|
||||||
'linear_list_attachments',
|
|
||||||
'linear_list_issue_relations',
|
|
||||||
'linear_list_favorites',
|
|
||||||
'linear_list_project_updates',
|
|
||||||
'linear_list_notifications',
|
|
||||||
'linear_list_customers',
|
|
||||||
'linear_list_customer_requests',
|
|
||||||
'linear_list_customer_statuses',
|
|
||||||
'linear_list_customer_tiers',
|
|
||||||
'linear_list_project_labels',
|
|
||||||
'linear_list_project_milestones',
|
|
||||||
'linear_list_project_statuses',
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// Project health (for project updates)
|
// Project health (for project updates)
|
||||||
@@ -1097,6 +1053,28 @@ Return ONLY the description text - no explanations.`,
|
|||||||
value: ['linear_create_customer_request', 'linear_update_customer_request'],
|
value: ['linear_create_customer_request', 'linear_update_customer_request'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// Pagination - first
|
||||||
|
{
|
||||||
|
id: 'first',
|
||||||
|
title: 'Limit',
|
||||||
|
type: 'short-input',
|
||||||
|
placeholder: 'Number of items (default: 50)',
|
||||||
|
condition: {
|
||||||
|
field: 'operation',
|
||||||
|
value: ['linear_list_customers', 'linear_list_customer_requests'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// Pagination - after
|
||||||
|
{
|
||||||
|
id: 'after',
|
||||||
|
title: 'After Cursor',
|
||||||
|
type: 'short-input',
|
||||||
|
placeholder: 'Cursor for pagination',
|
||||||
|
condition: {
|
||||||
|
field: 'operation',
|
||||||
|
value: ['linear_list_customers', 'linear_list_customer_requests'],
|
||||||
|
},
|
||||||
|
},
|
||||||
// Customer ID for get/update/delete/merge operations
|
// Customer ID for get/update/delete/merge operations
|
||||||
{
|
{
|
||||||
id: 'customerIdTarget',
|
id: 'customerIdTarget',
|
||||||
@@ -1515,8 +1493,6 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
|
|||||||
teamId: effectiveTeamId || undefined,
|
teamId: effectiveTeamId || undefined,
|
||||||
projectId: effectiveProjectId || undefined,
|
projectId: effectiveProjectId || undefined,
|
||||||
includeArchived: params.includeArchived,
|
includeArchived: params.includeArchived,
|
||||||
first: params.first ? Number(params.first) : undefined,
|
|
||||||
after: params.after,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'linear_get_issue':
|
case 'linear_get_issue':
|
||||||
@@ -1582,8 +1558,6 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
|
|||||||
query: params.query.trim(),
|
query: params.query.trim(),
|
||||||
teamId: effectiveTeamId,
|
teamId: effectiveTeamId,
|
||||||
includeArchived: params.includeArchived,
|
includeArchived: params.includeArchived,
|
||||||
first: params.first ? Number(params.first) : undefined,
|
|
||||||
after: params.after,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'linear_add_label_to_issue':
|
case 'linear_add_label_to_issue':
|
||||||
@@ -1633,8 +1607,6 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
|
|||||||
return {
|
return {
|
||||||
...baseParams,
|
...baseParams,
|
||||||
issueId: params.issueId.trim(),
|
issueId: params.issueId.trim(),
|
||||||
first: params.first ? Number(params.first) : undefined,
|
|
||||||
after: params.after,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'linear_list_projects':
|
case 'linear_list_projects':
|
||||||
@@ -1642,8 +1614,6 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
|
|||||||
...baseParams,
|
...baseParams,
|
||||||
teamId: effectiveTeamId,
|
teamId: effectiveTeamId,
|
||||||
includeArchived: params.includeArchived,
|
includeArchived: params.includeArchived,
|
||||||
first: params.first ? Number(params.first) : undefined,
|
|
||||||
after: params.after,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'linear_get_project':
|
case 'linear_get_project':
|
||||||
@@ -1695,12 +1665,6 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
|
|||||||
|
|
||||||
case 'linear_list_users':
|
case 'linear_list_users':
|
||||||
case 'linear_list_teams':
|
case 'linear_list_teams':
|
||||||
return {
|
|
||||||
...baseParams,
|
|
||||||
first: params.first ? Number(params.first) : undefined,
|
|
||||||
after: params.after,
|
|
||||||
}
|
|
||||||
|
|
||||||
case 'linear_get_viewer':
|
case 'linear_get_viewer':
|
||||||
return baseParams
|
return baseParams
|
||||||
|
|
||||||
@@ -1708,8 +1672,6 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
|
|||||||
return {
|
return {
|
||||||
...baseParams,
|
...baseParams,
|
||||||
teamId: effectiveTeamId,
|
teamId: effectiveTeamId,
|
||||||
first: params.first ? Number(params.first) : undefined,
|
|
||||||
after: params.after,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'linear_create_label':
|
case 'linear_create_label':
|
||||||
@@ -1747,8 +1709,6 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
|
|||||||
return {
|
return {
|
||||||
...baseParams,
|
...baseParams,
|
||||||
teamId: effectiveTeamId,
|
teamId: effectiveTeamId,
|
||||||
first: params.first ? Number(params.first) : undefined,
|
|
||||||
after: params.after,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'linear_create_workflow_state':
|
case 'linear_create_workflow_state':
|
||||||
@@ -1778,8 +1738,6 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
|
|||||||
return {
|
return {
|
||||||
...baseParams,
|
...baseParams,
|
||||||
teamId: effectiveTeamId,
|
teamId: effectiveTeamId,
|
||||||
first: params.first ? Number(params.first) : undefined,
|
|
||||||
after: params.after,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'linear_get_cycle':
|
case 'linear_get_cycle':
|
||||||
@@ -1843,8 +1801,6 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
|
|||||||
return {
|
return {
|
||||||
...baseParams,
|
...baseParams,
|
||||||
issueId: params.issueId.trim(),
|
issueId: params.issueId.trim(),
|
||||||
first: params.first ? Number(params.first) : undefined,
|
|
||||||
after: params.after,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'linear_update_attachment':
|
case 'linear_update_attachment':
|
||||||
@@ -1884,8 +1840,6 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
|
|||||||
return {
|
return {
|
||||||
...baseParams,
|
...baseParams,
|
||||||
issueId: params.issueId.trim(),
|
issueId: params.issueId.trim(),
|
||||||
first: params.first ? Number(params.first) : undefined,
|
|
||||||
after: params.after,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'linear_delete_issue_relation':
|
case 'linear_delete_issue_relation':
|
||||||
@@ -1932,16 +1886,10 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
|
|||||||
return {
|
return {
|
||||||
...baseParams,
|
...baseParams,
|
||||||
projectId: effectiveProjectId,
|
projectId: effectiveProjectId,
|
||||||
first: params.first ? Number(params.first) : undefined,
|
|
||||||
after: params.after,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'linear_list_notifications':
|
case 'linear_list_notifications':
|
||||||
return {
|
return baseParams
|
||||||
...baseParams,
|
|
||||||
first: params.first ? Number(params.first) : undefined,
|
|
||||||
after: params.after,
|
|
||||||
}
|
|
||||||
|
|
||||||
case 'linear_update_notification':
|
case 'linear_update_notification':
|
||||||
if (!params.notificationId?.trim()) {
|
if (!params.notificationId?.trim()) {
|
||||||
@@ -2070,9 +2018,9 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
|
|||||||
return {
|
return {
|
||||||
...baseParams,
|
...baseParams,
|
||||||
name: params.statusName.trim(),
|
name: params.statusName.trim(),
|
||||||
|
displayName: params.statusDisplayName?.trim() || params.statusName.trim(),
|
||||||
color: params.statusColor.trim(),
|
color: params.statusColor.trim(),
|
||||||
description: params.statusDescription?.trim() || undefined,
|
description: params.statusDescription?.trim() || undefined,
|
||||||
displayName: params.statusDisplayName?.trim() || undefined,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'linear_update_customer_status':
|
case 'linear_update_customer_status':
|
||||||
@@ -2083,9 +2031,9 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
|
|||||||
...baseParams,
|
...baseParams,
|
||||||
statusId: params.statusId.trim(),
|
statusId: params.statusId.trim(),
|
||||||
name: params.statusName?.trim() || undefined,
|
name: params.statusName?.trim() || undefined,
|
||||||
|
displayName: params.statusDisplayName?.trim() || undefined,
|
||||||
color: params.statusColor?.trim() || undefined,
|
color: params.statusColor?.trim() || undefined,
|
||||||
description: params.statusDescription?.trim() || undefined,
|
description: params.statusDescription?.trim() || undefined,
|
||||||
displayName: params.statusDisplayName?.trim() || undefined,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'linear_delete_customer_status':
|
case 'linear_delete_customer_status':
|
||||||
@@ -2098,11 +2046,7 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
|
|||||||
}
|
}
|
||||||
|
|
||||||
case 'linear_list_customer_statuses':
|
case 'linear_list_customer_statuses':
|
||||||
return {
|
return baseParams
|
||||||
...baseParams,
|
|
||||||
first: params.first ? Number(params.first) : undefined,
|
|
||||||
after: params.after,
|
|
||||||
}
|
|
||||||
|
|
||||||
// Customer Tier Operations
|
// Customer Tier Operations
|
||||||
case 'linear_create_customer_tier':
|
case 'linear_create_customer_tier':
|
||||||
@@ -2140,11 +2084,7 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
|
|||||||
}
|
}
|
||||||
|
|
||||||
case 'linear_list_customer_tiers':
|
case 'linear_list_customer_tiers':
|
||||||
return {
|
return baseParams
|
||||||
...baseParams,
|
|
||||||
first: params.first ? Number(params.first) : undefined,
|
|
||||||
after: params.after,
|
|
||||||
}
|
|
||||||
|
|
||||||
// Project Management Operations
|
// Project Management Operations
|
||||||
case 'linear_delete_project':
|
case 'linear_delete_project':
|
||||||
@@ -2195,8 +2135,6 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
|
|||||||
return {
|
return {
|
||||||
...baseParams,
|
...baseParams,
|
||||||
projectId: effectiveProjectId || undefined,
|
projectId: effectiveProjectId || undefined,
|
||||||
first: params.first ? Number(params.first) : undefined,
|
|
||||||
after: params.after,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'linear_add_label_to_project':
|
case 'linear_add_label_to_project':
|
||||||
@@ -2260,8 +2198,6 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
|
|||||||
return {
|
return {
|
||||||
...baseParams,
|
...baseParams,
|
||||||
projectId: params.projectIdForMilestone.trim(),
|
projectId: params.projectIdForMilestone.trim(),
|
||||||
first: params.first ? Number(params.first) : undefined,
|
|
||||||
after: params.after,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Project Status Operations
|
// Project Status Operations
|
||||||
@@ -2309,11 +2245,7 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
|
|||||||
}
|
}
|
||||||
|
|
||||||
case 'linear_list_project_statuses':
|
case 'linear_list_project_statuses':
|
||||||
return {
|
return baseParams
|
||||||
...baseParams,
|
|
||||||
first: params.first ? Number(params.first) : undefined,
|
|
||||||
after: params.after,
|
|
||||||
}
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return baseParams
|
return baseParams
|
||||||
@@ -2389,9 +2321,9 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
|
|||||||
// Customer status and tier inputs
|
// Customer status and tier inputs
|
||||||
statusId: { type: 'string', description: 'Status identifier' },
|
statusId: { type: 'string', description: 'Status identifier' },
|
||||||
statusName: { type: 'string', description: 'Status name' },
|
statusName: { type: 'string', description: 'Status name' },
|
||||||
|
statusDisplayName: { type: 'string', description: 'Status display name' },
|
||||||
statusColor: { type: 'string', description: 'Status color in hex format' },
|
statusColor: { type: 'string', description: 'Status color in hex format' },
|
||||||
statusDescription: { type: 'string', description: 'Status description' },
|
statusDescription: { type: 'string', description: 'Status description' },
|
||||||
statusDisplayName: { type: 'string', description: 'Status display name' },
|
|
||||||
tierId: { type: 'string', description: 'Tier identifier' },
|
tierId: { type: 'string', description: 'Tier identifier' },
|
||||||
tierName: { type: 'string', description: 'Tier name' },
|
tierName: { type: 'string', description: 'Tier name' },
|
||||||
tierDisplayName: { type: 'string', description: 'Tier display name' },
|
tierDisplayName: { type: 'string', description: 'Tier display name' },
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ export const WorkflowBlock: BlockConfig = {
|
|||||||
outputs: {
|
outputs: {
|
||||||
success: { type: 'boolean', description: 'Execution success status' },
|
success: { type: 'boolean', description: 'Execution success status' },
|
||||||
childWorkflowName: { type: 'string', description: 'Child workflow name' },
|
childWorkflowName: { type: 'string', description: 'Child workflow name' },
|
||||||
childWorkflowId: { type: 'string', description: 'Child workflow ID' },
|
|
||||||
result: { type: 'json', description: 'Workflow execution result' },
|
result: { type: 'json', description: 'Workflow execution result' },
|
||||||
error: { type: 'string', description: 'Error message' },
|
error: { type: 'string', description: 'Error message' },
|
||||||
childTraceSpans: {
|
childTraceSpans: {
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ export const WorkflowInputBlock: BlockConfig = {
|
|||||||
outputs: {
|
outputs: {
|
||||||
success: { type: 'boolean', description: 'Execution success status' },
|
success: { type: 'boolean', description: 'Execution success status' },
|
||||||
childWorkflowName: { type: 'string', description: 'Child workflow name' },
|
childWorkflowName: { type: 'string', description: 'Child workflow name' },
|
||||||
childWorkflowId: { type: 'string', description: 'Child workflow ID' },
|
|
||||||
result: { type: 'json', description: 'Workflow execution result' },
|
result: { type: 'json', description: 'Workflow execution result' },
|
||||||
error: { type: 'string', description: 'Error message' },
|
error: { type: 'string', description: 'Error message' },
|
||||||
childTraceSpans: {
|
childTraceSpans: {
|
||||||
|
|||||||
@@ -2478,9 +2478,6 @@ describe('EdgeManager', () => {
|
|||||||
expect(readyNodes).toContain(otherBranchId)
|
expect(readyNodes).toContain(otherBranchId)
|
||||||
expect(readyNodes).not.toContain(sentinelStartId)
|
expect(readyNodes).not.toContain(sentinelStartId)
|
||||||
|
|
||||||
// sentinel_end should NOT be ready - it's on a fully deactivated path
|
|
||||||
expect(readyNodes).not.toContain(sentinelEndId)
|
|
||||||
|
|
||||||
// afterLoop should NOT be ready - its incoming edge from sentinel_end should be deactivated
|
// afterLoop should NOT be ready - its incoming edge from sentinel_end should be deactivated
|
||||||
expect(readyNodes).not.toContain(afterLoopId)
|
expect(readyNodes).not.toContain(afterLoopId)
|
||||||
|
|
||||||
@@ -2548,84 +2545,6 @@ describe('EdgeManager', () => {
|
|||||||
expect(edgeManager.isNodeReady(afterParallelNode)).toBe(true)
|
expect(edgeManager.isNodeReady(afterParallelNode)).toBe(true)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should not queue loop sentinel-end when upstream condition deactivates entire loop branch', () => {
|
|
||||||
// Regression test for: upstream condition → (if) → ... many blocks ... → sentinel_start → body → sentinel_end
|
|
||||||
// → (else) → exit_block
|
|
||||||
// When condition takes "else", the deep cascade deactivation should NOT queue sentinel_end.
|
|
||||||
// Previously, sentinel_end was flagged as a cascadeTarget (terminal control node) and
|
|
||||||
// spuriously queued, causing it to attempt loop scope initialization and fail.
|
|
||||||
|
|
||||||
const conditionId = 'condition'
|
|
||||||
const intermediateId = 'intermediate'
|
|
||||||
const sentinelStartId = 'sentinel-start'
|
|
||||||
const loopBodyId = 'loop-body'
|
|
||||||
const sentinelEndId = 'sentinel-end'
|
|
||||||
const afterLoopId = 'after-loop'
|
|
||||||
const exitBlockId = 'exit-block'
|
|
||||||
|
|
||||||
const conditionNode = createMockNode(conditionId, [
|
|
||||||
{ target: intermediateId, sourceHandle: 'condition-if' },
|
|
||||||
{ target: exitBlockId, sourceHandle: 'condition-else' },
|
|
||||||
])
|
|
||||||
|
|
||||||
const intermediateNode = createMockNode(
|
|
||||||
intermediateId,
|
|
||||||
[{ target: sentinelStartId }],
|
|
||||||
[conditionId]
|
|
||||||
)
|
|
||||||
|
|
||||||
const sentinelStartNode = createMockNode(
|
|
||||||
sentinelStartId,
|
|
||||||
[{ target: loopBodyId }],
|
|
||||||
[intermediateId]
|
|
||||||
)
|
|
||||||
|
|
||||||
const loopBodyNode = createMockNode(
|
|
||||||
loopBodyId,
|
|
||||||
[{ target: sentinelEndId }],
|
|
||||||
[sentinelStartId]
|
|
||||||
)
|
|
||||||
|
|
||||||
const sentinelEndNode = createMockNode(
|
|
||||||
sentinelEndId,
|
|
||||||
[
|
|
||||||
{ target: sentinelStartId, sourceHandle: 'loop_continue' },
|
|
||||||
{ target: afterLoopId, sourceHandle: 'loop_exit' },
|
|
||||||
],
|
|
||||||
[loopBodyId]
|
|
||||||
)
|
|
||||||
|
|
||||||
const afterLoopNode = createMockNode(afterLoopId, [], [sentinelEndId])
|
|
||||||
const exitBlockNode = createMockNode(exitBlockId, [], [conditionId])
|
|
||||||
|
|
||||||
const nodes = new Map<string, DAGNode>([
|
|
||||||
[conditionId, conditionNode],
|
|
||||||
[intermediateId, intermediateNode],
|
|
||||||
[sentinelStartId, sentinelStartNode],
|
|
||||||
[loopBodyId, loopBodyNode],
|
|
||||||
[sentinelEndId, sentinelEndNode],
|
|
||||||
[afterLoopId, afterLoopNode],
|
|
||||||
[exitBlockId, exitBlockNode],
|
|
||||||
])
|
|
||||||
|
|
||||||
const dag = createMockDAG(nodes)
|
|
||||||
const edgeManager = new EdgeManager(dag)
|
|
||||||
|
|
||||||
const readyNodes = edgeManager.processOutgoingEdges(conditionNode, {
|
|
||||||
selectedOption: 'else',
|
|
||||||
})
|
|
||||||
|
|
||||||
// Only exitBlock should be ready
|
|
||||||
expect(readyNodes).toContain(exitBlockId)
|
|
||||||
|
|
||||||
// Nothing on the deactivated path should be queued
|
|
||||||
expect(readyNodes).not.toContain(intermediateId)
|
|
||||||
expect(readyNodes).not.toContain(sentinelStartId)
|
|
||||||
expect(readyNodes).not.toContain(loopBodyId)
|
|
||||||
expect(readyNodes).not.toContain(sentinelEndId)
|
|
||||||
expect(readyNodes).not.toContain(afterLoopId)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should still correctly handle normal loop exit (not deactivate when loop runs)', () => {
|
it('should still correctly handle normal loop exit (not deactivate when loop runs)', () => {
|
||||||
// When a loop actually executes and exits normally, after_loop should become ready
|
// When a loop actually executes and exits normally, after_loop should become ready
|
||||||
const sentinelStartId = 'sentinel-start'
|
const sentinelStartId = 'sentinel-start'
|
||||||
|
|||||||
@@ -71,13 +71,7 @@ export class EdgeManager {
|
|||||||
|
|
||||||
for (const targetId of cascadeTargets) {
|
for (const targetId of cascadeTargets) {
|
||||||
if (!readyNodes.includes(targetId) && !activatedTargets.includes(targetId)) {
|
if (!readyNodes.includes(targetId) && !activatedTargets.includes(targetId)) {
|
||||||
// Only queue cascade terminal control nodes when ALL outgoing edges from the
|
if (this.isTargetReady(targetId)) {
|
||||||
// current node were deactivated (dead-end scenario). When some edges are
|
|
||||||
// activated, terminal control nodes on deactivated branches should NOT be
|
|
||||||
// queued - they will be reached through the normal activated path's completion.
|
|
||||||
// This prevents loop/parallel sentinels on fully deactivated paths (e.g., an
|
|
||||||
// upstream condition took a different branch) from being spuriously executed.
|
|
||||||
if (activatedTargets.length === 0 && this.isTargetReady(targetId)) {
|
|
||||||
readyNodes.push(targetId)
|
readyNodes.push(targetId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
import {
|
|
||||||
extractFieldsFromSchema,
|
|
||||||
parseResponseFormatSafely,
|
|
||||||
} from '@/lib/core/utils/response-format'
|
|
||||||
import { normalizeInputFormatValue } from '@/lib/workflows/input-format'
|
import { normalizeInputFormatValue } from '@/lib/workflows/input-format'
|
||||||
import { isTriggerBehavior, normalizeName } from '@/executor/constants'
|
import { isTriggerBehavior, normalizeName } from '@/executor/constants'
|
||||||
import type { ExecutionContext } from '@/executor/types'
|
import type { ExecutionContext } from '@/executor/types'
|
||||||
@@ -47,53 +43,23 @@ function getInputFormatFields(block: SerializedBlock): OutputSchema {
|
|||||||
const schema: OutputSchema = {}
|
const schema: OutputSchema = {}
|
||||||
for (const field of inputFormat) {
|
for (const field of inputFormat) {
|
||||||
if (!field.name) continue
|
if (!field.name) continue
|
||||||
schema[field.name] = { type: field.type || 'any' }
|
schema[field.name] = {
|
||||||
|
type: (field.type || 'any') as 'string' | 'number' | 'boolean' | 'object' | 'array' | 'any',
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return schema
|
return schema
|
||||||
}
|
}
|
||||||
|
|
||||||
function getEvaluatorMetricsSchema(block: SerializedBlock): OutputSchema | undefined {
|
|
||||||
if (block.metadata?.id !== 'evaluator') return undefined
|
|
||||||
|
|
||||||
const metrics = block.config?.params?.metrics
|
|
||||||
if (!Array.isArray(metrics) || metrics.length === 0) return undefined
|
|
||||||
|
|
||||||
const validMetrics = metrics.filter(
|
|
||||||
(m: { name?: string }) => m?.name && typeof m.name === 'string'
|
|
||||||
)
|
|
||||||
if (validMetrics.length === 0) return undefined
|
|
||||||
|
|
||||||
const schema: OutputSchema = { ...(block.outputs as OutputSchema) }
|
|
||||||
for (const metric of validMetrics) {
|
|
||||||
schema[metric.name.toLowerCase()] = { type: 'number' }
|
|
||||||
}
|
|
||||||
return schema
|
|
||||||
}
|
|
||||||
|
|
||||||
function getResponseFormatSchema(block: SerializedBlock): OutputSchema | undefined {
|
|
||||||
const responseFormatValue = block.config?.params?.responseFormat
|
|
||||||
if (!responseFormatValue) return undefined
|
|
||||||
|
|
||||||
const parsed = parseResponseFormatSafely(responseFormatValue, block.id)
|
|
||||||
if (!parsed) return undefined
|
|
||||||
|
|
||||||
const fields = extractFieldsFromSchema(parsed)
|
|
||||||
if (fields.length === 0) return undefined
|
|
||||||
|
|
||||||
const schema: OutputSchema = {}
|
|
||||||
for (const field of fields) {
|
|
||||||
schema[field.name] = { type: field.type || 'any' }
|
|
||||||
}
|
|
||||||
return schema
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getBlockSchema(
|
export function getBlockSchema(
|
||||||
block: SerializedBlock,
|
block: SerializedBlock,
|
||||||
toolConfig?: ToolConfig
|
toolConfig?: ToolConfig
|
||||||
): OutputSchema | undefined {
|
): OutputSchema | undefined {
|
||||||
const blockType = block.metadata?.id
|
const blockType = block.metadata?.id
|
||||||
|
|
||||||
|
// For blocks that expose inputFormat as outputs, always merge them
|
||||||
|
// This includes both triggers (start_trigger, generic_webhook) and
|
||||||
|
// non-triggers (starter, human_in_the_loop) that have inputFormat
|
||||||
if (
|
if (
|
||||||
blockType &&
|
blockType &&
|
||||||
BLOCKS_WITH_INPUT_FORMAT_OUTPUTS.includes(
|
BLOCKS_WITH_INPUT_FORMAT_OUTPUTS.includes(
|
||||||
@@ -108,16 +74,6 @@ export function getBlockSchema(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const evaluatorSchema = getEvaluatorMetricsSchema(block)
|
|
||||||
if (evaluatorSchema) {
|
|
||||||
return evaluatorSchema
|
|
||||||
}
|
|
||||||
|
|
||||||
const responseFormatSchema = getResponseFormatSchema(block)
|
|
||||||
if (responseFormatSchema) {
|
|
||||||
return responseFormatSchema
|
|
||||||
}
|
|
||||||
|
|
||||||
const isTrigger = isTriggerBehavior(block)
|
const isTrigger = isTriggerBehavior(block)
|
||||||
|
|
||||||
if (isTrigger && block.outputs && Object.keys(block.outputs).length > 0) {
|
if (isTrigger && block.outputs && Object.keys(block.outputs).length > 0) {
|
||||||
|
|||||||
@@ -33,25 +33,11 @@ export class SnapshotService implements ISnapshotService {
|
|||||||
|
|
||||||
const existingSnapshot = await this.getSnapshotByHash(workflowId, stateHash)
|
const existingSnapshot = await this.getSnapshotByHash(workflowId, stateHash)
|
||||||
if (existingSnapshot) {
|
if (existingSnapshot) {
|
||||||
let refreshedState: WorkflowState = existingSnapshot.stateData
|
|
||||||
try {
|
|
||||||
await db
|
|
||||||
.update(workflowExecutionSnapshots)
|
|
||||||
.set({ stateData: state })
|
|
||||||
.where(eq(workflowExecutionSnapshots.id, existingSnapshot.id))
|
|
||||||
refreshedState = state
|
|
||||||
} catch (error) {
|
|
||||||
logger.warn(
|
|
||||||
`Failed to refresh snapshot stateData for ${existingSnapshot.id}, continuing with existing data`,
|
|
||||||
error
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
logger.info(
|
logger.info(
|
||||||
`Reusing existing snapshot for workflow ${workflowId} (hash: ${stateHash.slice(0, 12)}...)`
|
`Reusing existing snapshot for workflow ${workflowId} (hash: ${stateHash.slice(0, 12)}...)`
|
||||||
)
|
)
|
||||||
return {
|
return {
|
||||||
snapshot: { ...existingSnapshot, stateData: refreshedState },
|
snapshot: existingSnapshot,
|
||||||
isNew: false,
|
isNew: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -527,113 +527,6 @@ export async function validateTwilioSignature(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const SLACK_FILE_HOSTS = new Set(['files.slack.com', 'files-pri.slack.com'])
|
|
||||||
const SLACK_MAX_FILE_SIZE = 50 * 1024 * 1024 // 50 MB
|
|
||||||
const SLACK_MAX_FILES = 10
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Downloads file attachments from Slack using the bot token.
|
|
||||||
* Returns files in the format expected by WebhookAttachmentProcessor:
|
|
||||||
* { name, data (base64 string), mimeType, size }
|
|
||||||
*
|
|
||||||
* Security:
|
|
||||||
* - Validates each url_private against allowlisted Slack file hosts
|
|
||||||
* - Uses validateUrlWithDNS + secureFetchWithPinnedIP to prevent SSRF
|
|
||||||
* - Enforces per-file size limit and max file count
|
|
||||||
*/
|
|
||||||
async function downloadSlackFiles(
|
|
||||||
rawFiles: any[],
|
|
||||||
botToken: string
|
|
||||||
): Promise<Array<{ name: string; data: string; mimeType: string; size: number }>> {
|
|
||||||
const filesToProcess = rawFiles.slice(0, SLACK_MAX_FILES)
|
|
||||||
const downloaded: Array<{ name: string; data: string; mimeType: string; size: number }> = []
|
|
||||||
|
|
||||||
for (const file of filesToProcess) {
|
|
||||||
const urlPrivate = file.url_private as string | undefined
|
|
||||||
if (!urlPrivate) {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate the URL points to a known Slack file host
|
|
||||||
let parsedUrl: URL
|
|
||||||
try {
|
|
||||||
parsedUrl = new URL(urlPrivate)
|
|
||||||
} catch {
|
|
||||||
logger.warn('Slack file has invalid url_private, skipping', { fileId: file.id })
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!SLACK_FILE_HOSTS.has(parsedUrl.hostname)) {
|
|
||||||
logger.warn('Slack file url_private points to unexpected host, skipping', {
|
|
||||||
fileId: file.id,
|
|
||||||
hostname: sanitizeUrlForLog(urlPrivate),
|
|
||||||
})
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
// Skip files that exceed the size limit
|
|
||||||
const reportedSize = Number(file.size) || 0
|
|
||||||
if (reportedSize > SLACK_MAX_FILE_SIZE) {
|
|
||||||
logger.warn('Slack file exceeds size limit, skipping', {
|
|
||||||
fileId: file.id,
|
|
||||||
size: reportedSize,
|
|
||||||
limit: SLACK_MAX_FILE_SIZE,
|
|
||||||
})
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
const urlValidation = await validateUrlWithDNS(urlPrivate, 'url_private')
|
|
||||||
if (!urlValidation.isValid) {
|
|
||||||
logger.warn('Slack file url_private failed DNS validation, skipping', {
|
|
||||||
fileId: file.id,
|
|
||||||
error: urlValidation.error,
|
|
||||||
})
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
const response = await secureFetchWithPinnedIP(urlPrivate, urlValidation.resolvedIP!, {
|
|
||||||
headers: { Authorization: `Bearer ${botToken}` },
|
|
||||||
})
|
|
||||||
|
|
||||||
if (!response.ok) {
|
|
||||||
logger.warn('Failed to download Slack file, skipping', {
|
|
||||||
fileId: file.id,
|
|
||||||
status: response.status,
|
|
||||||
})
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
const arrayBuffer = await response.arrayBuffer()
|
|
||||||
const buffer = Buffer.from(arrayBuffer)
|
|
||||||
|
|
||||||
// Verify the actual downloaded size doesn't exceed our limit
|
|
||||||
if (buffer.length > SLACK_MAX_FILE_SIZE) {
|
|
||||||
logger.warn('Downloaded Slack file exceeds size limit, skipping', {
|
|
||||||
fileId: file.id,
|
|
||||||
actualSize: buffer.length,
|
|
||||||
limit: SLACK_MAX_FILE_SIZE,
|
|
||||||
})
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
downloaded.push({
|
|
||||||
name: file.name || 'download',
|
|
||||||
data: buffer.toString('base64'),
|
|
||||||
mimeType: file.mimetype || 'application/octet-stream',
|
|
||||||
size: buffer.length,
|
|
||||||
})
|
|
||||||
} catch (error) {
|
|
||||||
logger.error('Error downloading Slack file, skipping', {
|
|
||||||
fileId: file.id,
|
|
||||||
error: error instanceof Error ? error.message : String(error),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return downloaded
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Format webhook input based on provider
|
* Format webhook input based on provider
|
||||||
*/
|
*/
|
||||||
@@ -894,44 +787,43 @@ export async function formatWebhookInput(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (foundWebhook.provider === 'slack') {
|
if (foundWebhook.provider === 'slack') {
|
||||||
const providerConfig = (foundWebhook.providerConfig as Record<string, any>) || {}
|
const event = body?.event
|
||||||
const botToken = providerConfig.botToken as string | undefined
|
|
||||||
const includeFiles = Boolean(providerConfig.includeFiles)
|
|
||||||
|
|
||||||
const rawEvent = body?.event
|
if (event && body?.type === 'event_callback') {
|
||||||
|
return {
|
||||||
if (!rawEvent) {
|
event: {
|
||||||
logger.warn('Unknown Slack event type', {
|
event_type: event.type || '',
|
||||||
type: body?.type,
|
channel: event.channel || '',
|
||||||
hasEvent: false,
|
channel_name: '',
|
||||||
bodyKeys: Object.keys(body || {}),
|
user: event.user || '',
|
||||||
})
|
user_name: '',
|
||||||
|
text: event.text || '',
|
||||||
|
timestamp: event.ts || event.event_ts || '',
|
||||||
|
thread_ts: event.thread_ts || '',
|
||||||
|
team_id: body.team_id || event.team || '',
|
||||||
|
event_id: body.event_id || '',
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const rawFiles: any[] = rawEvent?.files ?? []
|
logger.warn('Unknown Slack event type', {
|
||||||
const hasFiles = rawFiles.length > 0
|
type: body?.type,
|
||||||
|
hasEvent: !!body?.event,
|
||||||
let files: any[] = []
|
bodyKeys: Object.keys(body || {}),
|
||||||
if (hasFiles && includeFiles && botToken) {
|
})
|
||||||
files = await downloadSlackFiles(rawFiles, botToken)
|
|
||||||
} else if (hasFiles && includeFiles && !botToken) {
|
|
||||||
logger.warn('Slack message has files and includeFiles is enabled, but no bot token provided')
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
event: {
|
event: {
|
||||||
event_type: rawEvent?.type || body?.type || 'unknown',
|
event_type: body?.event?.type || body?.type || 'unknown',
|
||||||
channel: rawEvent?.channel || '',
|
channel: body?.event?.channel || '',
|
||||||
channel_name: '',
|
channel_name: '',
|
||||||
user: rawEvent?.user || '',
|
user: body?.event?.user || '',
|
||||||
user_name: '',
|
user_name: '',
|
||||||
text: rawEvent?.text || '',
|
text: body?.event?.text || '',
|
||||||
timestamp: rawEvent?.ts || rawEvent?.event_ts || '',
|
timestamp: body?.event?.ts || '',
|
||||||
thread_ts: rawEvent?.thread_ts || '',
|
thread_ts: body?.event?.thread_ts || '',
|
||||||
team_id: body?.team_id || rawEvent?.team || '',
|
team_id: body?.team_id || '',
|
||||||
event_id: body?.event_id || '',
|
event_id: body?.event_id || '',
|
||||||
hasFiles,
|
|
||||||
files,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,12 +131,8 @@ export const linearCreateCustomerTool: ToolConfig<
|
|||||||
domains
|
domains
|
||||||
externalIds
|
externalIds
|
||||||
logoUrl
|
logoUrl
|
||||||
slugId
|
|
||||||
approximateNeedCount
|
approximateNeedCount
|
||||||
revenue
|
|
||||||
size
|
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
|
||||||
archivedAt
|
archivedAt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,18 +32,18 @@ export const linearCreateCustomerStatusTool: ToolConfig<
|
|||||||
visibility: 'user-or-llm',
|
visibility: 'user-or-llm',
|
||||||
description: 'Status color (hex code)',
|
description: 'Status color (hex code)',
|
||||||
},
|
},
|
||||||
description: {
|
|
||||||
type: 'string',
|
|
||||||
required: false,
|
|
||||||
visibility: 'user-or-llm',
|
|
||||||
description: 'Status description',
|
|
||||||
},
|
|
||||||
displayName: {
|
displayName: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
required: false,
|
required: false,
|
||||||
visibility: 'user-or-llm',
|
visibility: 'user-or-llm',
|
||||||
description: 'Display name for the status',
|
description: 'Display name for the status',
|
||||||
},
|
},
|
||||||
|
description: {
|
||||||
|
type: 'string',
|
||||||
|
required: false,
|
||||||
|
visibility: 'user-or-llm',
|
||||||
|
description: 'Status description',
|
||||||
|
},
|
||||||
position: {
|
position: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
required: false,
|
required: false,
|
||||||
@@ -70,12 +70,12 @@ export const linearCreateCustomerStatusTool: ToolConfig<
|
|||||||
color: params.color,
|
color: params.color,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.description != null && params.description !== '') {
|
|
||||||
input.description = params.description
|
|
||||||
}
|
|
||||||
if (params.displayName != null && params.displayName !== '') {
|
if (params.displayName != null && params.displayName !== '') {
|
||||||
input.displayName = params.displayName
|
input.displayName = params.displayName
|
||||||
}
|
}
|
||||||
|
if (params.description != null && params.description !== '') {
|
||||||
|
input.description = params.description
|
||||||
|
}
|
||||||
if (params.position != null) {
|
if (params.position != null) {
|
||||||
input.position = params.position
|
input.position = params.position
|
||||||
}
|
}
|
||||||
@@ -88,12 +88,11 @@ export const linearCreateCustomerStatusTool: ToolConfig<
|
|||||||
status {
|
status {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
|
displayName
|
||||||
description
|
description
|
||||||
color
|
color
|
||||||
position
|
position
|
||||||
type
|
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
|
||||||
archivedAt
|
archivedAt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { LinearCreateCycleParams, LinearCreateCycleResponse } from '@/tools/linear/types'
|
import type { LinearCreateCycleParams, LinearCreateCycleResponse } from '@/tools/linear/types'
|
||||||
import { CYCLE_FULL_OUTPUT_PROPERTIES } from '@/tools/linear/types'
|
|
||||||
import type { ToolConfig } from '@/tools/types'
|
import type { ToolConfig } from '@/tools/types'
|
||||||
|
|
||||||
export const linearCreateCycleTool: ToolConfig<LinearCreateCycleParams, LinearCreateCycleResponse> =
|
export const linearCreateCycleTool: ToolConfig<LinearCreateCycleParams, LinearCreateCycleResponse> =
|
||||||
@@ -73,9 +72,7 @@ export const linearCreateCycleTool: ToolConfig<LinearCreateCycleParams, LinearCr
|
|||||||
name
|
name
|
||||||
startsAt
|
startsAt
|
||||||
endsAt
|
endsAt
|
||||||
completedAt
|
|
||||||
progress
|
progress
|
||||||
createdAt
|
|
||||||
team {
|
team {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
@@ -123,7 +120,14 @@ export const linearCreateCycleTool: ToolConfig<LinearCreateCycleParams, LinearCr
|
|||||||
cycle: {
|
cycle: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
description: 'The created cycle',
|
description: 'The created cycle',
|
||||||
properties: CYCLE_FULL_OUTPUT_PROPERTIES,
|
properties: {
|
||||||
|
id: { type: 'string', description: 'Cycle ID' },
|
||||||
|
number: { type: 'number', description: 'Cycle number' },
|
||||||
|
name: { type: 'string', description: 'Cycle name' },
|
||||||
|
startsAt: { type: 'string', description: 'Start date' },
|
||||||
|
endsAt: { type: 'string', description: 'End date' },
|
||||||
|
team: { type: 'object', description: 'Team this cycle belongs to' },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,10 +73,6 @@ export const linearCreateLabelTool: ToolConfig<LinearCreateLabelParams, LinearCr
|
|||||||
name
|
name
|
||||||
color
|
color
|
||||||
description
|
description
|
||||||
isGroup
|
|
||||||
createdAt
|
|
||||||
updatedAt
|
|
||||||
archivedAt
|
|
||||||
team {
|
team {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import type {
|
|||||||
LinearCreateProjectLabelParams,
|
LinearCreateProjectLabelParams,
|
||||||
LinearCreateProjectLabelResponse,
|
LinearCreateProjectLabelResponse,
|
||||||
} from '@/tools/linear/types'
|
} from '@/tools/linear/types'
|
||||||
import { PROJECT_LABEL_OUTPUT_PROPERTIES } from '@/tools/linear/types'
|
|
||||||
import type { ToolConfig } from '@/tools/types'
|
import type { ToolConfig } from '@/tools/types'
|
||||||
|
|
||||||
export const linearCreateProjectLabelTool: ToolConfig<
|
export const linearCreateProjectLabelTool: ToolConfig<
|
||||||
@@ -94,7 +93,6 @@ export const linearCreateProjectLabelTool: ToolConfig<
|
|||||||
color
|
color
|
||||||
isGroup
|
isGroup
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
|
||||||
archivedAt
|
archivedAt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,7 +137,6 @@ export const linearCreateProjectLabelTool: ToolConfig<
|
|||||||
projectLabel: {
|
projectLabel: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
description: 'The created project label',
|
description: 'The created project label',
|
||||||
properties: PROJECT_LABEL_OUTPUT_PROPERTIES,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import type {
|
|||||||
LinearCreateProjectMilestoneParams,
|
LinearCreateProjectMilestoneParams,
|
||||||
LinearCreateProjectMilestoneResponse,
|
LinearCreateProjectMilestoneResponse,
|
||||||
} from '@/tools/linear/types'
|
} from '@/tools/linear/types'
|
||||||
import { PROJECT_MILESTONE_OUTPUT_PROPERTIES } from '@/tools/linear/types'
|
|
||||||
import type { ToolConfig } from '@/tools/types'
|
import type { ToolConfig } from '@/tools/types'
|
||||||
|
|
||||||
export const linearCreateProjectMilestoneTool: ToolConfig<
|
export const linearCreateProjectMilestoneTool: ToolConfig<
|
||||||
@@ -80,15 +79,10 @@ export const linearCreateProjectMilestoneTool: ToolConfig<
|
|||||||
id
|
id
|
||||||
name
|
name
|
||||||
description
|
description
|
||||||
|
projectId
|
||||||
targetDate
|
targetDate
|
||||||
progress
|
|
||||||
sortOrder
|
|
||||||
status
|
|
||||||
createdAt
|
createdAt
|
||||||
archivedAt
|
archivedAt
|
||||||
project {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -120,15 +114,10 @@ export const linearCreateProjectMilestoneTool: ToolConfig<
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const milestone = result.projectMilestone
|
|
||||||
return {
|
return {
|
||||||
success: true,
|
success: true,
|
||||||
output: {
|
output: {
|
||||||
projectMilestone: {
|
projectMilestone: result.projectMilestone,
|
||||||
...milestone,
|
|
||||||
projectId: milestone.project?.id ?? null,
|
|
||||||
project: undefined,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -137,7 +126,6 @@ export const linearCreateProjectMilestoneTool: ToolConfig<
|
|||||||
projectMilestone: {
|
projectMilestone: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
description: 'The created project milestone',
|
description: 'The created project milestone',
|
||||||
properties: PROJECT_MILESTONE_OUTPUT_PROPERTIES,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import type {
|
|||||||
LinearCreateProjectStatusParams,
|
LinearCreateProjectStatusParams,
|
||||||
LinearCreateProjectStatusResponse,
|
LinearCreateProjectStatusResponse,
|
||||||
} from '@/tools/linear/types'
|
} from '@/tools/linear/types'
|
||||||
import { PROJECT_STATUS_OUTPUT_PROPERTIES } from '@/tools/linear/types'
|
|
||||||
import type { ToolConfig } from '@/tools/types'
|
import type { ToolConfig } from '@/tools/types'
|
||||||
|
|
||||||
export const linearCreateProjectStatusTool: ToolConfig<
|
export const linearCreateProjectStatusTool: ToolConfig<
|
||||||
@@ -98,9 +97,7 @@ export const linearCreateProjectStatusTool: ToolConfig<
|
|||||||
color
|
color
|
||||||
indefinite
|
indefinite
|
||||||
position
|
position
|
||||||
type
|
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
|
||||||
archivedAt
|
archivedAt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -145,7 +142,6 @@ export const linearCreateProjectStatusTool: ToolConfig<
|
|||||||
projectStatus: {
|
projectStatus: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
description: 'The created project status',
|
description: 'The created project status',
|
||||||
properties: PROJECT_STATUS_OUTPUT_PROPERTIES,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import type {
|
|||||||
LinearCreateWorkflowStateParams,
|
LinearCreateWorkflowStateParams,
|
||||||
LinearCreateWorkflowStateResponse,
|
LinearCreateWorkflowStateResponse,
|
||||||
} from '@/tools/linear/types'
|
} from '@/tools/linear/types'
|
||||||
import { WORKFLOW_STATE_OUTPUT_PROPERTIES } from '@/tools/linear/types'
|
|
||||||
import type { ToolConfig } from '@/tools/types'
|
import type { ToolConfig } from '@/tools/types'
|
||||||
|
|
||||||
export const linearCreateWorkflowStateTool: ToolConfig<
|
export const linearCreateWorkflowStateTool: ToolConfig<
|
||||||
@@ -95,13 +94,9 @@ export const linearCreateWorkflowStateTool: ToolConfig<
|
|||||||
workflowState {
|
workflowState {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
description
|
|
||||||
type
|
type
|
||||||
color
|
color
|
||||||
position
|
position
|
||||||
createdAt
|
|
||||||
updatedAt
|
|
||||||
archivedAt
|
|
||||||
team {
|
team {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
@@ -149,7 +144,14 @@ export const linearCreateWorkflowStateTool: ToolConfig<
|
|||||||
state: {
|
state: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
description: 'The created workflow state',
|
description: 'The created workflow state',
|
||||||
properties: WORKFLOW_STATE_OUTPUT_PROPERTIES,
|
properties: {
|
||||||
|
id: { type: 'string', description: 'State ID' },
|
||||||
|
name: { type: 'string', description: 'State name' },
|
||||||
|
type: { type: 'string', description: 'State type' },
|
||||||
|
color: { type: 'string', description: 'State color' },
|
||||||
|
position: { type: 'number', description: 'State position' },
|
||||||
|
team: { type: 'object', description: 'Team this state belongs to' },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { LinearGetActiveCycleParams, LinearGetActiveCycleResponse } from '@/tools/linear/types'
|
import type { LinearGetActiveCycleParams, LinearGetActiveCycleResponse } from '@/tools/linear/types'
|
||||||
import { CYCLE_FULL_OUTPUT_PROPERTIES } from '@/tools/linear/types'
|
|
||||||
import type { ToolConfig } from '@/tools/types'
|
import type { ToolConfig } from '@/tools/types'
|
||||||
|
|
||||||
export const linearGetActiveCycleTool: ToolConfig<
|
export const linearGetActiveCycleTool: ToolConfig<
|
||||||
@@ -49,7 +48,6 @@ export const linearGetActiveCycleTool: ToolConfig<
|
|||||||
endsAt
|
endsAt
|
||||||
completedAt
|
completedAt
|
||||||
progress
|
progress
|
||||||
createdAt
|
|
||||||
team {
|
team {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
@@ -95,7 +93,15 @@ export const linearGetActiveCycleTool: ToolConfig<
|
|||||||
cycle: {
|
cycle: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
description: 'The active cycle (null if no active cycle)',
|
description: 'The active cycle (null if no active cycle)',
|
||||||
properties: CYCLE_FULL_OUTPUT_PROPERTIES,
|
properties: {
|
||||||
|
id: { type: 'string', description: 'Cycle ID' },
|
||||||
|
number: { type: 'number', description: 'Cycle number' },
|
||||||
|
name: { type: 'string', description: 'Cycle name' },
|
||||||
|
startsAt: { type: 'string', description: 'Start date' },
|
||||||
|
endsAt: { type: 'string', description: 'End date' },
|
||||||
|
progress: { type: 'number', description: 'Progress percentage' },
|
||||||
|
team: { type: 'object', description: 'Team this cycle belongs to' },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,12 +44,8 @@ export const linearGetCustomerTool: ToolConfig<LinearGetCustomerParams, LinearGe
|
|||||||
domains
|
domains
|
||||||
externalIds
|
externalIds
|
||||||
logoUrl
|
logoUrl
|
||||||
slugId
|
|
||||||
approximateNeedCount
|
approximateNeedCount
|
||||||
revenue
|
|
||||||
size
|
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
|
||||||
archivedAt
|
archivedAt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ export const linearGetCycleTool: ToolConfig<LinearGetCycleParams, LinearGetCycle
|
|||||||
endsAt
|
endsAt
|
||||||
completedAt
|
completedAt
|
||||||
progress
|
progress
|
||||||
createdAt
|
|
||||||
team {
|
team {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ export const linearListCustomerRequestsTool: ToolConfig<
|
|||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
variables: {
|
variables: {
|
||||||
first: params.first ? Number(params.first) : 50,
|
first: params.first || 50,
|
||||||
after: params.after,
|
after: params.after,
|
||||||
includeArchived: params.includeArchived || false,
|
includeArchived: params.includeArchived || false,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import type {
|
|||||||
LinearListCustomerStatusesParams,
|
LinearListCustomerStatusesParams,
|
||||||
LinearListCustomerStatusesResponse,
|
LinearListCustomerStatusesResponse,
|
||||||
} from '@/tools/linear/types'
|
} from '@/tools/linear/types'
|
||||||
import { CUSTOMER_STATUS_OUTPUT_PROPERTIES, PAGE_INFO_OUTPUT } from '@/tools/linear/types'
|
import { CUSTOMER_STATUS_OUTPUT_PROPERTIES } from '@/tools/linear/types'
|
||||||
import type { ToolConfig } from '@/tools/types'
|
import type { ToolConfig } from '@/tools/types'
|
||||||
|
|
||||||
export const linearListCustomerStatusesTool: ToolConfig<
|
export const linearListCustomerStatusesTool: ToolConfig<
|
||||||
@@ -19,20 +19,7 @@ export const linearListCustomerStatusesTool: ToolConfig<
|
|||||||
provider: 'linear',
|
provider: 'linear',
|
||||||
},
|
},
|
||||||
|
|
||||||
params: {
|
params: {},
|
||||||
first: {
|
|
||||||
type: 'number',
|
|
||||||
required: false,
|
|
||||||
visibility: 'user-or-llm',
|
|
||||||
description: 'Number of statuses to return (default: 50)',
|
|
||||||
},
|
|
||||||
after: {
|
|
||||||
type: 'string',
|
|
||||||
required: false,
|
|
||||||
visibility: 'user-or-llm',
|
|
||||||
description: 'Cursor for pagination',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
request: {
|
request: {
|
||||||
url: 'https://api.linear.app/graphql',
|
url: 'https://api.linear.app/graphql',
|
||||||
@@ -46,32 +33,23 @@ export const linearListCustomerStatusesTool: ToolConfig<
|
|||||||
Authorization: `Bearer ${params.accessToken}`,
|
Authorization: `Bearer ${params.accessToken}`,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
body: (params) => ({
|
body: () => ({
|
||||||
query: `
|
query: `
|
||||||
query CustomerStatuses($first: Int, $after: String) {
|
query CustomerStatuses {
|
||||||
customerStatuses(first: $first, after: $after) {
|
customerStatuses {
|
||||||
nodes {
|
nodes {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
|
displayName
|
||||||
description
|
description
|
||||||
color
|
color
|
||||||
position
|
position
|
||||||
type
|
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
|
||||||
archivedAt
|
archivedAt
|
||||||
}
|
}
|
||||||
pageInfo {
|
|
||||||
hasNextPage
|
|
||||||
endCursor
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
variables: {
|
|
||||||
first: params.first ? Number(params.first) : 50,
|
|
||||||
after: params.after,
|
|
||||||
},
|
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -86,15 +64,10 @@ export const linearListCustomerStatusesTool: ToolConfig<
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = data.data.customerStatuses
|
|
||||||
return {
|
return {
|
||||||
success: true,
|
success: true,
|
||||||
output: {
|
output: {
|
||||||
customerStatuses: result.nodes,
|
customerStatuses: data.data.customerStatuses.nodes,
|
||||||
pageInfo: {
|
|
||||||
hasNextPage: result.pageInfo.hasNextPage,
|
|
||||||
endCursor: result.pageInfo.endCursor,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -108,6 +81,5 @@ export const linearListCustomerStatusesTool: ToolConfig<
|
|||||||
properties: CUSTOMER_STATUS_OUTPUT_PROPERTIES,
|
properties: CUSTOMER_STATUS_OUTPUT_PROPERTIES,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
pageInfo: PAGE_INFO_OUTPUT,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import type {
|
|||||||
LinearListCustomerTiersParams,
|
LinearListCustomerTiersParams,
|
||||||
LinearListCustomerTiersResponse,
|
LinearListCustomerTiersResponse,
|
||||||
} from '@/tools/linear/types'
|
} from '@/tools/linear/types'
|
||||||
import { CUSTOMER_TIER_OUTPUT_PROPERTIES, PAGE_INFO_OUTPUT } from '@/tools/linear/types'
|
import { CUSTOMER_TIER_OUTPUT_PROPERTIES } from '@/tools/linear/types'
|
||||||
import type { ToolConfig } from '@/tools/types'
|
import type { ToolConfig } from '@/tools/types'
|
||||||
|
|
||||||
export const linearListCustomerTiersTool: ToolConfig<
|
export const linearListCustomerTiersTool: ToolConfig<
|
||||||
@@ -19,20 +19,7 @@ export const linearListCustomerTiersTool: ToolConfig<
|
|||||||
provider: 'linear',
|
provider: 'linear',
|
||||||
},
|
},
|
||||||
|
|
||||||
params: {
|
params: {},
|
||||||
first: {
|
|
||||||
type: 'number',
|
|
||||||
required: false,
|
|
||||||
visibility: 'user-or-llm',
|
|
||||||
description: 'Number of tiers to return (default: 50)',
|
|
||||||
},
|
|
||||||
after: {
|
|
||||||
type: 'string',
|
|
||||||
required: false,
|
|
||||||
visibility: 'user-or-llm',
|
|
||||||
description: 'Cursor for pagination',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
request: {
|
request: {
|
||||||
url: 'https://api.linear.app/graphql',
|
url: 'https://api.linear.app/graphql',
|
||||||
@@ -46,10 +33,10 @@ export const linearListCustomerTiersTool: ToolConfig<
|
|||||||
Authorization: `Bearer ${params.accessToken}`,
|
Authorization: `Bearer ${params.accessToken}`,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
body: (params) => ({
|
body: () => ({
|
||||||
query: `
|
query: `
|
||||||
query CustomerTiers($first: Int, $after: String) {
|
query CustomerTiers {
|
||||||
customerTiers(first: $first, after: $after) {
|
customerTiers {
|
||||||
nodes {
|
nodes {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
@@ -60,17 +47,9 @@ export const linearListCustomerTiersTool: ToolConfig<
|
|||||||
createdAt
|
createdAt
|
||||||
archivedAt
|
archivedAt
|
||||||
}
|
}
|
||||||
pageInfo {
|
|
||||||
hasNextPage
|
|
||||||
endCursor
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
variables: {
|
|
||||||
first: params.first ? Number(params.first) : 50,
|
|
||||||
after: params.after,
|
|
||||||
},
|
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -85,15 +64,10 @@ export const linearListCustomerTiersTool: ToolConfig<
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = data.data.customerTiers
|
|
||||||
return {
|
return {
|
||||||
success: true,
|
success: true,
|
||||||
output: {
|
output: {
|
||||||
customerTiers: result.nodes,
|
customerTiers: data.data.customerTiers.nodes,
|
||||||
pageInfo: {
|
|
||||||
hasNextPage: result.pageInfo.hasNextPage,
|
|
||||||
endCursor: result.pageInfo.endCursor,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -107,6 +81,5 @@ export const linearListCustomerTiersTool: ToolConfig<
|
|||||||
properties: CUSTOMER_TIER_OUTPUT_PROPERTIES,
|
properties: CUSTOMER_TIER_OUTPUT_PROPERTIES,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
pageInfo: PAGE_INFO_OUTPUT,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,12 +59,8 @@ export const linearListCustomersTool: ToolConfig<
|
|||||||
domains
|
domains
|
||||||
externalIds
|
externalIds
|
||||||
logoUrl
|
logoUrl
|
||||||
slugId
|
|
||||||
approximateNeedCount
|
approximateNeedCount
|
||||||
revenue
|
|
||||||
size
|
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
|
||||||
archivedAt
|
archivedAt
|
||||||
}
|
}
|
||||||
pageInfo {
|
pageInfo {
|
||||||
@@ -75,7 +71,7 @@ export const linearListCustomersTool: ToolConfig<
|
|||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
variables: {
|
variables: {
|
||||||
first: params.first ? Number(params.first) : 50,
|
first: params.first || 50,
|
||||||
after: params.after,
|
after: params.after,
|
||||||
includeArchived: params.includeArchived || false,
|
includeArchived: params.includeArchived || false,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ export const linearListCyclesTool: ToolConfig<LinearListCyclesParams, LinearList
|
|||||||
endsAt
|
endsAt
|
||||||
completedAt
|
completedAt
|
||||||
progress
|
progress
|
||||||
createdAt
|
|
||||||
team {
|
team {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
|
|||||||
@@ -61,10 +61,6 @@ export const linearListLabelsTool: ToolConfig<LinearListLabelsParams, LinearList
|
|||||||
name
|
name
|
||||||
color
|
color
|
||||||
description
|
description
|
||||||
isGroup
|
|
||||||
createdAt
|
|
||||||
updatedAt
|
|
||||||
archivedAt
|
|
||||||
team {
|
team {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import type {
|
|||||||
LinearListProjectLabelsParams,
|
LinearListProjectLabelsParams,
|
||||||
LinearListProjectLabelsResponse,
|
LinearListProjectLabelsResponse,
|
||||||
} from '@/tools/linear/types'
|
} from '@/tools/linear/types'
|
||||||
import { PAGE_INFO_OUTPUT, PROJECT_LABEL_OUTPUT_PROPERTIES } from '@/tools/linear/types'
|
|
||||||
import type { ToolConfig } from '@/tools/types'
|
import type { ToolConfig } from '@/tools/types'
|
||||||
|
|
||||||
export const linearListProjectLabelsTool: ToolConfig<
|
export const linearListProjectLabelsTool: ToolConfig<
|
||||||
@@ -26,18 +25,6 @@ export const linearListProjectLabelsTool: ToolConfig<
|
|||||||
visibility: 'user-or-llm',
|
visibility: 'user-or-llm',
|
||||||
description: 'Optional project ID to filter labels for a specific project',
|
description: 'Optional project ID to filter labels for a specific project',
|
||||||
},
|
},
|
||||||
first: {
|
|
||||||
type: 'number',
|
|
||||||
required: false,
|
|
||||||
visibility: 'user-or-llm',
|
|
||||||
description: 'Number of labels to return (default: 50)',
|
|
||||||
},
|
|
||||||
after: {
|
|
||||||
type: 'string',
|
|
||||||
required: false,
|
|
||||||
visibility: 'user-or-llm',
|
|
||||||
description: 'Cursor for pagination',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
request: {
|
request: {
|
||||||
@@ -53,14 +40,15 @@ export const linearListProjectLabelsTool: ToolConfig<
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
body: (params) => {
|
body: (params) => {
|
||||||
|
// If projectId is provided, query the specific project's labels
|
||||||
if (params.projectId?.trim()) {
|
if (params.projectId?.trim()) {
|
||||||
return {
|
return {
|
||||||
query: `
|
query: `
|
||||||
query ProjectWithLabels($id: String!, $first: Int, $after: String) {
|
query ProjectWithLabels($id: String!) {
|
||||||
project(id: $id) {
|
project(id: $id) {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
labels(first: $first, after: $after) {
|
labels {
|
||||||
nodes {
|
nodes {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
@@ -68,29 +56,23 @@ export const linearListProjectLabelsTool: ToolConfig<
|
|||||||
color
|
color
|
||||||
isGroup
|
isGroup
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
|
||||||
archivedAt
|
archivedAt
|
||||||
}
|
}
|
||||||
pageInfo {
|
|
||||||
hasNextPage
|
|
||||||
endCursor
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
variables: {
|
variables: {
|
||||||
id: params.projectId.trim(),
|
id: params.projectId.trim(),
|
||||||
first: params.first ? Number(params.first) : 50,
|
|
||||||
after: params.after,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Otherwise, list all project labels
|
||||||
return {
|
return {
|
||||||
query: `
|
query: `
|
||||||
query ProjectLabels($first: Int, $after: String) {
|
query ProjectLabels {
|
||||||
projectLabels(first: $first, after: $after) {
|
projectLabels {
|
||||||
nodes {
|
nodes {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
@@ -98,20 +80,11 @@ export const linearListProjectLabelsTool: ToolConfig<
|
|||||||
color
|
color
|
||||||
isGroup
|
isGroup
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
|
||||||
archivedAt
|
archivedAt
|
||||||
}
|
}
|
||||||
pageInfo {
|
|
||||||
hasNextPage
|
|
||||||
endCursor
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
variables: {
|
|
||||||
first: params.first ? Number(params.first) : 50,
|
|
||||||
after: params.after,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -127,29 +100,21 @@ export const linearListProjectLabelsTool: ToolConfig<
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Handle project-specific query response
|
||||||
if (data.data.project) {
|
if (data.data.project) {
|
||||||
const result = data.data.project.labels
|
|
||||||
return {
|
return {
|
||||||
success: true,
|
success: true,
|
||||||
output: {
|
output: {
|
||||||
projectLabels: result.nodes,
|
projectLabels: data.data.project.labels.nodes,
|
||||||
pageInfo: {
|
|
||||||
hasNextPage: result.pageInfo.hasNextPage,
|
|
||||||
endCursor: result.pageInfo.endCursor,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = data.data.projectLabels
|
// Handle global projectLabels query response
|
||||||
return {
|
return {
|
||||||
success: true,
|
success: true,
|
||||||
output: {
|
output: {
|
||||||
projectLabels: result.nodes,
|
projectLabels: data.data.projectLabels.nodes,
|
||||||
pageInfo: {
|
|
||||||
hasNextPage: result.pageInfo.hasNextPage,
|
|
||||||
endCursor: result.pageInfo.endCursor,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -158,11 +123,6 @@ export const linearListProjectLabelsTool: ToolConfig<
|
|||||||
projectLabels: {
|
projectLabels: {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
description: 'List of project labels',
|
description: 'List of project labels',
|
||||||
items: {
|
|
||||||
type: 'object',
|
|
||||||
properties: PROJECT_LABEL_OUTPUT_PROPERTIES,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
pageInfo: PAGE_INFO_OUTPUT,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import type {
|
|||||||
LinearListProjectMilestonesParams,
|
LinearListProjectMilestonesParams,
|
||||||
LinearListProjectMilestonesResponse,
|
LinearListProjectMilestonesResponse,
|
||||||
} from '@/tools/linear/types'
|
} from '@/tools/linear/types'
|
||||||
import { PAGE_INFO_OUTPUT, PROJECT_MILESTONE_OUTPUT_PROPERTIES } from '@/tools/linear/types'
|
|
||||||
import type { ToolConfig } from '@/tools/types'
|
import type { ToolConfig } from '@/tools/types'
|
||||||
|
|
||||||
export const linearListProjectMilestonesTool: ToolConfig<
|
export const linearListProjectMilestonesTool: ToolConfig<
|
||||||
@@ -26,18 +25,6 @@ export const linearListProjectMilestonesTool: ToolConfig<
|
|||||||
visibility: 'user-or-llm',
|
visibility: 'user-or-llm',
|
||||||
description: 'Project ID to list milestones for',
|
description: 'Project ID to list milestones for',
|
||||||
},
|
},
|
||||||
first: {
|
|
||||||
type: 'number',
|
|
||||||
required: false,
|
|
||||||
visibility: 'user-or-llm',
|
|
||||||
description: 'Number of milestones to return (default: 50)',
|
|
||||||
},
|
|
||||||
after: {
|
|
||||||
type: 'string',
|
|
||||||
required: false,
|
|
||||||
visibility: 'user-or-llm',
|
|
||||||
description: 'Cursor for pagination',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
request: {
|
request: {
|
||||||
@@ -54,26 +41,17 @@ export const linearListProjectMilestonesTool: ToolConfig<
|
|||||||
},
|
},
|
||||||
body: (params) => ({
|
body: (params) => ({
|
||||||
query: `
|
query: `
|
||||||
query Project($id: String!, $first: Int, $after: String) {
|
query Project($id: String!) {
|
||||||
project(id: $id) {
|
project(id: $id) {
|
||||||
projectMilestones(first: $first, after: $after) {
|
projectMilestones {
|
||||||
nodes {
|
nodes {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
description
|
description
|
||||||
|
projectId
|
||||||
targetDate
|
targetDate
|
||||||
progress
|
|
||||||
sortOrder
|
|
||||||
status
|
|
||||||
createdAt
|
createdAt
|
||||||
archivedAt
|
archivedAt
|
||||||
project {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pageInfo {
|
|
||||||
hasNextPage
|
|
||||||
endCursor
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -81,8 +59,6 @@ export const linearListProjectMilestonesTool: ToolConfig<
|
|||||||
`,
|
`,
|
||||||
variables: {
|
variables: {
|
||||||
id: params.projectId,
|
id: params.projectId,
|
||||||
first: params.first ? Number(params.first) : 50,
|
|
||||||
after: params.after,
|
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
@@ -98,20 +74,10 @@ export const linearListProjectMilestonesTool: ToolConfig<
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = data.data.project?.projectMilestones
|
|
||||||
const milestones = (result?.nodes || []).map((node: Record<string, unknown>) => ({
|
|
||||||
...node,
|
|
||||||
projectId: (node.project as Record<string, string>)?.id ?? null,
|
|
||||||
project: undefined,
|
|
||||||
}))
|
|
||||||
return {
|
return {
|
||||||
success: true,
|
success: true,
|
||||||
output: {
|
output: {
|
||||||
projectMilestones: milestones,
|
projectMilestones: data.data.project?.projectMilestones?.nodes || [],
|
||||||
pageInfo: {
|
|
||||||
hasNextPage: result?.pageInfo?.hasNextPage ?? false,
|
|
||||||
endCursor: result?.pageInfo?.endCursor,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -120,11 +86,6 @@ export const linearListProjectMilestonesTool: ToolConfig<
|
|||||||
projectMilestones: {
|
projectMilestones: {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
description: 'List of project milestones',
|
description: 'List of project milestones',
|
||||||
items: {
|
|
||||||
type: 'object',
|
|
||||||
properties: PROJECT_MILESTONE_OUTPUT_PROPERTIES,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
pageInfo: PAGE_INFO_OUTPUT,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import type {
|
|||||||
LinearListProjectStatusesParams,
|
LinearListProjectStatusesParams,
|
||||||
LinearListProjectStatusesResponse,
|
LinearListProjectStatusesResponse,
|
||||||
} from '@/tools/linear/types'
|
} from '@/tools/linear/types'
|
||||||
import { PAGE_INFO_OUTPUT, PROJECT_STATUS_OUTPUT_PROPERTIES } from '@/tools/linear/types'
|
|
||||||
import type { ToolConfig } from '@/tools/types'
|
import type { ToolConfig } from '@/tools/types'
|
||||||
|
|
||||||
export const linearListProjectStatusesTool: ToolConfig<
|
export const linearListProjectStatusesTool: ToolConfig<
|
||||||
@@ -19,20 +18,7 @@ export const linearListProjectStatusesTool: ToolConfig<
|
|||||||
provider: 'linear',
|
provider: 'linear',
|
||||||
},
|
},
|
||||||
|
|
||||||
params: {
|
params: {},
|
||||||
first: {
|
|
||||||
type: 'number',
|
|
||||||
required: false,
|
|
||||||
visibility: 'user-or-llm',
|
|
||||||
description: 'Number of statuses to return (default: 50)',
|
|
||||||
},
|
|
||||||
after: {
|
|
||||||
type: 'string',
|
|
||||||
required: false,
|
|
||||||
visibility: 'user-or-llm',
|
|
||||||
description: 'Cursor for pagination',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
request: {
|
request: {
|
||||||
url: 'https://api.linear.app/graphql',
|
url: 'https://api.linear.app/graphql',
|
||||||
@@ -46,10 +32,10 @@ export const linearListProjectStatusesTool: ToolConfig<
|
|||||||
Authorization: `Bearer ${params.accessToken}`,
|
Authorization: `Bearer ${params.accessToken}`,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
body: (params) => ({
|
body: () => ({
|
||||||
query: `
|
query: `
|
||||||
query ProjectStatuses($first: Int, $after: String) {
|
query ProjectStatuses {
|
||||||
projectStatuses(first: $first, after: $after) {
|
projectStatuses {
|
||||||
nodes {
|
nodes {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
@@ -57,22 +43,12 @@ export const linearListProjectStatusesTool: ToolConfig<
|
|||||||
color
|
color
|
||||||
indefinite
|
indefinite
|
||||||
position
|
position
|
||||||
type
|
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
|
||||||
archivedAt
|
archivedAt
|
||||||
}
|
}
|
||||||
pageInfo {
|
|
||||||
hasNextPage
|
|
||||||
endCursor
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
variables: {
|
|
||||||
first: params.first ? Number(params.first) : 50,
|
|
||||||
after: params.after,
|
|
||||||
},
|
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -87,15 +63,10 @@ export const linearListProjectStatusesTool: ToolConfig<
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = data.data.projectStatuses
|
|
||||||
return {
|
return {
|
||||||
success: true,
|
success: true,
|
||||||
output: {
|
output: {
|
||||||
projectStatuses: result.nodes,
|
projectStatuses: data.data.projectStatuses.nodes,
|
||||||
pageInfo: {
|
|
||||||
hasNextPage: result.pageInfo.hasNextPage,
|
|
||||||
endCursor: result.pageInfo.endCursor,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -104,11 +75,6 @@ export const linearListProjectStatusesTool: ToolConfig<
|
|||||||
projectStatuses: {
|
projectStatuses: {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
description: 'List of project statuses',
|
description: 'List of project statuses',
|
||||||
items: {
|
|
||||||
type: 'object',
|
|
||||||
properties: PROJECT_STATUS_OUTPUT_PROPERTIES,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
pageInfo: PAGE_INFO_OUTPUT,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ export const linearListProjectsTool: ToolConfig<
|
|||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
variables: {
|
variables: {
|
||||||
first: params.first ? Number(params.first) : 50,
|
first: params.first || 50,
|
||||||
after: params.after,
|
after: params.after,
|
||||||
includeArchived: params.includeArchived || false,
|
includeArchived: params.includeArchived || false,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -65,13 +65,9 @@ export const linearListWorkflowStatesTool: ToolConfig<
|
|||||||
nodes {
|
nodes {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
description
|
|
||||||
type
|
type
|
||||||
color
|
color
|
||||||
position
|
position
|
||||||
createdAt
|
|
||||||
updatedAt
|
|
||||||
archivedAt
|
|
||||||
team {
|
team {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
|
|||||||
@@ -41,12 +41,6 @@ export const linearSearchIssuesTool: ToolConfig<
|
|||||||
visibility: 'user-or-llm',
|
visibility: 'user-or-llm',
|
||||||
description: 'Number of results to return (default: 50)',
|
description: 'Number of results to return (default: 50)',
|
||||||
},
|
},
|
||||||
after: {
|
|
||||||
type: 'string',
|
|
||||||
required: false,
|
|
||||||
visibility: 'user-or-llm',
|
|
||||||
description: 'Cursor for pagination',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
request: {
|
request: {
|
||||||
@@ -69,8 +63,8 @@ export const linearSearchIssuesTool: ToolConfig<
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
query: `
|
query: `
|
||||||
query SearchIssues($term: String!, $filter: IssueFilter, $first: Int, $after: String, $includeArchived: Boolean) {
|
query SearchIssues($term: String!, $filter: IssueFilter, $first: Int, $includeArchived: Boolean) {
|
||||||
searchIssues(term: $term, filter: $filter, first: $first, after: $after, includeArchived: $includeArchived) {
|
searchIssues(term: $term, filter: $filter, first: $first, includeArchived: $includeArchived) {
|
||||||
nodes {
|
nodes {
|
||||||
id
|
id
|
||||||
title
|
title
|
||||||
@@ -117,8 +111,7 @@ export const linearSearchIssuesTool: ToolConfig<
|
|||||||
variables: {
|
variables: {
|
||||||
term: params.query,
|
term: params.query,
|
||||||
filter: Object.keys(filter).length > 0 ? filter : undefined,
|
filter: Object.keys(filter).length > 0 ? filter : undefined,
|
||||||
first: params.first ? Number(params.first) : 50,
|
first: params.first || 50,
|
||||||
after: params.after,
|
|
||||||
includeArchived: params.includeArchived || false,
|
includeArchived: params.includeArchived || false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,10 +112,6 @@ export const LABEL_FULL_OUTPUT_PROPERTIES = {
|
|||||||
name: { type: 'string', description: 'Label name' },
|
name: { type: 'string', description: 'Label name' },
|
||||||
color: { type: 'string', description: 'Label color (hex)' },
|
color: { type: 'string', description: 'Label color (hex)' },
|
||||||
description: { type: 'string', description: 'Label description' },
|
description: { type: 'string', description: 'Label description' },
|
||||||
isGroup: { type: 'boolean', description: 'Whether this label is a group' },
|
|
||||||
createdAt: { type: 'string', description: 'Creation timestamp (ISO 8601)' },
|
|
||||||
updatedAt: { type: 'string', description: 'Last update timestamp (ISO 8601)' },
|
|
||||||
archivedAt: { type: 'string', description: 'Archive timestamp (ISO 8601)' },
|
|
||||||
team: TEAM_OUTPUT,
|
team: TEAM_OUTPUT,
|
||||||
} as const satisfies Record<string, OutputProperty>
|
} as const satisfies Record<string, OutputProperty>
|
||||||
|
|
||||||
@@ -148,7 +144,6 @@ export const CYCLE_FULL_OUTPUT_PROPERTIES = {
|
|||||||
endsAt: { type: 'string', description: 'End date (ISO 8601)' },
|
endsAt: { type: 'string', description: 'End date (ISO 8601)' },
|
||||||
completedAt: { type: 'string', description: 'Completion date (ISO 8601)' },
|
completedAt: { type: 'string', description: 'Completion date (ISO 8601)' },
|
||||||
progress: { type: 'number', description: 'Progress percentage (0-1)' },
|
progress: { type: 'number', description: 'Progress percentage (0-1)' },
|
||||||
createdAt: { type: 'string', description: 'Creation timestamp (ISO 8601)' },
|
|
||||||
team: TEAM_OUTPUT,
|
team: TEAM_OUTPUT,
|
||||||
} as const satisfies Record<string, OutputProperty>
|
} as const satisfies Record<string, OutputProperty>
|
||||||
|
|
||||||
@@ -282,16 +277,9 @@ export const ATTACHMENT_OUTPUT_PROPERTIES = {
|
|||||||
export const WORKFLOW_STATE_OUTPUT_PROPERTIES = {
|
export const WORKFLOW_STATE_OUTPUT_PROPERTIES = {
|
||||||
id: { type: 'string', description: 'State ID' },
|
id: { type: 'string', description: 'State ID' },
|
||||||
name: { type: 'string', description: 'State name (e.g., "Todo", "In Progress")' },
|
name: { type: 'string', description: 'State name (e.g., "Todo", "In Progress")' },
|
||||||
description: { type: 'string', description: 'State description' },
|
type: { type: 'string', description: 'State type (unstarted, started, completed, canceled)' },
|
||||||
type: {
|
|
||||||
type: 'string',
|
|
||||||
description: 'State type (triage, backlog, unstarted, started, completed, canceled)',
|
|
||||||
},
|
|
||||||
color: { type: 'string', description: 'State color (hex)' },
|
color: { type: 'string', description: 'State color (hex)' },
|
||||||
position: { type: 'number', description: 'State position in workflow' },
|
position: { type: 'number', description: 'State position in workflow' },
|
||||||
createdAt: { type: 'string', description: 'Creation timestamp (ISO 8601)' },
|
|
||||||
updatedAt: { type: 'string', description: 'Last update timestamp (ISO 8601)' },
|
|
||||||
archivedAt: { type: 'string', description: 'Archive timestamp (ISO 8601)' },
|
|
||||||
team: TEAM_OUTPUT,
|
team: TEAM_OUTPUT,
|
||||||
} as const satisfies Record<string, OutputProperty>
|
} as const satisfies Record<string, OutputProperty>
|
||||||
|
|
||||||
@@ -355,12 +343,8 @@ export const CUSTOMER_OUTPUT_PROPERTIES = {
|
|||||||
items: { type: 'string', description: 'External ID' },
|
items: { type: 'string', description: 'External ID' },
|
||||||
},
|
},
|
||||||
logoUrl: { type: 'string', description: 'Logo URL' },
|
logoUrl: { type: 'string', description: 'Logo URL' },
|
||||||
slugId: { type: 'string', description: 'Unique URL slug' },
|
|
||||||
approximateNeedCount: { type: 'number', description: 'Number of customer needs' },
|
approximateNeedCount: { type: 'number', description: 'Number of customer needs' },
|
||||||
revenue: { type: 'number', description: 'Annual revenue' },
|
|
||||||
size: { type: 'number', description: 'Organization size' },
|
|
||||||
createdAt: { type: 'string', description: 'Creation timestamp (ISO 8601)' },
|
createdAt: { type: 'string', description: 'Creation timestamp (ISO 8601)' },
|
||||||
updatedAt: { type: 'string', description: 'Last update timestamp (ISO 8601)' },
|
|
||||||
archivedAt: { type: 'string', description: 'Archive timestamp (ISO 8601)' },
|
archivedAt: { type: 'string', description: 'Archive timestamp (ISO 8601)' },
|
||||||
} as const satisfies Record<string, OutputProperty>
|
} as const satisfies Record<string, OutputProperty>
|
||||||
|
|
||||||
@@ -394,12 +378,11 @@ export const CUSTOMER_NEED_OUTPUT_PROPERTIES = {
|
|||||||
export const CUSTOMER_STATUS_OUTPUT_PROPERTIES = {
|
export const CUSTOMER_STATUS_OUTPUT_PROPERTIES = {
|
||||||
id: { type: 'string', description: 'Customer status ID' },
|
id: { type: 'string', description: 'Customer status ID' },
|
||||||
name: { type: 'string', description: 'Status name' },
|
name: { type: 'string', description: 'Status name' },
|
||||||
|
displayName: { type: 'string', description: 'Display name' },
|
||||||
description: { type: 'string', description: 'Status description' },
|
description: { type: 'string', description: 'Status description' },
|
||||||
color: { type: 'string', description: 'Status color (hex)' },
|
color: { type: 'string', description: 'Status color (hex)' },
|
||||||
position: { type: 'number', description: 'Position in list' },
|
position: { type: 'number', description: 'Position in list' },
|
||||||
type: { type: 'string', description: 'Status type (active, inactive)' },
|
|
||||||
createdAt: { type: 'string', description: 'Creation timestamp (ISO 8601)' },
|
createdAt: { type: 'string', description: 'Creation timestamp (ISO 8601)' },
|
||||||
updatedAt: { type: 'string', description: 'Last updated timestamp (ISO 8601)' },
|
|
||||||
archivedAt: { type: 'string', description: 'Archive timestamp (ISO 8601)' },
|
archivedAt: { type: 'string', description: 'Archive timestamp (ISO 8601)' },
|
||||||
} as const satisfies Record<string, OutputProperty>
|
} as const satisfies Record<string, OutputProperty>
|
||||||
|
|
||||||
@@ -427,7 +410,6 @@ export const PROJECT_LABEL_OUTPUT_PROPERTIES = {
|
|||||||
color: { type: 'string', description: 'Label color (hex)' },
|
color: { type: 'string', description: 'Label color (hex)' },
|
||||||
isGroup: { type: 'boolean', description: 'Whether this label is a group' },
|
isGroup: { type: 'boolean', description: 'Whether this label is a group' },
|
||||||
createdAt: { type: 'string', description: 'Creation timestamp (ISO 8601)' },
|
createdAt: { type: 'string', description: 'Creation timestamp (ISO 8601)' },
|
||||||
updatedAt: { type: 'string', description: 'Last update timestamp (ISO 8601)' },
|
|
||||||
archivedAt: { type: 'string', description: 'Archive timestamp (ISO 8601)' },
|
archivedAt: { type: 'string', description: 'Archive timestamp (ISO 8601)' },
|
||||||
} as const satisfies Record<string, OutputProperty>
|
} as const satisfies Record<string, OutputProperty>
|
||||||
|
|
||||||
@@ -440,9 +422,6 @@ export const PROJECT_MILESTONE_OUTPUT_PROPERTIES = {
|
|||||||
description: { type: 'string', description: 'Milestone description' },
|
description: { type: 'string', description: 'Milestone description' },
|
||||||
projectId: { type: 'string', description: 'Project ID' },
|
projectId: { type: 'string', description: 'Project ID' },
|
||||||
targetDate: { type: 'string', description: 'Target date (YYYY-MM-DD)' },
|
targetDate: { type: 'string', description: 'Target date (YYYY-MM-DD)' },
|
||||||
progress: { type: 'number', description: 'Progress percentage (0-1)' },
|
|
||||||
sortOrder: { type: 'number', description: 'Sort order within the project' },
|
|
||||||
status: { type: 'string', description: 'Milestone status (done, next, overdue, unstarted)' },
|
|
||||||
createdAt: { type: 'string', description: 'Creation timestamp (ISO 8601)' },
|
createdAt: { type: 'string', description: 'Creation timestamp (ISO 8601)' },
|
||||||
archivedAt: { type: 'string', description: 'Archive timestamp (ISO 8601)' },
|
archivedAt: { type: 'string', description: 'Archive timestamp (ISO 8601)' },
|
||||||
} as const satisfies Record<string, OutputProperty>
|
} as const satisfies Record<string, OutputProperty>
|
||||||
@@ -465,12 +444,7 @@ export const PROJECT_STATUS_OUTPUT_PROPERTIES = {
|
|||||||
color: { type: 'string', description: 'Status color (hex)' },
|
color: { type: 'string', description: 'Status color (hex)' },
|
||||||
indefinite: { type: 'boolean', description: 'Whether this status is indefinite' },
|
indefinite: { type: 'boolean', description: 'Whether this status is indefinite' },
|
||||||
position: { type: 'number', description: 'Position in list' },
|
position: { type: 'number', description: 'Position in list' },
|
||||||
type: {
|
|
||||||
type: 'string',
|
|
||||||
description: 'Status type (backlog, planned, started, paused, completed, canceled)',
|
|
||||||
},
|
|
||||||
createdAt: { type: 'string', description: 'Creation timestamp (ISO 8601)' },
|
createdAt: { type: 'string', description: 'Creation timestamp (ISO 8601)' },
|
||||||
updatedAt: { type: 'string', description: 'Last updated timestamp (ISO 8601)' },
|
|
||||||
archivedAt: { type: 'string', description: 'Archive timestamp (ISO 8601)' },
|
archivedAt: { type: 'string', description: 'Archive timestamp (ISO 8601)' },
|
||||||
} as const satisfies Record<string, OutputProperty>
|
} as const satisfies Record<string, OutputProperty>
|
||||||
|
|
||||||
@@ -613,10 +587,6 @@ export interface LinearLabel {
|
|||||||
name: string
|
name: string
|
||||||
color: string
|
color: string
|
||||||
description?: string
|
description?: string
|
||||||
isGroup: boolean
|
|
||||||
createdAt: string
|
|
||||||
updatedAt: string
|
|
||||||
archivedAt?: string
|
|
||||||
team?: {
|
team?: {
|
||||||
id: string
|
id: string
|
||||||
name: string
|
name: string
|
||||||
@@ -626,13 +596,9 @@ export interface LinearLabel {
|
|||||||
export interface LinearWorkflowState {
|
export interface LinearWorkflowState {
|
||||||
id: string
|
id: string
|
||||||
name: string
|
name: string
|
||||||
description?: string
|
|
||||||
type: string
|
type: string
|
||||||
color: string
|
color: string
|
||||||
position: number
|
position: number
|
||||||
createdAt: string
|
|
||||||
updatedAt: string
|
|
||||||
archivedAt?: string
|
|
||||||
team: {
|
team: {
|
||||||
id: string
|
id: string
|
||||||
name: string
|
name: string
|
||||||
@@ -647,7 +613,6 @@ export interface LinearCycle {
|
|||||||
endsAt: string
|
endsAt: string
|
||||||
completedAt?: string
|
completedAt?: string
|
||||||
progress: number
|
progress: number
|
||||||
createdAt: string
|
|
||||||
team: {
|
team: {
|
||||||
id: string
|
id: string
|
||||||
name: string
|
name: string
|
||||||
@@ -745,7 +710,6 @@ export interface LinearSearchIssuesParams {
|
|||||||
teamId?: string
|
teamId?: string
|
||||||
includeArchived?: boolean
|
includeArchived?: boolean
|
||||||
first?: number
|
first?: number
|
||||||
after?: string
|
|
||||||
accessToken?: string
|
accessToken?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1241,7 +1205,7 @@ export interface LinearAttachment {
|
|||||||
subtitle?: string
|
subtitle?: string
|
||||||
url: string
|
url: string
|
||||||
createdAt: string
|
createdAt: string
|
||||||
updatedAt: string
|
updatedAt?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LinearCreateAttachmentResponse extends ToolResponse {
|
export interface LinearCreateAttachmentResponse extends ToolResponse {
|
||||||
@@ -1402,12 +1366,8 @@ export interface LinearCustomer {
|
|||||||
domains: string[]
|
domains: string[]
|
||||||
externalIds: string[]
|
externalIds: string[]
|
||||||
logoUrl?: string
|
logoUrl?: string
|
||||||
slugId: string
|
|
||||||
approximateNeedCount: number
|
approximateNeedCount: number
|
||||||
revenue?: number
|
|
||||||
size?: number
|
|
||||||
createdAt: string
|
createdAt: string
|
||||||
updatedAt: string
|
|
||||||
archivedAt?: string
|
archivedAt?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1582,12 +1542,11 @@ export interface LinearMergeCustomersResponse extends ToolResponse {
|
|||||||
export interface LinearCustomerStatus {
|
export interface LinearCustomerStatus {
|
||||||
id: string
|
id: string
|
||||||
name: string
|
name: string
|
||||||
|
displayName: string
|
||||||
description?: string
|
description?: string
|
||||||
color: string
|
color: string
|
||||||
position: number
|
position: number
|
||||||
type: string
|
|
||||||
createdAt: string
|
createdAt: string
|
||||||
updatedAt: string
|
|
||||||
archivedAt?: string
|
archivedAt?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1634,18 +1593,12 @@ export interface LinearDeleteCustomerStatusResponse extends ToolResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface LinearListCustomerStatusesParams {
|
export interface LinearListCustomerStatusesParams {
|
||||||
first?: number
|
|
||||||
after?: string
|
|
||||||
accessToken?: string
|
accessToken?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LinearListCustomerStatusesResponse extends ToolResponse {
|
export interface LinearListCustomerStatusesResponse extends ToolResponse {
|
||||||
output: {
|
output: {
|
||||||
customerStatuses?: LinearCustomerStatus[]
|
customerStatuses?: LinearCustomerStatus[]
|
||||||
pageInfo?: {
|
|
||||||
hasNextPage: boolean
|
|
||||||
endCursor?: string
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1705,18 +1658,12 @@ export interface LinearDeleteCustomerTierResponse extends ToolResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface LinearListCustomerTiersParams {
|
export interface LinearListCustomerTiersParams {
|
||||||
first?: number
|
|
||||||
after?: string
|
|
||||||
accessToken?: string
|
accessToken?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LinearListCustomerTiersResponse extends ToolResponse {
|
export interface LinearListCustomerTiersResponse extends ToolResponse {
|
||||||
output: {
|
output: {
|
||||||
customerTiers?: LinearCustomerTier[]
|
customerTiers?: LinearCustomerTier[]
|
||||||
pageInfo?: {
|
|
||||||
hasNextPage: boolean
|
|
||||||
endCursor?: string
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1729,7 +1676,6 @@ export interface LinearProjectLabel {
|
|||||||
color?: string
|
color?: string
|
||||||
isGroup: boolean
|
isGroup: boolean
|
||||||
createdAt: string
|
createdAt: string
|
||||||
updatedAt: string
|
|
||||||
archivedAt?: string
|
archivedAt?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1774,19 +1720,13 @@ export interface LinearDeleteProjectLabelResponse extends ToolResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface LinearListProjectLabelsParams {
|
export interface LinearListProjectLabelsParams {
|
||||||
projectId?: string
|
|
||||||
first?: number
|
|
||||||
after?: string
|
|
||||||
accessToken?: string
|
accessToken?: string
|
||||||
|
projectId?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LinearListProjectLabelsResponse extends ToolResponse {
|
export interface LinearListProjectLabelsResponse extends ToolResponse {
|
||||||
output: {
|
output: {
|
||||||
projectLabels?: LinearProjectLabel[]
|
projectLabels?: LinearProjectLabel[]
|
||||||
pageInfo?: {
|
|
||||||
hasNextPage: boolean
|
|
||||||
endCursor?: string
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1824,9 +1764,6 @@ export interface LinearProjectMilestone {
|
|||||||
description?: string
|
description?: string
|
||||||
projectId: string
|
projectId: string
|
||||||
targetDate?: string
|
targetDate?: string
|
||||||
progress: number
|
|
||||||
sortOrder: number
|
|
||||||
status: string
|
|
||||||
createdAt: string
|
createdAt: string
|
||||||
archivedAt?: string
|
archivedAt?: string
|
||||||
}
|
}
|
||||||
@@ -1872,18 +1809,12 @@ export interface LinearDeleteProjectMilestoneResponse extends ToolResponse {
|
|||||||
|
|
||||||
export interface LinearListProjectMilestonesParams {
|
export interface LinearListProjectMilestonesParams {
|
||||||
projectId: string
|
projectId: string
|
||||||
first?: number
|
|
||||||
after?: string
|
|
||||||
accessToken?: string
|
accessToken?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LinearListProjectMilestonesResponse extends ToolResponse {
|
export interface LinearListProjectMilestonesResponse extends ToolResponse {
|
||||||
output: {
|
output: {
|
||||||
projectMilestones?: LinearProjectMilestone[]
|
projectMilestones?: LinearProjectMilestone[]
|
||||||
pageInfo?: {
|
|
||||||
hasNextPage: boolean
|
|
||||||
endCursor?: string
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1896,9 +1827,7 @@ export interface LinearProjectStatus {
|
|||||||
color: string
|
color: string
|
||||||
indefinite: boolean
|
indefinite: boolean
|
||||||
position: number
|
position: number
|
||||||
type: string
|
|
||||||
createdAt: string
|
createdAt: string
|
||||||
updatedAt: string
|
|
||||||
archivedAt?: string
|
archivedAt?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1946,18 +1875,12 @@ export interface LinearDeleteProjectStatusResponse extends ToolResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface LinearListProjectStatusesParams {
|
export interface LinearListProjectStatusesParams {
|
||||||
first?: number
|
|
||||||
after?: string
|
|
||||||
accessToken?: string
|
accessToken?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LinearListProjectStatusesResponse extends ToolResponse {
|
export interface LinearListProjectStatusesResponse extends ToolResponse {
|
||||||
output: {
|
output: {
|
||||||
projectStatuses?: LinearProjectStatus[]
|
projectStatuses?: LinearProjectStatus[]
|
||||||
pageInfo?: {
|
|
||||||
hasNextPage: boolean
|
|
||||||
endCursor?: string
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ export const linearUpdateAttachmentTool: ToolConfig<
|
|||||||
title
|
title
|
||||||
subtitle
|
subtitle
|
||||||
url
|
url
|
||||||
createdAt
|
|
||||||
updatedAt
|
updatedAt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,12 +137,8 @@ export const linearUpdateCustomerTool: ToolConfig<
|
|||||||
domains
|
domains
|
||||||
externalIds
|
externalIds
|
||||||
logoUrl
|
logoUrl
|
||||||
slugId
|
|
||||||
approximateNeedCount
|
approximateNeedCount
|
||||||
revenue
|
|
||||||
size
|
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
|
||||||
archivedAt
|
archivedAt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import type {
|
|||||||
LinearUpdateCustomerStatusParams,
|
LinearUpdateCustomerStatusParams,
|
||||||
LinearUpdateCustomerStatusResponse,
|
LinearUpdateCustomerStatusResponse,
|
||||||
} from '@/tools/linear/types'
|
} from '@/tools/linear/types'
|
||||||
import { CUSTOMER_STATUS_OUTPUT_PROPERTIES } from '@/tools/linear/types'
|
|
||||||
import type { ToolConfig } from '@/tools/types'
|
import type { ToolConfig } from '@/tools/types'
|
||||||
|
|
||||||
export const linearUpdateCustomerStatusTool: ToolConfig<
|
export const linearUpdateCustomerStatusTool: ToolConfig<
|
||||||
@@ -38,18 +37,18 @@ export const linearUpdateCustomerStatusTool: ToolConfig<
|
|||||||
visibility: 'user-or-llm',
|
visibility: 'user-or-llm',
|
||||||
description: 'Updated status color',
|
description: 'Updated status color',
|
||||||
},
|
},
|
||||||
description: {
|
|
||||||
type: 'string',
|
|
||||||
required: false,
|
|
||||||
visibility: 'user-or-llm',
|
|
||||||
description: 'Updated description',
|
|
||||||
},
|
|
||||||
displayName: {
|
displayName: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
required: false,
|
required: false,
|
||||||
visibility: 'user-or-llm',
|
visibility: 'user-or-llm',
|
||||||
description: 'Updated display name',
|
description: 'Updated display name',
|
||||||
},
|
},
|
||||||
|
description: {
|
||||||
|
type: 'string',
|
||||||
|
required: false,
|
||||||
|
visibility: 'user-or-llm',
|
||||||
|
description: 'Updated description',
|
||||||
|
},
|
||||||
position: {
|
position: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
required: false,
|
required: false,
|
||||||
@@ -79,12 +78,12 @@ export const linearUpdateCustomerStatusTool: ToolConfig<
|
|||||||
if (params.color != null && params.color !== '') {
|
if (params.color != null && params.color !== '') {
|
||||||
input.color = params.color
|
input.color = params.color
|
||||||
}
|
}
|
||||||
if (params.description != null && params.description !== '') {
|
|
||||||
input.description = params.description
|
|
||||||
}
|
|
||||||
if (params.displayName != null && params.displayName !== '') {
|
if (params.displayName != null && params.displayName !== '') {
|
||||||
input.displayName = params.displayName
|
input.displayName = params.displayName
|
||||||
}
|
}
|
||||||
|
if (params.description != null && params.description !== '') {
|
||||||
|
input.description = params.description
|
||||||
|
}
|
||||||
if (params.position != null) {
|
if (params.position != null) {
|
||||||
input.position = params.position
|
input.position = params.position
|
||||||
}
|
}
|
||||||
@@ -97,12 +96,11 @@ export const linearUpdateCustomerStatusTool: ToolConfig<
|
|||||||
customerStatus {
|
customerStatus {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
|
displayName
|
||||||
description
|
description
|
||||||
color
|
color
|
||||||
position
|
position
|
||||||
type
|
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
|
||||||
archivedAt
|
archivedAt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -140,7 +138,6 @@ export const linearUpdateCustomerStatusTool: ToolConfig<
|
|||||||
customerStatus: {
|
customerStatus: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
description: 'The updated customer status',
|
description: 'The updated customer status',
|
||||||
properties: CUSTOMER_STATUS_OUTPUT_PROPERTIES,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,10 +71,6 @@ export const linearUpdateLabelTool: ToolConfig<LinearUpdateLabelParams, LinearUp
|
|||||||
name
|
name
|
||||||
color
|
color
|
||||||
description
|
description
|
||||||
isGroup
|
|
||||||
createdAt
|
|
||||||
updatedAt
|
|
||||||
archivedAt
|
|
||||||
team {
|
team {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import type {
|
|||||||
LinearUpdateProjectLabelParams,
|
LinearUpdateProjectLabelParams,
|
||||||
LinearUpdateProjectLabelResponse,
|
LinearUpdateProjectLabelResponse,
|
||||||
} from '@/tools/linear/types'
|
} from '@/tools/linear/types'
|
||||||
import { PROJECT_LABEL_OUTPUT_PROPERTIES } from '@/tools/linear/types'
|
|
||||||
import type { ToolConfig } from '@/tools/types'
|
import type { ToolConfig } from '@/tools/types'
|
||||||
|
|
||||||
export const linearUpdateProjectLabelTool: ToolConfig<
|
export const linearUpdateProjectLabelTool: ToolConfig<
|
||||||
@@ -83,7 +82,6 @@ export const linearUpdateProjectLabelTool: ToolConfig<
|
|||||||
color
|
color
|
||||||
isGroup
|
isGroup
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
|
||||||
archivedAt
|
archivedAt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -121,7 +119,6 @@ export const linearUpdateProjectLabelTool: ToolConfig<
|
|||||||
projectLabel: {
|
projectLabel: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
description: 'The updated project label',
|
description: 'The updated project label',
|
||||||
properties: PROJECT_LABEL_OUTPUT_PROPERTIES,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import type {
|
|||||||
LinearUpdateProjectMilestoneParams,
|
LinearUpdateProjectMilestoneParams,
|
||||||
LinearUpdateProjectMilestoneResponse,
|
LinearUpdateProjectMilestoneResponse,
|
||||||
} from '@/tools/linear/types'
|
} from '@/tools/linear/types'
|
||||||
import { PROJECT_MILESTONE_OUTPUT_PROPERTIES } from '@/tools/linear/types'
|
|
||||||
import type { ToolConfig } from '@/tools/types'
|
import type { ToolConfig } from '@/tools/types'
|
||||||
|
|
||||||
export const linearUpdateProjectMilestoneTool: ToolConfig<
|
export const linearUpdateProjectMilestoneTool: ToolConfig<
|
||||||
@@ -80,15 +79,10 @@ export const linearUpdateProjectMilestoneTool: ToolConfig<
|
|||||||
id
|
id
|
||||||
name
|
name
|
||||||
description
|
description
|
||||||
|
projectId
|
||||||
targetDate
|
targetDate
|
||||||
progress
|
|
||||||
sortOrder
|
|
||||||
status
|
|
||||||
createdAt
|
createdAt
|
||||||
archivedAt
|
archivedAt
|
||||||
project {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -113,23 +107,10 @@ export const linearUpdateProjectMilestoneTool: ToolConfig<
|
|||||||
}
|
}
|
||||||
|
|
||||||
const result = data.data.projectMilestoneUpdate
|
const result = data.data.projectMilestoneUpdate
|
||||||
if (!result.success) {
|
|
||||||
return {
|
|
||||||
success: false,
|
|
||||||
error: 'Project milestone update was not successful',
|
|
||||||
output: {},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const milestone = result.projectMilestone
|
|
||||||
return {
|
return {
|
||||||
success: true,
|
success: result.success,
|
||||||
output: {
|
output: {
|
||||||
projectMilestone: {
|
projectMilestone: result.projectMilestone,
|
||||||
...milestone,
|
|
||||||
projectId: milestone.project?.id ?? null,
|
|
||||||
project: undefined,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -138,7 +119,6 @@ export const linearUpdateProjectMilestoneTool: ToolConfig<
|
|||||||
projectMilestone: {
|
projectMilestone: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
description: 'The updated project milestone',
|
description: 'The updated project milestone',
|
||||||
properties: PROJECT_MILESTONE_OUTPUT_PROPERTIES,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import type {
|
|||||||
LinearUpdateProjectStatusParams,
|
LinearUpdateProjectStatusParams,
|
||||||
LinearUpdateProjectStatusResponse,
|
LinearUpdateProjectStatusResponse,
|
||||||
} from '@/tools/linear/types'
|
} from '@/tools/linear/types'
|
||||||
import { PROJECT_STATUS_OUTPUT_PROPERTIES } from '@/tools/linear/types'
|
|
||||||
import type { ToolConfig } from '@/tools/types'
|
import type { ToolConfig } from '@/tools/types'
|
||||||
|
|
||||||
export const linearUpdateProjectStatusTool: ToolConfig<
|
export const linearUpdateProjectStatusTool: ToolConfig<
|
||||||
@@ -101,9 +100,7 @@ export const linearUpdateProjectStatusTool: ToolConfig<
|
|||||||
color
|
color
|
||||||
indefinite
|
indefinite
|
||||||
position
|
position
|
||||||
type
|
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
|
||||||
archivedAt
|
archivedAt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -141,7 +138,6 @@ export const linearUpdateProjectStatusTool: ToolConfig<
|
|||||||
projectStatus: {
|
projectStatus: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
description: 'The updated project status',
|
description: 'The updated project status',
|
||||||
properties: PROJECT_STATUS_OUTPUT_PROPERTIES,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import type {
|
|||||||
LinearUpdateWorkflowStateParams,
|
LinearUpdateWorkflowStateParams,
|
||||||
LinearUpdateWorkflowStateResponse,
|
LinearUpdateWorkflowStateResponse,
|
||||||
} from '@/tools/linear/types'
|
} from '@/tools/linear/types'
|
||||||
import { WORKFLOW_STATE_OUTPUT_PROPERTIES } from '@/tools/linear/types'
|
|
||||||
import type { ToolConfig } from '@/tools/types'
|
import type { ToolConfig } from '@/tools/types'
|
||||||
|
|
||||||
export const linearUpdateWorkflowStateTool: ToolConfig<
|
export const linearUpdateWorkflowStateTool: ToolConfig<
|
||||||
@@ -88,13 +87,9 @@ export const linearUpdateWorkflowStateTool: ToolConfig<
|
|||||||
workflowState {
|
workflowState {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
description
|
|
||||||
type
|
type
|
||||||
color
|
color
|
||||||
position
|
position
|
||||||
createdAt
|
|
||||||
updatedAt
|
|
||||||
archivedAt
|
|
||||||
team {
|
team {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
@@ -143,7 +138,13 @@ export const linearUpdateWorkflowStateTool: ToolConfig<
|
|||||||
state: {
|
state: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
description: 'The updated workflow state',
|
description: 'The updated workflow state',
|
||||||
properties: WORKFLOW_STATE_OUTPUT_PROPERTIES,
|
properties: {
|
||||||
|
id: { type: 'string', description: 'State ID' },
|
||||||
|
name: { type: 'string', description: 'State name' },
|
||||||
|
type: { type: 'string', description: 'State type' },
|
||||||
|
color: { type: 'string', description: 'State color' },
|
||||||
|
position: { type: 'number', description: 'State position' },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,27 +30,6 @@ export const slackWebhookTrigger: TriggerConfig = {
|
|||||||
required: true,
|
required: true,
|
||||||
mode: 'trigger',
|
mode: 'trigger',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: 'botToken',
|
|
||||||
title: 'Bot Token',
|
|
||||||
type: 'short-input',
|
|
||||||
placeholder: 'xoxb-...',
|
|
||||||
description:
|
|
||||||
'The bot token from your Slack app. Required for downloading files attached to messages.',
|
|
||||||
password: true,
|
|
||||||
required: false,
|
|
||||||
mode: 'trigger',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'includeFiles',
|
|
||||||
title: 'Include File Attachments',
|
|
||||||
type: 'switch',
|
|
||||||
defaultValue: false,
|
|
||||||
description:
|
|
||||||
'Download and include file attachments from messages. Requires a bot token with files:read scope.',
|
|
||||||
required: false,
|
|
||||||
mode: 'trigger',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: 'triggerSave',
|
id: 'triggerSave',
|
||||||
title: '',
|
title: '',
|
||||||
@@ -67,10 +46,9 @@ export const slackWebhookTrigger: TriggerConfig = {
|
|||||||
'Go to <a href="https://api.slack.com/apps" target="_blank" rel="noopener noreferrer" class="text-muted-foreground underline transition-colors hover:text-muted-foreground/80">Slack Apps page</a>',
|
'Go to <a href="https://api.slack.com/apps" target="_blank" rel="noopener noreferrer" class="text-muted-foreground underline transition-colors hover:text-muted-foreground/80">Slack Apps page</a>',
|
||||||
'If you don\'t have an app:<br><ul class="mt-1 ml-5 list-disc"><li>Create an app from scratch</li><li>Give it a name and select your workspace</li></ul>',
|
'If you don\'t have an app:<br><ul class="mt-1 ml-5 list-disc"><li>Create an app from scratch</li><li>Give it a name and select your workspace</li></ul>',
|
||||||
'Go to "Basic Information", find the "Signing Secret", and paste it in the field above.',
|
'Go to "Basic Information", find the "Signing Secret", and paste it in the field above.',
|
||||||
'Go to "OAuth & Permissions" and add bot token scopes:<br><ul class="mt-1 ml-5 list-disc"><li><code>app_mentions:read</code> - For viewing messages that tag your bot with an @</li><li><code>chat:write</code> - To send messages to channels your bot is a part of</li><li><code>files:read</code> - To access files and images shared in messages</li></ul>',
|
'Go to "OAuth & Permissions" and add bot token scopes:<br><ul class="mt-1 ml-5 list-disc"><li><code>app_mentions:read</code> - For viewing messages that tag your bot with an @</li><li><code>chat:write</code> - To send messages to channels your bot is a part of</li></ul>',
|
||||||
'Go to "Event Subscriptions":<br><ul class="mt-1 ml-5 list-disc"><li>Enable events</li><li>Under "Subscribe to Bot Events", add <code>app_mention</code> to listen to messages that mention your bot</li><li>Paste the Webhook URL above into the "Request URL" field</li></ul>',
|
'Go to "Event Subscriptions":<br><ul class="mt-1 ml-5 list-disc"><li>Enable events</li><li>Under "Subscribe to Bot Events", add <code>app_mention</code> to listen to messages that mention your bot</li><li>Paste the Webhook URL above into the "Request URL" field</li></ul>',
|
||||||
'Go to "Install App" in the left sidebar and install the app into your desired Slack workspace and channel.',
|
'Go to "Install App" in the left sidebar and install the app into your desired Slack workspace and channel.',
|
||||||
'Copy the "Bot User OAuth Token" (starts with <code>xoxb-</code>) and paste it in the Bot Token field above to enable file downloads.',
|
|
||||||
'Save changes in both Slack and here.',
|
'Save changes in both Slack and here.',
|
||||||
]
|
]
|
||||||
.map(
|
.map(
|
||||||
@@ -128,15 +106,6 @@ export const slackWebhookTrigger: TriggerConfig = {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
description: 'Unique event identifier',
|
description: 'Unique event identifier',
|
||||||
},
|
},
|
||||||
hasFiles: {
|
|
||||||
type: 'boolean',
|
|
||||||
description: 'Whether the message has file attachments',
|
|
||||||
},
|
|
||||||
files: {
|
|
||||||
type: 'file[]',
|
|
||||||
description:
|
|
||||||
'File attachments downloaded from the message (if includeFiles is enabled and bot token is provided)',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user