@mastra/dane 0.0.2-alpha.7 → 0.0.2-alpha.71

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 (89) 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.map +1 -1
  14. package/dist/commands/issue-labeler.js +19 -2
  15. package/dist/commands/link-checker.d.ts +4 -0
  16. package/dist/commands/link-checker.d.ts.map +1 -0
  17. package/dist/commands/link-checker.js +16 -0
  18. package/dist/commands/message.d.ts.map +1 -1
  19. package/dist/commands/message.js +3 -1
  20. package/dist/commands/new-contributor-message.d.ts +2 -0
  21. package/dist/commands/new-contributor-message.d.ts.map +1 -0
  22. package/dist/commands/new-contributor-message.js +43 -0
  23. package/dist/commands/publish-packages.d.ts +2 -0
  24. package/dist/commands/publish-packages.d.ts.map +1 -0
  25. package/dist/commands/publish-packages.js +11 -0
  26. package/dist/commands/telephone-game.d.ts +2 -0
  27. package/dist/commands/telephone-game.d.ts.map +1 -0
  28. package/dist/commands/telephone-game.js +32 -0
  29. package/dist/config/index.d.ts +12 -0
  30. package/dist/config/index.d.ts.map +1 -0
  31. package/dist/config/index.js +75 -0
  32. package/dist/index.js +30 -2
  33. package/dist/mastra/agents/index.d.ts +116 -0
  34. package/dist/mastra/agents/index.d.ts.map +1 -1
  35. package/dist/mastra/agents/index.js +92 -24
  36. package/dist/mastra/agents/model.d.ts +7 -0
  37. package/dist/mastra/agents/model.d.ts.map +1 -0
  38. package/dist/mastra/agents/model.js +7 -0
  39. package/dist/mastra/agents/new-contributor.d.ts +3 -0
  40. package/dist/mastra/agents/new-contributor.d.ts.map +1 -0
  41. package/dist/mastra/agents/new-contributor.js +12 -0
  42. package/dist/mastra/index.d.ts +157 -1
  43. package/dist/mastra/index.d.ts.map +1 -1
  44. package/dist/mastra/index.js +19 -3
  45. package/dist/mastra/integrations/index.d.ts +2 -0
  46. package/dist/mastra/integrations/index.d.ts.map +1 -1
  47. package/dist/mastra/integrations/index.js +19 -2
  48. package/dist/mastra/tools/crawl.d.ts +3 -0
  49. package/dist/mastra/tools/crawl.d.ts.map +1 -1
  50. package/dist/mastra/tools/crawl.js +4 -2
  51. package/dist/mastra/tools/execa.d.ts.map +1 -1
  52. package/dist/mastra/tools/execa.js +5 -1
  53. package/dist/mastra/tools/image.d.ts +27 -0
  54. package/dist/mastra/tools/image.d.ts.map +1 -0
  55. package/dist/mastra/tools/image.js +37 -0
  56. package/dist/mastra/tools/mcp.d.ts +3 -0
  57. package/dist/mastra/tools/mcp.d.ts.map +1 -0
  58. package/dist/mastra/tools/mcp.js +12 -0
  59. package/dist/mastra/tools/pdf.d.ts.map +1 -1
  60. package/dist/mastra/tools/pdf.js +3 -2
  61. package/dist/mastra/tools/pnpm.d.ts +60 -0
  62. package/dist/mastra/tools/pnpm.d.ts.map +1 -0
  63. package/dist/mastra/tools/pnpm.js +128 -0
  64. package/dist/mastra/workflows/changelog.d.ts +10 -0
  65. package/dist/mastra/workflows/changelog.d.ts.map +1 -0
  66. package/dist/mastra/workflows/changelog.js +149 -0
  67. package/dist/mastra/workflows/chat.d.ts.map +1 -1
  68. package/dist/mastra/workflows/chat.js +6 -11
  69. package/dist/mastra/workflows/commit-message.d.ts +10 -0
  70. package/dist/mastra/workflows/commit-message.d.ts.map +1 -0
  71. package/dist/mastra/workflows/commit-message.js +138 -0
  72. package/dist/mastra/workflows/first-contributor.d.ts +16 -0
  73. package/dist/mastra/workflows/first-contributor.d.ts.map +1 -0
  74. package/dist/mastra/workflows/first-contributor.js +122 -0
  75. package/dist/mastra/workflows/index.d.ts +1 -0
  76. package/dist/mastra/workflows/index.d.ts.map +1 -1
  77. package/dist/mastra/workflows/index.js +1 -0
  78. package/dist/mastra/workflows/issue-labeler.js +1 -1
  79. package/dist/mastra/workflows/link-checker.d.ts +13 -0
  80. package/dist/mastra/workflows/link-checker.d.ts.map +1 -0
  81. package/dist/mastra/workflows/link-checker.js +102 -0
  82. package/dist/mastra/workflows/publish-packages.d.ts +3 -0
  83. package/dist/mastra/workflows/publish-packages.d.ts.map +1 -0
  84. package/dist/mastra/workflows/publish-packages.js +273 -0
  85. package/dist/mastra/workflows/telephone-game.d.ts +3 -0
  86. package/dist/mastra/workflows/telephone-game.d.ts.map +1 -0
  87. package/dist/mastra/workflows/telephone-game.js +95 -0
  88. package/package.json +13 -9
  89. package/test-files/716a95a5c57a56d32a32b1c9592d6df0.png +0 -0
