@mastra/dane 0.0.2-alpha.0 → 0.0.2-alpha.100

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 (126) hide show
  1. package/LICENSE +44 -0
  2. package/README.md +25 -4
  3. package/data/crawl/conventional-commit.json +25 -0
  4. package/dist/commands/changelog.d.ts +2 -0
  5. package/dist/commands/changelog.d.ts.map +1 -0
  6. package/dist/commands/changelog.js +15 -0
  7. package/dist/commands/commit-message.d.ts +2 -0
  8. package/dist/commands/commit-message.d.ts.map +1 -0
  9. package/dist/commands/commit-message.js +32 -0
  10. package/dist/commands/config.d.ts +3 -0
  11. package/dist/commands/config.d.ts.map +1 -0
  12. package/dist/commands/config.js +40 -0
  13. package/dist/commands/issue-labeler.d.ts +1 -0
  14. package/dist/commands/issue-labeler.d.ts.map +1 -0
  15. package/dist/commands/issue-labeler.js +19 -2
  16. package/dist/commands/link-checker.d.ts +4 -0
  17. package/dist/commands/link-checker.d.ts.map +1 -0
  18. package/dist/commands/link-checker.js +16 -0
  19. package/dist/commands/message.d.ts +1 -0
  20. package/dist/commands/message.d.ts.map +1 -0
  21. package/dist/commands/message.js +3 -1
  22. package/dist/commands/new-contributor-message.d.ts +2 -0
  23. package/dist/commands/new-contributor-message.d.ts.map +1 -0
  24. package/dist/commands/new-contributor-message.js +43 -0
  25. package/dist/commands/publish-packages.d.ts +2 -0
  26. package/dist/commands/publish-packages.d.ts.map +1 -0
  27. package/dist/commands/publish-packages.js +11 -0
  28. package/dist/commands/telephone-game.d.ts +2 -0
  29. package/dist/commands/telephone-game.d.ts.map +1 -0
  30. package/dist/commands/telephone-game.js +32 -0
  31. package/dist/config/index.d.ts +12 -0
  32. package/dist/config/index.d.ts.map +1 -0
  33. package/dist/config/index.js +75 -0
  34. package/dist/index.d.ts +2 -0
  35. package/dist/index.d.ts.map +1 -0
  36. package/dist/index.js +31 -1
  37. package/dist/mastra/agents/index.d.ts +34 -2
  38. package/dist/mastra/agents/index.d.ts.map +1 -0
  39. package/dist/mastra/agents/index.js +62 -25
  40. package/dist/mastra/agents/model.d.ts +7 -0
  41. package/dist/mastra/agents/model.d.ts.map +1 -0
  42. package/dist/mastra/agents/model.js +7 -0
  43. package/dist/mastra/agents/new-contributor.d.ts +3 -0
  44. package/dist/mastra/agents/new-contributor.d.ts.map +1 -0
  45. package/dist/mastra/agents/new-contributor.js +12 -0
  46. package/dist/mastra/agents/package-publisher.d.ts +65 -0
  47. package/dist/mastra/agents/package-publisher.d.ts.map +1 -0
  48. package/dist/mastra/agents/package-publisher.js +168 -0
  49. package/dist/mastra/index.d.ts +135 -5
  50. package/dist/mastra/index.d.ts.map +1 -0
  51. package/dist/mastra/index.js +21 -8
  52. package/dist/mastra/integrations/index.d.ts +3 -0
  53. package/dist/mastra/integrations/index.d.ts.map +1 -0
  54. package/dist/mastra/integrations/index.js +19 -2
  55. package/dist/mastra/tools/browser.d.ts +1 -0
  56. package/dist/mastra/tools/browser.d.ts.map +1 -0
  57. package/dist/mastra/tools/browser.js +10 -12
  58. package/dist/mastra/tools/calendar.d.ts +1 -0
  59. package/dist/mastra/tools/calendar.d.ts.map +1 -0
  60. package/dist/mastra/tools/crawl.d.ts +4 -0
  61. package/dist/mastra/tools/crawl.d.ts.map +1 -0
  62. package/dist/mastra/tools/crawl.js +7 -4
  63. package/dist/mastra/tools/execa.d.ts +1 -0
  64. package/dist/mastra/tools/execa.d.ts.map +1 -0
  65. package/dist/mastra/tools/execa.js +5 -1
  66. package/dist/mastra/tools/fs.d.ts +1 -0
  67. package/dist/mastra/tools/fs.d.ts.map +1 -0
  68. package/dist/mastra/tools/image.d.ts +27 -0
  69. package/dist/mastra/tools/image.d.ts.map +1 -0
  70. package/dist/mastra/tools/image.js +37 -0
  71. package/dist/mastra/tools/mcp.d.ts +3 -0
  72. package/dist/mastra/tools/mcp.d.ts.map +1 -0
  73. package/dist/mastra/tools/mcp.js +12 -0
  74. package/dist/mastra/tools/pdf.d.ts +1 -0
  75. package/dist/mastra/tools/pdf.d.ts.map +1 -0
  76. package/dist/mastra/tools/pdf.js +3 -2
  77. package/dist/mastra/tools/pnpm.d.ts +60 -0
  78. package/dist/mastra/tools/pnpm.d.ts.map +1 -0
  79. package/dist/mastra/tools/pnpm.js +127 -0
  80. package/dist/mastra/workflows/changelog.d.ts +10 -0
  81. package/dist/mastra/workflows/changelog.d.ts.map +1 -0
  82. package/dist/mastra/workflows/changelog.js +149 -0
  83. package/dist/mastra/workflows/chat.d.ts +1 -0
  84. package/dist/mastra/workflows/chat.d.ts.map +1 -0
  85. package/dist/mastra/workflows/chat.js +6 -11
  86. package/dist/mastra/workflows/commit-message.d.ts +10 -0
  87. package/dist/mastra/workflows/commit-message.d.ts.map +1 -0
  88. package/dist/mastra/workflows/commit-message.js +138 -0
  89. package/dist/mastra/workflows/first-contributor.d.ts +16 -0
  90. package/dist/mastra/workflows/first-contributor.d.ts.map +1 -0
  91. package/dist/mastra/workflows/first-contributor.js +122 -0
  92. package/dist/mastra/workflows/index.d.ts +2 -0
  93. package/dist/mastra/workflows/index.d.ts.map +1 -0
  94. package/dist/mastra/workflows/index.js +1 -0
  95. package/dist/mastra/workflows/issue-labeler.d.ts +1 -0
  96. package/dist/mastra/workflows/issue-labeler.d.ts.map +1 -0
  97. package/dist/mastra/workflows/issue-labeler.js +1 -1
  98. package/dist/mastra/workflows/link-checker.d.ts +13 -0
  99. package/dist/mastra/workflows/link-checker.d.ts.map +1 -0
  100. package/dist/mastra/workflows/link-checker.js +102 -0
  101. package/dist/mastra/workflows/publish-packages.d.ts +3 -0
  102. package/dist/mastra/workflows/publish-packages.d.ts.map +1 -0
  103. package/dist/mastra/workflows/publish-packages.js +344 -0
  104. package/dist/mastra/workflows/telephone-game.d.ts +3 -0
  105. package/dist/mastra/workflows/telephone-game.d.ts.map +1 -0
  106. package/dist/mastra/workflows/telephone-game.js +95 -0
  107. package/package.json +19 -10
  108. package/test-files/716a95a5c57a56d32a32b1c9592d6df0.png +0 -0
  109. package/CHANGELOG.md +0 -19
  110. package/docker-compose.yaml +0 -22
  111. package/src/commands/issue-labeler.ts +0 -26
  112. package/src/commands/message.ts +0 -16
  113. package/src/index.ts +0 -12
  114. package/src/mastra/agents/index.ts +0 -79
  115. package/src/mastra/index.ts +0 -32
  116. package/src/mastra/integrations/index.ts +0 -14
  117. package/src/mastra/tools/browser.ts +0 -132
  118. package/src/mastra/tools/calendar.ts +0 -154
  119. package/src/mastra/tools/crawl.ts +0 -26
  120. package/src/mastra/tools/execa.ts +0 -41
  121. package/src/mastra/tools/fs.ts +0 -36
  122. package/src/mastra/tools/pdf.ts +0 -46
  123. package/src/mastra/workflows/chat.ts +0 -111
  124. package/src/mastra/workflows/index.ts +0 -2
  125. package/src/mastra/workflows/issue-labeler.ts +0 -104
  126. package/tsconfig.json +0 -11
