@shipfox/api-integration-slack 11.0.0 → 12.2.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.
@@ -1,2 +1,2 @@
1
1
  $ shipfox-swc
2
- Successfully compiled: 25 files with swc (447.03ms)
2
+ Successfully compiled: 25 files with swc (326.24ms)
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # @shipfox/api-integration-slack
2
2
 
3
+ ## 12.2.0
4
+
5
+ ### Patch Changes
6
+
7
+ - @shipfox/api-integration-slack-dto@12.2.0
8
+ - @shipfox/api-integration-spi@1.0.1
9
+ - @shipfox/node-opentelemetry@0.6.4
10
+ - @shipfox/node-fastify@0.4.2
11
+ - @shipfox/api-auth-context@12.2.0
12
+
13
+ ## 12.0.0
14
+
15
+ ### Minor Changes
16
+
17
+ - a018f92: Expose the Linear and Slack agent-tool catalogs for integration documentation generation.
18
+
19
+ ### Patch Changes
20
+
21
+ - f78740d: Remove Unicode dash punctuation from package prose and source comments.
22
+ - Updated dependencies [f78740d]
23
+ - Updated dependencies [94aba88]
24
+ - Updated dependencies [24ef475]
25
+ - Updated dependencies [f13e8bb]
26
+ - Updated dependencies [9ebc5b4]
27
+ - Updated dependencies [869a792]
28
+ - Updated dependencies [54c820e]
29
+ - Updated dependencies [e1efaee]
30
+ - @shipfox/inter-module@0.2.3
31
+ - @shipfox/node-fastify@0.4.1
32
+ - @shipfox/api-workspaces-dto@12.0.0
33
+ - @shipfox/api-integration-spi@1.0.0
34
+ - @shipfox/node-postgres@0.5.0
35
+ - @shipfox/api-auth-context@12.0.0
36
+ - @shipfox/api-integration-slack-dto@12.0.0
37
+ - @shipfox/node-drizzle@0.3.5
38
+
3
39
  ## 11.0.0
4
40
 
5
41
  ### Major Changes
