@shipfox/api-integration-slack 11.0.0 → 12.0.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/.turbo/turbo-build.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
$ shipfox-swc
|
|
2
|
-
Successfully compiled: 25 files with swc (
|
|
2
|
+
Successfully compiled: 25 files with swc (244.52ms)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @shipfox/api-integration-slack
|
|
2
2
|
|
|
3
|
+
## 12.0.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a018f92: Expose the Linear and Slack agent-tool catalogs for integration documentation generation.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- f78740d: Remove Unicode dash punctuation from package prose and source comments.
|
|
12
|
+
- Updated dependencies [f78740d]
|
|
13
|
+
- Updated dependencies [94aba88]
|
|
14
|
+
- Updated dependencies [24ef475]
|
|
15
|
+
- Updated dependencies [f13e8bb]
|
|
16
|
+
- Updated dependencies [9ebc5b4]
|
|
17
|
+
- Updated dependencies [869a792]
|
|
18
|
+
- Updated dependencies [54c820e]
|
|
19
|
+
- Updated dependencies [e1efaee]
|
|
20
|
+
- @shipfox/inter-module@0.2.3
|
|
21
|
+
- @shipfox/node-fastify@0.4.1
|
|
22
|
+
- @shipfox/api-workspaces-dto@12.0.0
|
|
23
|
+
- @shipfox/api-integration-spi@1.0.0
|
|
24
|
+
- @shipfox/node-postgres@0.5.0
|
|
25
|
+
- @shipfox/api-auth-context@12.0.0
|
|
26
|
+
- @shipfox/api-integration-slack-dto@12.0.0
|
|
27
|
+
- @shipfox/node-drizzle@0.3.5
|
|
28
|
+
|
|
3
29
|
## 11.0.0
|
|
4
30
|
|
|
5
31
|
### Major Changes
|
package/dist/core/agent-tools.js
CHANGED
|
@@ -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
|
|
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,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,e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QAA2B,OAAOA,UAAU,UACpDC,IAAI,CAAC,KACLV,WAAW;IACd,OAAOD,MAAMY,KAAK,CAAC,CAACC,OAASL,SAASM,QAAQ,CAACD;AACjD;AAEA,SAASJ,UAAUM,KAAc;IAC/B,IAAI,OAAOA,UAAU,YAAYA,UAAU,MAAM,OAAOtB;IACxD,OAAO,AAACsB,MAAkCL,KAAK;AACjD;AAEA,SAAS9C,oCACPoD,OAA8C;IAE9C,OAAO;QACLC,WAAWD,QAAQE,GAAG,CACpB,CAACC,QAA8B,CAAA;gBAC7BC,OAAOD,MAAMhH,EAAE;gBACfkH,MAAM;gBACNhH,aAAa8G,MAAM9G,WAAW;gBAC9BC,WAAW6G,MAAM7G,SAAS;YAC5B,CAAA;IAEJ;AACF;AAEA,SAASJ,KAAqDoH,KAAY;IACxE,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,a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