@@ -1,7 +1,5 @@
1
1
  import { Mastra } from '@mastra/core';
2
2
  export declare const mastra: Mastra<{
3
- [x: string]: import("@mastra/core").SyncAction<any, any, any, any>;
4
- }, {
5
3
  dane: import("@mastra/core").Agent<{
6
4
  fsTool: import("@mastra/core").Tool<"fsTool", import("zod").ZodObject<{
7
5
  action: import("zod").ZodString;
@@ -149,10 +147,13 @@ export declare const mastra: Mastra<{
149
147
  limit?: number | undefined;
150
148
  }>, import("zod").ZodObject<{
151
149
  message: import("zod").ZodString;
150
+ crawlData: import("zod").ZodAny;
152
151
  }, "strip", import("zod").ZodTypeAny, {
153
152
  message: string;
153
+ crawlData?: any;
154
154
  }, {
155
155
  message: string;
156
+ crawlData?: any;
156
157
  }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
157
158
  url: import("zod").ZodString;
158
159
  limit: import("zod").ZodDefault<import("zod").ZodNumber>;
@@ -166,8 +167,97 @@ export declare const mastra: Mastra<{
166
167
  pathRegex: string | null;
167
168
  limit?: number | undefined;
168
169
  }>, import("@mastra/core").WorkflowContext<any>>>;
169
- }>;
170
- daneIssueLabeler: import("@mastra/core").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>>;
170
+ imageTool: import("@mastra/core").Tool<"imageTool", import("zod").ZodObject<{
171
+ directory: import("zod").ZodString;
172
+ prompt: import("zod").ZodString;
173
+ }, "strip", import("zod").ZodTypeAny, {
174
+ directory: string;
175
+ prompt: string;
176
+ }, {
177
+ directory: string;
178
+ prompt: string;
179
+ }>, import("zod").ZodObject<{
180
+ message: import("zod").ZodString;
181
+ }, "strip", import("zod").ZodTypeAny, {
182
+ message: string;
183
+ }, {
184
+ message: string;
185
+ }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
186
+ directory: import("zod").ZodString;
187
+ prompt: import("zod").ZodString;
188
+ }, "strip", import("zod").ZodTypeAny, {
189
+ directory: string;
190
+ prompt: string;
191
+ }, {
192
+ directory: string;
193
+ prompt: string;
194
+ }>, import("@mastra/core").WorkflowContext<any>>>;
195
+ }, Record<string, import("@mastra/core").Metric>>;
196
+ danePackagePublisher: import("@mastra/core").Agent<{
197
+ pnpmChangesetStatus: import("@mastra/core").Tool<"pnpmChangesetStatus", import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("zod").ZodObject<{
198
+ message: import("zod").ZodArray<import("zod").ZodString, "many">;
199
+ }, "strip", import("zod").ZodTypeAny, {
200
+ message: string[];
201
+ }, {
202
+ message: string[];
203
+ }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("@mastra/core").WorkflowContext<any>>>;
204
+ pnpmBuild: import("@mastra/core").Tool<"pnpmBuild", import("zod").ZodObject<{
205
+ name: import("zod").ZodString;
206
+ packagePath: import("zod").ZodString;
207
+ }, "strip", import("zod").ZodTypeAny, {
208
+ name: string;
209
+ packagePath: string;
210
+ }, {
211
+ name: string;
212
+ packagePath: string;
213
+ }>, import("zod").ZodObject<{
214
+ message: import("zod").ZodString;
215
+ }, "strip", import("zod").ZodTypeAny, {
216
+ message: string;
217
+ }, {
218
+ message: string;
219
+ }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
220
+ name: import("zod").ZodString;
221
+ packagePath: import("zod").ZodString;
222
+ }, "strip", import("zod").ZodTypeAny, {
223
+ name: string;
224
+ packagePath: string;
225
+ }, {
226
+ name: string;
227
+ packagePath: string;
228
+ }>, import("@mastra/core").WorkflowContext<any>>>;
229
+ pnpmChangesetPublish: import("@mastra/core").Tool<"pnpmChangesetPublish", import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("zod").ZodObject<{
230
+ message: import("zod").ZodString;
231
+ }, "strip", import("zod").ZodTypeAny, {
232
+ message: string;
233
+ }, {
234
+ message: string;
235
+ }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("@mastra/core").WorkflowContext<any>>>;
236
+ activeDistTag: import("@mastra/core").Tool<"activeDistTag", import("zod").ZodObject<{
237
+ packagePath: import("zod").ZodString;
238
+ }, "strip", import("zod").ZodTypeAny, {
239
+ packagePath: string;
240
+ }, {
241
+ packagePath: string;
242
+ }>, import("zod").ZodObject<{
243
+ message: import("zod").ZodString;
244
+ }, "strip", import("zod").ZodTypeAny, {
245
+ message: string;
246
+ }, {
247
+ message: string;
248
+ }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
249
+ packagePath: import("zod").ZodString;
250
+ }, "strip", import("zod").ZodTypeAny, {
251
+ packagePath: string;
252
+ }, {
253
+ packagePath: string;
254
+ }>, import("@mastra/core").WorkflowContext<any>>>;
255
+ }, Record<string, import("@mastra/core").Metric>>;
256
+ daneLinkChecker: import("@mastra/core").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>, Record<string, import("@mastra/core").Metric>>;
257
+ daneIssueLabeler: import("@mastra/core").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>, Record<string, import("@mastra/core").Metric>>;
258
+ daneCommitMessage: import("@mastra/core").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>, Record<string, import("@mastra/core").Metric>>;
259
+ daneChangeLog: import("@mastra/core").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>, Record<string, import("@mastra/core").Metric>>;
260
+ daneNewContributor: import("@mastra/core").Agent<{}, Record<string, import("@mastra/core").Metric>>;
171
261
  }, {
172
262
  message: import("@mastra/core").Workflow<any, import("zod").ZodObject<{
173
263
  resourceid: import("zod").ZodString;
@@ -192,4 +282,44 @@ export declare const mastra: Mastra<{
192
282
  owner: string;
193
283
  issue_number: number;
194
284
  }>>;
195
- }, import("@mastra/core").BaseLogger<import("@mastra/core").BaseLogMessage>>;
285
+ commitMessage: import("@mastra/core").Workflow<any, import("zod").ZodObject<{
286
+ repoPath: import("zod").ZodString;
287
+ }, "strip", import("zod").ZodTypeAny, {
288
+ repoPath: string;
289
+ }, {
290
+ repoPath: string;
291
+ }>>;
292
+ packagePublisher: import("@mastra/core").Workflow<any, any>;
293
+ telephoneGame: import("@mastra/core").Workflow<any, any>;
294
+ changelog: import("@mastra/core").Workflow<any, import("zod").ZodObject<{
295
+ channelId: import("zod").ZodString;
296
+ }, "strip", import("zod").ZodTypeAny, {
297
+ channelId: string;
298
+ }, {
299
+ channelId: string;
300
+ }>>;
301
+ githubFirstContributorMessage: import("@mastra/core").Workflow<any, import("zod").ZodObject<{
302
+ repo: import("zod").ZodString;
303
+ owner: import("zod").ZodString;
304
+ pr_number: import("zod").ZodNumber;
305
+ }, "strip", import("zod").ZodTypeAny, {
306
+ repo: string;
307
+ owner: string;
308
+ pr_number: number;
309
+ }, {
310
+ repo: string;
311
+ owner: string;
312
+ pr_number: number;
313
+ }>>;
314
+ linkChecker: import("@mastra/core").Workflow<any, import("zod").ZodObject<{
315
+ channelId: import("zod").ZodString;
316
+ targetUrl: import("zod").ZodString;
317
+ }, "strip", import("zod").ZodTypeAny, {
318
+ channelId: string;
319
+ targetUrl: string;
320
+ }, {
321
+ channelId: string;
322
+ targetUrl: string;
323
+ }>>;
324
+ }, Record<string, import("@mastra/core").MastraVector>, Record<string, import("@mastra/core").MastraTTS>, import("@mastra/core").Logger>;
325
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mastra/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAkBtC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wIA0BjB,CAAC"}
@@ -1,16 +1,27 @@
1
1
  import { Mastra } from '@mastra/core';
