@mastra/dane 0.0.2-alpha.76 → 0.0.2-alpha.78

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.
@@ -1,6 +1,6 @@
1
1
  import { Agent } from '@mastra/core';
2
- export declare const daneCommitMessage: Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>>;
3
- export declare const daneIssueLabeler: Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>>;
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
4
  export declare const danePackagePublisher: Agent<{
5
5
  execaTool: import("@mastra/core").Tool<"execaTool", import("zod").ZodObject<{
6
6
  command: import("zod").ZodString;
@@ -85,9 +85,9 @@ export declare const danePackagePublisher: Agent<{
85
85
  }, {
86
86
  packagePath: string;
87
87
  }>, import("@mastra/core").WorkflowContext<any>>>;
88
- }>;
89
- export declare const daneLinkChecker: Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>>;
90
- export declare const daneChangeLog: Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>>;
88
+ }, Record<string, import("@mastra/core").Metric>>;
89
+ export declare const daneLinkChecker: Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>, Record<string, import("@mastra/core").Metric>>;
90
+ export declare const daneChangeLog: Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>, Record<string, import("@mastra/core").Metric>>;
91
91
  export declare const dane: Agent<{
92
92
  fsTool: import("@mastra/core").Tool<"fsTool", import("zod").ZodObject<{
93
93
  action: import("zod").ZodString;
@@ -280,5 +280,5 @@ export declare const dane: Agent<{
280
280
  directory: string;
281
281
  prompt: string;
282
282
  }>, import("@mastra/core").WorkflowContext<any>>>;
283
- }>;
283
+ }, Record<string, import("@mastra/core").Metric>>;
284
284
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mastra/agents/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAarC,eAAO,MAAM,iBAAiB,8EAU5B,CAAC;AAEH,eAAO,MAAM,gBAAgB,8EAO3B,CAAC;AAgBH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgB/B,CAAC;AAEH,eAAO,MAAM,eAAe,8EAa1B,CAAC;AAEH,eAAO,MAAM,aAAa,8EAcxB,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuDf,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mastra/agents/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAarC,eAAO,MAAM,iBAAiB,6HAU5B,CAAC;AAEH,eAAO,MAAM,gBAAgB,6HAO3B,CAAC;AAiBH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAgC/B,CAAC;AAEH,eAAO,MAAM,eAAe,6HAa1B,CAAC;AAEH,eAAO,MAAM,aAAa,6HAcxB,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAuDf,CAAC"}
@@ -7,7 +7,7 @@ import { fsTool } from '../tools/fs.js';
7
7
  import { imageTool } from '../tools/image.js';
8
8
  import { readPDF } from '../tools/pdf.js';
9
9
  import { activeDistTag, pnpmBuild, pnpmChangesetPublish, pnpmChangesetStatus } from '../tools/pnpm.js';
