@mastra/dane 0.0.2-alpha.116 → 0.0.2-alpha.118

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 (106) hide show
  1. package/package.json +10 -9
  2. package/dist/commands/changelog.d.ts +0 -2
  3. package/dist/commands/changelog.d.ts.map +0 -1
  4. package/dist/commands/changelog.js +0 -15
  5. package/dist/commands/commit-message.d.ts +0 -2
  6. package/dist/commands/commit-message.d.ts.map +0 -1
  7. package/dist/commands/commit-message.js +0 -32
  8. package/dist/commands/config.d.ts +0 -3
  9. package/dist/commands/config.d.ts.map +0 -1
  10. package/dist/commands/config.js +0 -40
  11. package/dist/commands/issue-labeler.d.ts +0 -2
  12. package/dist/commands/issue-labeler.d.ts.map +0 -1
  13. package/dist/commands/issue-labeler.js +0 -35
  14. package/dist/commands/link-checker.d.ts +0 -4
  15. package/dist/commands/link-checker.d.ts.map +0 -1
  16. package/dist/commands/link-checker.js +0 -16
  17. package/dist/commands/message.d.ts +0 -2
  18. package/dist/commands/message.d.ts.map +0 -1
  19. package/dist/commands/message.js +0 -14
  20. package/dist/commands/new-contributor-message.d.ts +0 -2
  21. package/dist/commands/new-contributor-message.d.ts.map +0 -1
  22. package/dist/commands/new-contributor-message.js +0 -43
  23. package/dist/commands/publish-packages.d.ts +0 -2
  24. package/dist/commands/publish-packages.d.ts.map +0 -1
  25. package/dist/commands/publish-packages.js +0 -11
  26. package/dist/commands/telephone-game.d.ts +0 -2
  27. package/dist/commands/telephone-game.d.ts.map +0 -1
  28. package/dist/commands/telephone-game.js +0 -32
  29. package/dist/config/index.d.ts +0 -12
  30. package/dist/config/index.d.ts.map +0 -1
  31. package/dist/config/index.js +0 -75
  32. package/dist/index.d.ts +0 -3
  33. package/dist/index.d.ts.map +0 -1
  34. package/dist/index.js +0 -37
  35. package/dist/mastra/agents/index.d.ts +0 -165
  36. package/dist/mastra/agents/index.d.ts.map +0 -1
  37. package/dist/mastra/agents/index.js +0 -105
  38. package/dist/mastra/agents/model.d.ts +0 -7
  39. package/dist/mastra/agents/model.d.ts.map +0 -1
  40. package/dist/mastra/agents/model.js +0 -7
  41. package/dist/mastra/agents/new-contributor.d.ts +0 -3
  42. package/dist/mastra/agents/new-contributor.d.ts.map +0 -1
  43. package/dist/mastra/agents/new-contributor.js +0 -12
  44. package/dist/mastra/agents/package-publisher.d.ts +0 -65
  45. package/dist/mastra/agents/package-publisher.d.ts.map +0 -1
  46. package/dist/mastra/agents/package-publisher.js +0 -188
  47. package/dist/mastra/index.d.ts +0 -291
  48. package/dist/mastra/index.d.ts.map +0 -1
  49. package/dist/mastra/index.js +0 -46
  50. package/dist/mastra/integrations/index.d.ts +0 -5
  51. package/dist/mastra/integrations/index.d.ts.map +0 -1
  52. package/dist/mastra/integrations/index.js +0 -23
  53. package/dist/mastra/tools/browser.d.ts +0 -40
  54. package/dist/mastra/tools/browser.d.ts.map +0 -1
  55. package/dist/mastra/tools/browser.js +0 -116
  56. package/dist/mastra/tools/calendar.d.ts +0 -21
  57. package/dist/mastra/tools/calendar.d.ts.map +0 -1
  58. package/dist/mastra/tools/calendar.js +0 -134
  59. package/dist/mastra/tools/crawl.d.ts +0 -36
  60. package/dist/mastra/tools/crawl.d.ts.map +0 -1
  61. package/dist/mastra/tools/crawl.js +0 -27
  62. package/dist/mastra/tools/execa.d.ts +0 -27
  63. package/dist/mastra/tools/execa.d.ts.map +0 -1
  64. package/dist/mastra/tools/execa.js +0 -43
  65. package/dist/mastra/tools/fs.d.ts +0 -33
  66. package/dist/mastra/tools/fs.d.ts.map +0 -1
  67. package/dist/mastra/tools/fs.js +0 -36
  68. package/dist/mastra/tools/image.d.ts +0 -27
  69. package/dist/mastra/tools/image.d.ts.map +0 -1
  70. package/dist/mastra/tools/image.js +0 -37
  71. package/dist/mastra/tools/mcp.d.ts +0 -3
  72. package/dist/mastra/tools/mcp.d.ts.map +0 -1
  73. package/dist/mastra/tools/mcp.js +0 -12
  74. package/dist/mastra/tools/pdf.d.ts +0 -21
  75. package/dist/mastra/tools/pdf.d.ts.map +0 -1
  76. package/dist/mastra/tools/pdf.js +0 -42
  77. package/dist/mastra/tools/pnpm.d.ts +0 -60
  78. package/dist/mastra/tools/pnpm.d.ts.map +0 -1
  79. package/dist/mastra/tools/pnpm.js +0 -127
  80. package/dist/mastra/workflows/changelog.d.ts +0 -10
  81. package/dist/mastra/workflows/changelog.d.ts.map +0 -1
  82. package/dist/mastra/workflows/changelog.js +0 -149
  83. package/dist/mastra/workflows/chat.d.ts +0 -13
  84. package/dist/mastra/workflows/chat.d.ts.map +0 -1
  85. package/dist/mastra/workflows/chat.js +0 -90
  86. package/dist/mastra/workflows/commit-message.d.ts +0 -10
  87. package/dist/mastra/workflows/commit-message.d.ts.map +0 -1
  88. package/dist/mastra/workflows/commit-message.js +0 -138
  89. package/dist/mastra/workflows/first-contributor.d.ts +0 -16
  90. package/dist/mastra/workflows/first-contributor.d.ts.map +0 -1
  91. package/dist/mastra/workflows/first-contributor.js +0 -122
  92. package/dist/mastra/workflows/index.d.ts +0 -4
  93. package/dist/mastra/workflows/index.d.ts.map +0 -1
  94. package/dist/mastra/workflows/index.js +0 -3
  95. package/dist/mastra/workflows/issue-labeler.d.ts +0 -16
  96. package/dist/mastra/workflows/issue-labeler.d.ts.map +0 -1
  97. package/dist/mastra/workflows/issue-labeler.js +0 -85
  98. package/dist/mastra/workflows/link-checker.d.ts +0 -13
  99. package/dist/mastra/workflows/link-checker.d.ts.map +0 -1
  100. package/dist/mastra/workflows/link-checker.js +0 -102
  101. package/dist/mastra/workflows/publish-packages.d.ts +0 -3
  102. package/dist/mastra/workflows/publish-packages.d.ts.map +0 -1
  103. package/dist/mastra/workflows/publish-packages.js +0 -425
  104. package/dist/mastra/workflows/telephone-game.d.ts +0 -3
  105. package/dist/mastra/workflows/telephone-game.d.ts.map +0 -1
  106. package/dist/mastra/workflows/telephone-game.js +0 -95
