@ganju/utils 0.0.1

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.
Files changed (220) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +9 -0
  3. package/README.md +23 -0
  4. package/dist/apiError.d.ts +3 -0
  5. package/dist/apiError.d.ts.map +1 -0
  6. package/dist/apiError.js +36 -0
  7. package/dist/attachment.d.ts +33 -0
  8. package/dist/attachment.d.ts.map +1 -0
  9. package/dist/attachment.js +59 -0
  10. package/dist/base64.d.ts +10 -0
  11. package/dist/base64.d.ts.map +1 -0
  12. package/dist/base64.js +50 -0
  13. package/dist/channelDebounce.d.ts +26 -0
  14. package/dist/channelDebounce.d.ts.map +1 -0
  15. package/dist/channelDebounce.js +35 -0
  16. package/dist/channelNotifier.d.ts +9 -0
  17. package/dist/channelNotifier.d.ts.map +1 -0
  18. package/dist/channelNotifier.js +31 -0
  19. package/dist/chunking.d.ts +28 -0
  20. package/dist/chunking.d.ts.map +1 -0
  21. package/dist/chunking.js +97 -0
  22. package/dist/cliConstants.d.ts +9 -0
  23. package/dist/cliConstants.d.ts.map +1 -0
  24. package/dist/cliConstants.js +47 -0
  25. package/dist/coerce.d.ts +2 -0
  26. package/dist/coerce.d.ts.map +1 -0
  27. package/dist/coerce.js +13 -0
  28. package/dist/constants.d.ts +624 -0
  29. package/dist/constants.d.ts.map +1 -0
  30. package/dist/constants.js +2220 -0
  31. package/dist/crypto.d.ts +14 -0
  32. package/dist/crypto.d.ts.map +1 -0
  33. package/dist/crypto.js +93 -0
  34. package/dist/customCodeProject.d.ts +91 -0
  35. package/dist/customCodeProject.d.ts.map +1 -0
  36. package/dist/customCodeProject.js +154 -0
  37. package/dist/customCodeToken.d.ts +41 -0
  38. package/dist/customCodeToken.d.ts.map +1 -0
  39. package/dist/customCodeToken.js +115 -0
  40. package/dist/deadline.d.ts +6 -0
  41. package/dist/deadline.d.ts.map +1 -0
  42. package/dist/deadline.js +45 -0
  43. package/dist/discordSend.d.ts +25 -0
  44. package/dist/discordSend.d.ts.map +1 -0
  45. package/dist/discordSend.js +8 -0
  46. package/dist/embeddable.d.ts +2 -0
  47. package/dist/embeddable.d.ts.map +1 -0
  48. package/dist/embeddable.js +6 -0
  49. package/dist/exposedResource.d.ts +6 -0
  50. package/dist/exposedResource.d.ts.map +1 -0
  51. package/dist/exposedResource.js +18 -0
  52. package/dist/extractedDocument.d.ts +70 -0
  53. package/dist/extractedDocument.d.ts.map +1 -0
  54. package/dist/extractedDocument.js +2 -0
  55. package/dist/fetcher.d.ts +8 -0
  56. package/dist/fetcher.d.ts.map +1 -0
  57. package/dist/fetcher.js +68 -0
  58. package/dist/formatFilename.d.ts +2 -0
  59. package/dist/formatFilename.d.ts.map +1 -0
  60. package/dist/formatFilename.js +19 -0
  61. package/dist/formatRelative.d.ts +12 -0
  62. package/dist/formatRelative.d.ts.map +1 -0
  63. package/dist/formatRelative.js +28 -0
  64. package/dist/formatRelativeTime.d.ts +2 -0
  65. package/dist/formatRelativeTime.d.ts.map +1 -0
  66. package/dist/formatRelativeTime.js +49 -0
  67. package/dist/getEnv.d.ts +5 -0
  68. package/dist/getEnv.d.ts.map +1 -0
  69. package/dist/getEnv.js +11 -0
  70. package/dist/gmailSend.d.ts +24 -0
  71. package/dist/gmailSend.d.ts.map +1 -0
  72. package/dist/gmailSend.js +9 -0
  73. package/dist/index.d.ts +2839 -0
  74. package/dist/index.d.ts.map +1 -0
  75. package/dist/index.js +155 -0
  76. package/dist/jsonSchemaToZodShape.d.ts +38 -0
  77. package/dist/jsonSchemaToZodShape.d.ts.map +1 -0
  78. package/dist/jsonSchemaToZodShape.js +117 -0
  79. package/dist/l2Normalize.d.ts +2 -0
  80. package/dist/l2Normalize.d.ts.map +1 -0
  81. package/dist/l2Normalize.js +25 -0
  82. package/dist/languageCookieDomain.d.ts +21 -0
  83. package/dist/languageCookieDomain.d.ts.map +1 -0
  84. package/dist/languageCookieDomain.js +39 -0
  85. package/dist/localizeZodIssue.d.ts +43 -0
  86. package/dist/localizeZodIssue.d.ts.map +1 -0
  87. package/dist/localizeZodIssue.js +90 -0
  88. package/dist/mailHeaders.d.ts +4 -0
  89. package/dist/mailHeaders.d.ts.map +1 -0
  90. package/dist/mailHeaders.js +11 -0
  91. package/dist/mcpProxy.d.ts +2 -0
  92. package/dist/mcpProxy.d.ts.map +1 -0
  93. package/dist/mcpProxy.js +21 -0
  94. package/dist/mimeMessage.d.ts +21 -0
  95. package/dist/mimeMessage.d.ts.map +1 -0
  96. package/dist/mimeMessage.js +58 -0
  97. package/dist/oauth.d.ts +21 -0
  98. package/dist/oauth.d.ts.map +1 -0
  99. package/dist/oauth.js +75 -0
  100. package/dist/oauthProviders.d.ts +12 -0
  101. package/dist/oauthProviders.d.ts.map +1 -0
  102. package/dist/oauthProviders.js +99 -0
  103. package/dist/outlookSend.d.ts +19 -0
  104. package/dist/outlookSend.d.ts.map +1 -0
  105. package/dist/outlookSend.js +9 -0
  106. package/dist/parseHttpError.d.ts +2 -0
  107. package/dist/parseHttpError.d.ts.map +1 -0
  108. package/dist/parseHttpError.js +23 -0
  109. package/dist/planLimitError.d.ts +18 -0
  110. package/dist/planLimitError.d.ts.map +1 -0
  111. package/dist/planLimitError.js +35 -0
  112. package/dist/processQueueBatch.d.ts +17 -0
  113. package/dist/processQueueBatch.d.ts.map +1 -0
  114. package/dist/processQueueBatch.js +32 -0
  115. package/dist/reservedToolName.d.ts +16 -0
  116. package/dist/reservedToolName.d.ts.map +1 -0
  117. package/dist/reservedToolName.js +25 -0
  118. package/dist/resourceUri.d.ts +2 -0
  119. package/dist/resourceUri.d.ts.map +1 -0
  120. package/dist/resourceUri.js +19 -0
  121. package/dist/retry.d.ts +10 -0
  122. package/dist/retry.d.ts.map +1 -0
  123. package/dist/retry.js +37 -0
  124. package/dist/sanitize.d.ts +7 -0
  125. package/dist/sanitize.d.ts.map +1 -0
  126. package/dist/sanitize.js +69 -0
  127. package/dist/schema.d.ts +2175 -0
  128. package/dist/schema.d.ts.map +1 -0
  129. package/dist/schema.js +1382 -0
  130. package/dist/sdkConstants.d.ts +15 -0
  131. package/dist/sdkConstants.d.ts.map +1 -0
  132. package/dist/sdkConstants.js +43 -0
  133. package/dist/slackSend.d.ts +38 -0
  134. package/dist/slackSend.d.ts.map +1 -0
  135. package/dist/slackSend.js +14 -0
  136. package/dist/slug.d.ts +5 -0
  137. package/dist/slug.d.ts.map +1 -0
  138. package/dist/slug.js +34 -0
  139. package/dist/slugifyTitle.d.ts +2 -0
  140. package/dist/slugifyTitle.d.ts.map +1 -0
  141. package/dist/slugifyTitle.js +11 -0
  142. package/dist/sources.d.ts +43 -0
  143. package/dist/sources.d.ts.map +1 -0
  144. package/dist/sources.js +73 -0
  145. package/dist/ssrf.d.ts +3 -0
  146. package/dist/ssrf.d.ts.map +1 -0
  147. package/dist/ssrf.js +46 -0
  148. package/dist/tallyUsageKinds.d.ts +9 -0
  149. package/dist/tallyUsageKinds.d.ts.map +1 -0
  150. package/dist/tallyUsageKinds.js +20 -0
  151. package/dist/telegramSend.d.ts +28 -0
  152. package/dist/telegramSend.d.ts.map +1 -0
  153. package/dist/telegramSend.js +9 -0
  154. package/dist/toolCatalog.d.ts +452 -0
  155. package/dist/toolCatalog.d.ts.map +1 -0
  156. package/dist/toolCatalog.js +552 -0
  157. package/dist/validateMessageVariables.d.ts +7 -0
  158. package/dist/validateMessageVariables.d.ts.map +1 -0
  159. package/dist/validateMessageVariables.js +16 -0
  160. package/dist/vendorError.d.ts +2 -0
  161. package/dist/vendorError.d.ts.map +1 -0
  162. package/dist/vendorError.js +25 -0
  163. package/dist/whatsappSend.d.ts +31 -0
  164. package/dist/whatsappSend.d.ts.map +1 -0
  165. package/dist/whatsappSend.js +11 -0
  166. package/package.json +76 -0
  167. package/src/apiError.ts +40 -0
  168. package/src/attachment.ts +97 -0
  169. package/src/base64.ts +60 -0
  170. package/src/channelDebounce.ts +76 -0
  171. package/src/channelNotifier.ts +39 -0
  172. package/src/chunking.ts +131 -0
  173. package/src/cliConstants.ts +50 -0
  174. package/src/coerce.ts +9 -0
  175. package/src/constants.ts +2542 -0
  176. package/src/crypto.ts +108 -0
  177. package/src/customCodeProject.ts +182 -0
  178. package/src/customCodeToken.ts +198 -0
  179. package/src/deadline.ts +43 -0
  180. package/src/discordSend.ts +41 -0
  181. package/src/embeddable.ts +4 -0
  182. package/src/exposedResource.ts +40 -0
  183. package/src/extractedDocument.ts +62 -0
  184. package/src/fetcher.ts +82 -0
  185. package/src/formatFilename.ts +19 -0
  186. package/src/formatRelative.ts +36 -0
  187. package/src/formatRelativeTime.ts +45 -0
  188. package/src/getEnv.ts +13 -0
  189. package/src/gmailSend.ts +34 -0
  190. package/src/index.ts +397 -0
  191. package/src/jsonSchemaToZodShape.ts +111 -0
  192. package/src/l2Normalize.ts +19 -0
  193. package/src/languageCookieDomain.ts +37 -0
  194. package/src/localizeZodIssue.ts +124 -0
  195. package/src/mailHeaders.ts +12 -0
  196. package/src/mcpProxy.ts +20 -0
  197. package/src/mimeMessage.ts +82 -0
  198. package/src/oauth.ts +103 -0
  199. package/src/oauthProviders.ts +118 -0
  200. package/src/outlookSend.ts +44 -0
  201. package/src/parseHttpError.ts +16 -0
  202. package/src/planLimitError.ts +50 -0
  203. package/src/processQueueBatch.ts +46 -0
  204. package/src/reservedToolName.ts +27 -0
  205. package/src/resourceUri.ts +17 -0
  206. package/src/retry.ts +43 -0
  207. package/src/sanitize.ts +67 -0
  208. package/src/schema.ts +1624 -0
  209. package/src/sdkConstants.ts +44 -0
  210. package/src/slackSend.ts +65 -0
  211. package/src/slug.ts +37 -0
  212. package/src/slugifyTitle.ts +8 -0
  213. package/src/sources.ts +117 -0
  214. package/src/ssrf.ts +34 -0
  215. package/src/tallyUsageKinds.ts +20 -0
  216. package/src/telegramSend.ts +39 -0
  217. package/src/toolCatalog.ts +635 -0
  218. package/src/validateMessageVariables.ts +18 -0
  219. package/src/vendorError.ts +19 -0
  220. package/src/whatsappSend.ts +47 -0