10
- import { getBaseModelConfig } from './model';
10
+ import { getBaseModelConfig } from './model.js';
11
11
  export const daneCommitMessage = new Agent({
12
12
  name: 'DaneCommitMessage',
13
13
  instructions: `
@@ -38,15 +38,32 @@ const packages_llm_text = `
38
38
  @mastra/memory is located in the "packages/memory" directory.
39
39
  @mastra/mcp is located in the "packages/mcp" directory.
40
40
  @mastra/deployer-{name} is located in the "deployers/{name}" directory.
41
- dane or @mastra/dane is located in the "exampeles/dane" directory.
41
+ @mastra/vector-{name} is located in the "vector-stores/{name}" directory.
42
+ @mastra/vector-astra is located in the "vector-stores/astra-db" directory.
42
43
  `;
43
44
  export const danePackagePublisher = new Agent({
44
45
  name: 'DanePackagePublisher',
45
46
  instructions: `
46
- You are Dane, the ultimate node module publisher.
47
- You help engineers publish their pnpm changesets.
47
+ I am Dane, a specialized agent for managing pnpm package publications in monorepos. My core responsibilities are:
48
48
 
49
+ 1. Package Analysis:
50
+ - Identify packages requiring publication across the monorepo
51
+ - Detect changes that warrant new version releases
52
+ - Validate package dependencies and versioning
53
+
54
+ 2. Publication Management:
55
+ - Orchestrate the correct build order for interdependent packages
56
+ - Ensure proper versioning using changesets
57
+ - Maintain package publishing standards
58
+
59
+ 3. Directory Structure Knowledge:
49
60
  ${packages_llm_text}
61
+
62
+ Important Guidelines:
63
+ - Always respect package dependencies when determining build order
64
+ - Ensure all necessary builds complete before publishing
65
+ - Follow semantic versioning principles
66
+ - Validate package.json configurations before publishing
50
67
  `,
51
68
  model: getBaseModelConfig(),
52
69
  tools: {
@@ -1,3 +1,3 @@
1
1
  import { Agent } from '@mastra/core';
2
- export declare const daneNewContributor: Agent<{}>;
2
+ export declare const daneNewContributor: Agent<{}, Record<string, import("@mastra/core").Metric>>;
3
3
  //# sourceMappingURL=new-contributor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"new-contributor.d.ts","sourceRoot":"","sources":["../../../src/mastra/agents/new-contributor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAIrC,eAAO,MAAM,kBAAkB,WAS7B,CAAC"}
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,5 +1,5 @@
1
1
  import { Agent } from '@mastra/core';
2
- import { getBaseModelConfig } from './model';
2
+ import { getBaseModelConfig } from './model.js';
3
3
  export const daneNewContributor = new Agent({
4
4
  name: 'DaneNewContributor',
5
5
  instructions: `
@@ -194,7 +194,7 @@ export declare const mastra: Mastra<{
194
194
  directory: string;
195
195
  prompt: string;
196
196
  }>, import("@mastra/core").WorkflowContext<any>>>;
197
- }>;
197
+ }, Record<string, import("@mastra/core").Metric>>;
198
198
  danePackagePublisher: import("@mastra/core").Agent<{
199
199
  execaTool: import("@mastra/core").Tool<"execaTool", import("zod").ZodObject<{
200
200
  command: import("zod").ZodString;
@@ -279,12 +279,12 @@ export declare const mastra: Mastra<{
279
279
  }, {
280
280
  packagePath: string;
281
281
  }>, import("@mastra/core").WorkflowContext<any>>>;
282
- }>;
283
- daneLinkChecker: import("@mastra/core").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>>;
284
- daneIssueLabeler: import("@mastra/core").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>>;
285
- daneCommitMessage: import("@mastra/core").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>>;
286
- daneChangeLog: import("@mastra/core").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>>;
287
- daneNewContributor: import("@mastra/core").Agent<{}>;
282
+ }, Record<string, import("@mastra/core").Metric>>;
283
+ daneLinkChecker: import("@mastra/core").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>, Record<string, import("@mastra/core").Metric>>;
284
+ daneIssueLabeler: import("@mastra/core").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>, Record<string, import("@mastra/core").Metric>>;
285
+ daneCommitMessage: import("@mastra/core").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>, Record<string, import("@mastra/core").Metric>>;
286
+ daneChangeLog: import("@mastra/core").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>, Record<string, import("@mastra/core").Metric>>;
287
+ daneNewContributor: import("@mastra/core").Agent<{}, Record<string, import("@mastra/core").Metric>>;
288
288
  }, {
289
289
  message: import("@mastra/core").Workflow<any, import("zod").ZodObject<{
290
290
  resourceid: import("zod").ZodString;
@@ -348,5 +348,5 @@ export declare const mastra: Mastra<{
348
348
  channelId: string;
349
349
  targetUrl: string;
350
350
  }>>;
351
- }, Record<string, import("@mastra/core").MastraVector>, Record<string, import("@mastra/core").MastraTTS>, import("@mastra/core").BaseLogger<import("@mastra/core").BaseLogMessage>>;
351
+ }, Record<string, import("@mastra/core").MastraVector>, Record<string, import("@mastra/core").MastraTTS>, import("@mastra/core").Logger>;
352
352
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mastra/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAyBtC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mLA6BjB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mastra/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAyBtC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wIA6BjB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { Step, Workflow } from '@mastra/core';
2
2
  import chalk from 'chalk';
3
- import { existsSync, readFileSync } from 'fs';
3
+ import { existsSync } from 'fs';
4
4
  import path from 'path';
5
5
  import { z } from 'zod';