@@ -0,0 +1,75 @@
1
+ import * as fs from 'fs';
2
+ import * as os from 'os';
3
+ import * as path from 'path';
4
+ export class ConfigManager {
5
+ constructor() {
6
+ const homeDir = os.homedir();
7
+ const configDir = path.join(homeDir, '.dane');
8
+ this.configPath = path.join(configDir, 'config.json');
9
+ this.ensureConfigExists();
10
+ }
11
+ ensureConfigExists() {
12
+ const configDir = path.dirname(this.configPath);
13
+ if (!fs.existsSync(configDir)) {
14
+ fs.mkdirSync(configDir, { recursive: true });
15
+ }
16
+ if (!fs.existsSync(this.configPath)) {
17
+ fs.writeFileSync(this.configPath, JSON.stringify({}, null, 2));
18
+ }
19
+ }
20
+ get(key) {
21
+ try {
22
+ const config = JSON.parse(fs.readFileSync(this.configPath, 'utf-8'));
23
+ return config[key];
24
+ }
25
+ catch (error) {
26
+ return undefined;
27
+ }
28
+ }
29
+ set(key, value) {
30
+ try {
31
+ const config = fs.existsSync(this.configPath) ? JSON.parse(fs.readFileSync(this.configPath, 'utf-8')) : {};
32
+ config[key] = value;
33
+ fs.writeFileSync(this.configPath, JSON.stringify(config, null, 2));
34
+ }
35
+ catch (error) {
36
+ throw new Error(`Failed to set config value: ${error}`);
37
+ }
38
+ }
39
+ delete(key) {
40
+ try {
41
+ const config = fs.existsSync(this.configPath) ? JSON.parse(fs.readFileSync(this.configPath, 'utf-8')) : {};
42
+ if (key in config) {
43
+ delete config[key];
44
+ fs.writeFileSync(this.configPath, JSON.stringify(config, null, 2));
45
+ }
46
+ }
47
+ catch (error) {
48
+ throw new Error(`Failed to delete config value: ${error}`);
49
+ }
50
+ }
51
+ list() {
52
+ try {
53
+ return JSON.parse(fs.readFileSync(this.configPath, 'utf-8'));
54
+ }
55
+ catch (error) {
56
+ return {};
57
+ }
58
+ }
59
+ getAnthropicApiKey() {
60
+ const key = this.get('ANTHROPIC_API_KEY') || process.env.ANTHROPIC_API_KEY;
61
+ if (!key) {
62
+ // Check if we're in a command that requires the API key
63
+ const command = process.argv[2] || '';
64
+ const configCommands = ['config', '--help', '-h'];
65
+ // Only throw if we're not in a config-related command
66
+ if (!configCommands.includes(command)) {
67
+ throw new Error('ANTHROPIC_API_KEY not found in config. Please set it using: dane config --set ANTHROPIC_API_KEY=your_key_here');
68
+ }
69
+ return '';
70
+ }
71
+ return key;
72
+ }
73
+ }
74
+ // Create a singleton instance for easy access
75
+ export const config = new ConfigManager();
package/dist/index.js CHANGED
@@ -1,9 +1,37 @@
1
1
  #! /usr/bin/env node
2
- process.env.NODE_NO_WARNINGS = '1';
3
2
  import { Command } from 'commander';