@@ -0,0 +1,452 @@
1
+ export interface CatalogTool {
2
+ key: string;
3
+ title: string;
4
+ description: string | null;
5
+ requiredScopes: string | null;
6
+ }
7
+ export interface CatalogGroup {
8
+ key: string;
9
+ title: string;
10
+ description: string | null;
11
+ icon: string | null;
12
+ provider: string | null;
13
+ tools: readonly CatalogTool[];
14
+ }
15
+ export declare const TOOL_CATALOG: readonly [{
16
+ readonly key: "gmail";
17
+ readonly title: "Gmail";
18
+ readonly description: "Send, read, search, and manage emails";
19
+ readonly icon: "https://www.gstatic.com/images/branding/product/1x/gmail_2020q4_48dp.png";
20
+ readonly provider: "google-gmail";
21
+ readonly tools: readonly [{
22
+ readonly key: "gmail-batch-modify-labels";
23
+ readonly title: "Batch Modify Labels";
24
+ readonly description: "Add or remove labels on many emails at once (archive, mark read, etc.).";
25
+ readonly requiredScopes: "https://www.googleapis.com/auth/gmail.modify";
26
+ }, {
27
+ readonly key: "gmail-create-draft";
28
+ readonly title: "Create Draft";
29
+ readonly description: "Save a new draft in Gmail without sending it yet.";
30
+ readonly requiredScopes: "https://www.googleapis.com/auth/gmail.compose";
31
+ }, {
32
+ readonly key: "gmail-delete-draft";
33
+ readonly title: "Delete Draft";
34
+ readonly description: "Permanently delete a draft.";
35
+ readonly requiredScopes: "https://www.googleapis.com/auth/gmail.compose";
36
+ }, {
37
+ readonly key: "gmail-forward-email";
38
+ readonly title: "Forward Email";
39
+ readonly description: "Forward an email to a new recipient.";
40
+ readonly requiredScopes: "https://www.googleapis.com/auth/gmail.send";
41
+ }, {
42
+ readonly key: "gmail-get-draft";
43
+ readonly title: "Get Draft";
44
+ readonly description: "Open a saved draft to review its contents.";
45
+ readonly requiredScopes: "https://www.googleapis.com/auth/gmail.compose";
46
+ }, {
47
+ readonly key: "gmail-get-profile";
48
+ readonly title: "Get Profile";
49
+ readonly description: "Show the email address and inbox stats for the connected Gmail account.";
50
+ readonly requiredScopes: "https://www.googleapis.com/auth/gmail.readonly";
51
+ }, {
52
+ readonly key: "gmail-get-thread";
53
+ readonly title: "Get Thread";
54
+ readonly description: "See every message inside one conversation.";
55
+ readonly requiredScopes: "https://www.googleapis.com/auth/gmail.readonly";
56
+ }, {
57
+ readonly key: "gmail-list-drafts";
58
+ readonly title: "List Drafts";
59
+ readonly description: "Browse your saved drafts.";
60
+ readonly requiredScopes: "https://www.googleapis.com/auth/gmail.compose";
61
+ }, {
62
+ readonly key: "gmail-list-emails";
63
+ readonly title: "List Emails";
64
+ readonly description: "Browse your Gmail inbox, with optional search filters.";
65
+ readonly requiredScopes: "https://www.googleapis.com/auth/gmail.readonly";
66
+ }, {
67
+ readonly key: "gmail-list-labels";
68
+ readonly title: "List Labels";
69
+ readonly description: "See all of your Gmail labels and folders.";
70
+ readonly requiredScopes: "https://www.googleapis.com/auth/gmail.labels";
71
+ }, {
72
+ readonly key: "gmail-list-threads";
73
+ readonly title: "List Threads";
74
+ readonly description: "List your Gmail conversations.";
75
+ readonly requiredScopes: "https://www.googleapis.com/auth/gmail.readonly";
76
+ }, {
77
+ readonly key: "gmail-modify-labels";
78
+ readonly title: "Modify Labels";
79
+ readonly description: "Add or remove labels on a single email — archive it, mark it read, star it, and more.";
80
+ readonly requiredScopes: "https://www.googleapis.com/auth/gmail.modify";
81
+ }, {
82
+ readonly key: "gmail-read-email";
83
+ readonly title: "Read Email";
84
+ readonly description: "Open and read a specific email.";
85
+ readonly requiredScopes: "https://www.googleapis.com/auth/gmail.readonly";
86
+ }, {
87
+ readonly key: "gmail-reply-email";
88
+ readonly title: "Reply Email";
89
+ readonly description: "Reply to an email so the response stays in the same conversation.";
90
+ readonly requiredScopes: "https://www.googleapis.com/auth/gmail.send";
91
+ }, {
92
+ readonly key: "gmail-send-draft";
93
+ readonly title: "Send Draft";
94
+ readonly description: "Send a draft you've already saved.";
95
+ readonly requiredScopes: "https://www.googleapis.com/auth/gmail.send";
96
+ }, {
97
+ readonly key: "gmail-send-email";
98
+ readonly title: "Send Email";
99
+ readonly description: "Compose and send a new email from your connected Gmail account.";
100
+ readonly requiredScopes: "https://www.googleapis.com/auth/gmail.send";
101
+ }, {
102
+ readonly key: "gmail-trash-email";
103
+ readonly title: "Move to Trash";
104
+ readonly description: "Move an email to Trash. It stays recoverable for 30 days.";
105
+ readonly requiredScopes: "https://www.googleapis.com/auth/gmail.modify";
106
+ }, {
107
+ readonly key: "gmail-update-draft";
108
+ readonly title: "Update Draft";
109
+ readonly description: "Edit the contents of a saved draft.";
110
+ readonly requiredScopes: "https://www.googleapis.com/auth/gmail.compose";
111
+ }];
112
+ }, {
113
+ readonly key: "outlook";
114
+ readonly title: "Outlook";
115
+ readonly description: "Microsoft Outlook mail tools backed by Microsoft Graph.";
116
+ readonly icon: "https://api.iconify.design/vscode-icons:file-type-outlook.svg";
117
+ readonly provider: "microsoft-outlook";
118
+ readonly tools: readonly [{
119
+ readonly key: "outlook-batch-move-messages";
120
+ readonly title: "Batch Move Messages";
121
+ readonly description: "Move up to 20 messages to the same folder.";
122
+ readonly requiredScopes: "https://graph.microsoft.com/Mail.ReadWrite";
123
+ }, {
124
+ readonly key: "outlook-create-draft";
125
+ readonly title: "Create Draft";
126
+ readonly description: "Create a draft email saved in Drafts.";
127
+ readonly requiredScopes: "https://graph.microsoft.com/Mail.ReadWrite";
128
+ }, {
129
+ readonly key: "outlook-delete-draft";
130
+ readonly title: "Delete Draft";
131
+ readonly description: "Permanently delete a draft.";
132
+ readonly requiredScopes: "https://graph.microsoft.com/Mail.ReadWrite";
133
+ }, {
134
+ readonly key: "outlook-forward-email";
135
+ readonly title: "Forward";
136
+ readonly description: "Forward an existing message to a new recipient.";
137
+ readonly requiredScopes: "https://graph.microsoft.com/Mail.Send";
138
+ }, {
139
+ readonly key: "outlook-get-draft";
140
+ readonly title: "Get Draft";
141
+ readonly description: "Read the full contents of a draft.";
142
+ readonly requiredScopes: "https://graph.microsoft.com/Mail.Read";
143
+ }, {
144
+ readonly key: "outlook-get-profile";
145
+ readonly title: "Get Profile";
146
+ readonly description: "Get the connected account's profile and inbox totals.";
147
+ readonly requiredScopes: "https://graph.microsoft.com/User.Read";
148
+ }, {
149
+ readonly key: "outlook-get-thread";
150
+ readonly title: "Get Thread";
151
+ readonly description: "Get summaries of every message in a conversation.";
152
+ readonly requiredScopes: "https://graph.microsoft.com/Mail.Read";
153
+ }, {
154
+ readonly key: "outlook-list-drafts";
155
+ readonly title: "List Drafts";
156
+ readonly description: "List drafts in the Drafts folder.";
157
+ readonly requiredScopes: "https://graph.microsoft.com/Mail.Read";
158
+ }, {
159
+ readonly key: "outlook-list-emails";
160
+ readonly title: "List Emails";
161
+ readonly description: "List inbox messages, optionally filtered by search.";
162
+ readonly requiredScopes: "https://graph.microsoft.com/Mail.Read";
163
+ }, {
164
+ readonly key: "outlook-list-folders";
165
+ readonly title: "List Folders";
166
+ readonly description: "List every mail folder on the account.";
167
+ readonly requiredScopes: "https://graph.microsoft.com/Mail.Read";
168
+ }, {
169
+ readonly key: "outlook-list-threads";
170
+ readonly title: "List Threads";
171
+ readonly description: "List inbox conversation threads.";
172
+ readonly requiredScopes: "https://graph.microsoft.com/Mail.Read";
173
+ }, {
174
+ readonly key: "outlook-move-message";
175
+ readonly title: "Move Message";
176
+ readonly description: "Move a message to a different folder.";
177
+ readonly requiredScopes: "https://graph.microsoft.com/Mail.ReadWrite";
178
+ }, {
179
+ readonly key: "outlook-read-email";
180
+ readonly title: "Read Email";
181
+ readonly description: "Read the full contents of one message by ID.";
182
+ readonly requiredScopes: "https://graph.microsoft.com/Mail.Read";
183
+ }, {
184
+ readonly key: "outlook-reply-email";
185
+ readonly title: "Reply";
186
+ readonly description: "Reply to an existing message, preserving the conversation.";
187
+ readonly requiredScopes: "https://graph.microsoft.com/Mail.Send";
188
+ }, {
189
+ readonly key: "outlook-send-draft";
190
+ readonly title: "Send Draft";
191
+ readonly description: "Send an existing draft as-is.";
192
+ readonly requiredScopes: "https://graph.microsoft.com/Mail.Send";
193
+ }, {
194
+ readonly key: "outlook-send-email";
195
+ readonly title: "Send Email";
196
+ readonly description: "Send a brand-new email from the connected account.";
197
+ readonly requiredScopes: "https://graph.microsoft.com/Mail.Send";
198
+ }, {
199
+ readonly key: "outlook-trash-email";
200
+ readonly title: "Move to Trash";
201
+ readonly description: "Move a message to the Deleted Items folder.";
202
+ readonly requiredScopes: "https://graph.microsoft.com/Mail.ReadWrite";
203
+ }, {
204
+ readonly key: "outlook-update-draft";
205
+ readonly title: "Update Draft";
206
+ readonly description: "Replace the contents of an existing draft.";
207
+ readonly requiredScopes: "https://graph.microsoft.com/Mail.ReadWrite";
208
+ }];
209
+ }, {
210
+ readonly key: "slack";
211
+ readonly title: "Slack";
212
+ readonly description: "Post messages, browse channels, and upload files in Slack via Web API.";
213
+ readonly icon: "https://api.iconify.design/logos:slack-icon.svg";
214
+ readonly provider: "slack";
215
+ readonly tools: readonly [{
216
+ readonly key: "slack-get-user";
217
+ readonly title: "Get User";
218
+ readonly description: "Look up a Slack user by ID or email.";
219
+ readonly requiredScopes: "users:read,users:read.email";
220
+ }, {
221
+ readonly key: "slack-list-channels";
222
+ readonly title: "List Channels";
223
+ readonly description: "Browse the channels and DMs the agent can see.";
224
+ readonly requiredScopes: "channels:read,groups:read,mpim:read,im:read";
225
+ }, {
226
+ readonly key: "slack-send-message";
227
+ readonly title: "Send Message";
228
+ readonly description: "Post a message to a Slack channel, DM, or thread.";
229
+ readonly requiredScopes: "chat:write";
230
+ }, {
231
+ readonly key: "slack-upload-file";
232
+ readonly title: "Upload File";
233
+ readonly description: "Upload a stored resource into a Slack channel.";
234
+ readonly requiredScopes: "files:write,chat:write";
235
+ }];
236
+ }, {
237
+ readonly key: "slack-user";
238
+ readonly title: "Slack Search";
239
+ readonly description: "Workspace-wide message search for Slack. Backed by a user (xoxp) token because Slack does not allow bot tokens to call search.messages.";
240
+ readonly icon: "https://api.iconify.design/logos:slack-icon.svg";
241
+ readonly provider: "slack-user";
242
+ readonly tools: readonly [{
243
+ readonly key: "slack-search-messages";
244
+ readonly title: "Search Messages";
245
+ readonly description: "Search messages across the workspace. Requires a Slack user token (xoxp).";
246
+ readonly requiredScopes: "search:read";
247
+ }];
248
+ }, {
249
+ readonly key: "google-calendar";
250
+ readonly title: "Google Calendar";
251
+ readonly description: "Create and manage calendar events, and find open time slots";
252
+ readonly icon: "https://api.iconify.design/logos:google-calendar.svg";
253
+ readonly provider: "google-calendar";
254
+ readonly tools: readonly [{
255
+ readonly key: "calendar-create-event";
256
+ readonly title: "Create Event";
257
+ readonly description: "Add a new event to a calendar.";
258
+ readonly requiredScopes: "https://www.googleapis.com/auth/calendar.events";
259
+ }, {
260
+ readonly key: "calendar-delete-event";
261
+ readonly title: "Delete Event";
262
+ readonly description: "Permanently remove an event from a calendar.";
263
+ readonly requiredScopes: "https://www.googleapis.com/auth/calendar.events";
264
+ }, {
265
+ readonly key: "calendar-find-free-slots";
266
+ readonly title: "Find Free Slots";
267
+ readonly description: "Find open time gaps on a calendar.";
268
+ readonly requiredScopes: "https://www.googleapis.com/auth/calendar.readonly";
269
+ }, {
270
+ readonly key: "calendar-list-calendars";
271
+ readonly title: "List Calendars";
272
+ readonly description: "See all calendars on the connected Google account.";
273
+ readonly requiredScopes: "https://www.googleapis.com/auth/calendar.readonly";
274
+ }, {
275
+ readonly key: "calendar-list-events";
276
+ readonly title: "List Events";
277
+ readonly description: "Browse events on a calendar within a time range.";
278
+ readonly requiredScopes: "https://www.googleapis.com/auth/calendar.readonly";
279
+ }, {
280
+ readonly key: "calendar-update-event";
281
+ readonly title: "Update Event";
282
+ readonly description: "Change the details of an existing event.";
283
+ readonly requiredScopes: "https://www.googleapis.com/auth/calendar.events";
284
+ }];
285
+ }, {
286
+ readonly key: "calcom";
287
+ readonly title: "Cal.com";
288
+ readonly description: "Check availability and book or cancel meetings on Cal.com";
289
+ readonly icon: "https://api.iconify.design/simple-icons:caldotcom.svg";
290
+ readonly provider: "calcom";
291
+ readonly tools: readonly [{
292
+ readonly key: "calcom-cancel-booking";
293
+ readonly title: "Cancel Booking";
294
+ readonly description: "Cancel an existing booking by its UID.";
295
+ readonly requiredScopes: null;
296
+ }, {
297
+ readonly key: "calcom-create-booking";
298
+ readonly title: "Create Booking";
299
+ readonly description: "Book an available slot for an attendee.";
300
+ readonly requiredScopes: null;
301
+ }, {
302
+ readonly key: "calcom-list-available-slots";
303
+ readonly title: "List Available Slots";
304
+ readonly description: "Find open booking times for an event type in a date range.";
305
+ readonly requiredScopes: null;
306
+ }, {
307
+ readonly key: "calcom-list-event-types";
308
+ readonly title: "List Event Types";
309
+ readonly description: "See the bookable meeting types on the connected Cal.com account.";
310
+ readonly requiredScopes: null;
311
+ }];
312
+ }, {
313
+ readonly key: "web";
314
+ readonly title: "Web Search";
315
+ readonly description: "Search the live web and extract page content, powered by Tavily.";
316
+ readonly icon: "https://api.iconify.design/mdi:web.svg";
317
+ readonly provider: "tavily";
318
+ readonly tools: readonly [{
319
+ readonly key: "web-extract";
320
+ readonly title: "Web Extract";
321
+ readonly description: "Fetch the full cleaned text of specific web pages by URL for in-depth reading.";
322
+ readonly requiredScopes: null;
323
+ }, {
324
+ readonly key: "web-search";
325
+ readonly title: "Web Search";
326
+ readonly description: "Search the live web and return the top results plus a synthesized answer so the model can cite sources.";
327
+ readonly requiredScopes: null;
328
+ }];
329
+ }, {
330
+ readonly key: "builtin";
331
+ readonly title: "Built-in";
332
+ readonly description: "Core tools available to every MCP server";
333
+ readonly icon: null;
334
+ readonly provider: null;
335
+ readonly tools: readonly [{
336
+ readonly key: "list-prompts";
337
+ readonly title: "List Prompts";
338
+ readonly description: "List the prompts and commands this assistant exposes, and how to run them on the current channel.";
339
+ readonly requiredScopes: null;
340
+ }, {
341
+ readonly key: "list-resources";
342
+ readonly title: "List Resources";
343
+ readonly description: "List every resource available to this assistant.";
344
+ readonly requiredScopes: null;
345
+ }, {
346
+ readonly key: "read-resource";
347
+ readonly title: "Read Resource";
348
+ readonly description: "Read the contents of a stored resource.";
349
+ readonly requiredScopes: null;
350
+ }, {
351
+ readonly key: "search-resources";
352
+ readonly title: "Search Resources";
353
+ readonly description: "Find the resources most relevant to a question using semantic search.";
354
+ readonly requiredScopes: null;
355
+ }, {
356
+ readonly key: "send-resource";
357
+ readonly title: "Send Resource";
358
+ readonly description: "Deliver a resource to the user as a chat attachment.";
359
+ readonly requiredScopes: null;
360
+ }];
361
+ }, {
362
+ readonly key: "greeting";
363
+ readonly title: "Greeting";
364
+ readonly description: "Simple greeting utilities";
365
+ readonly icon: null;
366
+ readonly provider: null;
367
+ readonly tools: readonly [{
368
+ readonly key: "greeting";
369
+ readonly title: "Greeting";
370
+ readonly description: "Reply with a friendly hello in English or Spanish (demo tool).";
371
+ readonly requiredScopes: null;
372
+ }];
373
+ }, {
374
+ readonly key: "http-endpoint";
375
+ readonly title: "HTTP Endpoints";
376
+ readonly description: "Expose your own HTTP APIs to the agent as named tools. Each endpoint you add becomes a tool the assistant can call.";
377
+ readonly icon: "https://api.iconify.design/mdi:api.svg";
378
+ readonly provider: null;
379
+ readonly tools: readonly [{
380
+ readonly key: "http-endpoint";
381
+ readonly title: "HTTP Endpoint";
382
+ readonly description: "A user-configured HTTP request exposed to the agent as its own named tool.";
383
+ readonly requiredScopes: null;
384
+ }];
385
+ }, {
386
+ readonly key: "mcp-proxy";
387
+ readonly title: "MCP Servers";
388
+ readonly description: "Connect a vendor's official remote MCP server and expose its tools to the agent. Each server you add brings its own set of tools.";
389
+ readonly icon: "https://api.iconify.design/mdi:server-network.svg";
390
+ readonly provider: null;
391
+ readonly tools: readonly [{
392
+ readonly key: "mcp-proxy";
393
+ readonly title: "MCP Server";
394
+ readonly description: "A connected remote MCP server. Each server you add exposes its tools to the agent under a vendor prefix.";
395
+ readonly requiredScopes: null;
396
+ }];
397
+ }, {
398
+ readonly key: "custom-code";
399
+ readonly title: "Custom code";
400
+ readonly description: "Write your own tools as a Cloudflare Worker and deploy them to this MCP server.";
401
+ readonly icon: null;
402
+ readonly provider: null;
403
+ readonly tools: readonly [{
404
+ readonly key: "custom-code";
405
+ readonly title: "Custom code";
406
+ readonly description: "Tools implemented by your own code. One script per artifact; names and schemas come from the published version.";
407
+ readonly requiredScopes: null;
408
+ }];
409
+ }];
410
+ export type ToolKey = (typeof TOOL_CATALOG)[number]['tools'][number]['key'];
411
+ export type ToolGroupKey = (typeof TOOL_CATALOG)[number]['key'];
412
+ export declare const TOOL_KEYS: ToolKey[];
413
+ /**
414
+ * Look up one tool and the group it belongs to.
415
+ *
416
+ * Returns undefined rather than throwing, because the callers that matter are
417
+ * reading a STORED `artifact_tool.tool_key` — a row written before a tool was
418
+ * retired still has to be readable. The MCP boot loop skips what it can't
419
+ * resolve; it must never fail the whole artifact over one row.
420
+ */
421
+ export declare const findCatalogTool: (key: string) => {
422
+ tool: CatalogTool;
423
+ group: CatalogGroup;
424
+ } | undefined;
425
+ export declare const findCatalogGroup: (key: string) => CatalogGroup | undefined;
426
+ /**
427
+ * Is this a tool the platform ships? Used on the WRITE path, where installing an
428
+ * unknown key has to be refused — unlike the read path above, which is lenient
429
+ * on purpose.
430
+ */
431
+ export declare const isToolKey: (key: string) => key is ToolKey;
432
+ /**
433
+ * One installed tool's catalog entry, shaped for an API response.
434
+ *
435
+ * `artifact_tool` rows carry only a key, so every surface that renders a tool —
436
+ * the dashboard's cards, a channel's usage attribution — needs the title,
437
+ * description and group that used to arrive on the join. Attaching it
438
+ * server-side keeps those responses self-describing, so a client never has to
439
+ * hold its own copy of the catalog to render a row.
440
+ *
441
+ * Null for a key the catalog no longer offers. Callers render what they can
442
+ * (the key is still on the row) rather than dropping the tool.
443
+ */
444
+ export interface CatalogToolDescriptor {
445
+ key: string;
446
+ title: string;
447
+ description: string | null;
448
+ requiredScopes: string | null;
449
+ group: Omit<CatalogGroup, 'tools'>;
450
+ }
451
+ export declare const describeCatalogTool: (key: string) => CatalogToolDescriptor | null;
452
+ //# sourceMappingURL=toolCatalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolCatalog.d.ts","sourceRoot":"","sources":["../src/toolCatalog.ts"],"names":[],"mappings":"AAiBA,MAAM,WAAW,WAAW;IAG1B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAI3B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAGpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,SAAS,WAAW,EAAE,CAAC;CAC/B;AAMD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyfmB,CAAC;AAI7C,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;AAC5E,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;AAgBhE,eAAO,MAAM,SAAS,EAA6B,OAAO,EAAE,CAAC;AAE7D;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAC1B,KAAK,MAAM,KACV;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,YAAY,CAAA;CAAE,GAAG,SAC3B,CAAC;AAEtB,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,KAAG,YAAY,GAAG,SACxC,CAAC;AAEvB;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,KAAK,MAAM,KAAG,GAAG,IAAI,OAA8B,CAAC;AAE9E;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,qBAAqB;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,eAAO,MAAM,mBAAmB,GAC9B,KAAK,MAAM,KACV,qBAAqB,GAAG,IAiB1B,CAAC"}