6
6
  export const packagePublisher = new Workflow({
@@ -11,7 +11,8 @@ const getPacakgesToPublish = new Step({
11
11
  outputSchema: z.object({
12
12
  packages: z.array(z.string()),
13
13
  integrations: z.array(z.string()),
14
- danePackage: z.string(),
14
+ deployers: z.array(z.string()),
15
+ vector_stores: z.array(z.string()),
15
16
  }),
16
17
  execute: async ({ mastra }) => {
17
18
  const agent = mastra?.agents?.['danePackagePublisher'];
@@ -19,35 +20,53 @@ const getPacakgesToPublish = new Step({
19
20
  throw new Error('Agent not found');
20
21
  }
21
22
  const result = await agent.generate(`
22
- Here is my project structure in my monorepo.
23
- * My core modules are in the 'packages' directory.
24
- * My integrations are in the 'integrations' directory.
25
- * My deployers are in the 'deployers' directory.
23
+ Please analyze the following monorepo directories and identify packages that need pnpm publishing:
26
24
 
27
- Can you tell me which packages within these folders need to be published to npm?
25
+ CRITICAL: All packages MUST be built before publishing, in the correct order.
26
+
27
+ 1. Directory Structure:
28
+ - packages/ : Contains core modules (format: @mastra/{name})
29
+ - integrations/ : Contains integration packages (format: @mastra/{name})
30
+ - deployers/ : Contains deployer packages (format: @mastra/deployer-{name})
31
+ - vector-stores/: Contains vector store packages with following mapping:
32
+ * @mastra/vector-astra -> vector-stores/astra-db/
33
+ * @mastra/vector-{name} -> vector-stores/{name}/ (for all other vector stores)
34
+
35
+ 2. Publish Requirements:
36
+ - Build @mastra/core first, MUST be built before any other package
37
+ - Build all packages in correct dependency order before publishing
38
+ - Identify packages that have changes requiring a new pnpm publish
39
+ - Include create-mastra in the packages list if changes exist
40
+ - EXCLUDE @mastra/dane from consideration
41
+
42
+ Please list all packages that need building grouped by their directory.
28
43
  `);
29
44
  const resultObj = await agent.generate(`
30
- Can you format the following text with my described format?
45
+ Please organize the following packages for building and publishing:
46
+
47
+ Input Text: ${result.text}
48
+
49
+ 1. Build Order Requirements:
50
+ - ALL packages MUST be built before publishing
51
+ - @mastra/core MUST be built first
52
+ - Dependencies must be built before dependents
53
+ - Group parallel builds by directory type
31
54
 
32
- Formatting Rules:
33
- * If the text I am giving you says there are no publishable packages, return empty arrays.
34
- * @mastra/core must be first.
35
- * @mastra/deployer must be second.
36
- * mastra must be third.
37
-
38
- Text: ${result.text}
55
+ 2. Output Format:
56
+ - Group into: packages[], integrations[], deployers[], vector_stores[]
57
+ - Place create-mastra in packages[] array
58
+ - Maintain correct build order within each group
39
59
 
40
- Very Important:
41
- * Do not include packages if we do not need to build them.
42
- * create-mastra is a package (not an integration) and should be listed in packages array.
43
- * @mastra/deployers-{name} should be listed after packages.
44
- * @mastra/dane should be listed after packages and integrations.
60
+ 3. Critical Rules:
61
+ - Never publish without building first
62
+ - Only include packages that need updates
63
+ - Follow dependency order strictly
45
64
  `, {
46
65
  output: z.object({
47
66
  packages: z.array(z.string()),
48
67
  integrations: z.array(z.string()),
49
68
  deployers: z.array(z.string()),
50
- danePackage: z.string(),
69
+ vector_stores: z.array(z.string()),
51
70
  }),
52
71
  });
53
72
  console.log(resultObj.object);
@@ -55,7 +74,7 @@ const getPacakgesToPublish = new Step({
55
74
  packages: resultObj?.object?.packages,
56
75
  integrations: resultObj?.object?.integrations,
57
76
  deployers: resultObj?.object?.deployers,
58
- danePackage: resultObj?.object?.danePackage,
77
+ vector_stores: resultObj?.object?.vector_stores,
59
78
  };
60
79
  },
61
80
  });
@@ -92,6 +111,16 @@ const assemblePackages = new Step({
92
111
  packagesToBuild.add(pkgPath);
93
112
  });
94
113
  }
114
+ if (payload?.vector_stores) {
115
+ payload.vector_stores.forEach((pkg) => {
116
+ let pkgName = pkg.replace('@mastra/vector-', '');
117
+ if (pkgName === 'astra') {
118
+ pkgName = 'astra-db';
119
+ }
120
+ const pkgPath = path.join(process.cwd(), 'vector-stores', pkgName);
121
+ packagesToBuild.add(pkgPath);
122
+ });
123
+ }
95
124
  if (payload?.integrations) {
96
125
  const integrations = payload.integrations;
97
126
  integrations.forEach((integration) => {
@@ -100,31 +129,6 @@ const assemblePackages = new Step({
100
129
  packagesToBuild.add(integrationPath);
101
130
  });
102
131
  }
103
- if (payload?.danePackage) {
104
- const danePackage = payload.danePackage;
105
- let pkgName = danePackage.replace('@mastra/', '');
106
- const danePackageMapped = path.join(process.cwd(), 'examples', pkgName);
107
- const pkgJsonPath = readFileSync(path.join(danePackageMapped, 'package.json'), 'utf-8');
108
- const pkgJson = JSON.parse(pkgJsonPath);
109
- const dependencies = Object.keys(pkgJson.dependencies || {}).filter((dep) => dep.startsWith('@mastra/'));
110
- dependencies.forEach((dep) => {
111
- const pkgName = dep.replace('@mastra/', '');
112
- const pkgPath = path.join(process.cwd(), 'packages', pkgName);
113
- const integrationPath = path.join(process.cwd(), 'integrations', pkgName);
114
- try {
115
- if (existsSync(pkgPath)) {
116
- packagesToBuild.add(pkgPath);
117
- }
118
- else {
119
- packagesToBuild.add(integrationPath);
120
- }
121
- }
122
- catch (e) {
123
- console.error(e);
124
- }
125
- });
126
- packagesToBuild.add(path.join(process.cwd(), 'examples', 'dane'));
127
- }
128
132
  const pkgSet = Array.from(packagesToBuild.keys());
129
133
  if (!packagesToBuild.size) {
130
134
  console.error(chalk.red('No packages to build.'));
@@ -158,17 +162,21 @@ const buildPackages = new Step({
158
162
  let res = await agent.generate(`
159
163
  Here are the packages that need to be built: ${pkgSet.join(',')}.
160
164
 
161
- ## Follow the rules:
162
- * @mastra/core must be first.
163
- * @mastra/deployer must be second.
164
- * mastra must be third.
165
+ Please organize the build order following these strict requirements:
165
166
 
166
- Packages found within the 'packages' directory should be built next in parallel.
167
- Packages found within the 'integrations' directory should be built in parallel.
168
- Packages found within the 'deployers' directory should be built in parallel.
167
+ 1. Core Dependencies (Must be built in this exact order):
168
+ - @mastra/core MUST be built first
169
+ - @mastra/deployer MUST be built second
170
+ - mastra MUST be built third
169
171
 
170
- Build @mastra/dane last.
171
- `);
172
+ 2. Parallel Builds (After core dependencies):
173
+ - Build all remaining packages in 'packages' directory in parallel
174
+ - Build all packages in 'integrations' directory in parallel
175
+ - Build all packages in 'deployers' directory in parallel
176
+ - Build all packages in 'vector-stores' directory in parallel
177
+
178
+ Note: Do not proceed to the next group until the current group is fully built.
179
+ `);
172
180
  console.log(chalk.green(res.text));
173
181
  return { packages: pkgSet };
174
182
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/dane",
3
- "version": "0.0.2-alpha.76",
3
+ "version": "0.0.2-alpha.78",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "files": [
@@ -39,14 +39,14 @@
39
39
  "sqlite3": "^5.1.7",
40
40
  "typescript": "^5.5.4",
41
41
  "zod": "^3.24.0",
42
+ "@mastra/engine": "0.0.5-alpha.63",
42
43
  "@mastra/core": "0.1.27-alpha.69",
43
- "@mastra/stabilityai": "1.0.1-alpha.44",
44
- "@mastra/rag": "0.0.2-alpha.56",
45
- "@mastra/memory": "0.0.2-alpha.49",
46
44
  "@mastra/github": "1.0.3-alpha.53",
47
- "@mastra/mcp": "0.0.1-alpha.9",
48
- "@mastra/engine": "0.0.5-alpha.63",
49
- "@mastra/firecrawl": "1.0.4-alpha.58"
45
+ "@mastra/memory": "0.0.2-alpha.49",
46
+ "@mastra/stabilityai": "1.0.1-alpha.44",
47
+ "@mastra/firecrawl": "1.0.4-alpha.59",
48
+ "@mastra/rag": "0.0.2-alpha.57",
49
+ "@mastra/mcp": "0.0.1-alpha.10"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "npx tsc",