3
+ import dotenv from 'dotenv';
4
+ import { changelog } from './commands/changelog.js';
5
+ import { commitMessageCommand } from './commands/commit-message.js';
6
+ import { configCommand } from './commands/config.js';
4
7
  import { issueLabelerCommand } from './commands/issue-labeler.js';
8
+ import { linkChecker } from './commands/link-checker.js';
5
9
  import { message } from './commands/message.js';
10
+ import { newContributorMessage } from './commands/new-contributor-message.js';
11
+ import { publishPackages } from './commands/publish-packages.js';
12
+ import { telephone } from './commands/telephone-game.js';
13
+ dotenv.config();
14
+ process.env.NODE_NO_WARNINGS = '1';
6
15
  const program = new Command();
7
16
  program.command('chat').action(message);
8
- program.command('issue-labeler').action(issueLabelerCommand);
17
+ program
18
+ .command('issue-labeler')
19
+ .description('Automatically label GitHub issues based on their content and context')
20
+ .action(issueLabelerCommand);
21
+ program
22
+ .command('commit')
23
+ .description('Create a sensible commit message based on the changes made')
24
+ .action(commitMessageCommand);
25
+ program.addCommand(configCommand);
26
+ program.command('publish').description('Publish packages to the registry').action(publishPackages);
27
+ program.command('telephone-game').description('Play a classic game of telephone').action(telephone);
28
+ program.command('changelog').description('Mastra Changelog').action(changelog);
29
+ program.command('new-contributor').description('Create a new contributor message').action(newContributorMessage);
30
+ program
31
+ .command('link-checker')
32
+ .description('Check for broken links')
33
+ .option('-u, --url <url>', 'URL to check')
34
+ .action(args => {
35
+ linkChecker({ url: args.url });
36
+ });
9
37
  program.parse(process.argv);
@@ -1,5 +1,93 @@
1
1
  import { Agent } from '@mastra/core';
2
+ export declare const daneCommitMessage: Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>>;
2
3
  export declare const daneIssueLabeler: Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>>;
