@mastra/dane 0.0.2-alpha.99 → 0.0.2

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