2
2
  import { PostgresEngine } from '@mastra/engine';
3
- import { UpstashKVMemory } from '@mastra/memory';
4
- import { dane, daneIssueLabeler } from './agents/index.js';
5
- import { firecrawl } from './integrations/index.js';
6
- import { messageWorkflow, githubIssueLabeler } from './workflows/index.js';
3
+ import { UpstashKVMemory } from '@mastra/memory/kv-upstash';
4
+ import { dane, daneChangeLog, daneCommitMessage, daneIssueLabeler, daneLinkChecker } from './agents/index.js';
5
+ import { daneNewContributor } from './agents/new-contributor.js';
6
+ import { danePackagePublisher } from './agents/package-publisher.js';
7
+ import { changelogWorkflow } from './workflows/changelog.js';
8
+ import { githubFirstContributorMessage } from './workflows/first-contributor.js';
9
+ import { messageWorkflow, githubIssueLabeler, commitMessageGenerator } from './workflows/index.js';
10
+ import { linkCheckerWorkflow } from './workflows/link-checker.js';
11
+ import { packagePublisher } from './workflows/publish-packages.js';
12
+ import { telephoneGameWorkflow } from './workflows/telephone-game.js';
7
13
  const engine = new PostgresEngine({
8
14
  url: 'postgres://postgres:postgres@localhost:5433/mastra',
9
15
  });