4
+ export declare const danePackagePublisher: Agent<{
5
+ execaTool: import("@mastra/core").Tool<"execaTool", import("zod").ZodObject<{
6
+ command: import("zod").ZodString;
7
+ args: import("zod").ZodArray<import("zod").ZodString, "many">;
8
+ }, "strip", import("zod").ZodTypeAny, {
9
+ command: string;
10
+ args: string[];
11
+ }, {
12
+ command: string;
13
+ args: string[];
14
+ }>, import("zod").ZodObject<{
15
+ message: import("zod").ZodString;
16
+ }, "strip", import("zod").ZodTypeAny, {
17
+ message: string;
18
+ }, {
19
+ message: string;
20
+ }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
21
+ command: import("zod").ZodString;
22
+ args: import("zod").ZodArray<import("zod").ZodString, "many">;
23
+ }, "strip", import("zod").ZodTypeAny, {
24
+ command: string;
25
+ args: string[];
26
+ }, {
27
+ command: string;
28
+ args: string[];
29
+ }>, import("@mastra/core").WorkflowContext<any>>>;
30
+ pnpmBuild: import("@mastra/core").Tool<"pnpmBuild", import("zod").ZodObject<{
31
+ name: import("zod").ZodString;
32
+ packagePath: import("zod").ZodString;
33
+ }, "strip", import("zod").ZodTypeAny, {
34
+ name: string;
35
+ packagePath: string;
36
+ }, {
37
+ name: string;
38
+ packagePath: string;
39
+ }>, import("zod").ZodObject<{
40
+ message: import("zod").ZodString;
41
+ }, "strip", import("zod").ZodTypeAny, {
42
+ message: string;
43
+ }, {
44
+ message: string;
45
+ }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
46
+ name: import("zod").ZodString;
47
+ packagePath: import("zod").ZodString;
48
+ }, "strip", import("zod").ZodTypeAny, {
49
+ name: string;
50
+ packagePath: string;
51
+ }, {
52
+ name: string;
53
+ packagePath: string;
54
+ }>, import("@mastra/core").WorkflowContext<any>>>;
55
+ pnpmChangesetPublish: import("@mastra/core").Tool<"pnpmChangesetPublish", import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("zod").ZodObject<{
56
+ message: import("zod").ZodString;
57
+ }, "strip", import("zod").ZodTypeAny, {
58
+ message: string;
59
+ }, {
60
+ message: string;
61
+ }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("@mastra/core").WorkflowContext<any>>>;
62
+ pnpmChangesetStatus: import("@mastra/core").Tool<"pnpmChangesetStatus", import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("zod").ZodObject<{
63
+ message: import("zod").ZodArray<import("zod").ZodString, "many">;
64
+ }, "strip", import("zod").ZodTypeAny, {
65
+ message: string[];
66
+ }, {
67
+ message: string[];
68
+ }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("@mastra/core").WorkflowContext<any>>>;
69
+ activeDistTag: import("@mastra/core").Tool<"activeDistTag", import("zod").ZodObject<{
70
+ packagePath: import("zod").ZodString;
71
+ }, "strip", import("zod").ZodTypeAny, {
72
+ packagePath: string;
73
+ }, {
74
+ packagePath: string;
75
+ }>, import("zod").ZodObject<{
76
+ message: import("zod").ZodString;
77
+ }, "strip", import("zod").ZodTypeAny, {
78
+ message: string;
79
+ }, {
80
+ message: string;
81
+ }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
82
+ packagePath: import("zod").ZodString;
83
+ }, "strip", import("zod").ZodTypeAny, {
84
+ packagePath: string;
85
+ }, {
86
+ packagePath: string;
87
+ }>, import("@mastra/core").WorkflowContext<any>>>;
88
+ }>;
89
+ export declare const daneLinkChecker: Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>>;
90
+ export declare const daneChangeLog: Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>>;
3
91
  export declare const dane: Agent<{
4
92
  fsTool: import("@mastra/core").Tool<"fsTool", import("zod").ZodObject<{
5
93
  action: import("zod").ZodString;
@@ -147,10 +235,13 @@ export declare const dane: Agent<{
147
235
  limit?: number | undefined;
148
236
  }>, import("zod").ZodObject<{
149
237
  message: import("zod").ZodString;
238
+ crawlData: import("zod").ZodAny;
150
239
  }, "strip", import("zod").ZodTypeAny, {
151
240
  message: string;
241
+ crawlData?: any;
152
242
  }, {
153
243
  message: string;
244
+ crawlData?: any;
154
245
  }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
155
246
  url: import("zod").ZodString;
156
247
  limit: import("zod").ZodDefault<import("zod").ZodNumber>;
@@ -164,5 +255,30 @@ export declare const dane: Agent<{
164
255
  pathRegex: string | null;
165
256
  limit?: number | undefined;
166
257
  }>, import("@mastra/core").WorkflowContext<any>>>;
258
+ imageTool: import("@mastra/core").Tool<"imageTool", import("zod").ZodObject<{
259
+ directory: import("zod").ZodString;
260
+ prompt: import("zod").ZodString;
261
+ }, "strip", import("zod").ZodTypeAny, {
262
+ directory: string;
263
+ prompt: string;
264
+ }, {
265
+ directory: string;
266
+ prompt: string;
267
+ }>, import("zod").ZodObject<{
268
+ message: import("zod").ZodString;
269
+ }, "strip", import("zod").ZodTypeAny, {
270
+ message: string;
271
+ }, {
272
+ message: string;
273
+ }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
274
+ directory: import("zod").ZodString;
275
+ prompt: import("zod").ZodString;
276
+ }, "strip", import("zod").ZodTypeAny, {
277
+ directory: string;
278
+ prompt: string;
279
+ }, {
280
+ directory: string;
281
+ prompt: string;
282
+ }>, import("@mastra/core").WorkflowContext<any>>>;
167
283
  }>;
168
284
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mastra/agents/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AASrC,eAAO,MAAM,gBAAgB,8EAW3B,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDf,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mastra/agents/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAarC,eAAO,MAAM,iBAAiB,8EAU5B,CAAC;AAEH,eAAO,MAAM,gBAAgB,8EAO3B,CAAC;AAgBH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgB/B,CAAC;AAEH,eAAO,MAAM,eAAe,8EAa1B,CAAC;AAEH,eAAO,MAAM,aAAa,8EAcxB,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuDf,CAAC"}
@@ -4,19 +4,88 @@ import { listEvents } from '../tools/calendar.js';
4
4
  import { crawl } from '../tools/crawl.js';
5
5
  import { execaTool } from '../tools/execa.js';
