@mastra/dane 0.0.2-alpha.17 → 0.0.2-alpha.19
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.
- package/dist/commands/publish-packages.d.ts +2 -0
- package/dist/commands/publish-packages.d.ts.map +1 -0
- package/dist/commands/publish-packages.js +66 -0
- package/dist/index.js +6 -1
- package/dist/mastra/agents/index.d.ts +59 -0
- package/dist/mastra/agents/index.d.ts.map +1 -1
- package/dist/mastra/agents/index.js +14 -1
- package/dist/mastra/index.d.ts +59 -0
- package/dist/mastra/index.d.ts.map +1 -1
- package/dist/mastra/index.js +2 -1
- package/dist/mastra/tools/execa.d.ts +32 -0
- package/dist/mastra/tools/execa.d.ts.map +1 -1
- package/dist/mastra/tools/execa.js +61 -0
- package/dist/mastra/workflows/commit-message.js +1 -1
- package/package.json +10 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish-packages.d.ts","sourceRoot":"","sources":["../../src/commands/publish-packages.ts"],"names":[],"mappings":"AAMA,wBAAsB,eAAe,kBA+EpC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { mastra } from '../mastra/index.js';
|
|
5
|
+
export async function publishPackages() {
|
|
6
|
+
console.log(chalk.green("Hi! I'm Dane!"));
|
|
7
|
+
console.log(chalk.green('Let me publish your packages..\n'));
|
|
8
|
+
const agent = mastra.getAgent('danePackagePublisher');
|
|
9
|
+
const result = await agent.generate(`
|
|
10
|
+
Can you tell me which packages within the packages and integrations directory need to be published to npm?
|
|
11
|
+
`);
|
|
12
|
+
const resultObj = await agent.generate(`
|
|
13
|
+
Can you format this for me ${result.text}?
|
|
14
|
+
@mastra/core must be first.
|
|
15
|
+
@mastra/dane should be listed after packages and integrations.
|
|
16
|
+
`, {
|
|
17
|
+
schema: z.object({
|
|
18
|
+
packages: z.array(z.string()),
|
|
19
|
+
integrations: z.array(z.string()),
|
|
20
|
+
danePackage: z.string(),
|
|
21
|
+
}),
|
|
22
|
+
});
|
|
23
|
+
console.log(resultObj.object);
|
|
24
|
+
let packagesToBuild = [];
|
|
25
|
+
if (resultObj?.object?.packages) {
|
|
26
|
+
const packages = resultObj.object.packages;
|
|
27
|
+
const packagesMapped = packages.map((pkg) => {
|
|
28
|
+
let pkgName = pkg.replace('@mastra/', '');
|
|
29
|
+
if (pkgName === 'mastra') {
|
|
30
|
+
pkgName = 'cli';
|
|
31
|
+
}
|
|
32
|
+
const pkgPath = path.join(process.cwd(), 'packages', pkgName);
|
|
33
|
+
return pkgPath;
|
|
34
|
+
});
|
|
35
|
+
packagesToBuild = [...packagesMapped];
|
|
36
|
+
}
|
|
37
|
+
if (resultObj?.object?.integrations) {
|
|
38
|
+
const integrations = resultObj.object.integrations;
|
|
39
|
+
const integrationsMapped = integrations.map((integration) => {
|
|
40
|
+
let pkgName = integration.replace('@mastra/', '');
|
|
41
|
+
const integrationPath = path.join(process.cwd(), 'integrations', pkgName);
|
|
42
|
+
return integrationPath;
|
|
43
|
+
});
|
|
44
|
+
packagesToBuild = [...packagesToBuild, ...integrationsMapped];
|
|
45
|
+
}
|
|
46
|
+
if (resultObj?.object?.danePackage) {
|
|
47
|
+
const danePackage = resultObj.object.danePackage;
|
|
48
|
+
let pkgName = danePackage.replace('@mastra/', '');
|
|
49
|
+
const danePackageMapped = path.join(process.cwd(), 'examples', pkgName);
|
|
50
|
+
packagesToBuild = [...packagesToBuild, danePackageMapped];
|
|
51
|
+
}
|
|
52
|
+
console.log(packagesToBuild);
|
|
53
|
+
if (!packagesToBuild || !packagesToBuild.length) {
|
|
54
|
+
console.error(chalk.red('No packages to build.'));
|
|
55
|
+
process.exit(1);
|
|
56
|
+
}
|
|
57
|
+
let res = await agent.generate(`
|
|
58
|
+
Here are the packages that need to be built: ${packagesToBuild.join(',')}.
|
|
59
|
+
We need to build core first. And dane last. The rest can be done in parallel.
|
|
60
|
+
`);
|
|
61
|
+
console.log(chalk.green(res.text));
|
|
62
|
+
res = await agent.generate(`
|
|
63
|
+
Publish the changeset and then set the dist-tag of latest to the new version.
|
|
64
|
+
`);
|
|
65
|
+
console.log(chalk.green(result.text));
|
|
66
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { commitMessageCommand } from './commands/commit-message.js';
|
|
|
5
5
|
import { configCommand } from './commands/config.js';
|
|
6
6
|
import { issueLabelerCommand } from './commands/issue-labeler.js';
|
|
7
7
|
import { message } from './commands/message.js';
|
|
8
|
+
import { publishPackages } from './commands/publish-packages.js';
|
|
8
9
|
dotenv.config();
|
|
9
10
|
process.env.NODE_NO_WARNINGS = '1';
|
|
10
11
|
const program = new Command();
|
|
@@ -13,6 +14,10 @@ program
|
|
|
13
14
|
.command('issue-labeler')
|
|
14
15
|
.description('Automatically label GitHub issues based on their content and context')
|
|
15
16
|
.action(issueLabelerCommand);
|
|
16
|
-
program
|
|
17
|
+
program
|
|
18
|
+
.command('commit')
|
|
19
|
+
.description('Create a sensible commit message based on the changes made')
|
|
20
|
+
.action(commitMessageCommand);
|
|
17
21
|
program.addCommand(configCommand);
|
|
22
|
+
program.command('publish').description('Publish packages to the registry').action(publishPackages);
|
|
18
23
|
program.parse(process.argv);
|
|
@@ -1,6 +1,65 @@
|
|
|
1
1
|
import { Agent } from '@mastra/core';
|
|
2
2
|
export declare const daneCommitMessage: Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>>;
|
|
3
3
|
export declare const daneIssueLabeler: Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>>;
|
|
4
|
+
export declare const danePackagePublisher: Agent<{
|
|
5
|
+
execaTool: import("@mastra/core").Tool<"execaTool", import("zod").ZodObject<{
|
|
6
|
+
command: import("zod").ZodString;
|
|
7
|
+
args: import("zod").ZodArray<import("zod").ZodString, "many">;
|
|
8
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
9
|
+
command: string;
|
|
10
|
+
args: string[];
|
|
11
|
+
}, {
|
|
12
|
+
command: string;
|
|
13
|
+
args: string[];
|
|
14
|
+
}>, import("zod").ZodObject<{
|
|
15
|
+
message: import("zod").ZodString;
|
|
16
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
17
|
+
message: string;
|
|
18
|
+
}, {
|
|
19
|
+
message: string;
|
|
20
|
+
}>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
|
|
21
|
+
command: import("zod").ZodString;
|
|
22
|
+
args: import("zod").ZodArray<import("zod").ZodString, "many">;
|
|
23
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
24
|
+
command: string;
|
|
25
|
+
args: string[];
|
|
26
|
+
}, {
|
|
27
|
+
command: string;
|
|
28
|
+
args: string[];
|
|
29
|
+
}>, import("@mastra/core").WorkflowContext<any>>>;
|
|
30
|
+
pnpmBuild: import("@mastra/core").Tool<"pnpmBuild", import("zod").ZodObject<{
|
|
31
|
+
name: import("zod").ZodString;
|
|
32
|
+
packagePath: import("zod").ZodString;
|
|
33
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
34
|
+
name: string;
|
|
35
|
+
packagePath: string;
|
|
36
|
+
}, {
|
|
37
|
+
name: string;
|
|
38
|
+
packagePath: string;
|
|
39
|
+
}>, import("zod").ZodObject<{
|
|
40
|
+
message: import("zod").ZodString;
|
|
41
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
42
|
+
message: string;
|
|
43
|
+
}, {
|
|
44
|
+
message: string;
|
|
45
|
+
}>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
|
|
46
|
+
name: import("zod").ZodString;
|
|
47
|
+
packagePath: import("zod").ZodString;
|
|
48
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
49
|
+
name: string;
|
|
50
|
+
packagePath: string;
|
|
51
|
+
}, {
|
|
52
|
+
name: string;
|
|
53
|
+
packagePath: string;
|
|
54
|
+
}>, import("@mastra/core").WorkflowContext<any>>>;
|
|
55
|
+
pnpmChangesetPublish: import("@mastra/core").Tool<"pnpmChangesetPublish", import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("zod").ZodObject<{
|
|
56
|
+
message: import("zod").ZodString;
|
|
57
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
58
|
+
message: string;
|
|
59
|
+
}, {
|
|
60
|
+
message: string;
|
|
61
|
+
}>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("@mastra/core").WorkflowContext<any>>>;
|
|
62
|
+
}>;
|
|
4
63
|
export declare const dane: Agent<{
|
|
5
64
|
fsTool: import("@mastra/core").Tool<"fsTool", import("zod").ZodObject<{
|
|
6
65
|
action: import("zod").ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mastra/agents/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAkBrC,eAAO,MAAM,iBAAiB,8EAU5B,CAAC;AAEH,eAAO,MAAM,gBAAgB,8EAO3B,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuDf,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mastra/agents/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAkBrC,eAAO,MAAM,iBAAiB,8EAU5B,CAAC;AAEH,eAAO,MAAM,gBAAgB,8EAO3B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY/B,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuDf,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { config } from '../../config/index.js';
|
|
|
3
3
|
import { browserTool, googleSearch } from '../tools/browser.js';
|
|
4
4
|
import { listEvents } from '../tools/calendar.js';
|
|
5
5
|
import { crawl } from '../tools/crawl.js';
|
|
6
|
-
import { execaTool } from '../tools/execa.js';
|
|
6
|
+
import { execaTool, pnpmBuild, pnpmChangesetPublish } from '../tools/execa.js';
|
|
7
7
|
import { fsTool } from '../tools/fs.js';
|
|
8
8
|
import { imageTool } from '../tools/image.js';
|
|
9
9
|
import { readPDF } from '../tools/pdf.js';
|
|
@@ -32,6 +32,19 @@ export const daneIssueLabeler = new Agent({
|
|
|
32
32
|
`,
|
|
33
33
|
model: getBaseModelConfig(),
|
|
34
34
|
});
|
|
35
|
+
export const danePackagePublisher = new Agent({
|
|
36
|
+
name: 'DanePackagePublisher',
|
|
37
|
+
instructions: `
|
|
38
|
+
You are Dane, the ultimate node module publisher.
|
|
39
|
+
You help engineers publish their pnpm changesets.
|
|
40
|
+
`,
|
|
41
|
+
model: getBaseModelConfig(),
|
|
42
|
+
tools: {
|
|
43
|
+
execaTool,
|
|
44
|
+
pnpmBuild,
|
|
45
|
+
pnpmChangesetPublish,
|
|
46
|
+
},
|
|
47
|
+
});
|
|
35
48
|
export const dane = new Agent({
|
|
36
49
|
name: 'Dane',
|
|
37
50
|
instructions: `
|
package/dist/mastra/index.d.ts
CHANGED
|
@@ -195,6 +195,65 @@ export declare const mastra: Mastra<{
|
|
|
195
195
|
prompt: string;
|
|
196
196
|
}>, import("@mastra/core").WorkflowContext<any>>>;
|
|
197
197
|
}>;
|
|
198
|
+
danePackagePublisher: import("@mastra/core").Agent<{
|
|
199
|
+
execaTool: import("@mastra/core").Tool<"execaTool", import("zod").ZodObject<{
|
|
200
|
+
command: import("zod").ZodString;
|
|
201
|
+
args: import("zod").ZodArray<import("zod").ZodString, "many">;
|
|
202
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
203
|
+
command: string;
|
|
204
|
+
args: string[];
|
|
205
|
+
}, {
|
|
206
|
+
command: string;
|
|
207
|
+
args: string[];
|
|
208
|
+
}>, import("zod").ZodObject<{
|
|
209
|
+
message: import("zod").ZodString;
|
|
210
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
211
|
+
message: string;
|
|
212
|
+
}, {
|
|
213
|
+
message: string;
|
|
214
|
+
}>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
|
|
215
|
+
command: import("zod").ZodString;
|
|
216
|
+
args: import("zod").ZodArray<import("zod").ZodString, "many">;
|
|
217
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
218
|
+
command: string;
|
|
219
|
+
args: string[];
|
|
220
|
+
}, {
|
|
221
|
+
command: string;
|
|
222
|
+
args: string[];
|
|
223
|
+
}>, import("@mastra/core").WorkflowContext<any>>>;
|
|
224
|
+
pnpmBuild: import("@mastra/core").Tool<"pnpmBuild", import("zod").ZodObject<{
|
|
225
|
+
name: import("zod").ZodString;
|
|
226
|
+
packagePath: import("zod").ZodString;
|
|
227
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
228
|
+
name: string;
|
|
229
|
+
packagePath: string;
|
|
230
|
+
}, {
|
|
231
|
+
name: string;
|
|
232
|
+
packagePath: string;
|
|
233
|
+
}>, import("zod").ZodObject<{
|
|
234
|
+
message: import("zod").ZodString;
|
|
235
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
236
|
+
message: string;
|
|
237
|
+
}, {
|
|
238
|
+
message: string;
|
|
239
|
+
}>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
|
|
240
|
+
name: import("zod").ZodString;
|
|
241
|
+
packagePath: import("zod").ZodString;
|
|
242
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
243
|
+
name: string;
|
|
244
|
+
packagePath: string;
|
|
245
|
+
}, {
|
|
246
|
+
name: string;
|
|
247
|
+
packagePath: string;
|
|
248
|
+
}>, import("@mastra/core").WorkflowContext<any>>>;
|
|
249
|
+
pnpmChangesetPublish: import("@mastra/core").Tool<"pnpmChangesetPublish", import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("zod").ZodObject<{
|
|
250
|
+
message: import("zod").ZodString;
|
|
251
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
252
|
+
message: string;
|
|
253
|
+
}, {
|
|
254
|
+
message: string;
|
|
255
|
+
}>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("@mastra/core").WorkflowContext<any>>>;
|
|
256
|
+
}>;
|
|
198
257
|
daneIssueLabeler: import("@mastra/core").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>>;
|
|
199
258
|
daneCommitMessage: import("@mastra/core").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>>;
|
|
200
259
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mastra/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAYtC,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mastra/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAYtC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAsBjB,CAAC"}
|
package/dist/mastra/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Mastra } from '@mastra/core';
|
|
2
2
|
import { PostgresEngine } from '@mastra/engine';
|
|
3
3
|
import { UpstashKVMemory } from '@mastra/memory';
|
|
4
|
-
import { dane, daneCommitMessage, daneIssueLabeler } from './agents/index.js';
|
|
4
|
+
import { dane, daneCommitMessage, daneIssueLabeler, danePackagePublisher } from './agents/index.js';
|
|
5
5
|
import { firecrawl } from './integrations/index.js';
|
|
6
6
|
import { messageWorkflow, githubIssueLabeler, commitMessageGenerator } from './workflows/index.js';
|
|
7
7
|
const engine = new PostgresEngine({
|
|
@@ -10,6 +10,7 @@ const engine = new PostgresEngine({
|
|
|
10
10
|
export const mastra = new Mastra({
|
|
11
11
|
agents: {
|
|
12
12
|
dane,
|
|
13
|
+
danePackagePublisher,
|
|
13
14
|
daneIssueLabeler,
|
|
14
15
|
daneCommitMessage,
|
|
15
16
|
},
|
|
@@ -24,4 +24,36 @@ export declare const execaTool: import("@mastra/core").Tool<"execaTool", z.ZodOb
|
|
|
24
24
|
command: string;
|
|
25
25
|
args: string[];
|
|
26
26
|
}>, import("@mastra/core").WorkflowContext<any>>>;
|
|
27
|
+
export declare const pnpmBuild: import("@mastra/core").Tool<"pnpmBuild", z.ZodObject<{
|
|
28
|
+
name: z.ZodString;
|
|
29
|
+
packagePath: z.ZodString;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
name: string;
|
|
32
|
+
packagePath: string;
|
|
33
|
+
}, {
|
|
34
|
+
name: string;
|
|
35
|
+
packagePath: string;
|
|
36
|
+
}>, z.ZodObject<{
|
|
37
|
+
message: z.ZodString;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
message: string;
|
|
40
|
+
}, {
|
|
41
|
+
message: string;
|
|
42
|
+
}>, import("@mastra/core").ToolExecutionContext<z.ZodObject<{
|
|
43
|
+
name: z.ZodString;
|
|
44
|
+
packagePath: z.ZodString;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
name: string;
|
|
47
|
+
packagePath: string;
|
|
48
|
+
}, {
|
|
49
|
+
name: string;
|
|
50
|
+
packagePath: string;
|
|
51
|
+
}>, import("@mastra/core").WorkflowContext<any>>>;
|
|
52
|
+
export declare const pnpmChangesetPublish: import("@mastra/core").Tool<"pnpmChangesetPublish", z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodObject<{
|
|
53
|
+
message: z.ZodString;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
message: string;
|
|
56
|
+
}, {
|
|
57
|
+
message: string;
|
|
58
|
+
}>, import("@mastra/core").ToolExecutionContext<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, import("@mastra/core").WorkflowContext<any>>>;
|
|
27
59
|
//# sourceMappingURL=execa.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execa.d.ts","sourceRoot":"","sources":["../../../src/mastra/tools/execa.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"execa.d.ts","sourceRoot":"","sources":["../../../src/mastra/tools/execa.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;iDA4BpB,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;iDA8BpB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;6IA0B/B,CAAC"}
|
|
@@ -25,6 +25,7 @@ export const execaTool = createTool({
|
|
|
25
25
|
}),
|
|
26
26
|
execute: async ({ context: { command, args } }) => {
|
|
27
27
|
try {
|
|
28
|
+
console.log(chalk.green(`Running command: ${command} ${args.join(' ')}`));
|
|
28
29
|
const p = execa(command, args);
|
|
29
30
|
console.log(`\n`);
|
|
30
31
|
p.stdout.pipe(colorTransform).pipe(process.stdout);
|
|
@@ -40,3 +41,63 @@ export const execaTool = createTool({
|
|
|
40
41
|
}
|
|
41
42
|
},
|
|
42
43
|
});
|
|
44
|
+
export const pnpmBuild = createTool({
|
|
45
|
+
id: 'pnpmBuild',
|
|
46
|
+
name: 'PNPM Build Tool',
|
|
47
|
+
description: 'Used to build the pnpm module',
|
|
48
|
+
inputSchema: z.object({
|
|
49
|
+
name: z.string(),
|
|
50
|
+
packagePath: z.string(),
|
|
51
|
+
}),
|
|
52
|
+
outputSchema: z.object({
|
|
53
|
+
message: z.string(),
|
|
54
|
+
}),
|
|
55
|
+
execute: async ({ context: { name, packagePath } }) => {
|
|
56
|
+
try {
|
|
57
|
+
console.log(chalk.green(`Building: ${name} at ${packagePath}`));
|
|
58
|
+
const p = execa(`pnpm`, ['build'], {
|
|
59
|
+
stdio: 'inherit',
|
|
60
|
+
cwd: packagePath,
|
|
61
|
+
reject: false,
|
|
62
|
+
});
|
|
63
|
+
console.log(`\n`);
|
|
64
|
+
await p;
|
|
65
|
+
return { message: 'Done' };
|
|
66
|
+
}
|
|
67
|
+
catch (e) {
|
|
68
|
+
console.error(e);
|
|
69
|
+
if (e instanceof ExecaError) {
|
|
70
|
+
return { message: e.message };
|
|
71
|
+
}
|
|
72
|
+
return { message: 'Error' };
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
export const pnpmChangesetPublish = createTool({
|
|
77
|
+
id: 'pnpmChangesetPublish',
|
|
78
|
+
name: 'PNPM Changeset Publish Tool',
|
|
79
|
+
description: 'Used to publish the pnpm module',
|
|
80
|
+
inputSchema: z.object({}),
|
|
81
|
+
outputSchema: z.object({
|
|
82
|
+
message: z.string(),
|
|
83
|
+
}),
|
|
84
|
+
execute: async () => {
|
|
85
|
+
try {
|
|
86
|
+
console.log(chalk.green(`Publishing...`));
|
|
87
|
+
const p = execa(`pnpm`, ['changeset', 'publish'], {
|
|
88
|
+
stdio: 'inherit',
|
|
89
|
+
reject: false,
|
|
90
|
+
});
|
|
91
|
+
console.log(`\n`);
|
|
92
|
+
await p;
|
|
93
|
+
return { message: 'Done' };
|
|
94
|
+
}
|
|
95
|
+
catch (e) {
|
|
96
|
+
console.error(e);
|
|
97
|
+
if (e instanceof ExecaError) {
|
|
98
|
+
return { message: e.message };
|
|
99
|
+
}
|
|
100
|
+
return { message: 'Error' };
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
});
|
|
@@ -3,7 +3,7 @@ import { Step, Workflow } from '@mastra/core';
|
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
import { execSync } from 'child_process';
|
|
5
5
|
import { z } from 'zod';
|
|
6
|
-
import { fsTool } from '../tools/fs';
|
|
6
|
+
import { fsTool } from '../tools/fs.js';
|
|
7
7
|
export const commitMessageGenerator = new Workflow({
|
|
8
8
|
name: 'commit-message',
|
|
9
9
|
triggerSchema: z.object({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/dane",
|
|
3
|
-
"version": "0.0.2-alpha.
|
|
3
|
+
"version": "0.0.2-alpha.19",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -38,17 +38,18 @@
|
|
|
38
38
|
"sqlite3": "^5.1.7",
|
|
39
39
|
"typescript": "^5.5.4",
|
|
40
40
|
"zod": "^3.24.0",
|
|
41
|
-
"@mastra/core": "0.1.27-alpha.
|
|
42
|
-
"@mastra/engine": "0.0.5-alpha.
|
|
43
|
-
"@mastra/firecrawl": "1.0.4-alpha.
|
|
44
|
-
"@mastra/
|
|
45
|
-
"@mastra/
|
|
46
|
-
"@mastra/rag": "0.0.2-alpha.
|
|
47
|
-
"@mastra/stabilityai": "1.0.1-alpha.
|
|
41
|
+
"@mastra/core": "0.1.27-alpha.46",
|
|
42
|
+
"@mastra/engine": "0.0.5-alpha.40",
|
|
43
|
+
"@mastra/firecrawl": "1.0.4-alpha.32",
|
|
44
|
+
"@mastra/github": "1.0.3-alpha.30",
|
|
45
|
+
"@mastra/memory": "0.0.2-alpha.26",
|
|
46
|
+
"@mastra/rag": "0.0.2-alpha.30",
|
|
47
|
+
"@mastra/stabilityai": "1.0.1-alpha.21"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "npx tsc",
|
|
51
51
|
"start": "npx bun src/index.ts",
|
|
52
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
52
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
53
|
+
"prepublish": "pnpm build"
|
|
53
54
|
}
|
|
54
55
|
}
|