@mastra/dane 0.0.4 → 0.0.5-alpha.0

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