6
6
  import { fsTool } from '../tools/fs.js';
7
+ import { imageTool } from '../tools/image.js';
7
8
  import { readPDF } from '../tools/pdf.js';
9
+ import { activeDistTag, pnpmBuild, pnpmChangesetPublish, pnpmChangesetStatus } from '../tools/pnpm.js';
10
+ import { getBaseModelConfig } from './model';
11
+ export const daneCommitMessage = new Agent({
12
+ name: 'DaneCommitMessage',
13
+ instructions: `
14
+ You are Dane, the ultimate GitHub operator.
15
+ You help engineers generate commit messages.
16
+
17
+ GENERATE A SCOPE FOR THE COMMIT MESSAGE IF NECESSARY.
18
+ FIGURE OUT THE BEST TOP LEVEL SEMANTIC MATCH TO USE AS THE SCOPE.
19
+ `,
20
+ model: getBaseModelConfig(),
21
+ });
8
22
  export const daneIssueLabeler = new Agent({
9
23
  name: 'DaneIssueLabeler',
10
24
  instructions: `
11
- You are Dane, the ultimate GitHub operator.
25
+ You are Dane, the ultimate GitHub operator.
12
26
  You help engineers label their issues.
13
27
  `,
14
- model: {
15
- provider: 'ANTHROPIC',
16
- toolChoice: 'auto',
17
- name: 'claude-3-5-sonnet-20241022',
28
+ model: getBaseModelConfig(),
29
+ });
30
+ const packages_llm_text = `
31
+ @mastra/core is located in the "packages/core" directory.
32
+ @mastra/deployer is located in the "packages/deployer" directory.
33
+ mastra is located in the "packages/cli" directory.
34
+ @mastra/engine is located in the "packages/engine" directory.
35
+ @mastra/evals is located in the "packages/evals" directory.
36
+ @mastra/rag is located in the "packages/rag" directory.
37
+ @mastra/tts is located in the "packages/tts" directory.
38
+ @mastra/memory is located in the "packages/memory" directory.
39
+ @mastra/mcp is located in the "packages/mcp" directory.
40
+ @mastra/deployer-{name} is located in the "deployers/{name}" directory.
41
+ dane or @mastra/dane is located in the "exampeles/dane" directory.
42
+ `;
43
+ export const danePackagePublisher = new Agent({
44
+ name: 'DanePackagePublisher',
45
+ instructions: `
46
+ You are Dane, the ultimate node module publisher.
47
+ You help engineers publish their pnpm changesets.
48
+
49
+ ${packages_llm_text}
50
+ `,
51
+ model: getBaseModelConfig(),
52
+ tools: {
53
+ execaTool,
54
+ pnpmBuild,
55
+ pnpmChangesetPublish,
56
+ pnpmChangesetStatus,
57
+ activeDistTag,
18
58
  },
19
59
  });
60
+ export const daneLinkChecker = new Agent({
61
+ name: 'DaneLinkChecker',
62
+ instructions: `
63
+ You are Dane, the link checker for Mastra AI. You report on broken links whenever you see them.
64
+ Make sure to include the url in the message.
65
+
66
+ ## Style Guide
67
+ - Use active voice
68
+ - Keep descriptions concise but informative
69
+ - Avoid marketing language
70
+ - Link to relevant documentation
71
+ `,
72
+ model: getBaseModelConfig(),
73
+ });
74
+ export const daneChangeLog = new Agent({
75
+ name: 'DanePackagePublisher',
76
+ instructions: `
77
+ You are Dane, the changelog writer for Mastra AI. Every week we need to write a changelog for the Mastra AI project.
78
+ ## Style Guide
79
+ - Use active voice
80
+ - Lead with the change, not the PR number
81
+ - Include PR numbers in parentheses at end of line
82
+ - Keep descriptions concise but informative
83
+ - Avoid marketing language
84
+ - Link to relevant documentation
85
+ - Use consistent formatting for code references
86
+ `,
87
+ model: getBaseModelConfig(),
88
+ });
20
89
  export const dane = new Agent({
21
90
  name: 'Dane',
22
91
  instructions: `
@@ -26,42 +95,42 @@ export const dane = new Agent({
26
95
  DO NOT ATTEMPT TO USE GENERAL KNOWLEDGE! We are only as good as the tools we use.
27
96
 
28
97
  # Our tools:
29
-
98
+
30
99
  ## readPDF
31
100
  Makes you a powerful agent capable of reading PDF files.
32
101
 
33
102
  ## fsTool
34
103
  Makes you a powerful agent capable of reading and writing files to the local filesystem.
35
-
104
+
36
105
  ## execaTool
37
- Makes you a powerful agent capabale of executing files on the local system.
38
-
39
- ## googleSearch
106
+ Makes you a powerful agent capabale of executing files on the local system.
107
+
108
+ ## googleSearch
40
109
  Makes you a powerful agent capabale answering all questions by finding the answer on Google search.
41
110
  Pass the query as a JS object. If you have links, ALWAYS CITE YOUR SOURCES.
42
-
111
+
43
112
  ## browserTool
44
- Makes you a powerful agent capable of scraping the web. Pass the url as a JS object.
113
+ Makes you a powerful agent capable of scraping the web. Pass the url as a JS object.
45
114
 
46
115
  ## listEvents
47
- Makes you a powerful agent capable of listing events on a calendar. When using this tool ONLY RETURN RELEVANT EVENTS.
116
+ Makes you a powerful agent capable of listing events on a calendar. When using this tool ONLY RETURN RELEVANT EVENTS.
48
117
  DO NOT ATTEMPT TO DO ANYTHING MORE.
49
118
 
50
119
  ## crawl
51
120
  Use this when the user asks you to crawl. CRAWL is the signal to use this tool.
52
- Makes you a powerful agent capable of crawling a site and extracting markdown metadata.
53
- The data will be stored in a database. Confirm that it is sucessful.
54
-
121
+ Makes you a powerful agent capable of crawling a site and extracting markdown metadata.
122
+ The data will be stored in a database if it is not already there. Confirm that it is sucessful.
123
+ The crawled data will be returned in the response on the 'crawlData' field.
124
+
125
+ ## imageTool
126
+ Makes you a powerful agent capable of generating images and saving them to disk. Pass the directory and an image prompt.
127
+
55
128
  # Rules
56
129
  * DO NOT ATTEMPT TO USE GENERAL KNOWLEDGE. Use the 'googleSearch' tool to find the answer.
57
- * Don't reference tools when you communicate with the user. Do not mention what tools you are using.
130
+ * Don't reference tools when you communicate with the user. Do not mention what tools you are using.
58
131
  * Tell the user what you are doing.
59
132
  `,
60
- model: {
61
- provider: 'ANTHROPIC',
62
- toolChoice: 'auto',
63
- name: 'claude-3-5-sonnet-20241022',
64
- },
133
+ model: getBaseModelConfig(),
65
134
  tools: {
66
135
  fsTool,
67
136
  execaTool,
@@ -70,7 +139,6 @@ export const dane = new Agent({
70
139
  readPDF,
71
140
  listEvents,
72
141
  crawl,
73
- // TODO I SHOULD BE ABLE TO PASS A WORKFLOW EXECUTE HERE
74
- // browserAgentRelay,
142
+ imageTool,
75
143
  },
76
144
  });
@@ -0,0 +1,7 @@
1
+ export declare const getBaseModelConfig: () => {
2
+ provider: "ANTHROPIC";
3
+ toolChoice: "auto";
4
+ name: string;
5
+ apiKey: string;
6
+ };
7
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/mastra/agents/model.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB;;;;;CAK7B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { config } from '../../config/index.js';
2
+ export const getBaseModelConfig = () => ({
3
+ provider: 'ANTHROPIC',
4
+ toolChoice: 'auto',
5
+ name: 'claude-3-5-sonnet-20241022',
6
+ apiKey: config.getAnthropicApiKey(),
7
+ });
@@ -0,0 +1,3 @@
1
+ import { Agent } from '@mastra/core';
2
+ export declare const daneNewContributor: Agent<{}>;
3
+ //# sourceMappingURL=new-contributor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"new-contributor.d.ts","sourceRoot":"","sources":["../../../src/mastra/agents/new-contributor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAIrC,eAAO,MAAM,kBAAkB,WAS7B,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { Agent } from '@mastra/core';
2
+ import { getBaseModelConfig } from './model';
3
+ export const daneNewContributor = new Agent({
4
+ name: 'DaneNewContributor',
5
+ instructions: `
6
+ You're Dane, the best GitHub open-source maintainer in the world.
7
+ Your tone is friendly and joyful.
8
+ When a new contributor creates a pull request, they see your message first.
9
+ `,
10
+ model: getBaseModelConfig(),
11
+ tools: {},
12
+ });
@@ -149,10 +149,13 @@ export declare const mastra: Mastra<{
149
149
  limit?: number | undefined;
150
150
  }>, import("zod").ZodObject<{
151
151
  message: import("zod").ZodString;
152
+ crawlData: import("zod").ZodAny;
152
153
  }, "strip", import("zod").ZodTypeAny, {
153
154
  message: string;
155
+ crawlData?: any;
154
156
  }, {
155
157
  message: string;
158
+ crawlData?: any;
156
159
  }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
157
160
  url: import("zod").ZodString;
158
161
  limit: import("zod").ZodDefault<import("zod").ZodNumber>;
@@ -166,8 +169,122 @@ export declare const mastra: Mastra<{
166
169
  pathRegex: string | null;
167
170
  limit?: number | undefined;
168
171
  }>, import("@mastra/core").WorkflowContext<any>>>;
172
+ imageTool: import("@mastra/core").Tool<"imageTool", import("zod").ZodObject<{
173
+ directory: import("zod").ZodString;
174
+ prompt: import("zod").ZodString;
175
+ }, "strip", import("zod").ZodTypeAny, {
176
+ directory: string;
177
+ prompt: string;
178
+ }, {
179
+ directory: string;
180
+ prompt: string;
181
+ }>, import("zod").ZodObject<{
182
+ message: import("zod").ZodString;
183
+ }, "strip", import("zod").ZodTypeAny, {
184
+ message: string;
185
+ }, {
186
+ message: string;
187
+ }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
188
+ directory: import("zod").ZodString;
189
+ prompt: import("zod").ZodString;
190
+ }, "strip", import("zod").ZodTypeAny, {
191
+ directory: string;
192
+ prompt: string;
193
+ }, {
194
+ directory: string;
195
+ prompt: string;
196
+ }>, import("@mastra/core").WorkflowContext<any>>>;
169
197
  }>;
198
+ danePackagePublisher: import("@mastra/core").Agent<{
199
+ execaTool: import("@mastra/core").Tool<"execaTool", import("zod").ZodObject<{
200
+ command: import("zod").ZodString;
201
+ args: import("zod").ZodArray<import("zod").ZodString, "many">;
202
+ }, "strip", import("zod").ZodTypeAny, {
203
+ command: string;
204
+ args: string[];
205
+ }, {
206
+ command: string;
207
+ args: string[];
208
+ }>, import("zod").ZodObject<{
209
+ message: import("zod").ZodString;
210
+ }, "strip", import("zod").ZodTypeAny, {
211
+ message: string;
212
+ }, {
213
+ message: string;
214
+ }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
215
+ command: import("zod").ZodString;
216
+ args: import("zod").ZodArray<import("zod").ZodString, "many">;
217
+ }, "strip", import("zod").ZodTypeAny, {
218
+ command: string;
219
+ args: string[];
220
+ }, {
221
+ command: string;
222
+ args: string[];
223
+ }>, import("@mastra/core").WorkflowContext<any>>>;
224
+ pnpmBuild: import("@mastra/core").Tool<"pnpmBuild", import("zod").ZodObject<{
225
+ name: import("zod").ZodString;
226
+ packagePath: import("zod").ZodString;
227
+ }, "strip", import("zod").ZodTypeAny, {
228
+ name: string;
229
+ packagePath: string;
230
+ }, {
231
+ name: string;
232
+ packagePath: string;
233
+ }>, import("zod").ZodObject<{
234
+ message: import("zod").ZodString;
235
+ }, "strip", import("zod").ZodTypeAny, {
236
+ message: string;
237
+ }, {
238
+ message: string;
239
+ }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
240
+ name: import("zod").ZodString;
241
+ packagePath: import("zod").ZodString;
242
+ }, "strip", import("zod").ZodTypeAny, {
243
+ name: string;
244
+ packagePath: string;
245
+ }, {
246
+ name: string;
247
+ packagePath: string;
248
+ }>, import("@mastra/core").WorkflowContext<any>>>;
249
+ pnpmChangesetPublish: import("@mastra/core").Tool<"pnpmChangesetPublish", import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("zod").ZodObject<{
250
+ message: import("zod").ZodString;
251
+ }, "strip", import("zod").ZodTypeAny, {
252
+ message: string;
253
+ }, {
254
+ message: string;
255
+ }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("@mastra/core").WorkflowContext<any>>>;
256
+ pnpmChangesetStatus: import("@mastra/core").Tool<"pnpmChangesetStatus", import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("zod").ZodObject<{
257
+ message: import("zod").ZodArray<import("zod").ZodString, "many">;
258
+ }, "strip", import("zod").ZodTypeAny, {
259
+ message: string[];
260
+ }, {
261
+ message: string[];
262
+ }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("@mastra/core").WorkflowContext<any>>>;
263
+ activeDistTag: import("@mastra/core").Tool<"activeDistTag", import("zod").ZodObject<{
264
+ packagePath: import("zod").ZodString;
265
+ }, "strip", import("zod").ZodTypeAny, {
266
+ packagePath: string;
267
+ }, {
268
+ packagePath: string;
269
+ }>, import("zod").ZodObject<{
270
+ message: import("zod").ZodString;
271
+ }, "strip", import("zod").ZodTypeAny, {
272
+ message: string;
273
+ }, {
274
+ message: string;
275
+ }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
276
+ packagePath: import("zod").ZodString;
277
+ }, "strip", import("zod").ZodTypeAny, {
278
+ packagePath: string;
279
+ }, {
280
+ packagePath: string;
281
+ }>, import("@mastra/core").WorkflowContext<any>>>;
282
+ }>;
283
+ daneLinkChecker: import("@mastra/core").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>>;
170
284
  daneIssueLabeler: import("@mastra/core").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>>;