10
16
  export const mastra = new Mastra({
11
17
  agents: {
12
18
  dane,
19
+ danePackagePublisher,
20
+ daneLinkChecker,
13
21
  daneIssueLabeler,
22
+ daneCommitMessage,
23
+ daneChangeLog,
24
+ daneNewContributor,
14
25
  },
15
26
  engine,
16
27
  memory: new UpstashKVMemory({
@@ -21,9 +32,11 @@ export const mastra = new Mastra({
21
32
  workflows: {
22
33
  message: messageWorkflow,
23
34
  githubIssueLabeler: githubIssueLabeler,
24
- },
25
- logger: false,
26
- syncs: {
27
- ...firecrawl.getSyncs(),
35
+ commitMessage: commitMessageGenerator,
36
+ packagePublisher: packagePublisher,
37
+ telephoneGame: telephoneGameWorkflow,
38
+ changelog: changelogWorkflow,
39
+ githubFirstContributorMessage: githubFirstContributorMessage,
40
+ linkChecker: linkCheckerWorkflow,
28
41
  },
29
42
  });
@@ -1,4 +1,7 @@
1
1
  import { FirecrawlIntegration } from "@mastra/firecrawl";
2
2
  import { GithubIntegration } from "@mastra/github";
3
+ import { StabilityAiIntegration } from "@mastra/stabilityai";
3
4
  export declare const firecrawl: FirecrawlIntegration;
4
5
  export declare const github: GithubIntegration;
6
+ export declare const stabilityai: StabilityAiIntegration;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mastra/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAc7D,eAAO,MAAM,SAAS,sBAIpB,CAAC;AAEH,eAAO,MAAM,MAAM,mBAIjB,CAAC;AAEH,eAAO,MAAM,WAAW,wBAItB,CAAC"}
@@ -1,12 +1,29 @@
1
1
  import { FirecrawlIntegration } from "@mastra/firecrawl";
2
2
  import { GithubIntegration } from "@mastra/github";
3
+ import { StabilityAiIntegration } from "@mastra/stabilityai";
4
+ import { config } from "../../config/index.js";
5
+ // Helper function to get key from config or env
6
+ const getApiKey = (configKey, envKey) => {
7
+ const configValue = config.get(configKey);
8
+ if (configValue)
9
+ return configValue;
10
+ const envValue = process.env[envKey];
11
+ if (envValue)
12
+ return envValue;
13
+ return '';
14
+ };
3
15
  export const firecrawl = new FirecrawlIntegration({
4
16
  config: {
5
- API_KEY: process.env.FIRECRAWL_API_KEY,
17
+ API_KEY: getApiKey('FIRECRAWL_API_KEY', 'FIRECRAWL_API_KEY'),
6
18
  },
7
19
  });
8
20
  export const github = new GithubIntegration({
9
21
  config: {
10
- PERSONAL_ACCESS_TOKEN: process.env.GITHUB_PERSONAL_ACCESS_TOKEN,
22
+ PERSONAL_ACCESS_TOKEN: getApiKey('GITHUB_PERSONAL_ACCESS_TOKEN', 'GITHUB_PERSONAL_ACCESS_TOKEN'),
23
+ }
24
+ });
25
+ export const stabilityai = new StabilityAiIntegration({
26
+ config: {
27
+ API_KEY: getApiKey('STABILITYAI_API_KEY', 'STABILITYAI_API_KEY'),
11
28
  }
12
29
  });
@@ -37,3 +37,4 @@ export declare const googleSearch: import("@mastra/core").Tool<"googleSearch", z
37
37
  }, {
38
38
  query: string;
39
39
  }>, import("@mastra/core").WorkflowContext<any>>>;
40
+ //# sourceMappingURL=browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../src/mastra/tools/browser.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;iDAoDtB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;iDAqEvB,CAAC"}
@@ -23,18 +23,16 @@ export const browserTool = createTool({
23
23
  const docs = MDocument.fromHTML(await page.content());
24
24
  await docs.chunk({
25
25
  strategy: 'html',
26
- options: {
27
- chunkSize: 300,
28
- sections: [
29
- ['h1', 'Header 1'],
30
- ['h2', 'Header 2'],
31
- ['h3', 'Header 3'],
32
- ['h4', 'Header 4'],
33
- ['h5', 'Header 5'],
34
- ['h6', 'Header 6'],
35
- ['p', 'Paragraph'],
36
- ],
37
- },
26
+ size: 300,
27
+ sections: [
28
+ ['h1', 'Header 1'],
29
+ ['h2', 'Header 2'],
30
+ ['h3', 'Header 3'],
31
+ ['h4', 'Header 4'],
32
+ ['h5', 'Header 5'],
33
+ ['h6', 'Header 6'],
34
+ ['p', 'Paragraph'],
35
+ ],
38
36
  });
39
37
  await page.close();
40
38
  await browser.close();
@@ -18,3 +18,4 @@ export declare const listEvents: import("@mastra/core").Tool<"listEvents", z.Zod
18
18
  }, {
19
19
  startDate: string;
20
20
  }>, import("@mastra/core").WorkflowContext<any>>>;
21
+ //# sourceMappingURL=calendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/mastra/tools/calendar.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqGxB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;iDAgDrB,CAAC"}
@@ -13,10 +13,13 @@ export declare const crawl: import("@mastra/core").Tool<"crawler", z.ZodObject<{
13
13
  limit?: number | undefined;
14
14
  }>, z.ZodObject<{
15
15
  message: z.ZodString;
16
+ crawlData: z.ZodAny;
16
17
  }, "strip", z.ZodTypeAny, {
17
18
  message: string;
19
+ crawlData?: any;
18
20
  }, {
19
21
  message: string;
22
+ crawlData?: any;
20
23
  }>, import("@mastra/core").ToolExecutionContext<z.ZodObject<{
21
24
  url: z.ZodString;
22
25
  limit: z.ZodDefault<z.ZodNumber>;
@@ -30,3 +33,4 @@ export declare const crawl: import("@mastra/core").Tool<"crawler", z.ZodObject<{
30
33
  pathRegex: string | null;
31
34
  limit?: number | undefined;
32
35
  }>, import("@mastra/core").WorkflowContext<any>>>;
36
+ //# sourceMappingURL=crawl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crawl.d.ts","sourceRoot":"","sources":["../../../src/mastra/tools/crawl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAyBhB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { createTool } from '@mastra/core';
2
2
  import { z } from 'zod';
3
+ import { firecrawl } from '../integrations/index.js';
3
4
  export const crawl = createTool({
4
5
  id: 'crawler',
5
6
  name: 'Crawler Tool',
@@ -11,14 +12,16 @@ export const crawl = createTool({
11
12
  }),
12
13
  outputSchema: z.object({
13
14
  message: z.string(),
15
+ crawlData: z.any(),
14
16
  }),
15
- execute: async ({ context, mastra }) => {
16
- await mastra?.syncs?.['FIRECRAWL:CRAWL_AND_SYNC']?.execute({
17
- context,
18
- mastra,
17
+ execute: async ({ context }) => {
18
+ const crawlData = firecrawl.getWorkflows({})?.['FIRECRAWL:CRAWL_AND_SYNC']?.createRun();
19
+ await crawlData?.start({
20
+ triggerData: context,
19
21
  });
20
22
  return {
21
23
  message: 'The website has been successfully crawled and chunks have been synced to the database. Finish.',
24
+ crawlData,
22
25
  };
23
26
  },
24
27
  });
@@ -24,3 +24,4 @@ export declare const execaTool: import("@mastra/core").Tool<"execaTool", z.ZodOb
24
24
  command: string;
25
25
  args: string[];
26
26
  }>, import("@mastra/core").WorkflowContext<any>>>;
27
+ //# sourceMappingURL=execa.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execa.d.ts","sourceRoot":"","sources":["../../../src/mastra/tools/execa.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;iDA4BpB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { createTool } from '@mastra/core';
2
2
  import chalk from 'chalk';
3
- import { execa } from 'execa';
3
+ import { execa, ExecaError } from 'execa';
4
4
  import { Transform } from 'stream';
5
5
  import { z } from 'zod';
6
6
  // Create transform stream that applies chalk
@@ -25,6 +25,7 @@ export const execaTool = createTool({
25
25
  }),
26
26
  execute: async ({ context: { command, args } }) => {
27
27
  try {
28
+ console.log(chalk.green(`Running command: ${command} ${args.join(' ')}`));
28
29
  const p = execa(command, args);
29
30
  console.log(`\n`);
30
31
  p.stdout.pipe(colorTransform).pipe(process.stdout);
@@ -33,6 +34,9 @@ export const execaTool = createTool({
33
34
  return { message: r.stdout };
34
35
  }
35
36
  catch (e) {
37
+ if (e instanceof ExecaError) {
38
+ return { message: e.message };
39
+ }
36
40
  return { message: 'Error' };
37
41
  }
38
42
  },
@@ -30,3 +30,4 @@ export declare const fsTool: import("@mastra/core").Tool<"fsTool", z.ZodObject<{
30
30
  action: string;
31
31
  file: string;
32
32
  }>, import("@mastra/core").WorkflowContext<any>>>;
33
+ //# sourceMappingURL=fs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../../src/mastra/tools/fs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDA+BjB,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { z } from 'zod';
2
+ export declare const imageTool: import("@mastra/core").Tool<"imageTool", z.ZodObject<{
3
+ directory: z.ZodString;
4
+ prompt: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ directory: string;
7
+ prompt: string;
8
+ }, {
9
+ directory: string;
10
+ prompt: string;
11
+ }>, z.ZodObject<{
12
+ message: z.ZodString;
13
+ }, "strip", z.ZodTypeAny, {
14
+ message: string;
15
+ }, {
16
+ message: string;
17
+ }>, import("@mastra/core").ToolExecutionContext<z.ZodObject<{
18
+ directory: z.ZodString;
19
+ prompt: z.ZodString;
20
+ }, "strip", z.ZodTypeAny, {
21
+ directory: string;
22
+ prompt: string;
23
+ }, {
24
+ directory: string;
25
+ prompt: string;
26
+ }>, import("@mastra/core").WorkflowContext<any>>>;
27
+ //# sourceMappingURL=image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/mastra/tools/image.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;iDAgCpB,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { createTool } from '@mastra/core';
2
+ import chalk from 'chalk';
3
+ import { writeFileSync } from 'fs';
4
+ import { resolve } from 'path';
5
+ import { z } from 'zod';
6
+ import { stabilityai } from '../integrations/index.js';
7
+ export const imageTool = createTool({
8
+ id: 'imageTool',
9
+ name: 'imageTool',
10
+ description: 'Generate an image based on a text prompt',
11
+ inputSchema: z.object({
12
+ directory: z.string(),
13
+ prompt: z.string(),
14
+ }),
15
+ outputSchema: z.object({
16
+ message: z.string(),
17
+ }),
18
+ execute: async ({ context: { directory, prompt } }) => {
19
+ try {
20
+ console.log('\n' + chalk.blue(`Generating image...`));
21
+ const generateImageResult = await stabilityai.generateImage(prompt);
22
+ const file = resolve(directory, generateImageResult.filename);
23
+ writeFileSync(file, generateImageResult.buffer);
24
+ console.log(chalk.blue(`Successfully generated: ${file}`));
25
+ return {
26
+ message: `Successfully created ${file}`,
27
+ };
28
+ }
29
+ catch (e) {
30
+ if (e instanceof Error) {
31
+ console.log(`\n${chalk.red(e.message)}`);
32
+ return { message: e.message };
33
+ }
34
+ return { message: 'Error' };
35
+ }
36
+ },
37
+ });
@@ -0,0 +1,3 @@
1
+ import { MastraMCPClient } from '@mastra/mcp';
2
+ export declare const slack: MastraMCPClient;
3
+ //# sourceMappingURL=mcp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../../src/mastra/tools/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,eAAO,MAAM,KAAK,iBAUhB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { MastraMCPClient } from '@mastra/mcp';
2
+ export const slack = new MastraMCPClient({
3
+ name: 'Slack',
4
+ server: {
5
+ command: '/usr/local/bin/docker',
6
+ args: ['run', '-i', '--rm', '-e', 'SLACK_BOT_TOKEN', '-e', 'SLACK_TEAM_ID', 'mcp/slack'],
7
+ env: {
8
+ SLACK_BOT_TOKEN: process.env.SLACK_BOT_TOKEN,
9
+ SLACK_TEAM_ID: process.env.SLACK_TEAM_ID,
10
+ },
11
+ },
12
+ });
@@ -18,3 +18,4 @@ export declare const readPDF: import("@mastra/core").Tool<"readPDF", z.ZodObject
18
18
  }, {
19
19
  pdfPath: string;
20
20
  }>, import("@mastra/core").WorkflowContext<any>>>;
21
+ //# sourceMappingURL=pdf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pdf.d.ts","sourceRoot":"","sources":["../../../src/mastra/tools/pdf.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;iDAsClB,CAAC"}
@@ -2,8 +2,9 @@ import { createTool } from '@mastra/core';
2
2
  import chalk from 'chalk';
3
3
  import { existsSync, readFileSync } from 'fs';
4
4
  import path from 'path';
5
- import pdf from 'pdf-parse';
6
5
  import { z } from 'zod';
6
+ // @ts-ignore
7
+ import pdfParse from 'pdf-parse/lib/pdf-parse.js';
7
8
  export const readPDF = createTool({
8
9
  id: 'readPDF',
9
10
  name: 'Read PDF',
@@ -27,7 +28,7 @@ export const readPDF = createTool({
27
28
  // Read the PDF file
28
29
  const dataBuffer = readFileSync(pdfPath);
29
30
  // Parse PDF content
30
- const data = await pdf(dataBuffer);
31
+ const data = await pdfParse(dataBuffer);
31
32
  console.log(chalk.blue('\n'));
32
33
  console.log(chalk.blue('PDF Information:'));
33
34
  console.log(chalk.blue('-----------------'));
@@ -0,0 +1,60 @@
1
+ import { z } from 'zod';
2
+ export declare const pnpmBuild: import("@mastra/core").Tool<"pnpmBuild", z.ZodObject<{
3
+ name: z.ZodString;
4
+ packagePath: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ name: string;
7
+ packagePath: string;
8
+ }, {
9
+ name: string;
10
+ packagePath: string;
11
+ }>, z.ZodObject<{
12
+ message: z.ZodString;
13
+ }, "strip", z.ZodTypeAny, {
14
+ message: string;
15
+ }, {
16
+ message: string;
17
+ }>, import("@mastra/core").ToolExecutionContext<z.ZodObject<{
18
+ name: z.ZodString;
19
+ packagePath: z.ZodString;
20
+ }, "strip", z.ZodTypeAny, {
21
+ name: string;
22
+ packagePath: string;
23
+ }, {
24
+ name: string;
25
+ packagePath: string;
26
+ }>, import("@mastra/core").WorkflowContext<any>>>;
27
+ export declare const pnpmChangesetStatus: import("@mastra/core").Tool<"pnpmChangesetStatus", z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodObject<{
28
+ message: z.ZodArray<z.ZodString, "many">;
29
+ }, "strip", z.ZodTypeAny, {
30
+ message: string[];
31
+ }, {
32
+ message: string[];
33
+ }>, import("@mastra/core").ToolExecutionContext<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, import("@mastra/core").WorkflowContext<any>>>;
34
+ export declare const pnpmChangesetPublish: import("@mastra/core").Tool<"pnpmChangesetPublish", z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodObject<{
35
+ message: z.ZodString;
36
+ }, "strip", z.ZodTypeAny, {
37
+ message: string;
38
+ }, {
39
+ message: string;
40
+ }>, import("@mastra/core").ToolExecutionContext<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, import("@mastra/core").WorkflowContext<any>>>;
41
+ export declare const activeDistTag: import("@mastra/core").Tool<"activeDistTag", z.ZodObject<{
42
+ packagePath: z.ZodString;
43
+ }, "strip", z.ZodTypeAny, {
44
+ packagePath: string;
45
+ }, {
46
+ packagePath: string;
47
+ }>, z.ZodObject<{
48
+ message: z.ZodString;
49
+ }, "strip", z.ZodTypeAny, {
50
+ message: string;
51
+ }, {
52
+ message: string;
53
+ }>, import("@mastra/core").ToolExecutionContext<z.ZodObject<{
54
+ packagePath: z.ZodString;
55
+ }, "strip", z.ZodTypeAny, {
56
+ packagePath: string;
57
+ }, {
58
+ packagePath: string;
59
+ }>, import("@mastra/core").WorkflowContext<any>>>;
60
+ //# sourceMappingURL=pnpm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pnpm.d.ts","sourceRoot":"","sources":["../../../src/mastra/tools/pnpm.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;iDA8BpB,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;6IA6B9B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;6IA0B/B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;iDA8BxB,CAAC"}