@mastra/editor 0.13.8 → 0.13.9
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/CHANGELOG.md +17 -0
- package/dist/arcade.cjs +645 -292
- package/dist/arcade.cjs.map +1 -1
- package/dist/arcade.d.cts +47 -46
- package/dist/arcade.d.cts.map +1 -0
- package/dist/arcade.d.ts +47 -46
- package/dist/arcade.d.ts.map +1 -0
- package/dist/arcade.js +642 -263
- package/dist/arcade.js.map +1 -1
- package/dist/composio.cjs +336 -361
- package/dist/composio.cjs.map +1 -1
- package/dist/composio.d.cts +52 -51
- package/dist/composio.d.cts.map +1 -0
- package/dist/composio.d.ts +52 -51
- package/dist/composio.d.ts.map +1 -0
- package/dist/composio.js +330 -329
- package/dist/composio.js.map +1 -1
- package/dist/ee/index.cjs +199 -191
- package/dist/ee/index.cjs.map +1 -1
- package/dist/ee/index.d.cts +47 -44
- package/dist/ee/index.d.cts.map +1 -0
- package/dist/ee/index.d.ts +47 -44
- package/dist/ee/index.d.ts.map +1 -0
- package/dist/ee/index.js +180 -158
- package/dist/ee/index.js.map +1 -1
- package/dist/index.cjs +2459 -3145
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +461 -478
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +461 -478
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2442 -2797
- package/dist/index.js.map +1 -1
- package/dist/storage/index.cjs +24 -35
- package/dist/storage/index.d.cts +2 -1
- package/dist/storage/index.d.ts +2 -1
- package/dist/storage/index.js +2 -14
- package/package.json +11 -11
- package/dist/storage/index.cjs.map +0 -1
- package/dist/storage/index.js.map +0 -1
package/dist/arcade.cjs
CHANGED
|
@@ -1,296 +1,649 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
let _mastra_core_request_context = require("@mastra/core/request-context");
|
|
3
|
+
let _arcadeai_arcadejs = require("@arcadeai/arcadejs");
|
|
4
|
+
let _arcadeai_arcadejs_lib_index = require("@arcadeai/arcadejs/lib/index");
|
|
5
|
+
//#region src/providers/arcade.ts
|
|
6
|
+
const KNOWN_TOOLKITS = [
|
|
7
|
+
{
|
|
8
|
+
slug: "AirtableApi",
|
|
9
|
+
name: "Airtable API",
|
|
10
|
+
category: "productivity"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
slug: "ArcadeEngineApi",
|
|
14
|
+
name: "Arcade Engine API",
|
|
15
|
+
category: "development"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
slug: "Asana",
|
|
19
|
+
name: "Asana",
|
|
20
|
+
category: "productivity"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
slug: "AsanaApi",
|
|
24
|
+
name: "Asana API",
|
|
25
|
+
category: "productivity"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
slug: "AshbyApi",
|
|
29
|
+
name: "Ashby API",
|
|
30
|
+
category: "productivity"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
slug: "Attio",
|
|
34
|
+
name: "Attio",
|
|
35
|
+
category: "sales"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
slug: "BoxApi",
|
|
39
|
+
name: "Box API",
|
|
40
|
+
category: "productivity"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
slug: "Brightdata",
|
|
44
|
+
name: "Bright Data",
|
|
45
|
+
category: "development"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
slug: "CalendlyApi",
|
|
49
|
+
name: "Calendly API",
|
|
50
|
+
category: "productivity"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
slug: "Clickup",
|
|
54
|
+
name: "ClickUp",
|
|
55
|
+
category: "productivity"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
slug: "ClickupApi",
|
|
59
|
+
name: "ClickUp API",
|
|
60
|
+
category: "productivity"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
slug: "Confluence",
|
|
64
|
+
name: "Confluence",
|
|
65
|
+
category: "productivity"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
slug: "CursorAgentsApi",
|
|
69
|
+
name: "Cursor Agents API",
|
|
70
|
+
category: "development"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
slug: "CustomerioApi",
|
|
74
|
+
name: "Customer.io API",
|
|
75
|
+
category: "customer-support"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
slug: "CustomerioPipelinesApi",
|
|
79
|
+
name: "Customer.io Pipelines API",
|
|
80
|
+
category: "customer-support"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
slug: "CustomerioTrackApi",
|
|
84
|
+
name: "Customer.io Track API",
|
|
85
|
+
category: "customer-support"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
slug: "DatadogApi",
|
|
89
|
+
name: "Datadog API",
|
|
90
|
+
category: "development"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
slug: "Dropbox",
|
|
94
|
+
name: "Dropbox",
|
|
95
|
+
category: "productivity"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
slug: "E2b",
|
|
99
|
+
name: "E2B",
|
|
100
|
+
category: "development"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
slug: "ExaApi",
|
|
104
|
+
name: "Exa API",
|
|
105
|
+
category: "search"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
slug: "Figma",
|
|
109
|
+
name: "Figma",
|
|
110
|
+
category: "productivity"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
slug: "FigmaApi",
|
|
114
|
+
name: "Figma API",
|
|
115
|
+
category: "productivity"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
slug: "Firecrawl",
|
|
119
|
+
name: "Firecrawl",
|
|
120
|
+
category: "development"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
slug: "FreshserviceApi",
|
|
124
|
+
name: "Freshservice API",
|
|
125
|
+
category: "customer-support"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
slug: "Github",
|
|
129
|
+
name: "GitHub",
|
|
130
|
+
category: "development"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
slug: "GithubApi",
|
|
134
|
+
name: "GitHub API",
|
|
135
|
+
category: "development"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
slug: "Gmail",
|
|
139
|
+
name: "Gmail",
|
|
140
|
+
category: "productivity"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
slug: "Google",
|
|
144
|
+
name: "Google",
|
|
145
|
+
category: "search"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
slug: "GoogleCalendar",
|
|
149
|
+
name: "Google Calendar",
|
|
150
|
+
category: "productivity"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
slug: "GoogleContacts",
|
|
154
|
+
name: "Google Contacts",
|
|
155
|
+
category: "productivity"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
slug: "GoogleDocs",
|
|
159
|
+
name: "Google Docs",
|
|
160
|
+
category: "productivity"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
slug: "GoogleDrive",
|
|
164
|
+
name: "Google Drive",
|
|
165
|
+
category: "productivity"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
slug: "GoogleFinance",
|
|
169
|
+
name: "Google Finance",
|
|
170
|
+
category: "search"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
slug: "GoogleFlights",
|
|
174
|
+
name: "Google Flights",
|
|
175
|
+
category: "search"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
slug: "GoogleHotels",
|
|
179
|
+
name: "Google Hotels",
|
|
180
|
+
category: "search"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
slug: "GoogleJobs",
|
|
184
|
+
name: "Google Jobs",
|
|
185
|
+
category: "search"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
slug: "GoogleMaps",
|
|
189
|
+
name: "Google Maps",
|
|
190
|
+
category: "search"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
slug: "GoogleNews",
|
|
194
|
+
name: "Google News",
|
|
195
|
+
category: "search"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
slug: "GoogleSearch",
|
|
199
|
+
name: "Google Search",
|
|
200
|
+
category: "search"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
slug: "GoogleSheets",
|
|
204
|
+
name: "Google Sheets",
|
|
205
|
+
category: "productivity"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
slug: "GoogleShopping",
|
|
209
|
+
name: "Google Shopping",
|
|
210
|
+
category: "search"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
slug: "GoogleSlides",
|
|
214
|
+
name: "Google Slides",
|
|
215
|
+
category: "productivity"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
slug: "Hubspot",
|
|
219
|
+
name: "HubSpot",
|
|
220
|
+
category: "sales"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
slug: "HubspotAutomationApi",
|
|
224
|
+
name: "HubSpot Automation API",
|
|
225
|
+
category: "sales"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
slug: "HubspotCmsApi",
|
|
229
|
+
name: "HubSpot CMS API",
|
|
230
|
+
category: "sales"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
slug: "HubspotConversationsApi",
|
|
234
|
+
name: "HubSpot Conversations API",
|
|
235
|
+
category: "sales"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
slug: "HubspotCrmApi",
|
|
239
|
+
name: "HubSpot CRM API",
|
|
240
|
+
category: "sales"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
slug: "HubspotEventsApi",
|
|
244
|
+
name: "HubSpot Events API",
|
|
245
|
+
category: "sales"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
slug: "HubspotMarketingApi",
|
|
249
|
+
name: "HubSpot Marketing API",
|
|
250
|
+
category: "sales"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
slug: "HubspotMeetingsApi",
|
|
254
|
+
name: "HubSpot Meetings API",
|
|
255
|
+
category: "sales"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
slug: "HubspotUsersApi",
|
|
259
|
+
name: "HubSpot Users API",
|
|
260
|
+
category: "sales"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
slug: "Imgflip",
|
|
264
|
+
name: "Imgflip",
|
|
265
|
+
category: "entertainment"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
slug: "IntercomApi",
|
|
269
|
+
name: "Intercom API",
|
|
270
|
+
category: "customer-support"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
slug: "Jira",
|
|
274
|
+
name: "Jira",
|
|
275
|
+
category: "productivity"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
slug: "Linear",
|
|
279
|
+
name: "Linear",
|
|
280
|
+
category: "productivity"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
slug: "Linkedin",
|
|
284
|
+
name: "LinkedIn",
|
|
285
|
+
category: "social"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
slug: "LumaApi",
|
|
289
|
+
name: "Luma API",
|
|
290
|
+
category: "productivity"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
slug: "MailchimpMarketingApi",
|
|
294
|
+
name: "Mailchimp API",
|
|
295
|
+
category: "productivity"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
slug: "Math",
|
|
299
|
+
name: "Math",
|
|
300
|
+
category: "utility"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
slug: "Microsoft",
|
|
304
|
+
name: "Microsoft",
|
|
305
|
+
category: "productivity"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
slug: "MicrosoftOnedrive",
|
|
309
|
+
name: "Microsoft OneDrive",
|
|
310
|
+
category: "productivity"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
slug: "MicrosoftTeams",
|
|
314
|
+
name: "Microsoft Teams",
|
|
315
|
+
category: "social"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
slug: "MicrosoftWord",
|
|
319
|
+
name: "Microsoft Word",
|
|
320
|
+
category: "productivity"
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
slug: "MiroApi",
|
|
324
|
+
name: "Miro API",
|
|
325
|
+
category: "productivity"
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
slug: "NotionToolkit",
|
|
329
|
+
name: "Notion",
|
|
330
|
+
category: "productivity"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
slug: "OutlookCalendar",
|
|
334
|
+
name: "Outlook Calendar",
|
|
335
|
+
category: "productivity"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
slug: "OutlookMail",
|
|
339
|
+
name: "Outlook Mail",
|
|
340
|
+
category: "productivity"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
slug: "Pagerduty",
|
|
344
|
+
name: "PagerDuty",
|
|
345
|
+
category: "development"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
slug: "PagerdutyApi",
|
|
349
|
+
name: "PagerDuty API",
|
|
350
|
+
category: "development"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
slug: "PosthogApi",
|
|
354
|
+
name: "PostHog API",
|
|
355
|
+
category: "development"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
slug: "Pylon",
|
|
359
|
+
name: "Pylon",
|
|
360
|
+
category: "customer-support"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
slug: "PylonApi",
|
|
364
|
+
name: "Pylon API",
|
|
365
|
+
category: "customer-support"
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
slug: "Reddit",
|
|
369
|
+
name: "Reddit",
|
|
370
|
+
category: "social"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
slug: "Salesforce",
|
|
374
|
+
name: "Salesforce",
|
|
375
|
+
category: "sales"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
slug: "Sharepoint",
|
|
379
|
+
name: "Microsoft SharePoint",
|
|
380
|
+
category: "productivity"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
slug: "Slack",
|
|
384
|
+
name: "Slack",
|
|
385
|
+
category: "social"
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
slug: "SlackApi",
|
|
389
|
+
name: "Slack API",
|
|
390
|
+
category: "social"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
slug: "Spotify",
|
|
394
|
+
name: "Spotify",
|
|
395
|
+
category: "entertainment"
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
slug: "SquareupApi",
|
|
399
|
+
name: "SquareUp API",
|
|
400
|
+
category: "productivity"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
slug: "Stripe",
|
|
404
|
+
name: "Stripe",
|
|
405
|
+
category: "payments"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
slug: "StripeApi",
|
|
409
|
+
name: "Stripe API",
|
|
410
|
+
category: "payments"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
slug: "TicktickApi",
|
|
414
|
+
name: "TickTick API",
|
|
415
|
+
category: "productivity"
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
slug: "TrelloApi",
|
|
419
|
+
name: "Trello API",
|
|
420
|
+
category: "productivity"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
slug: "Twilio",
|
|
424
|
+
name: "Twilio",
|
|
425
|
+
category: "social"
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
slug: "VercelApi",
|
|
429
|
+
name: "Vercel API",
|
|
430
|
+
category: "development"
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
slug: "Walmart",
|
|
434
|
+
name: "Walmart",
|
|
435
|
+
category: "search"
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
slug: "WeaviateApi",
|
|
439
|
+
name: "Weaviate API",
|
|
440
|
+
category: "development"
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
slug: "X",
|
|
444
|
+
name: "X",
|
|
445
|
+
category: "social"
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
slug: "XeroApi",
|
|
449
|
+
name: "Xero API",
|
|
450
|
+
category: "productivity"
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
slug: "Youtube",
|
|
454
|
+
name: "Youtube",
|
|
455
|
+
category: "search"
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
slug: "Zendesk",
|
|
459
|
+
name: "Zendesk",
|
|
460
|
+
category: "customer-support"
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
slug: "ZohoBooksApi",
|
|
464
|
+
name: "Zoho Books API",
|
|
465
|
+
category: "payments"
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
slug: "Zoom",
|
|
469
|
+
name: "Zoom",
|
|
470
|
+
category: "social"
|
|
471
|
+
}
|
|
125
472
|
];
|
|
473
|
+
/**
|
|
474
|
+
* Arcade AI tool provider adapter.
|
|
475
|
+
*
|
|
476
|
+
* Uses `@arcadeai/arcadejs` SDK for discovery and runtime tool resolution.
|
|
477
|
+
* The SDK is a static import and tree-shaken if this provider class isn't used.
|
|
478
|
+
*
|
|
479
|
+
* Arcade tools use `Toolkit.ToolName` naming (e.g., `Github.GetRepository`).
|
|
480
|
+
* Each toolkit groups related tools and manages its own auth requirements.
|
|
481
|
+
*
|
|
482
|
+
* Discovery methods (`listToolkits`, `listTools`, `getToolSchema`) use the
|
|
483
|
+
* standard `tools.list()` / `tools.get()` SDK methods.
|
|
484
|
+
*
|
|
485
|
+
* Runtime method (`resolveTools`) uses `toZodToolSet` from `@arcadeai/arcadejs/lib`
|
|
486
|
+
* to get executable ZodTool objects, then converts them to Mastra's ToolAction format.
|
|
487
|
+
*/
|
|
126
488
|
var ArcadeToolProvider = class {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
outputSchema: zodTool.output,
|
|
284
|
-
execute: async (input) => {
|
|
285
|
-
return zodTool.execute(input);
|
|
286
|
-
}
|
|
287
|
-
};
|
|
288
|
-
}
|
|
289
|
-
return result;
|
|
290
|
-
}
|
|
489
|
+
constructor(config) {
|
|
490
|
+
this.info = {
|
|
491
|
+
id: "arcade",
|
|
492
|
+
name: "Arcade AI",
|
|
493
|
+
description: "Access 7,000+ tools from 130+ app integrations via Arcade AI"
|
|
494
|
+
};
|
|
495
|
+
this.client = null;
|
|
496
|
+
this.config = config;
|
|
497
|
+
this.toolkitCache = /* @__PURE__ */ new Map();
|
|
498
|
+
for (const tk of KNOWN_TOOLKITS) this.toolkitCache.set(tk.slug, {
|
|
499
|
+
slug: tk.slug,
|
|
500
|
+
name: tk.name,
|
|
501
|
+
description: tk.description ?? `Arcade AI ${tk.name} tools`,
|
|
502
|
+
icon: tk.category
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Get or create an Arcade client.
|
|
507
|
+
*/
|
|
508
|
+
getClient() {
|
|
509
|
+
if (!this.client) this.client = new _arcadeai_arcadejs.Arcade({
|
|
510
|
+
apiKey: this.config.apiKey,
|
|
511
|
+
...this.config.baseURL ? { baseURL: this.config.baseURL } : {}
|
|
512
|
+
});
|
|
513
|
+
return this.client;
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Absorb toolkit metadata from a tool listing into the cache.
|
|
517
|
+
* Returns true if any new toolkit was discovered.
|
|
518
|
+
*/
|
|
519
|
+
absorbToolkits(items) {
|
|
520
|
+
let discovered = false;
|
|
521
|
+
for (const tool of items) {
|
|
522
|
+
const tk = tool.toolkit;
|
|
523
|
+
if (tk?.name && !this.toolkitCache.has(tk.name)) {
|
|
524
|
+
this.toolkitCache.set(tk.name, {
|
|
525
|
+
slug: tk.name,
|
|
526
|
+
name: tk.name,
|
|
527
|
+
description: tk.description ?? `Arcade AI ${tk.name} tools`
|
|
528
|
+
});
|
|
529
|
+
discovered = true;
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
return discovered;
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* List toolkits.
|
|
536
|
+
*
|
|
537
|
+
* Returns the pre-seeded catalog merged with any toolkits discovered at
|
|
538
|
+
* runtime via `listTools()` or `resolveTools()` calls.
|
|
539
|
+
*/
|
|
540
|
+
async listToolkits() {
|
|
541
|
+
return { data: [...this.toolkitCache.values()].sort((a, b) => a.name.localeCompare(b.name)) };
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* List available tools with optional toolkit and pagination filters.
|
|
545
|
+
* Uses `tools.list({ toolkit, limit, offset })`.
|
|
546
|
+
*/
|
|
547
|
+
async listTools(options) {
|
|
548
|
+
const client = this.getClient();
|
|
549
|
+
const limit = options?.perPage ?? 50;
|
|
550
|
+
const page = options?.page ?? 1;
|
|
551
|
+
const offset = (page - 1) * limit;
|
|
552
|
+
const query = {
|
|
553
|
+
limit,
|
|
554
|
+
offset
|
|
555
|
+
};
|
|
556
|
+
if (options?.toolkit) query.toolkit = options.toolkit;
|
|
557
|
+
const result = await client.tools.list(query);
|
|
558
|
+
const items = result.items ?? [];
|
|
559
|
+
this.absorbToolkits(items);
|
|
560
|
+
let filtered = items;
|
|
561
|
+
if (options?.search) {
|
|
562
|
+
const searchLower = options.search.toLowerCase();
|
|
563
|
+
filtered = items.filter((t) => t.name?.toLowerCase().includes(searchLower) || t.description?.toLowerCase().includes(searchLower) || t.qualified_name?.toLowerCase().includes(searchLower));
|
|
564
|
+
}
|
|
565
|
+
return {
|
|
566
|
+
data: filtered.map((tool) => ({
|
|
567
|
+
slug: tool.qualified_name ?? `${tool.toolkit?.name}.${tool.name}`,
|
|
568
|
+
name: tool.name,
|
|
569
|
+
description: tool.description,
|
|
570
|
+
toolkit: tool.toolkit?.name
|
|
571
|
+
})),
|
|
572
|
+
pagination: {
|
|
573
|
+
page,
|
|
574
|
+
perPage: limit,
|
|
575
|
+
total: result.total_count,
|
|
576
|
+
hasMore: offset + items.length < (result.total_count ?? 0)
|
|
577
|
+
}
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* Get the JSON schema for a specific tool by its qualified name (e.g., `Github.GetRepository`).
|
|
582
|
+
*/
|
|
583
|
+
async getToolSchema(toolSlug) {
|
|
584
|
+
try {
|
|
585
|
+
const tool = await this.getClient().tools.get(toolSlug);
|
|
586
|
+
if (!tool) return null;
|
|
587
|
+
const properties = {};
|
|
588
|
+
const required = [];
|
|
589
|
+
for (const param of tool.input?.parameters ?? []) {
|
|
590
|
+
properties[param.name] = {
|
|
591
|
+
...param.value_schema ?? {},
|
|
592
|
+
description: param.description
|
|
593
|
+
};
|
|
594
|
+
if (param.required) required.push(param.name);
|
|
595
|
+
}
|
|
596
|
+
return {
|
|
597
|
+
type: "object",
|
|
598
|
+
properties,
|
|
599
|
+
...required.length > 0 ? { required } : {}
|
|
600
|
+
};
|
|
601
|
+
} catch {
|
|
602
|
+
return null;
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* Resolve executable tools in Mastra's ToolAction format.
|
|
607
|
+
*
|
|
608
|
+
* Uses `toZodToolSet` from `@arcadeai/arcadejs/lib` to create ZodTool objects
|
|
609
|
+
* with Zod schemas and execute functions, then wraps them as ToolAction objects.
|
|
610
|
+
*/
|
|
611
|
+
async resolveTools(toolSlugs, toolConfigs, options) {
|
|
612
|
+
if (toolSlugs.length === 0) return {};
|
|
613
|
+
const client = this.getClient();
|
|
614
|
+
const resourceId = options?.requestContext?.[_mastra_core_request_context.MASTRA_RESOURCE_ID_KEY];
|
|
615
|
+
const userId = typeof resourceId === "string" ? resourceId : options?.userId ?? "default";
|
|
616
|
+
const validDefs = (await Promise.all(toolSlugs.map((slug) => client.tools.get(slug).catch(() => null)))).filter((d) => d !== null);
|
|
617
|
+
if (validDefs.length === 0) return {};
|
|
618
|
+
this.absorbToolkits(validDefs);
|
|
619
|
+
const zodToolSet = (0, _arcadeai_arcadejs_lib_index.toZodToolSet)({
|
|
620
|
+
tools: validDefs,
|
|
621
|
+
client,
|
|
622
|
+
userId,
|
|
623
|
+
executeFactory: _arcadeai_arcadejs_lib_index.executeOrAuthorizeZodTool
|
|
624
|
+
});
|
|
625
|
+
const result = {};
|
|
626
|
+
const normalizedToQualified = /* @__PURE__ */ new Map();
|
|
627
|
+
for (const d of validDefs) {
|
|
628
|
+
const qn = d.qualified_name ?? `${d.toolkit?.name}.${d.name}`;
|
|
629
|
+
normalizedToQualified.set(qn.replace(/\./g, "_"), qn);
|
|
630
|
+
}
|
|
631
|
+
for (const [key, zodTool] of Object.entries(zodToolSet)) {
|
|
632
|
+
const qualifiedName = normalizedToQualified.get(key) ?? key;
|
|
633
|
+
result[qualifiedName] = {
|
|
634
|
+
id: qualifiedName,
|
|
635
|
+
description: toolConfigs?.[qualifiedName]?.description ?? toolConfigs?.[key]?.description ?? zodTool.description ?? "",
|
|
636
|
+
inputSchema: zodTool.parameters,
|
|
637
|
+
outputSchema: zodTool.output,
|
|
638
|
+
execute: async (input) => {
|
|
639
|
+
return zodTool.execute(input);
|
|
640
|
+
}
|
|
641
|
+
};
|
|
642
|
+
}
|
|
643
|
+
return result;
|
|
644
|
+
}
|
|
291
645
|
};
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
});
|
|
646
|
+
//#endregion
|
|
647
|
+
exports.ArcadeToolProvider = ArcadeToolProvider;
|
|
648
|
+
|
|
296
649
|
//# sourceMappingURL=arcade.cjs.map
|