285
+ daneCommitMessage: import("@mastra/core").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>>;
286
+ daneChangeLog: import("@mastra/core").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>>;
287
+ daneNewContributor: import("@mastra/core").Agent<{}>;
171
288
  }, {
172
289
  message: import("@mastra/core").Workflow<any, import("zod").ZodObject<{
173
290
  resourceid: import("zod").ZodString;
@@ -192,5 +309,44 @@ export declare const mastra: Mastra<{
192
309
  owner: string;
193
310
  issue_number: number;
194
311
  }>>;
195
- }, import("@mastra/core").BaseLogger<import("@mastra/core").BaseLogMessage>>;
312
+ commitMessage: import("@mastra/core").Workflow<any, import("zod").ZodObject<{
313
+ repoPath: import("zod").ZodString;
314
+ }, "strip", import("zod").ZodTypeAny, {
315
+ repoPath: string;
316
+ }, {
317
+ repoPath: string;
318
+ }>>;
319
+ packagePublisher: import("@mastra/core").Workflow<any, any>;
320
+ telephoneGame: import("@mastra/core").Workflow<any, any>;
321
+ changelog: import("@mastra/core").Workflow<any, import("zod").ZodObject<{
322
+ channelId: import("zod").ZodString;
323
+ }, "strip", import("zod").ZodTypeAny, {
324
+ channelId: string;
325
+ }, {
326
+ channelId: string;
327
+ }>>;
328
+ githubFirstContributorMessage: import("@mastra/core").Workflow<any, import("zod").ZodObject<{
329
+ repo: import("zod").ZodString;
330
+ owner: import("zod").ZodString;
331
+ pr_number: import("zod").ZodNumber;
332
+ }, "strip", import("zod").ZodTypeAny, {
333
+ repo: string;
334
+ owner: string;
335
+ pr_number: number;
336
+ }, {
337
+ repo: string;
338
+ owner: string;
339
+ pr_number: number;
340
+ }>>;
341
+ linkChecker: import("@mastra/core").Workflow<any, import("zod").ZodObject<{
342
+ channelId: import("zod").ZodString;
343
+ targetUrl: import("zod").ZodString;
344
+ }, "strip", import("zod").ZodTypeAny, {
345
+ channelId: string;
346
+ targetUrl: string;
347
+ }, {
348
+ channelId: string;
349
+ targetUrl: string;
350
+ }>>;
351
+ }, Record<string, import("@mastra/core").MastraVector>, Record<string, import("@mastra/core").MastraTTS>, import("@mastra/core").BaseLogger<import("@mastra/core").BaseLogMessage>>;
196
352
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mastra/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAYtC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAmBjB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mastra/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAyBtC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mLA6BjB,CAAC"}