@@ -1,165 +0,0 @@
1
- import { Agent } from '@mastra/core/agent';
2
- export declare const daneCommitMessage: Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>, Record<string, import("@mastra/core").Metric>>;
3
- export declare const daneIssueLabeler: Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>, Record<string, import("@mastra/core").Metric>>;
4
- export declare const daneLinkChecker: Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>, Record<string, import("@mastra/core").Metric>>;
5
- export declare const daneChangeLog: Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>, Record<string, import("@mastra/core").Metric>>;
6
- export declare const dane: Agent<{
7
- fsTool: import("@mastra/core/tools").Tool<"fsTool", import("zod").ZodObject<{
8
- action: import("zod").ZodString;
9
- file: import("zod").ZodString;
10
- data: import("zod").ZodString;
11
- }, "strip", import("zod").ZodTypeAny, {
12
- data: string;
13
- action: string;
14
- file: string;
15
- }, {
16
- data: string;
17
- action: string;
18
- file: string;
19
- }>, import("zod").ZodObject<{
20
- message: import("zod").ZodString;
21
- }, "strip", import("zod").ZodTypeAny, {
22
- message: string;
23
- }, {
24
- message: string;
25
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
26
- action: import("zod").ZodString;
27
- file: import("zod").ZodString;
28
- data: import("zod").ZodString;
29
- }, "strip", import("zod").ZodTypeAny, {
30
- data: string;
31
- action: string;
32
- file: string;
33
- }, {
34
- data: string;
35
- action: string;
36
- file: string;
37
- }>, import("@mastra/core").WorkflowContext<any>>>;
38
- execaTool: import("@mastra/core/tools").Tool<"execaTool", import("zod").ZodObject<{
39
- command: import("zod").ZodString;
40
- args: import("zod").ZodArray<import("zod").ZodString, "many">;
41
- }, "strip", import("zod").ZodTypeAny, {
42
- command: string;
43
- args: string[];
44
- }, {
45
- command: string;
46
- args: string[];
47
- }>, import("zod").ZodObject<{
48
- message: import("zod").ZodString;
49
- }, "strip", import("zod").ZodTypeAny, {
50
- message: string;
51
- }, {
52
- message: string;
53
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
54
- command: import("zod").ZodString;
55
- args: import("zod").ZodArray<import("zod").ZodString, "many">;
56
- }, "strip", import("zod").ZodTypeAny, {
57
- command: string;
58
- args: string[];
59
- }, {
60
- command: string;
61
- args: string[];
62
- }>, import("@mastra/core").WorkflowContext<any>>>;
63
- browserTool: import("@mastra/core/tools").Tool<"browserTool", import("zod").ZodObject<{
64
- url: import("zod").ZodString;
65
- }, "strip", import("zod").ZodTypeAny, {
66
- url: string;
67
- }, {
68
- url: string;
69
- }>, import("zod").ZodObject<{
70
- message: import("zod").ZodString;
71
- }, "strip", import("zod").ZodTypeAny, {
72
- message: string;
73
- }, {
74
- message: string;
75
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
76
- url: import("zod").ZodString;
77
- }, "strip", import("zod").ZodTypeAny, {
78
- url: string;
79
- }, {
80
- url: string;
81
- }>, import("@mastra/core").WorkflowContext<any>>>;
82
- googleSearch: import("@mastra/core/tools").Tool<"googleSearch", import("zod").ZodObject<{
83
- query: import("zod").ZodString;
84
- }, "strip", import("zod").ZodTypeAny, {
85
- query: string;
86
- }, {
87
- query: string;
88
- }>, import("zod").ZodObject<{
89
- message: import("zod").ZodString;
90
- }, "strip", import("zod").ZodTypeAny, {
91
- message: string;
92
- }, {
93
- message: string;
94
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
95
- query: import("zod").ZodString;
96
- }, "strip", import("zod").ZodTypeAny, {
97
- query: string;
98
- }, {
99
- query: string;
100
- }>, import("@mastra/core").WorkflowContext<any>>>;
101
- readPDF: import("@mastra/core/tools").Tool<"readPDF", import("zod").ZodObject<{
102
- pdfPath: import("zod").ZodString;
103
- }, "strip", import("zod").ZodTypeAny, {
104
- pdfPath: string;
105
- }, {
106
- pdfPath: string;
107
- }>, import("zod").ZodObject<{
108
- content: import("zod").ZodString;
109
- }, "strip", import("zod").ZodTypeAny, {
110
- content: string;
111
- }, {
112
- content: string;
113
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
114
- pdfPath: import("zod").ZodString;
115
- }, "strip", import("zod").ZodTypeAny, {
116
- pdfPath: string;
117
- }, {
118
- pdfPath: string;
119
- }>, import("@mastra/core").WorkflowContext<any>>>;
120
- listEvents: import("@mastra/core/tools").Tool<"listEvents", import("zod").ZodObject<{
121
- startDate: import("zod").ZodString;
122
- }, "strip", import("zod").ZodTypeAny, {
123
- startDate: string;
124
- }, {
125
- startDate: string;
126
- }>, import("zod").ZodObject<{
127
- content: import("zod").ZodString;
128
- }, "strip", import("zod").ZodTypeAny, {
129
- content: string;
130
- }, {
131
- content: string;
132
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
133
- startDate: import("zod").ZodString;
134
- }, "strip", import("zod").ZodTypeAny, {
135
- startDate: string;
136
- }, {
137
- startDate: string;
138
- }>, import("@mastra/core").WorkflowContext<any>>>;
139
- imageTool: import("@mastra/core/tools").Tool<"imageTool", import("zod").ZodObject<{
140
- directory: import("zod").ZodString;
141
- prompt: import("zod").ZodString;
142
- }, "strip", import("zod").ZodTypeAny, {
143
- directory: string;
144
- prompt: string;
145
- }, {
146
- directory: string;
147
- prompt: string;
148
- }>, import("zod").ZodObject<{
149
- message: import("zod").ZodString;
150
- }, "strip", import("zod").ZodTypeAny, {
151
- message: string;
152
- }, {
153
- message: string;
154
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
155
- directory: import("zod").ZodString;
156
- prompt: import("zod").ZodString;
157
- }, "strip", import("zod").ZodTypeAny, {
158
- directory: string;
159
- prompt: string;
160
- }, {
161
- directory: string;
162
- prompt: string;
163
- }>, import("@mastra/core").WorkflowContext<any>>>;
164
- }, Record<string, import("@mastra/core").Metric>>;
165
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mastra/agents/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAW3C,eAAO,MAAM,iBAAiB,6HAU5B,CAAC;AAEH,eAAO,MAAM,gBAAgB,6HAO3B,CAAC;AAEH,eAAO,MAAM,eAAe,6HAa1B,CAAC;AAEH,eAAO,MAAM,aAAa,6HAcxB,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAgDf,CAAC"}
@@ -1,105 +0,0 @@
1
- import { Agent } from '@mastra/core/agent';
2
- import { browserTool, googleSearch } from '../tools/browser.js';
3
- import { listEvents } from '../tools/calendar.js';
4
- import { execaTool } from '../tools/execa.js';
5
- import { fsTool } from '../tools/fs.js';
6
- import { imageTool } from '../tools/image.js';
7
- import { readPDF } from '../tools/pdf.js';
8
- import { getBaseModelConfig } from './model.js';
9
- export const daneCommitMessage = new Agent({
10
- name: 'DaneCommitMessage',
11
- instructions: `
12
- You are Dane, the ultimate GitHub operator.
13
- You help engineers generate commit messages.
14
-
15
- GENERATE A SCOPE FOR THE COMMIT MESSAGE IF NECESSARY.
16
- FIGURE OUT THE BEST TOP LEVEL SEMANTIC MATCH TO USE AS THE SCOPE.
17
- `,
18
- model: getBaseModelConfig(),
19
- });
20
- export const daneIssueLabeler = new Agent({
21
- name: 'DaneIssueLabeler',
22
- instructions: `
23
- You are Dane, the ultimate GitHub operator.
24
- You help engineers label their issues.
25
- `,
26
- model: getBaseModelConfig(),
27
- });
28
- export const daneLinkChecker = new Agent({
29
- name: 'DaneLinkChecker',
30
- instructions: `
31
- You are Dane, the link checker for Mastra AI. You report on broken links whenever you see them.
32
- Make sure to include the url in the message.
33
-
34
- ## Style Guide
35
- - Use active voice
36
- - Keep descriptions concise but informative
37
- - Avoid marketing language
38
- - Link to relevant documentation
39
- `,
40
- model: getBaseModelConfig(),
41
- });
42
- export const daneChangeLog = new Agent({
43
- name: 'DanePackagePublisher',
44
- instructions: `
45
- You are Dane, the changelog writer for Mastra AI. Every week we need to write a changelog for the Mastra AI project.
46
- ## Style Guide
47
- - Use active voice
48
- - Lead with the change, not the PR number
49
- - Include PR numbers in parentheses at end of line
50
- - Keep descriptions concise but informative
51
- - Avoid marketing language
52
- - Link to relevant documentation
53
- - Use consistent formatting for code references
54
- `,
55
- model: getBaseModelConfig(),
56
- });
57
- export const dane = new Agent({
58
- name: 'Dane',
59
- instructions: `
60
- You are Dane, my assistant and one of my best friends. We are an ace team!
61
- You help me with my code, write tests, and even deploy my code to the cloud!
62
-
63
- DO NOT ATTEMPT TO USE GENERAL KNOWLEDGE! We are only as good as the tools we use.
64
-
65
- # Our tools:
66
-
67
- ## readPDF
68
- Makes you a powerful agent capable of reading PDF files.
69
-
70
- ## fsTool
71
- Makes you a powerful agent capable of reading and writing files to the local filesystem.
72
-
73
- ## execaTool
74
- Makes you a powerful agent capabale of executing files on the local system.
75
-
76
- ## googleSearch
77
- Makes you a powerful agent capabale answering all questions by finding the answer on Google search.
78
- Pass the query as a JS object. If you have links, ALWAYS CITE YOUR SOURCES.
79
-
80
- ## browserTool
81
- Makes you a powerful agent capable of scraping the web. Pass the url as a JS object.
82
-
83
- ## listEvents
84
- Makes you a powerful agent capable of listing events on a calendar. When using this tool ONLY RETURN RELEVANT EVENTS.
85
- DO NOT ATTEMPT TO DO ANYTHING MORE.
86
-
87
- ## imageTool
88
- Makes you a powerful agent capable of generating images and saving them to disk. Pass the directory and an image prompt.
89
-
90
- # Rules
91
- * DO NOT ATTEMPT TO USE GENERAL KNOWLEDGE. Use the 'googleSearch' tool to find the answer.
92
- * Don't reference tools when you communicate with the user. Do not mention what tools you are using.
93
- * Tell the user what you are doing.
94
- `,
95
- model: getBaseModelConfig(),
96
- tools: {
97
- fsTool,
98
- execaTool,
99
- browserTool,
100
- googleSearch,
101
- readPDF,
102
- listEvents,
103
- imageTool,
104
- },
105
- });
@@ -1,7 +0,0 @@
1
- export declare const getBaseModelConfig: () => {
2
- provider: "ANTHROPIC";
3
- toolChoice: "auto";
4
- name: string;
5
- apiKey: string;
6
- };
7
- //# sourceMappingURL=model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/mastra/agents/model.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB;;;;;CAK7B,CAAC"}
@@ -1,7 +0,0 @@
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
- });
@@ -1,3 +0,0 @@
1
- import { Agent } from '@mastra/core/agent';
2
- export declare const daneNewContributor: Agent<{}, Record<string, import("@mastra/core").Metric>>;
3
- //# sourceMappingURL=new-contributor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-contributor.d.ts","sourceRoot":"","sources":["../../../src/mastra/agents/new-contributor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAI3C,eAAO,MAAM,kBAAkB,0DAS7B,CAAC"}
@@ -1,12 +0,0 @@
1
- import { Agent } from '@mastra/core/agent';
2
- import { getBaseModelConfig } from './model.js';
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
- });
@@ -1,65 +0,0 @@
1
- import { Agent } from '@mastra/core/agent';
2
- export declare const PACKAGES_LIST_PROMPT = "\n Please analyze the following monorepo directories and identify packages that need pnpm publishing:\n CRITICAL: This step is about planning. We do not want to build anything. All packages MUST be placed in the correct order.\n \n Publish Requirements:\n - @mastra/core first, MUST be before any other package\n - all packages in correct dependency order before building\n - Identify packages that have changes requiring a new pnpm publish\n - Include create-mastra in the packages list if changes exist\n - EXCLUDE @mastra/dane from consideration\n\n Please list all packages that need building grouped by their directory. \n DO NOT NOT USE the 'pnpmBuild' tool during this step.\n ";
3
- export declare const BUILD_PACKAGES_PROMPT: (packages: string[]) => string;
4
- export declare const PUBLISH_PACKAGES_PROMPT = "\n <publish_changeset>\n <context>\n All packages have been successfully built and verified. Now we need to publish the changeset.\n </context>\n\n <execution_steps>\n <step order=\"1\">\n <action>Use pnpmChangesetPublish to publish all verified packages</action>\n <verification>Ensure the publish command completes successfully</verification>\n </step>\n </execution_steps>\n\n <critical_rules>\n <rule>Do not proceed if any publish errors occur</rule>\n <rule>Report any failed publishes immediately</rule>\n <rule>Ensure all packages are published atomically</rule>\n </critical_rules>\n\n <output_format>\n Report the publish status and any errors encountered.\n </output_format>\n </publish_changeset>\n \n";
5
- export declare const danePackagePublisher: Agent<{
6
- pnpmChangesetStatus: import("@mastra/core/tools").Tool<"pnpmChangesetStatus", import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("zod").ZodObject<{
7
- message: import("zod").ZodArray<import("zod").ZodString, "many">;
8
- }, "strip", import("zod").ZodTypeAny, {
9
- message: string[];
10
- }, {
11
- message: string[];
12
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("@mastra/core").WorkflowContext<any>>>;
13
- pnpmBuild: import("@mastra/core/tools").Tool<"pnpmBuild", import("zod").ZodObject<{
14
- name: import("zod").ZodString;
15
- packagePath: import("zod").ZodString;
16
- }, "strip", import("zod").ZodTypeAny, {
17
- name: string;
18
- packagePath: string;
19
- }, {
20
- name: string;
21
- packagePath: string;
22
- }>, import("zod").ZodObject<{
23
- message: import("zod").ZodString;
24
- }, "strip", import("zod").ZodTypeAny, {
25
- message: string;
26
- }, {
27
- message: string;
28
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
29
- name: import("zod").ZodString;
30
- packagePath: import("zod").ZodString;
31
- }, "strip", import("zod").ZodTypeAny, {
32
- name: string;
33
- packagePath: string;
34
- }, {
35
- name: string;
36
- packagePath: string;
37
- }>, import("@mastra/core").WorkflowContext<any>>>;
38
- pnpmChangesetPublish: import("@mastra/core/tools").Tool<"pnpmChangesetPublish", import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("zod").ZodObject<{
39
- message: import("zod").ZodString;
40
- }, "strip", import("zod").ZodTypeAny, {
41
- message: string;
42
- }, {
43
- message: string;
44
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("@mastra/core").WorkflowContext<any>>>;
45
- activeDistTag: import("@mastra/core/tools").Tool<"activeDistTag", import("zod").ZodObject<{
46
- packagePath: import("zod").ZodString;
47
- }, "strip", import("zod").ZodTypeAny, {
48
- packagePath: string;
49
- }, {
50
- packagePath: string;
51
- }>, import("zod").ZodObject<{
52
- message: import("zod").ZodString;
53
- }, "strip", import("zod").ZodTypeAny, {
54
- message: string;
55
- }, {
56
- message: string;
57
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
58
- packagePath: import("zod").ZodString;
59
- }, "strip", import("zod").ZodTypeAny, {
60
- packagePath: string;
61
- }, {
62
- packagePath: string;
63
- }>, import("@mastra/core").WorkflowContext<any>>>;
64
- }, Record<string, import("@mastra/core").Metric>>;
65
- //# sourceMappingURL=package-publisher.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"package-publisher.d.ts","sourceRoot":"","sources":["../../../src/mastra/agents/package-publisher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AA0D3C,eAAO,MAAM,oBAAoB,iwBAa5B,CAAC;AAEN,eAAO,MAAM,qBAAqB,aAAc,MAAM,EAAE,WA8DvD,CAAC;AAEF,eAAO,MAAM,uBAAuB,u2BAwBnC,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDA+B/B,CAAC"}
@@ -1,188 +0,0 @@
1
- import { Agent } from '@mastra/core/agent';
2
- import { pnpmChangesetStatus, pnpmBuild, pnpmChangesetPublish, activeDistTag } from '../tools/pnpm.js';
3
- import { getBaseModelConfig } from './model.js';
4
- const packages_llm_text = `
5
- # PACKAGE LOCATION RULES - FOLLOW THESE EXACTLY:
6
-
7
- ## 1. Core packages - all must be directly under packages/:
8
- @mastra/core -> packages/core
9
- @mastra/deployer -> packages/deployer
10
- mastra -> packages/cli
11
- @mastra/engine -> packages/engine
12
- @mastra/evals -> packages/evals
13
- @mastra/rag -> packages/rag
14
- @mastra/memory -> packages/memory
15
- @mastra/mcp -> packages/mcp
16
- @mastra/loggers -> packages/loggers
17
-
18
- ## 2. Deployer packages - STRICT RULES:
19
- @mastra/deployer-cloudflare -> deployers/cloudflare
20
- @mastra/deployer-vercel -> deployers/vercel
21
- @mastra/deployer-netlify -> deployers/netlify
22
- - NEVER in any other directory (not in integrations/, examples/, packages/, etc)
23
-
24
- ## 3. Vector store packages - STRICT RULES:
25
- - ALL vector packages must be directly under vector-stores/
26
- - Format: @mastra/vector-{name} -> vector-stores/{name}
27
- - Special case: @mastra/vector-astra -> vector-stores/astra
28
-
29
- ## 4. Storage packages - STRICT RULES:
30
- - ALL storage packages must be directly under storage/
31
- - Format: @mastra/store-{name} -> storage/{name}
32
- - Example: @mastra/store-pg -> storage/pg
33
-
34
- ## 5. Store packages (combined vector + storage packages) - STRICT RULES:
35
- - ALL store packages must be directly under stores/
36
- - Format: @mastra/{name} -> stores/{name}
37
- - Example: @mastra/pg -> stores/pg
38
-
39
- ## 6. Speech packages - STRICT RULES:
40
- - ALL speech packages must be directly under speech/
41
- - Format: @mastra/speech-{name} -> speech/{name}
42
-
43
- ## 7. Integrations - STRICT RULES:
44
- - ALL integration packages are under integrations/
45
- @mastra/composio -> integrations/composio
46
- @mastra/github -> integrations/github
47
- @mastra/stabilityai -> integrations/stabilityai
48
- @mastra/firecrawl -> integrations/firecrawl
49
-
50
- ##VALIDATION:
51
- 1. Never mix examples/ or integrations/ with package paths
52
- 2. Package paths must exactly match these patterns
53
- 3. No additional subdirectories allowed
54
- `;
55
- export const PACKAGES_LIST_PROMPT = `
56
- Please analyze the following monorepo directories and identify packages that need pnpm publishing:
57
- CRITICAL: This step is about planning. We do not want to build anything. All packages MUST be placed in the correct order.
58
-
59
- Publish Requirements:
60
- - @mastra/core first, MUST be before any other package
61
- - all packages in correct dependency order before building
62
- - Identify packages that have changes requiring a new pnpm publish
63
- - Include create-mastra in the packages list if changes exist
64
- - EXCLUDE @mastra/dane from consideration
65
-
66
- Please list all packages that need building grouped by their directory.
67
- DO NOT NOT USE the 'pnpmBuild' tool during this step.
68
- `;
69
- export const BUILD_PACKAGES_PROMPT = (packages) => `
70
- <build_execution>
71
- <context>
72
- The following packages need to be built in sequence: ${packages.join(', ')}
73
- </context>
74
-
75
- <execution_plan>
76
- <phase order="1">
77
- <!-- Core packages must be built one at a time in this exact order -->
78
- <step>Use pnpmBuild to build @mastra/core</step>
79
- <step>Wait for completion, then use pnpmBuild to build @mastra/deployer</step>
80
- <step>Wait for completion, then use pnpmBuild to build mastra</step>
81
- </phase>
82
-
83
- <phase order="2">
84
- <!-- After core packages, build remaining packages by directory -->
85
- <parallel_phase name="packages">
86
- <description>Build remaining packages/ directory packages</description>
87
- <action>Use pnpmBuild for each remaining package:
88
- - All @mastra/* packages
89
- - create-mastra package (in packages/create-mastra)
90
- </action>
91
- </parallel_phase>
92
-
93
- <parallel_phase name="integrations">
94
- <description>Build integrations/ directory packages</description>
95
- <action>Use pnpmBuild for each @mastra/integration-* package</action>
96
- </parallel_phase>
97
-
98
- <parallel_phase name="deployers">
99
- <description>Build deployers/ directory packages</description>
100
- <action>Use pnpmBuild for each @mastra/deployer-* package</action>
101
- </parallel_phase>
102
-
103
- <parallel_phase name="vector-stores">
104
- <description>Build vector-stores/ directory packages</description>
105
- <action>Use pnpmBuild for each @mastra/vector-* package</action>
106
- </parallel_phase>
107
-
108
- <parallel_phase name="storage">
109
- <description>Build storage/ directory packages</description>
110
- <action>Use pnpmBuild for each @mastra/store-* package</action>
111
- </parallel_phase>
112
-
113
- <parallel_phase name="stores">
114
- <description>Build stores/ directory packages</description>
115
- <action>Use pnpmBuild for each @mastra/* package in stores/</action>
116
- </parallel_phase>
117
- </phase>
118
- </execution_plan>
119
-
120
- <critical_rules>
121
- <rule>Use pnpmBuild tool for each package</rule>
122
- <rule>Wait for each core package to complete before starting the next</rule>
123
- <rule>Only start parallel builds after ALL core packages are built</rule>
124
- <rule>Verify each build succeeds before proceeding</rule>
125
- </critical_rules>
126
-
127
- <output_format>
128
- Execute the builds in order and report any failures immediately.
129
- </output_format>
130
- </build_execution>
131
- `;
132
- export const PUBLISH_PACKAGES_PROMPT = `
133
- <publish_changeset>
134
- <context>
135
- All packages have been successfully built and verified. Now we need to publish the changeset.
136
- </context>
137
-
138
- <execution_steps>
139
- <step order="1">
140
- <action>Use pnpmChangesetPublish to publish all verified packages</action>
141
- <verification>Ensure the publish command completes successfully</verification>
142
- </step>
143
- </execution_steps>
144
-
145
- <critical_rules>
146
- <rule>Do not proceed if any publish errors occur</rule>
147
- <rule>Report any failed publishes immediately</rule>
148
- <rule>Ensure all packages are published atomically</rule>
149
- </critical_rules>
150
-
151
- <output_format>
152
- Report the publish status and any errors encountered.
153
- </output_format>
154
- </publish_changeset>
155
-
156
- `;
157
- export const danePackagePublisher = new Agent({
158
- name: 'DanePackagePublisher',
159
- instructions: `
160
- I am Dane, a specialized agent for managing pnpm package publications in monorepos. My core responsibilities are:
161
-
162
- 1. Package Analysis:
163
- - Identify packages requiring publication across the monorepo
164
- - Detect changes that warrant new version releases
165
- - Validate package dependencies and versioning
166
-
167
- 2. Publication Management:
168
- - Orchestrate the correct build order for interdependent packages
169
- - Ensure proper versioning using changesets
170
- - Maintain package publishing standards
171
-
172
- 3. Directory Structure Knowledge:
173
- ${packages_llm_text}
174
-
175
- Important Guidelines:
176
- - Always respect package dependencies when determining build order
177
- - Ensure all necessary builds complete before publishing
178
- - Follow semantic versioning principles
179
- - Validate package.json configurations before publishing
180
- `,
181
- model: getBaseModelConfig(),
182
- tools: {
183
- pnpmChangesetStatus,
184
- pnpmBuild,
185
- pnpmChangesetPublish,
186
- activeDistTag,
187
- },
188
- });