@hostwebhook/node-types 1.64.0 → 1.66.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/connections.js +1 -0
- package/dist/discord-toolkit.d.ts +47 -0
- package/dist/discord-toolkit.js +235 -0
- package/dist/dispatch.js +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +20 -2
- package/dist/jira-operations.d.ts +164 -0
- package/dist/jira-operations.js +474 -0
- package/dist/registry.js +19 -0
- package/dist/slack-toolkit.d.ts +47 -0
- package/dist/slack-toolkit.js +218 -0
- package/dist/types.d.ts +1 -1
- package/dist/ui.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Slack AI Toolkit — las herramientas que un slackAction expone cuando
|
|
4
|
+
* `aiEnabled` está encendido.
|
|
5
|
+
*
|
|
6
|
+
* **Se escribe una sola vez.** Antes vivía dos veces: una copia en
|
|
7
|
+
* `dashboard/components/slack-actions/slack-operations-schemas.ts` y otra en
|
|
8
|
+
* `api/src/mcp-servers/toolkit-specs.ts`, las dos a mano y en repos distintos,
|
|
9
|
+
* así que ningún test podía compararlas. Es la octava y novena mudanza de esta
|
|
10
|
+
* serie; de las siete anteriores, la de Contacts salió de que una copia
|
|
11
|
+
* anunciara 15 herramientas y expusiera una.
|
|
12
|
+
*
|
|
13
|
+
* La deriva aquí era gorda: **14 de las 16 descripciones** diferían. Gana la de
|
|
14
|
+
* la api en todas —es sistemáticamente la más completa y es la que sirve el MCP
|
|
15
|
+
* hoy—, y una no era cosmética: en `deleteMessage` la api nombra el permiso que
|
|
16
|
+
* hace falta (`chat:write.public` + admin) y el dashboard sólo decía «admin
|
|
17
|
+
* perms». Operaciones, nombres de herramienta y parámetros sí coincidían.
|
|
18
|
+
*
|
|
19
|
+
* Los nombres llevan `_slack_` para no chocar con los de Telegram y Discord
|
|
20
|
+
* cuando un mismo AI Node tiene varios toolkits encendidos.
|
|
21
|
+
*
|
|
22
|
+
* La forma es la que ya consume `toolkitSpecToMcpTool` en la api, para que
|
|
23
|
+
* pueda usarse sin adaptador. Los textos van en inglés porque los lee el modelo
|
|
24
|
+
* y quien mire la lista de herramientas del servidor MCP.
|
|
25
|
+
*/
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.SLACK_TOOLKIT_BY_TOOL_NAME = exports.SLACK_TOOLKIT_SPECS = void 0;
|
|
28
|
+
const p = (name, description, required = true, type = 'string') => ({ name, type, description, required });
|
|
29
|
+
exports.SLACK_TOOLKIT_SPECS = [
|
|
30
|
+
// ── Messages ─────────────────────────────────────────────────────
|
|
31
|
+
{
|
|
32
|
+
operation: 'sendMessage',
|
|
33
|
+
label: 'Send message',
|
|
34
|
+
toolName: 'send_slack_message',
|
|
35
|
+
description: 'Post a message to a Slack channel, group, or DM. ' +
|
|
36
|
+
'USAGE RULES: ' +
|
|
37
|
+
'(1) `channel` is a Slack channel id (C…), group id (G…), or DM id (D…). Get it from the trigger payload, listChannels, or the user. Never invent one. ' +
|
|
38
|
+
'(2) For a thread reply, set `threadTs` to the parent message timestamp. ' +
|
|
39
|
+
'(3) Either `text` or `blocks` is required. Use blocks for rich layouts.',
|
|
40
|
+
parameters: [
|
|
41
|
+
p('channel', 'Channel/group/DM id where the message will be posted.'),
|
|
42
|
+
p('text', 'Message text. Slack mrkdwn supported. Required when blocks is empty.', false),
|
|
43
|
+
p('blocks', 'Block Kit JSON for rich layouts. Stringified JSON or JSON array.', false),
|
|
44
|
+
p('threadTs', 'Parent message timestamp to reply inside an existing thread.', false),
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
operation: 'updateMessage',
|
|
49
|
+
label: 'Update message',
|
|
50
|
+
toolName: 'update_slack_message',
|
|
51
|
+
description: 'Edit a message previously posted by the bot. The bot can only edit its own messages — editing another user/bot message returns cant_update_message.',
|
|
52
|
+
parameters: [
|
|
53
|
+
p('channel', 'Channel where the original message lives.'),
|
|
54
|
+
p('ts', 'Timestamp of the message to edit (returned by sendMessage).'),
|
|
55
|
+
p('text', 'New message text. Required when blocks is empty.', false),
|
|
56
|
+
p('blocks', 'New Block Kit JSON. Replaces the existing layout.', false),
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
operation: 'deleteMessage',
|
|
61
|
+
label: 'Delete message',
|
|
62
|
+
toolName: 'delete_slack_message',
|
|
63
|
+
description: "Delete a message the bot posted. Other users' messages need chat:write.public + admin perms — usually fails for AI-driven calls. Confirm before destructive use.",
|
|
64
|
+
parameters: [
|
|
65
|
+
p('channel', 'Channel where the message lives.'),
|
|
66
|
+
p('ts', 'Timestamp of the message to delete.'),
|
|
67
|
+
],
|
|
68
|
+
destructive: true,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
operation: 'sendEphemeral',
|
|
72
|
+
label: 'Send ephemeral',
|
|
73
|
+
toolName: 'send_slack_ephemeral',
|
|
74
|
+
description: 'Post a message visible only to a specific user — the rest of the channel does not see it. Useful for per-user prompts, errors, or warnings.',
|
|
75
|
+
parameters: [
|
|
76
|
+
p('channel', 'Channel where the ephemeral message will appear.'),
|
|
77
|
+
p('user', 'User id (U…) — the only viewer of the message.'),
|
|
78
|
+
p('text', 'Message text. Required when blocks is empty.', false),
|
|
79
|
+
p('blocks', 'Block Kit JSON for rich layouts.', false),
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
operation: 'scheduleMessage',
|
|
84
|
+
label: 'Schedule message',
|
|
85
|
+
toolName: 'schedule_slack_message',
|
|
86
|
+
description: 'Schedule a Slack message to be posted at a future time. Returns a scheduled_message_id useful for cancellation later.',
|
|
87
|
+
parameters: [
|
|
88
|
+
p('channel', 'Channel where the message will be posted.'),
|
|
89
|
+
p('postAt', 'When to post — unix timestamp in SECONDS, not milliseconds.', true, 'number'),
|
|
90
|
+
p('text', 'Message text. Required when blocks is empty.', false),
|
|
91
|
+
p('blocks', 'Block Kit JSON for rich layouts.', false),
|
|
92
|
+
],
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
operation: 'getMessage',
|
|
96
|
+
label: 'Get message',
|
|
97
|
+
toolName: 'get_slack_message',
|
|
98
|
+
description: 'Fetch a single message by its timestamp. Returns the message text + author + reactions + attachments. Use BEFORE editing or reacting to verify state.',
|
|
99
|
+
parameters: [
|
|
100
|
+
p('channel', 'Channel where the message lives.'),
|
|
101
|
+
p('ts', 'Timestamp of the message to fetch.'),
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
// ── Channels ─────────────────────────────────────────────────────
|
|
105
|
+
{
|
|
106
|
+
operation: 'listChannels',
|
|
107
|
+
label: 'List channels',
|
|
108
|
+
toolName: 'list_slack_channels',
|
|
109
|
+
description: 'List public + private channels the bot can see in the workspace. Returns id, name, isMember, memberCount per channel. Pre-pick a channel before sendMessage.',
|
|
110
|
+
parameters: [
|
|
111
|
+
p('limit', 'Max channels to return (1-1000). Default 200.', false, 'number'),
|
|
112
|
+
p('excludeArchived', 'Hide archived channels. Default true.', false, 'boolean'),
|
|
113
|
+
],
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
operation: 'getChannelHistory',
|
|
117
|
+
label: 'Get channel history',
|
|
118
|
+
toolName: 'get_slack_channel_history',
|
|
119
|
+
description: 'Read recent messages from a Slack channel. Useful for summarization, context retrieval, or finding a message by content before editing/reacting.',
|
|
120
|
+
parameters: [
|
|
121
|
+
p('channel', 'Channel id to read from.'),
|
|
122
|
+
p('limit', 'Max messages to return (1-200). Default 50.', false, 'number'),
|
|
123
|
+
p('oldest', 'Only messages newer than this timestamp.', false),
|
|
124
|
+
p('latest', 'Only messages older than this timestamp.', false),
|
|
125
|
+
],
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
operation: 'getThreadReplies',
|
|
129
|
+
label: 'Get thread replies',
|
|
130
|
+
toolName: 'get_slack_thread_replies',
|
|
131
|
+
description: 'Fetch the replies inside a Slack thread, given the parent message timestamp. Use for summarizing or continuing a thread.',
|
|
132
|
+
parameters: [
|
|
133
|
+
p('channel', 'Channel where the thread lives.'),
|
|
134
|
+
p('ts', 'Timestamp of the thread parent message.'),
|
|
135
|
+
p('limit', 'Max replies to return (1-1000). Default 100.', false, 'number'),
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
operation: 'createChannel',
|
|
140
|
+
label: 'Create channel',
|
|
141
|
+
toolName: 'create_slack_channel',
|
|
142
|
+
description: 'Create a new public or private Slack channel. Names must be lowercase, no spaces, max 80 chars. Confirm with the user before creating channels — they are usually long-lived org artifacts.',
|
|
143
|
+
parameters: [
|
|
144
|
+
p('name', 'Channel name — lowercase, no spaces, max 80 chars.'),
|
|
145
|
+
p('isPrivate', 'Create a private channel instead of public. Default false.', false, 'boolean'),
|
|
146
|
+
],
|
|
147
|
+
destructive: true,
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
operation: 'inviteToChannel',
|
|
151
|
+
label: 'Invite to channel',
|
|
152
|
+
toolName: 'invite_to_slack_channel',
|
|
153
|
+
description: 'Invite one or more users to a Slack channel by user id. Comma-separated `users` argument.',
|
|
154
|
+
parameters: [
|
|
155
|
+
p('channel', 'Channel id to invite users to.'),
|
|
156
|
+
p('users', 'Comma-separated user ids (U…) to invite.'),
|
|
157
|
+
],
|
|
158
|
+
},
|
|
159
|
+
// ── Reactions ────────────────────────────────────────────────────
|
|
160
|
+
{
|
|
161
|
+
operation: 'addReaction',
|
|
162
|
+
label: 'Add reaction',
|
|
163
|
+
toolName: 'add_slack_reaction',
|
|
164
|
+
description: 'Add an emoji reaction to a Slack message as the bot. Use the emoji NAME without colons (e.g. `thumbsup`, `white_check_mark`, `eyes`).',
|
|
165
|
+
parameters: [
|
|
166
|
+
p('channel', 'Channel where the message lives.'),
|
|
167
|
+
p('ts', 'Timestamp of the message to react to.'),
|
|
168
|
+
p('name', 'Emoji name without colons.'),
|
|
169
|
+
],
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
operation: 'removeReaction',
|
|
173
|
+
label: 'Remove reaction',
|
|
174
|
+
toolName: 'remove_slack_reaction',
|
|
175
|
+
description: "Remove the bot's own emoji reaction from a Slack message. Cannot remove other users' reactions.",
|
|
176
|
+
parameters: [
|
|
177
|
+
p('channel', 'Channel where the message lives.'),
|
|
178
|
+
p('ts', 'Timestamp of the message.'),
|
|
179
|
+
p('name', 'Emoji name without colons.'),
|
|
180
|
+
],
|
|
181
|
+
},
|
|
182
|
+
// ── Users ────────────────────────────────────────────────────────
|
|
183
|
+
{
|
|
184
|
+
operation: 'listUsers',
|
|
185
|
+
label: 'List users',
|
|
186
|
+
toolName: 'list_slack_users',
|
|
187
|
+
description: 'List human members of the Slack workspace. Returns id, name, real_name, email, avatarUrl. Excludes deleted users + bots by default.',
|
|
188
|
+
parameters: [
|
|
189
|
+
p('limit', 'Max users to return (1-1000). Default 200.', false, 'number'),
|
|
190
|
+
p('includeDeleted', 'Include deactivated users. Default false.', false, 'boolean'),
|
|
191
|
+
p('includeBots', 'Include bot users + app users. Default false.', false, 'boolean'),
|
|
192
|
+
],
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
operation: 'getUserInfo',
|
|
196
|
+
label: 'Get user info',
|
|
197
|
+
toolName: 'get_slack_user_info',
|
|
198
|
+
description: 'Fetch a Slack user profile (real_name, email, timezone, status, avatar). Use BEFORE sendEphemeral to confirm the user id is valid.',
|
|
199
|
+
parameters: [p('user', 'User id (U…) to look up.')],
|
|
200
|
+
},
|
|
201
|
+
// ── Files ────────────────────────────────────────────────────────
|
|
202
|
+
{
|
|
203
|
+
operation: 'uploadFile',
|
|
204
|
+
label: 'Upload file',
|
|
205
|
+
toolName: 'upload_slack_file',
|
|
206
|
+
description: 'Upload a file to Slack and optionally share it in a channel. Provide either a public `url` to fetch or inline `contentBase64` for small payloads. Optionally attach to a thread via `threadTs`.',
|
|
207
|
+
parameters: [
|
|
208
|
+
p('url', 'Public URL or HW _file.downloadUrl that HW will fetch and re-upload.', false),
|
|
209
|
+
p('contentBase64', 'Inline base64 file content (alternative to url).', false),
|
|
210
|
+
p('filename', 'Display name in Slack. Auto-derived from URL when omitted.', false),
|
|
211
|
+
p('channel', 'Channel id to share the uploaded file in.', false),
|
|
212
|
+
p('title', 'Title shown above the file.', false),
|
|
213
|
+
p('initialComment', 'Message Slack posts together with the file.', false),
|
|
214
|
+
p('threadTs', 'Thread to attach the file to.', false),
|
|
215
|
+
],
|
|
216
|
+
},
|
|
217
|
+
];
|
|
218
|
+
exports.SLACK_TOOLKIT_BY_TOOL_NAME = Object.fromEntries(exports.SLACK_TOOLKIT_SPECS.map((s) => [s.toolName, s]));
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** All valid node type identifiers */
|
|
2
|
-
export type NodeType = 'webhook' | 'scheduledWorkflow' | 'chatTrigger' | 'trigger' | 'voiceAgent' | 'filter' | 'transform' | 'schemaValidator' | 'conditional' | 'delay' | 'rateLimiter' | 'aggregator' | 'cache' | 'code' | 'ai' | 'merge' | 'approval' | 'split' | 'loop' | 'markdown' | 'fileTransform' | 'limit' | 'router' | 'emailAction' | 'gmailAction' | 'httpAction' | 'mongoAction' | 'postgresAction' | 'notificationAction' | 'sheetsAction' | 'calendarAction' | 'docsAction' | 'driveAction' | 'firecrawlAction' | 'telegramAction' | 'whatsappAction' | 'discordAction' | 'slackAction' | 'googleContactsAction' | 'googleAnalyticsAction' | 'notionAction' | 'vectorStore' | 'rssAction' | 'socialMediaAction' | 'mailchimpAction' | 'shopifyAction' | 'githubAction' | 'stickyNote';
|
|
2
|
+
export type NodeType = 'webhook' | 'scheduledWorkflow' | 'chatTrigger' | 'trigger' | 'voiceAgent' | 'filter' | 'transform' | 'schemaValidator' | 'conditional' | 'delay' | 'rateLimiter' | 'aggregator' | 'cache' | 'code' | 'ai' | 'merge' | 'approval' | 'split' | 'loop' | 'markdown' | 'fileTransform' | 'limit' | 'router' | 'emailAction' | 'gmailAction' | 'httpAction' | 'mongoAction' | 'postgresAction' | 'notificationAction' | 'sheetsAction' | 'calendarAction' | 'docsAction' | 'driveAction' | 'firecrawlAction' | 'telegramAction' | 'whatsappAction' | 'discordAction' | 'slackAction' | 'googleContactsAction' | 'googleAnalyticsAction' | 'notionAction' | 'vectorStore' | 'rssAction' | 'socialMediaAction' | 'mailchimpAction' | 'shopifyAction' | 'githubAction' | 'jiraAction' | 'stickyNote';
|
|
3
3
|
/** Node role in the pipeline */
|
|
4
4
|
export type NodeRole = 'source' | 'processing' | 'flowControl' | 'routing' | 'action' | 'monitoring';
|
|
5
5
|
/** Handle positions on the canvas node */
|
package/dist/ui.js
CHANGED
|
@@ -78,6 +78,7 @@ exports.NODE_UI = {
|
|
|
78
78
|
mailchimpAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true, routerTargetLabel: 'mailchimp' } },
|
|
79
79
|
shopifyAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true, routerTargetLabel: 'shopify' } },
|
|
80
80
|
githubAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true, routerTargetLabel: 'github' } },
|
|
81
|
+
jiraAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true, routerTargetLabel: 'jira' } },
|
|
81
82
|
slackAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true, routerTargetLabel: 'slack' } },
|
|
82
83
|
googleContactsAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true } },
|
|
83
84
|
googleAnalyticsAction: { fromNodes: true, toNodes: true, inputHandles: ['left'], dotHandles: { input: ['left-in'], output: ['right-out'] }, special: { loopBackAllowed: true } },
|
|
@@ -104,6 +105,7 @@ exports.PREFIX_TO_TYPE = [
|
|
|
104
105
|
{ prefix: 'mc-', type: 'mailchimpAction', canvasType: 'mailchimpAction' },
|
|
105
106
|
{ prefix: 'shp-', type: 'shopifyAction', canvasType: 'shopifyAction' },
|
|
106
107
|
{ prefix: 'gh-', type: 'githubAction', canvasType: 'githubAction' },
|
|
108
|
+
{ prefix: 'jr-', type: 'jiraAction', canvasType: 'jiraAction' },
|
|
107
109
|
{ prefix: 'gc-', type: 'googleContactsAction', canvasType: 'googleContactsAction' },
|
|
108
110
|
{ prefix: 'gaa-', type: 'googleAnalyticsAction', canvasType: 'googleAnalyticsAction' },
|
|
109
111
|
{ prefix: 'ntn-', type: 'notionAction', canvasType: 'notionAction' },
|
package/package.json
CHANGED