@@ -1 +1 @@
1
- {"version":3,"file":"agent-tools-provider.d.ts","sourceRoot":"","sources":["../../src/core/agent-tools-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,g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AC,CAAC,CAqDhD;CACF"}
@@ -93,7 +93,7 @@ export interface SlackToolValidationError {
93
93
  }
94
94
  export declare const SLACK_TOOL_OPERATIONS: {
95
95
  readonly read_channel: {
96
- readonly method: "conversations.history";
96
+ readonly method: 'conversations.history';
97
97
  readonly mapArguments: ({ channel_id, oldest, latest, limit, cursor }: Record<string, unknown>) => {
98
98
  channel: unknown;
99
99
  oldest: unknown;
@@ -103,7 +103,7 @@ export declare const SLACK_TOOL_OPERATIONS: {
103
103
  };
104
104
  };
105
105
  readonly read_thread: {
106
- readonly method: "conversations.replies";
106
+ readonly method: 'conversations.replies';
107
107
  readonly mapArguments: ({ channel_id, message_ts, oldest, latest, limit, cursor }: Record<string, unknown>) => {
108
108
  channel: unknown;
109
109
  ts: unknown;
@@ -114,14 +114,14 @@ export declare const SLACK_TOOL_OPERATIONS: {
114
114
  };
115
115
  };
116
116
  readonly read_channel_info: {
117
- readonly method: "conversations.info";
117
+ readonly method: 'conversations.info';
118
118
  readonly mapArguments: ({ channel_id, include_num_members }: Record<string, unknown>) => {
119
119
  channel: unknown;
120
120
  include_num_members: unknown;
121
121
  };
122
122
  };
123
123
  readonly read_channel_members: {
124
- readonly method: "conversations.members";
124
+ readonly method: 'conversations.members';
125
125
  readonly mapArguments: ({ channel_id, limit, cursor }: Record<string, unknown>) => {
126
126
  channel: unknown;
127
127
  limit: unknown;
@@ -129,14 +129,14 @@ export declare const SLACK_TOOL_OPERATIONS: {
129
129
  };
130
130
  };
131
131
  readonly read_user_profile: {
132
- readonly method: "users.info";
132
+ readonly method: 'users.info';
133
133
  readonly mapArguments: ({ user_id, include_locale }: Record<string, unknown>) => {
134
134
  user: unknown;
135
135
  include_locale: unknown;
136
136
  };
137
137
  };
138
138
  readonly search_channels: {
139
- readonly method: "conversations.list";
139
+ readonly method: 'conversations.list';
140
140
  readonly mapArguments: ({ channel_types, include_archived, limit, cursor }: Record<string, unknown>) => {
141
141
  types: unknown;
142
142
  exclude_archived: boolean;
@@ -146,26 +146,26 @@ export declare const SLACK_TOOL_OPERATIONS: {
146
146
  readonly mapOutput: typeof matchingChannels;
147
147
  };
148
148
  readonly send_message: {
149
- readonly method: "chat.postMessage";
149
+ readonly method: 'chat.postMessage';
150
150
  readonly mapArguments: ({ channel_id, message, thread_ts, reply_broadcast }: Record<string, unknown>) => {
151
+ channel: unknown;
151
152
  thread_ts: unknown;
152
153
  reply_broadcast: unknown;
153
- channel: unknown;
154
154
  };
155
155
  readonly validate: typeof validateMessageLength;
156
156
  };
157
157
  readonly schedule_message: {
158
- readonly method: "chat.scheduleMessage";
158
+ readonly method: 'chat.scheduleMessage';
159
159
  readonly mapArguments: ({ channel_id, message, post_at, thread_ts, reply_broadcast }: Record<string, unknown>) => {
160
+ channel: unknown;
160
161
  post_at: unknown;
161
162
  thread_ts: unknown;
162
163
  reply_broadcast: unknown;
163
- channel: unknown;
164
164
  };
165
165
  readonly validate: typeof validateMessageLength;
166
166
  };
167
167
  readonly update_message: {
168
- readonly method: "chat.update";
168
+ readonly method: 'chat.update';
169
169
  readonly mapArguments: ({ channel_id, message_ts, message }: Record<string, unknown>) => {
170
170
  channel: unknown;
171
171
  ts: unknown;
@@ -173,7 +173,7 @@ export declare const SLACK_TOOL_OPERATIONS: {
173
173
  readonly validate: typeof validateMessageLength;
174
174
  };
175
175
  readonly add_reaction: {
176
- readonly method: "reactions.add";
176
+ readonly method: 'reactions.add';
177
177
  readonly mapArguments: ({ channel_id, message_ts, emoji }: Record<string, unknown>) => {
178
178
  channel: unknown;
179
179
  timestamp: unknown;
@@ -181,7 +181,7 @@ export declare const SLACK_TOOL_OPERATIONS: {
181
181
  };
182
182
  };
183
183
  readonly create_canvas: {
184
- readonly method: "canvases.create";
184
+ readonly method: 'canvases.create';
185
185
  readonly mapArguments: ({ title, content }: Record<string, unknown>) => {
186
186
  title: unknown;
187
187
  document_content: {
@@ -1 +1 @@
1
- {"version":3,"file":"agent-tools.d.ts","sourceRoot":"","sources":["../../src/core/agent-tools.ts"],"names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wBAAwB,GAAG,SAAS,CAAC;CACpF;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AAID,eAAO,MAAM,qBAAqB;;yBAEtB,uBAAuB;;;;;;;;;;yBAUvB,uBAAuB;;;;;;;;;;;yBAWvB,oBAAoB;;;;;;;yBAOpB,uBAAuB;;;;;;;;yBAIvB,YAAY;;;;;;;yBAIZ,oBAAoB;;;;;;;;;;yBAUpB,kBAAkB;;;;;;;;;yBAUlB,sBAAsB;;;;;;;;;;yBAWtB,aAAa;;;;;;;;yBASb,eAAe;;;;;;;;yBAQf,iBAAiB;;;;gBAGJ,IAAI;gBAAc,QAAQ;;;;CAGc,CAAC;AAElE,eAAO,MAAM,8BAA8B,2BACiB,CAAC;AAqD7D,iBAAS,qBAAqB,CAC5B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,wBAAwB,GAAG,SAAS,CActC;AAGD,iBAAS,gBAAgB,CACvB,IAAI,EAAE,mBAAmB,EACzB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,mBAAmB,CAOrB"}
@@ -315,7 +315,7 @@ const italicPattern = /\*([^*]+)\*|_([^_]+)_/g;
315
315
  const blockquotePattern = /^>\s?/gm;
316
316
  // Reserved code spans are wrapped in a delimiter built at runtime (String.fromCharCode) rather than
317
317
  // a literal escape in source. A real chat message is vanishingly unlikely to contain a NUL byte, but
318
- // isn't guaranteed not to, so any that do appear are stripped from the input first after that, the
318
+ // isn't guaranteed not to, so any that do appear are stripped from the input first. After that, the
319
319
  // only NUL bytes left are the ones this function inserts, so restoration can't misfire on user text.
320
320
  const codePlaceholderDelimiter = String.fromCharCode(0);
321
321
  const codePlaceholderPattern = new RegExp(`${codePlaceholderDelimiter}(\\d+)${codePlaceholderDelimiter}`, 'g');
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/core/agent-tools.ts"],"sourcesContent":["import type {\n AgentToolCatalogEntry,\n AgentToolJsonSchema,\n AgentToolSelectionCatalog,\n AgentToolSelector,\n} from '@shipfox/api-integration-spi';\nimport type {SlackWebApiResponse} from '#api/client.js';\n\nexport type SlackAgentToolRequiredScope = 'read' | 'write';\nexport type SlackAgentToolCatalogEntry = AgentToolCatalogEntry<SlackAgentToolRequiredScope>;\n\ninterface SlackAgentToolCatalogInput {\n id: string;\n description: string;\n sensitivity: 'read' | 'write';\n sensitive: boolean;\n requiredScope: SlackAgentToolRequiredScope;\n inputSchema: AgentToolJsonSchema;\n}\n\nconst whitespacePattern = /\\s+/;\n\n// Slack caps the cumulative text across all Markdown blocks in one payload at 12,000 characters;\n// content over that limit is rejected with invalid_blocks rather than truncated. Each tool here\n// sends exactly one Markdown block, so the cap applies to that single block's text.\nconst SLACK_MARKDOWN_BLOCK_MAX_LENGTH = 12_000;\n\n// Only the chat.* methods resolve a user ID into a direct message; conversations.* and reactions.*\n// need the conversation ID itself, so the two targets are described separately.\nconst conversationIdSchema = stringSchema(\n 'Channel, private group, or direct message conversation ID, such as C0ABC12345 or D0ABC12345. A user ID is not accepted here',\n);\nconst messageTargetSchema = stringSchema(\n 'Channel, private group, or direct message conversation ID. Pass a user ID to open a direct message with that user',\n);\nconst cursorSchema = stringSchema('Pagination cursor from a previous request');\nconst messageSchema = {\n ...stringSchema('Message content, written as standard Markdown'),\n maxLength: SLACK_MARKDOWN_BLOCK_MAX_LENGTH,\n};\nconst threadTsSchema = stringSchema('Timestamp of the parent message to reply in its thread');\nconst replyBroadcastSchema = booleanSchema('Also send the thread reply to the channel');\n\nexport const slackAgentToolCatalog = [\n tool({\n id: 'read_channel',\n description:\n 'Read messages from a Slack channel in reverse chronological order (newest first). Reading direct message history needs the ID of that conversation, not the ID of the user on the other side.',\n sensitivity: 'read',\n sensitive: false,\n requiredScope: 'read',\n inputSchema: objectSchema(\n {\n channel_id: conversationIdSchema,\n oldest: stringSchema('Start of the time range, as a Slack timestamp'),\n latest: stringSchema('End of the time range, as a Slack timestamp'),\n limit: integerSchema('Messages to return, 1 to 100 (default 100)'),\n cursor: cursorSchema,\n },\n ['channel_id'],\n ),\n }),\n tool({\n id: 'read_thread',\n description:\n 'Read a Slack thread: the parent message and all of its replies. Requires the channel ID and the timestamp of the parent message.',\n sensitivity: 'read',\n sensitive: false,\n requiredScope: 'read',\n inputSchema: objectSchema(\n {\n channel_id: conversationIdSchema,\n message_ts: stringSchema('Timestamp of the parent message, such as 1234567890.123456'),\n oldest: stringSchema('Start of the time range, as a Slack timestamp'),\n latest: stringSchema('End of the time range, as a Slack timestamp'),\n limit: integerSchema('Messages to return, 1 to 1000 (default 100)'),\n cursor: cursorSchema,\n },\n ['channel_id', 'message_ts'],\n ),\n }),\n tool({\n id: 'read_channel_info',\n description:\n 'Retrieve metadata for a single Slack channel by ID: name, topic, purpose, privacy, and archive status. Use this to learn what a channel is for before reading or posting. To read its messages, use read_channel instead.',\n sensitivity: 'read',\n sensitive: false,\n requiredScope: 'read',\n inputSchema: objectSchema(\n {\n channel_id: conversationIdSchema,\n include_num_members: booleanSchema('Include the channel member count (default false)'),\n },\n ['channel_id'],\n ),\n }),\n tool({\n id: 'read_channel_members',\n description:\n 'List the user IDs of the members of a Slack channel. Pair it with read_user_profile to resolve a member to a name.',\n sensitivity: 'read',\n sensitive: false,\n requiredScope: 'read',\n inputSchema: objectSchema(\n {\n channel_id: conversationIdSchema,\n limit: integerSchema('Members to return per page (default 100)'),\n cursor: cursorSchema,\n },\n ['channel_id'],\n ),\n }),\n tool({\n id: 'read_user_profile',\n description:\n 'Retrieve profile information for a Slack user, including contact details, status, timezone, and role.',\n sensitivity: 'read',\n sensitive: false,\n requiredScope: 'read',\n inputSchema: objectSchema(\n {\n user_id: stringSchema('Slack user ID, such as U0ABC12345'),\n include_locale: booleanSchema(\"Include the user's locale information (default false)\"),\n },\n ['user_id'],\n ),\n }),\n tool({\n id: 'search_channels',\n description:\n 'Search the channels this integration can see, by name, topic, or purpose. Returns channel names, IDs, topics, purposes, and archive status. Names are typically lowercase with hyphens. Space-separated terms all have to match. Only the requested page is searched, so page through with the returned cursor when a channel is missing.',\n sensitivity: 'read',\n sensitive: false,\n requiredScope: 'read',\n inputSchema: objectSchema(\n {\n query: stringSchema('Search query for finding channels'),\n channel_types: stringSchema(\n 'Comma-separated channel types: public_channel, private_channel. Defaults to public_channel',\n ),\n include_archived: booleanSchema('Include archived channels in the results'),\n limit: integerSchema('Channels to scan per page (default 100)'),\n cursor: cursorSchema,\n },\n ['query'],\n ),\n }),\n tool({\n id: 'send_message',\n description:\n 'Send a message to a Slack channel or user. To send a direct message, pass the user ID as the channel ID. Supports standard Markdown: bold, italic, strikethrough, links, lists, blockquotes, inline code, and code blocks. Returns the posted message timestamp.',\n sensitivity: 'write',\n sensitive: false,\n requiredScope: 'write',\n inputSchema: objectSchema(\n {\n channel_id: messageTargetSchema,\n message: messageSchema,\n thread_ts: threadTsSchema,\n reply_broadcast: replyBroadcastSchema,\n },\n ['channel_id', 'message'],\n ),\n }),\n tool({\n id: 'schedule_message',\n description:\n 'Schedule a message for future delivery to a Slack channel. Does not send immediately. post_at has to be at least 2 minutes in the future and at most 120 days out. Once scheduled, the message cannot be edited.',\n sensitivity: 'write',\n sensitive: false,\n requiredScope: 'write',\n inputSchema: objectSchema(\n {\n channel_id: messageTargetSchema,\n message: messageSchema,\n post_at: integerSchema('Unix timestamp at which to send the message'),\n thread_ts: threadTsSchema,\n reply_broadcast: replyBroadcastSchema,\n },\n ['channel_id', 'message', 'post_at'],\n ),\n }),\n tool({\n id: 'update_message',\n description:\n 'Update an already posted Slack message, replacing its content. Supports the same standard Markdown as send_message.',\n sensitivity: 'write',\n sensitive: false,\n requiredScope: 'write',\n inputSchema: objectSchema(\n {\n channel_id: conversationIdSchema,\n message_ts: stringSchema('Timestamp of the message to update'),\n message: messageSchema,\n },\n ['channel_id', 'message_ts', 'message'],\n ),\n }),\n tool({\n id: 'add_reaction',\n description: 'Add an emoji reaction to a Slack message.',\n sensitivity: 'write',\n sensitive: false,\n requiredScope: 'write',\n inputSchema: objectSchema(\n {\n channel_id: conversationIdSchema,\n message_ts: stringSchema('Timestamp of the message to react to'),\n emoji: stringSchema('Emoji name without the surrounding colons, such as white_check_mark'),\n },\n ['channel_id', 'message_ts', 'emoji'],\n ),\n }),\n tool({\n id: 'create_canvas',\n description:\n 'Create a standalone Slack canvas from Markdown and return its ID. Not available on free teams.',\n sensitivity: 'write',\n sensitive: false,\n requiredScope: 'write',\n inputSchema: objectSchema(\n {\n title: stringSchema('Concise, descriptive canvas name. Do not repeat it in the content'),\n content: stringSchema('Canvas body, written as standard Markdown'),\n },\n ['title', 'content'],\n ),\n }),\n] as const satisfies readonly SlackAgentToolCatalogEntry[];\n\nexport type SlackAgentToolId = (typeof slackAgentToolCatalog)[number]['id'];\n\nexport interface SlackToolOperation {\n method: string;\n mapArguments: (args: Record<string, unknown>) => Record<string, unknown>;\n mapOutput?: (body: SlackWebApiResponse, args: Record<string, unknown>) => SlackWebApiResponse;\n validate?: (args: Record<string, unknown>) => SlackToolValidationError | undefined;\n}\n\nexport interface SlackToolValidationError {\n message: string;\n code?: string | undefined;\n}\n\n// Tool inputs follow the Slack MCP server's naming so agent prompts port across both, which means\n// every call is translated to the Web API's own parameter names before it is sent.\nexport const SLACK_TOOL_OPERATIONS = {\n read_channel: {\n method: 'conversations.history',\n mapArguments: ({channel_id, oldest, latest, limit, cursor}) => ({\n channel: channel_id,\n oldest,\n latest,\n limit,\n cursor,\n }),\n },\n read_thread: {\n method: 'conversations.replies',\n mapArguments: ({channel_id, message_ts, oldest, latest, limit, cursor}) => ({\n channel: channel_id,\n ts: message_ts,\n oldest,\n latest,\n limit,\n cursor,\n }),\n },\n read_channel_info: {\n method: 'conversations.info',\n mapArguments: ({channel_id, include_num_members}) => ({\n channel: channel_id,\n include_num_members,\n }),\n },\n read_channel_members: {\n method: 'conversations.members',\n mapArguments: ({channel_id, limit, cursor}) => ({channel: channel_id, limit, cursor}),\n },\n read_user_profile: {\n method: 'users.info',\n mapArguments: ({user_id, include_locale}) => ({user: user_id, include_locale}),\n },\n search_channels: {\n method: 'conversations.list',\n mapArguments: ({channel_types, include_archived, limit, cursor}) => ({\n types: channel_types,\n exclude_archived: include_archived !== true,\n limit,\n cursor,\n }),\n mapOutput: matchingChannels,\n },\n send_message: {\n method: 'chat.postMessage',\n mapArguments: ({channel_id, message, thread_ts, reply_broadcast}) => ({\n channel: channel_id,\n ...markdownMessage(message),\n thread_ts,\n reply_broadcast,\n }),\n validate: validateMessageLength,\n },\n schedule_message: {\n method: 'chat.scheduleMessage',\n mapArguments: ({channel_id, message, post_at, thread_ts, reply_broadcast}) => ({\n channel: channel_id,\n ...markdownMessage(message),\n post_at,\n thread_ts,\n reply_broadcast,\n }),\n validate: validateMessageLength,\n },\n update_message: {\n method: 'chat.update',\n mapArguments: ({channel_id, message_ts, message}) => ({\n channel: channel_id,\n ts: message_ts,\n ...markdownMessage(message),\n }),\n validate: validateMessageLength,\n },\n add_reaction: {\n method: 'reactions.add',\n mapArguments: ({channel_id, message_ts, emoji}) => ({\n channel: channel_id,\n timestamp: message_ts,\n name: emoji,\n }),\n },\n create_canvas: {\n method: 'canvases.create',\n mapArguments: ({title, content}) => ({\n title,\n document_content: {type: 'markdown', markdown: content},\n }),\n },\n} as const satisfies Record<SlackAgentToolId, SlackToolOperation>;\n\nexport const slackAgentToolSelectionCatalog =\n buildSlackAgentToolSelectionCatalog(slackAgentToolCatalog);\n\n// A Markdown block renders standard Markdown, which the plain text field does not; text is kept as\n// the notification fallback, so its Markdown syntax is stripped rather than shown literally.\nfunction markdownMessage(message: unknown): Record<string, unknown> {\n if (typeof message !== 'string') return {};\n return {text: stripMarkdownForFallback(message), blocks: [{type: 'markdown', text: message}]};\n}\n\nconst codeBlockPattern = /```[^\\n]*\\n?([\\s\\S]*?)\\n?```/g;\nconst inlineCodePattern = /`([^`]+)`/g;\nconst linkPattern = /\\[([^\\]]+)\\]\\(([^)]+)\\)/g;\nconst boldPattern = /\\*\\*([^*]+)\\*\\*|__([^_]+)__/g;\nconst strikethroughPattern = /~~([^~]+)~~/g;\nconst italicPattern = /\\*([^*]+)\\*|_([^_]+)_/g;\nconst blockquotePattern = /^>\\s?/gm;\n// Reserved code spans are wrapped in a delimiter built at runtime (String.fromCharCode) rather than\n// a literal escape in source. A real chat message is vanishingly unlikely to contain a NUL byte, but\n// isn't guaranteed not to, so any that do appear are stripped from the input first — after that, the\n// only NUL bytes left are the ones this function inserts, so restoration can't misfire on user text.\nconst codePlaceholderDelimiter = String.fromCharCode(0);\nconst codePlaceholderPattern = new RegExp(\n `${codePlaceholderDelimiter}(\\\\d+)${codePlaceholderDelimiter}`,\n 'g',\n);\n\n// Best-effort plain-text rendering of the Markdown syntax the tool description promises (bold,\n// italic, strikethrough, links, lists, blockquotes, inline code, code blocks); lists are left as-is\n// since \"- item\" and \"1. item\" already read fine as plain text. Code spans are pulled out behind a\n// placeholder first so their own *, _, ~, and [] characters survive the other replacements intact.\nfunction stripMarkdownForFallback(message: string): string {\n const codeSpans: string[] = [];\n const reserveCodeSpan = (_match: string, code: string): string =>\n `${codePlaceholderDelimiter}${codeSpans.push(code) - 1}${codePlaceholderDelimiter}`;\n\n return message\n .replaceAll(codePlaceholderDelimiter, '')\n .replace(codeBlockPattern, reserveCodeSpan)\n .replace(inlineCodePattern, reserveCodeSpan)\n .replace(linkPattern, (_match, text: string, url: string) => `${text} (${url})`)\n .replace(\n boldPattern,\n (_match, asterisk?: string, underscore?: string) => asterisk ?? underscore ?? '',\n )\n .replace(strikethroughPattern, (_match, text: string) => text)\n .replace(\n italicPattern,\n (_match, asterisk?: string, underscore?: string) => asterisk ?? underscore ?? '',\n )\n .replace(blockquotePattern, '')\n .replace(codePlaceholderPattern, (_match, index: string) => codeSpans[Number(index)] ?? '');\n}\n\nfunction validateMessageLength(\n args: Record<string, unknown>,\n): SlackToolValidationError | undefined {\n const {message} = args;\n if (typeof message !== 'string') return undefined;\n // .length counts UTF-16 code units, so astral-plane characters (most emoji) count twice and\n // would reject messages the 12,000-character schema limit still allows; the spread operator\n // iterates by Unicode code point instead.\n const length = [...message].length;\n if (length > SLACK_MARKDOWN_BLOCK_MAX_LENGTH) {\n return {\n message: `Message is ${length.toLocaleString('en-US')} characters, which exceeds Slack's ${SLACK_MARKDOWN_BLOCK_MAX_LENGTH.toLocaleString('en-US')}-character Markdown block limit. Shorten it or split it into multiple messages.`,\n code: 'content-too-large',\n };\n }\n return undefined;\n}\n\n// Slack has no channel search method for bot tokens, so the requested page is matched locally.\nfunction matchingChannels(\n body: SlackWebApiResponse,\n args: Record<string, unknown>,\n): SlackWebApiResponse {\n const {query} = args;\n const {channels} = body;\n if (typeof query !== 'string' || !Array.isArray(channels)) return body;\n const terms = query.toLowerCase().split(whitespacePattern).filter(Boolean);\n if (terms.length === 0) return body;\n return {...body, channels: channels.filter((channel) => matchesTerms(channel, terms))};\n}\n\nfunction matchesTerms(channel: unknown, terms: string[]): boolean {\n if (typeof channel !== 'object' || channel === null) return false;\n const {name, topic, purpose} = channel as Record<string, unknown>;\n const haystack = [name, textValue(topic), textValue(purpose)]\n .filter((value): value is string => typeof value === 'string')\n .join(' ')\n .toLowerCase();\n return terms.every((term) => haystack.includes(term));\n}\n\nfunction textValue(field: unknown): unknown {\n if (typeof field !== 'object' || field === null) return undefined;\n return (field as Record<string, unknown>).value;\n}\n\nfunction buildSlackAgentToolSelectionCatalog(\n catalog: readonly SlackAgentToolCatalogEntry[],\n): AgentToolSelectionCatalog {\n return {\n selectors: catalog.map(\n (entry): AgentToolSelector => ({\n token: entry.id,\n kind: 'standalone',\n sensitivity: entry.sensitivity,\n sensitive: entry.sensitive,\n }),\n ),\n };\n}\n\nfunction tool<const Entry extends SlackAgentToolCatalogInput>(input: Entry): Entry {\n return input;\n}\n\nfunction objectSchema(\n properties: Record<string, AgentToolJsonSchema>,\n required: string[] = [],\n): AgentToolJsonSchema {\n return {\n type: 'object',\n additionalProperties: false,\n properties,\n ...(required.length > 0 ? {required} : {}),\n };\n}\n\nfunction stringSchema(description?: string): AgentToolJsonSchema {\n return {type: 'string', ...(description ? {description} : {})};\n}\n\nfunction integerSchema(description: string): AgentToolJsonSchema {\n return {type: 'integer', description};\n}\n\nfunction booleanSchema(description: string): AgentToolJsonSchema {\n return {type: 'boolean', description};\n}\n"],"names":["whitespacePattern","SLACK_MARKDOWN_BLOCK_MAX_LENGTH","conversationIdSchema","stringSchema","messageTargetSchema","cursorSchema","messageSchema","maxLength","threadTsSchema","replyBroadcastSchema","booleanSchema","slackAgentToolCatalog","tool","id","description","sensitivity","sensitive","requiredScope","inputSchema","objectSchema","channel_id","oldest","latest","limit","integerSchema","cursor","message_ts","include_num_members","user_id","include_locale","query","channel_types","include_archived","message","thread_ts","reply_broadcast","post_at","emoji","title","content","SLACK_TOOL_OPERATIONS","read_channel","method","mapArguments","channel","read_thread","ts","read_channel_info","read_channel_members","read_user_profile","user","search_channels","types","exclude_archived","mapOutput","matchingChannels","send_message","markdownMessage","validate","validateMessageLength","schedule_message","update_message","add_reaction","timestamp","name","create_canvas","document_content","type","markdown","slackAgentToolSelectionCatalog","buildSlackAgentToolSelectionCatalog","text","stripMarkdownForFallback","blocks","codeBlockPattern","inlineCodePattern","linkPattern","boldPattern","strikethroughPattern","italicPattern","blockquotePattern","codePlaceholderDelimiter","String","fromCharCode","codePlaceholderPattern","RegExp","codeSpans","reserveCodeSpan","_match","code","push","replaceAll","replace","url","asterisk","underscore","index","Number","args","undefined","length","toLocaleString","body","channels","Array","isArray","terms","toLowerCase","split","filter","Boolean","matchesTerms","topic","purpose","haystack","textValue","value","join","every","term","includes","field","catalog","selectors","map","entry","token","kind","input","properties","required","additionalProperties"],"mappings":"AAoBA,MAAMA,oBAAoB;AAE1B,iGAAiG;AACjG,gGAAgG;AAChG,oFAAoF;AACpF,MAAMC,kCAAkC;AAExC,mGAAmG;AACnG,gFAAgF;AAChF,MAAMC,uBAAuBC,aAC3B;AAEF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,OAAOA;AACT;AAEA,SAAS7G,aACP8G,UAA+C,EAC/CC,WAAqB,EAAE;IAEvB,OAAO;QACL/D,MAAM;QACNgE,sBAAsB;QACtBF;QACA,GAAIC,SAAS9B,MAAM,GAAG,IAAI;YAAC8B;QAAQ,IAAI,CAAC,CAAC;IAC3C;AACF;AAEA,SAAS/H,aAAaW,WAAoB;IACxC,OAAO;QAACqD,MAAM;QAAU,GAAIrD,cAAc;YAACA;QAAW,IAAI,CAAC,CAAC;IAAC;AAC/D;AAEA,SAASU,cAAcV,WAAmB;IACxC,OAAO;QAACqD,MAAM;QAAWrD;IAAW;AACtC;AAEA,SAASJ,cAAcI,WAAmB;IACxC,OAAO;QAACqD,MAAM;QAAWrD;IAAW;AACtC"}
1
+ {"version":3,"sources":["../../src/core/agent-tools.ts"],"sourcesContent":["import type {\n AgentToolCatalogEntry,\n AgentToolJsonSchema,\n AgentToolSelectionCatalog,\n AgentToolSelector,\n} from '@shipfox/api-integration-spi';\nimport type {SlackWebApiResponse} from '#api/client.js';\n\nexport type SlackAgentToolRequiredScope = 'read' | 'write';\nexport type SlackAgentToolCatalogEntry = AgentToolCatalogEntry<SlackAgentToolRequiredScope>;\n\ninterface SlackAgentToolCatalogInput {\n id: string;\n description: string;\n sensitivity: 'read' | 'write';\n sensitive: boolean;\n requiredScope: SlackAgentToolRequiredScope;\n inputSchema: AgentToolJsonSchema;\n}\n\nconst whitespacePattern = /\\s+/;\n\n// Slack caps the cumulative text across all Markdown blocks in one payload at 12,000 characters;\n// content over that limit is rejected with invalid_blocks rather than truncated. Each tool here\n// sends exactly one Markdown block, so the cap applies to that single block's text.\nconst SLACK_MARKDOWN_BLOCK_MAX_LENGTH = 12_000;\n\n// Only the chat.* methods resolve a user ID into a direct message; conversations.* and reactions.*\n// need the conversation ID itself, so the two targets are described separately.\nconst conversationIdSchema = stringSchema(\n 'Channel, private group, or direct message conversation ID, such as C0ABC12345 or D0ABC12345. A user ID is not accepted here',\n);\nconst messageTargetSchema = stringSchema(\n 'Channel, private group, or direct message conversation ID. Pass a user ID to open a direct message with that user',\n);\nconst cursorSchema = stringSchema('Pagination cursor from a previous request');\nconst messageSchema = {\n ...stringSchema('Message content, written as standard Markdown'),\n maxLength: SLACK_MARKDOWN_BLOCK_MAX_LENGTH,\n};\nconst threadTsSchema = stringSchema('Timestamp of the parent message to reply in its thread');\nconst replyBroadcastSchema = booleanSchema('Also send the thread reply to the channel');\n\nexport const slackAgentToolCatalog = [\n tool({\n id: 'read_channel',\n description:\n 'Read messages from a Slack channel in reverse chronological order (newest first). Reading direct message history needs the ID of that conversation, not the ID of the user on the other side.',\n sensitivity: 'read',\n sensitive: false,\n requiredScope: 'read',\n inputSchema: objectSchema(\n {\n channel_id: conversationIdSchema,\n oldest: stringSchema('Start of the time range, as a Slack timestamp'),\n latest: stringSchema('End of the time range, as a Slack timestamp'),\n limit: integerSchema('Messages to return, 1 to 100 (default 100)'),\n cursor: cursorSchema,\n },\n ['channel_id'],\n ),\n }),\n tool({\n id: 'read_thread',\n description:\n 'Read a Slack thread: the parent message and all of its replies. Requires the channel ID and the timestamp of the parent message.',\n sensitivity: 'read',\n sensitive: false,\n requiredScope: 'read',\n inputSchema: objectSchema(\n {\n channel_id: conversationIdSchema,\n message_ts: stringSchema('Timestamp of the parent message, such as 1234567890.123456'),\n oldest: stringSchema('Start of the time range, as a Slack timestamp'),\n latest: stringSchema('End of the time range, as a Slack timestamp'),\n limit: integerSchema('Messages to return, 1 to 1000 (default 100)'),\n cursor: cursorSchema,\n },\n ['channel_id', 'message_ts'],\n ),\n }),\n tool({\n id: 'read_channel_info',\n description:\n 'Retrieve metadata for a single Slack channel by ID: name, topic, purpose, privacy, and archive status. Use this to learn what a channel is for before reading or posting. To read its messages, use read_channel instead.',\n sensitivity: 'read',\n sensitive: false,\n requiredScope: 'read',\n inputSchema: objectSchema(\n {\n channel_id: conversationIdSchema,\n include_num_members: booleanSchema('Include the channel member count (default false)'),\n },\n ['channel_id'],\n ),\n }),\n tool({\n id: 'read_channel_members',\n description:\n 'List the user IDs of the members of a Slack channel. Pair it with read_user_profile to resolve a member to a name.',\n sensitivity: 'read',\n sensitive: false,\n requiredScope: 'read',\n inputSchema: objectSchema(\n {\n channel_id: conversationIdSchema,\n limit: integerSchema('Members to return per page (default 100)'),\n cursor: cursorSchema,\n },\n ['channel_id'],\n ),\n }),\n tool({\n id: 'read_user_profile',\n description:\n 'Retrieve profile information for a Slack user, including contact details, status, timezone, and role.',\n sensitivity: 'read',\n sensitive: false,\n requiredScope: 'read',\n inputSchema: objectSchema(\n {\n user_id: stringSchema('Slack user ID, such as U0ABC12345'),\n include_locale: booleanSchema(\"Include the user's locale information (default false)\"),\n },\n ['user_id'],\n ),\n }),\n tool({\n id: 'search_channels',\n description:\n 'Search the channels this integration can see, by name, topic, or purpose. Returns channel names, IDs, topics, purposes, and archive status. Names are typically lowercase with hyphens. Space-separated terms all have to match. Only the requested page is searched, so page through with the returned cursor when a channel is missing.',\n sensitivity: 'read',\n sensitive: false,\n requiredScope: 'read',\n inputSchema: objectSchema(\n {\n query: stringSchema('Search query for finding channels'),\n channel_types: stringSchema(\n 'Comma-separated channel types: public_channel, private_channel. Defaults to public_channel',\n ),\n include_archived: booleanSchema('Include archived channels in the results'),\n limit: integerSchema('Channels to scan per page (default 100)'),\n cursor: cursorSchema,\n },\n ['query'],\n ),\n }),\n tool({\n id: 'send_message',\n description:\n 'Send a message to a Slack channel or user. To send a direct message, pass the user ID as the channel ID. Supports standard Markdown: bold, italic, strikethrough, links, lists, blockquotes, inline code, and code blocks. Returns the posted message timestamp.',\n sensitivity: 'write',\n sensitive: false,\n requiredScope: 'write',\n inputSchema: objectSchema(\n {\n channel_id: messageTargetSchema,\n message: messageSchema,\n thread_ts: threadTsSchema,\n reply_broadcast: replyBroadcastSchema,\n },\n ['channel_id', 'message'],\n ),\n }),\n tool({\n id: 'schedule_message',\n description:\n 'Schedule a message for future delivery to a Slack channel. Does not send immediately. post_at has to be at least 2 minutes in the future and at most 120 days out. Once scheduled, the message cannot be edited.',\n sensitivity: 'write',\n sensitive: false,\n requiredScope: 'write',\n inputSchema: objectSchema(\n {\n channel_id: messageTargetSchema,\n message: messageSchema,\n post_at: integerSchema('Unix timestamp at which to send the message'),\n thread_ts: threadTsSchema,\n reply_broadcast: replyBroadcastSchema,\n },\n ['channel_id', 'message', 'post_at'],\n ),\n }),\n tool({\n id: 'update_message',\n description:\n 'Update an already posted Slack message, replacing its content. Supports the same standard Markdown as send_message.',\n sensitivity: 'write',\n sensitive: false,\n requiredScope: 'write',\n inputSchema: objectSchema(\n {\n channel_id: conversationIdSchema,\n message_ts: stringSchema('Timestamp of the message to update'),\n message: messageSchema,\n },\n ['channel_id', 'message_ts', 'message'],\n ),\n }),\n tool({\n id: 'add_reaction',\n description: 'Add an emoji reaction to a Slack message.',\n sensitivity: 'write',\n sensitive: false,\n requiredScope: 'write',\n inputSchema: objectSchema(\n {\n channel_id: conversationIdSchema,\n message_ts: stringSchema('Timestamp of the message to react to'),\n emoji: stringSchema('Emoji name without the surrounding colons, such as white_check_mark'),\n },\n ['channel_id', 'message_ts', 'emoji'],\n ),\n }),\n tool({\n id: 'create_canvas',\n description:\n 'Create a standalone Slack canvas from Markdown and return its ID. Not available on free teams.',\n sensitivity: 'write',\n sensitive: false,\n requiredScope: 'write',\n inputSchema: objectSchema(\n {\n title: stringSchema('Concise, descriptive canvas name. Do not repeat it in the content'),\n content: stringSchema('Canvas body, written as standard Markdown'),\n },\n ['title', 'content'],\n ),\n }),\n] as const satisfies readonly SlackAgentToolCatalogEntry[];\n\nexport type SlackAgentToolId = (typeof slackAgentToolCatalog)[number]['id'];\n\nexport interface SlackToolOperation {\n method: string;\n mapArguments: (args: Record<string, unknown>) => Record<string, unknown>;\n mapOutput?: (body: SlackWebApiResponse, args: Record<string, unknown>) => SlackWebApiResponse;\n validate?: (args: Record<string, unknown>) => SlackToolValidationError | undefined;\n}\n\nexport interface SlackToolValidationError {\n message: string;\n code?: string | undefined;\n}\n\n// Tool inputs follow the Slack MCP server's naming so agent prompts port across both, which means\n// every call is translated to the Web API's own parameter names before it is sent.\nexport const SLACK_TOOL_OPERATIONS = {\n read_channel: {\n method: 'conversations.history',\n mapArguments: ({channel_id, oldest, latest, limit, cursor}) => ({\n channel: channel_id,\n oldest,\n latest,\n limit,\n cursor,\n }),\n },\n read_thread: {\n method: 'conversations.replies',\n mapArguments: ({channel_id, message_ts, oldest, latest, limit, cursor}) => ({\n channel: channel_id,\n ts: message_ts,\n oldest,\n latest,\n limit,\n cursor,\n }),\n },\n read_channel_info: {\n method: 'conversations.info',\n mapArguments: ({channel_id, include_num_members}) => ({\n channel: channel_id,\n include_num_members,\n }),\n },\n read_channel_members: {\n method: 'conversations.members',\n mapArguments: ({channel_id, limit, cursor}) => ({channel: channel_id, limit, cursor}),\n },\n read_user_profile: {\n method: 'users.info',\n mapArguments: ({user_id, include_locale}) => ({user: user_id, include_locale}),\n },\n search_channels: {\n method: 'conversations.list',\n mapArguments: ({channel_types, include_archived, limit, cursor}) => ({\n types: channel_types,\n exclude_archived: include_archived !== true,\n limit,\n cursor,\n }),\n mapOutput: matchingChannels,\n },\n send_message: {\n method: 'chat.postMessage',\n mapArguments: ({channel_id, message, thread_ts, reply_broadcast}) => ({\n channel: channel_id,\n ...markdownMessage(message),\n thread_ts,\n reply_broadcast,\n }),\n validate: validateMessageLength,\n },\n schedule_message: {\n method: 'chat.scheduleMessage',\n mapArguments: ({channel_id, message, post_at, thread_ts, reply_broadcast}) => ({\n channel: channel_id,\n ...markdownMessage(message),\n post_at,\n thread_ts,\n reply_broadcast,\n }),\n validate: validateMessageLength,\n },\n update_message: {\n method: 'chat.update',\n mapArguments: ({channel_id, message_ts, message}) => ({\n channel: channel_id,\n ts: message_ts,\n ...markdownMessage(message),\n }),\n validate: validateMessageLength,\n },\n add_reaction: {\n method: 'reactions.add',\n mapArguments: ({channel_id, message_ts, emoji}) => ({\n channel: channel_id,\n timestamp: message_ts,\n name: emoji,\n }),\n },\n create_canvas: {\n method: 'canvases.create',\n mapArguments: ({title, content}) => ({\n title,\n document_content: {type: 'markdown', markdown: content},\n }),\n },\n} as const satisfies Record<SlackAgentToolId, SlackToolOperation>;\n\nexport const slackAgentToolSelectionCatalog =\n buildSlackAgentToolSelectionCatalog(slackAgentToolCatalog);\n\n// A Markdown block renders standard Markdown, which the plain text field does not; text is kept as\n// the notification fallback, so its Markdown syntax is stripped rather than shown literally.\nfunction markdownMessage(message: unknown): Record<string, unknown> {\n if (typeof message !== 'string') return {};\n return {text: stripMarkdownForFallback(message), blocks: [{type: 'markdown', text: message}]};\n}\n\nconst codeBlockPattern = /```[^\\n]*\\n?([\\s\\S]*?)\\n?```/g;\nconst inlineCodePattern = /`([^`]+)`/g;\nconst linkPattern = /\\[([^\\]]+)\\]\\(([^)]+)\\)/g;\nconst boldPattern = /\\*\\*([^*]+)\\*\\*|__([^_]+)__/g;\nconst strikethroughPattern = /~~([^~]+)~~/g;\nconst italicPattern = /\\*([^*]+)\\*|_([^_]+)_/g;\nconst blockquotePattern = /^>\\s?/gm;\n// Reserved code spans are wrapped in a delimiter built at runtime (String.fromCharCode) rather than\n// a literal escape in source. A real chat message is vanishingly unlikely to contain a NUL byte, but\n// isn't guaranteed not to, so any that do appear are stripped from the input first. After that, the\n// only NUL bytes left are the ones this function inserts, so restoration can't misfire on user text.\nconst codePlaceholderDelimiter = String.fromCharCode(0);\nconst codePlaceholderPattern = new RegExp(\n `${codePlaceholderDelimiter}(\\\\d+)${codePlaceholderDelimiter}`,\n 'g',\n);\n\n// Best-effort plain-text rendering of the Markdown syntax the tool description promises (bold,\n// italic, strikethrough, links, lists, blockquotes, inline code, code blocks); lists are left as-is\n// since \"- item\" and \"1. item\" already read fine as plain text. Code spans are pulled out behind a\n// placeholder first so their own *, _, ~, and [] characters survive the other replacements intact.\nfunction stripMarkdownForFallback(message: string): string {\n const codeSpans: string[] = [];\n const reserveCodeSpan = (_match: string, code: string): string =>\n `${codePlaceholderDelimiter}${codeSpans.push(code) - 1}${codePlaceholderDelimiter}`;\n\n return message\n .replaceAll(codePlaceholderDelimiter, '')\n .replace(codeBlockPattern, reserveCodeSpan)\n .replace(inlineCodePattern, reserveCodeSpan)\n .replace(linkPattern, (_match, text: string, url: string) => `${text} (${url})`)\n .replace(\n boldPattern,\n (_match, asterisk?: string, underscore?: string) => asterisk ?? underscore ?? '',\n )\n .replace(strikethroughPattern, (_match, text: string) => text)\n .replace(\n italicPattern,\n (_match, asterisk?: string, underscore?: string) => asterisk ?? underscore ?? '',\n )\n .replace(blockquotePattern, '')\n .replace(codePlaceholderPattern, (_match, index: string) => codeSpans[Number(index)] ?? '');\n}\n\nfunction validateMessageLength(\n args: Record<string, unknown>,\n): SlackToolValidationError | undefined {\n const {message} = args;\n if (typeof message !== 'string') return undefined;\n // .length counts UTF-16 code units, so astral-plane characters (most emoji) count twice and\n // would reject messages the 12,000-character schema limit still allows; the spread operator\n // iterates by Unicode code point instead.\n const length = [...message].length;\n if (length > SLACK_MARKDOWN_BLOCK_MAX_LENGTH) {\n return {\n message: `Message is ${length.toLocaleString('en-US')} characters, which exceeds Slack's ${SLACK_MARKDOWN_BLOCK_MAX_LENGTH.toLocaleString('en-US')}-character Markdown block limit. Shorten it or split it into multiple messages.`,\n code: 'content-too-large',\n };\n }\n return undefined;\n}\n\n// Slack has no channel search method for bot tokens, so the requested page is matched locally.\nfunction matchingChannels(\n body: SlackWebApiResponse,\n args: Record<string, unknown>,\n): SlackWebApiResponse {\n const {query} = args;\n const {channels} = body;\n if (typeof query !== 'string' || !Array.isArray(channels)) return body;\n const terms = query.toLowerCase().split(whitespacePattern).filter(Boolean);\n if (terms.length === 0) return body;\n return {...body, channels: channels.filter((channel) => matchesTerms(channel, terms))};\n}\n\nfunction matchesTerms(channel: unknown, terms: string[]): boolean {\n if (typeof channel !== 'object' || channel === null) return false;\n const {name, topic, purpose} = channel as Record<string, unknown>;\n const haystack = [name, textValue(topic), textValue(purpose)]\n .filter((value): value is string => typeof value === 'string')\n .join(' ')\n .toLowerCase();\n return terms.every((term) => haystack.includes(term));\n}\n\nfunction textValue(field: unknown): unknown {\n if (typeof field !== 'object' || field === null) return undefined;\n return (field as Record<string, unknown>).value;\n}\n\nfunction buildSlackAgentToolSelectionCatalog(\n catalog: readonly SlackAgentToolCatalogEntry[],\n): AgentToolSelectionCatalog {\n return {\n selectors: catalog.map(\n (entry): AgentToolSelector => ({\n token: entry.id,\n kind: 'standalone',\n sensitivity: entry.sensitivity,\n sensitive: entry.sensitive,\n }),\n ),\n };\n}\n\nfunction tool<const Entry extends SlackAgentToolCatalogInput>(input: Entry): Entry {\n return input;\n}\n\nfunction objectSchema(\n properties: Record<string, AgentToolJsonSchema>,\n required: string[] = [],\n): AgentToolJsonSchema {\n return {\n type: 'object',\n additionalProperties: false,\n properties,\n ...(required.length > 0 ? {required} : {}),\n };\n}\n\nfunction stringSchema(description?: string): AgentToolJsonSchema {\n return {type: 'string', ...(description ? {description} : {})};\n}\n\nfunction integerSchema(description: string): AgentToolJsonSchema {\n return {type: 'integer', description};\n}\n\nfunction booleanSchema(description: string): AgentToolJsonSchema {\n return {type: 'boolean', description};\n}\n"],"names":["whitespacePattern","SLACK_MARKDOWN_BLOCK_MAX_LENGTH","conversationIdSchema","stringSchema","messageTargetSchema","cursorSchema","messageSchema","maxLength","threadTsSchema","replyBroadcastSchema","booleanSchema","slackAgentToolCatalog","tool","id","description","sensitivity","sensitive","requiredScope","inputSchema","objectSchema","channel_id","oldest","latest","limit","integerSchema","cursor","message_ts","include_num_members","user_id","include_locale","query","channel_types","include_archived","message","thread_ts","reply_broadcast","post_at","emoji","title","content","SLACK_TOOL_OPERATIONS","read_channel","method","mapArguments","channel","read_thread","ts","read_channel_info","read_channel_members","read_user_profile","user","search_channels","types","exclude_archived","mapOutput","matchingChannels","send_message","markdownMessage","validate","validateMessageLength","schedule_message","update_message","add_reaction","timestamp","name","create_canvas","document_content","type","markdown","slackAgentToolSelectionCatalog","buildSlackAgentToolSelectionCatalog","text","stripMarkdownForFallback","blocks","codeBlockPattern","inlineCodePattern","linkPattern","boldPattern","strikethroughPattern","italicPattern","blockquotePattern","codePlaceholderDelimiter","String","fromCharCode","codePlaceholderPattern","RegExp","codeSpans","reserveCodeSpan","_match","code","push","replaceAll","replace","url","asterisk","underscore","index","Number","args","undefined","length","toLocaleString","body","channels","Array","isArray","terms","toLowerCase","split","filter","Boolean","matchesTerms","topic","purpose","haystack","textValue","value","join","every","term","includes","field","catalog","selectors","map","entry","token","kind","input","properties","required","additionalProperties"],"mappings":"AAoBA,MAAMA,oBAAoB;AAE1B,iGAAiG;AACjG,gGAAgG;AAChG,oFAAoF;AACpF,MAAMC,kCAAkC;AAExC,mGAAmG;AACnG,gFAAgF;AAChF,MAAMC,uBAAuBC,aAC3B;AAEF,MAAMC,sBAAsBD,aAC1B;AAEF,MAAME,eAAeF,aAAa;AAClC,MAAMG,gBAAgB;IACpB,GAAGH,aAAa,gDAAgD;IAChEI,WAAWN;AACb;AACA,MAAMO,iBAAiBL,aAAa;AACpC,MAAMM,uBAAuBC,cAAc;AAE3C,OAAO,MAAMC,wBAAwB;IACnCC,KAAK;QACHC,IAAI;QACJC,aACE;QACFC,aAAa;QACbC,WAAW;QACXC,eAAe;QACfC,aAAaC,aACX;YACEC,YAAYlB;YACZmB,QAAQlB,aAAa;YACrBmB,QAAQnB,aAAa;YACrBoB,OAAOC,cAAc;YACrBC,QAAQpB;QACV,GACA;YAAC;SAAa;IAElB;IACAO,KAAK;QACHC,IAAI;QACJC,aACE;QACFC,aAAa;QACbC,WAAW;QACXC,eAAe;QACfC,aAAaC,aACX;YACEC,YAAYlB;YACZwB,YAAYvB,aAAa;YACzBkB,QAAQlB,aAAa;YACrBmB,QAAQnB,aAAa;YACrBoB,OAAOC,cAAc;YACrBC,QAAQpB;QACV,GACA;YAAC;YAAc;SAAa;IAEhC;IACAO,KAAK;QACHC,IAAI;QACJC,aACE;QACFC,aAAa;QACbC,WAAW;QACXC,eAAe;QACfC,aAAaC,aAC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AAK;aAE9B,aAAa,EAAE,MAAM;aACrB,mBAAmB,EAAE,MAAM,GAAG,SAAS;IAFzD,YACkB,aAAa,EAAE,MAAM,EACrB,mBAAmB,EAAE,MAAM,GAAG,SAAS,EAIxD;CACF;AAED,qBAAa,oCAAqC,SAAQ,KAAK;aACjC,aAAa,EAAE,MAAM,EAAE;IAAnD,YAA4B,aAAa,EAAE,MAAM,EAAE,EAGlD;CACF;AAED,qBAAa,sCAAuC,SAAQ,KAAK;IAC/D,cAGC;CACF;AAED,qBAAa,kCAAmC,SAAQ,KAAK;IAC3D,cAGC;CACF;AAED,qBAAa,mCAAoC,SAAQ,KAAK;IAC5D,YAAY,MAAM,EAAE,MAAM,EAGzB;CACF;AAED,qBAAa,iCAAkC,SAAQ,KAAK;IAC1D,YAAY,YAAY,EAAE,MAAM,EAG/B;CACF;AAED,qBAAa,4BAA6B,SAAQ,KAAK;IACrD,YAAY,YAAY,EAAE,MAAM,EAG/B;CACF;AAED,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,YAAY,YAAY,EAAE,MAAM,EAG/B;CACF;AAED,MAAM,MAAM,iCAAiC,GACzC,wBAAwB,GACxB,eAAe,GACf,SAAS,CAAC;AAEd,qBAAa,gCAAiC,SAAQ,KAAK;aAEvC,YAAY,EAAE,MAAM;aACpB,MAAM,EAAE,iCAAiC;aACzC,SAAS,CAAC,EAAE,IAAI;IAHlC,YACkB,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,iCAAiC,EACzC,SAAS,CAAC,EAAE,IAAI,YAAA,EAIjC;CACF"}
package/dist/db/db.d.ts CHANGED
@@ -213,7 +213,7 @@ export declare const schema: {
213
213
  generated: undefined;
214
214
  }, {}, {}>;
215
215
  };
216
- dialect: "pg";
216
+ dialect: 'pg';
217
217
  }>;
218
218
  };
219
219
  export declare function db(): NodePgDatabase<{
@@ -430,7 +430,7 @@ export declare function db(): NodePgDatabase<{
430
430
  generated: undefined;
431
431
  }, {}, {}>;
432
432
  };
433
- dialect: "pg";
433
+ dialect: 'pg';
434
434
  }>;
435
435
  }>;
436
436
  export declare function closeDb(): void;
@@ -212,7 +212,7 @@ export declare const slackInstallations: import("drizzle-orm/pg-core").PgTableWi
212
212
  generated: undefined;
213
213
  }, {}, {}>;
214
214
  };
215
- dialect: "pg";
215
+ dialect: 'pg';
216
216
  }>;
217
217
  export type SlackInstallationDb = typeof slackInstallations.$inferSelect;
218
218
  export type SlackInstallationCreateDb = typeof slackInstallations.$inferInsert;
package/dist/index.d.ts CHANGED
@@ -57,11 +57,6 @@ export interface CreateSlackIntegrationProviderOptions {
57
57
  routes?: SlackRouteOptions | undefined;
58
58
  }
59
59
  export declare function createSlackIntegrationProvider(options?: CreateSlackIntegrationProviderOptions): {
60
- routes: RouteGroup[];
61
- webhookProcessors: {
62
- routeIds: readonly ["slack.event", "slack.command"];
63
- processor: import("#core/webhook-processor.js").SlackWebhookProcessor;
64
- }[] | undefined;
65
60
  deleteConnectionRecords?: (connection: {
66
61
  id: string;
67
62
  }, options: {
@@ -81,5 +76,10 @@ export declare function createSlackIntegrationProvider(options?: CreateSlackInte
81
76
  connectionExternalUrl(connection: {
82
77
  id: string;
83
78
  }): Promise<string | undefined>;
79
+ routes: RouteGroup[];
80
+ webhookProcessors: {
81
+ routeIds: readonly ['slack.event', 'slack.command'];
82
+ processor: import("#core/webhook-processor.js").SlackWebhookProcessor;
83
+ }[] | undefined;
84
84
  };
85
85
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAuB,KAAK,cAAc,EAAC,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAC,MAAM,EAAC,MAAM,YAAY,CAAC;AAClC,OAAO,EAAC,uBAAuB,EAAC,MAAM,+BAA+B,CAAC;AACtE,OAAO,KAAK,EAAC,eAAe,EAAC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CACxB,UAAU,EAAE;QAAC,EAAE,EAAE,MAAM,CAAA;KAAC,EACxB,OAAO,EAAE;QAAC,EAAE,EAAE,OAAO,CAAA;KAAC,KACnB,OAAO,CAAC,IAAI,CAAC;8BACQ,CAAC,UAAU,EAAE;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAC,KAAK,OAAO,CAAC,IAAI,CAAC;;;;;;;;sCA4DtD;QAAC,EAAE,EAAE,MAAM,CAAA;KAAC,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;;;4BAQjE,aAAa,EAAE,eAAe;;;EAGlD"}
@@ -1 +1 @@
1
- {"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../../../src/presentation/dto/integrations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,qBAAqB,EAAE,qBAAqB,EAAC,MAAM,8BAA8B,CAAC;AAE/F,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,qBAAqB,EACjC,MAAM,EAAE;IAAC,YAAY,EAAE,qBAAqB,EAAE,CAAA;CAAC;;;;;;;;;;;EAchD"}
1
+ {"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../../../src/presentation/dto/integrations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,qBAAqB,EAAE,qBAAqB,EAAC,MAAM,8BAA8B,CAAC;AAE/F,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,qBAAqB,EACjC,MAAM,EAAE;IAAC,YAAY,EAAE,qBAAqB,EAAE,CAAA;CAAC;IAG7C,EAAE;IACF,YAAY;IACZ,QAAQ;IACR,mBAAmB;IACnB,IAAI;IACJ,YAAY;IACZ,gBAAgB;IAChB,YAAY;IACZ,UAAU;IACV,UAAU;EAEb"}
@@ -4,8 +4,8 @@ import type { NodePgDatabase } from 'drizzle-orm/node-postgres';
4
4
  import { type SlackWebhookProcessor } from '#core/webhook-processor.js';
5
5
  export declare const SLACK_WEBHOOK_BODY_LIMIT: number;
6
6
  export declare const SLASH_COMMAND_ACK: {
7
- readonly response_type: "ephemeral";
8
- readonly text: "Working on it.";
7
+ readonly response_type: 'ephemeral';
8
+ readonly text: 'Working on it.';
9
9
  };
10
10
  export interface CreateSlackWebhookRoutesOptions {
11
11
  coreDb: () => NodePgDatabase<Record<string, unknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../../src/presentation/routes/webhooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,EACtB,8BAA8B,EAC9B,iCAAiC,EACjC,oBAAoB,EAGrB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAA8B,KAAK,qBAAqB,EAAC,MAAM,4BAA4B,CAAC;AAEnG,eAAO,MAAM,wBAAwB,QAAc,CAAC;AACpD,eAAO,MAAM,iBAAiB;;;CAAgE,CAAC;AAW/F,MAAM,WAAW,+BAA+B;IAC9C,MAAM,EAAE,MAAM,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACtD,oBAAoB,EAAE,sBAAsB,CAAC;IAC7C,+BAA+B,EAAE,iCAAiC,CAAC;IACnE,kBAAkB,EAAE,oBAAoB,CAAC;IACzC,4BAA4B,EAAE,8BAA8B,CAAC;IAC7D,SAAS,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;CAC/C;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,+BAA+B,GAAG,UAAU,EAAE,CAqE/F"}
1
+ {"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../../src/presentation/routes/webhooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,EACtB,8BAA8B,EAC9B,iCAAiC,EACjC,oBAAoB,EAGrB,MAAM,8BAA8B,CA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