@mastra/dane 0.0.2-alpha.7 → 0.0.2-alpha.71
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/LICENSE +44 -0
- package/README.md +25 -4
- package/data/crawl/conventional-commit.json +25 -0
- package/dist/commands/changelog.d.ts +2 -0
- package/dist/commands/changelog.d.ts.map +1 -0
- package/dist/commands/changelog.js +15 -0
- package/dist/commands/commit-message.d.ts +2 -0
- package/dist/commands/commit-message.d.ts.map +1 -0
- package/dist/commands/commit-message.js +32 -0
- package/dist/commands/config.d.ts +3 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +40 -0
- package/dist/commands/issue-labeler.d.ts.map +1 -1
- package/dist/commands/issue-labeler.js +19 -2
- package/dist/commands/link-checker.d.ts +4 -0
- package/dist/commands/link-checker.d.ts.map +1 -0
- package/dist/commands/link-checker.js +16 -0
- package/dist/commands/message.d.ts.map +1 -1
- package/dist/commands/message.js +3 -1
- package/dist/commands/new-contributor-message.d.ts +2 -0
- package/dist/commands/new-contributor-message.d.ts.map +1 -0
- package/dist/commands/new-contributor-message.js +43 -0
- 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 +11 -0
- package/dist/commands/telephone-game.d.ts +2 -0
- package/dist/commands/telephone-game.d.ts.map +1 -0
- package/dist/commands/telephone-game.js +32 -0
- package/dist/config/index.d.ts +12 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +75 -0
- package/dist/index.js +30 -2
- package/dist/mastra/agents/index.d.ts +116 -0
- package/dist/mastra/agents/index.d.ts.map +1 -1
- package/dist/mastra/agents/index.js +92 -24
- package/dist/mastra/agents/model.d.ts +7 -0
- package/dist/mastra/agents/model.d.ts.map +1 -0
- package/dist/mastra/agents/model.js +7 -0
- package/dist/mastra/agents/new-contributor.d.ts +3 -0
- package/dist/mastra/agents/new-contributor.d.ts.map +1 -0
- package/dist/mastra/agents/new-contributor.js +12 -0
- package/dist/mastra/index.d.ts +157 -1
- package/dist/mastra/index.d.ts.map +1 -1
- package/dist/mastra/index.js +19 -3
- package/dist/mastra/integrations/index.d.ts +2 -0
- package/dist/mastra/integrations/index.d.ts.map +1 -1
- package/dist/mastra/integrations/index.js +19 -2
- package/dist/mastra/tools/crawl.d.ts +3 -0
- package/dist/mastra/tools/crawl.d.ts.map +1 -1
- package/dist/mastra/tools/crawl.js +4 -2
- package/dist/mastra/tools/execa.d.ts.map +1 -1
- package/dist/mastra/tools/execa.js +5 -1
- package/dist/mastra/tools/image.d.ts +27 -0
- package/dist/mastra/tools/image.d.ts.map +1 -0
- package/dist/mastra/tools/image.js +37 -0
- package/dist/mastra/tools/mcp.d.ts +3 -0
- package/dist/mastra/tools/mcp.d.ts.map +1 -0
- package/dist/mastra/tools/mcp.js +12 -0
- package/dist/mastra/tools/pdf.d.ts.map +1 -1
- package/dist/mastra/tools/pdf.js +3 -2
- package/dist/mastra/tools/pnpm.d.ts +60 -0
- package/dist/mastra/tools/pnpm.d.ts.map +1 -0
- package/dist/mastra/tools/pnpm.js +128 -0
- package/dist/mastra/workflows/changelog.d.ts +10 -0
- package/dist/mastra/workflows/changelog.d.ts.map +1 -0
- package/dist/mastra/workflows/changelog.js +149 -0
- package/dist/mastra/workflows/chat.d.ts.map +1 -1
- package/dist/mastra/workflows/chat.js +6 -11
- package/dist/mastra/workflows/commit-message.d.ts +10 -0
- package/dist/mastra/workflows/commit-message.d.ts.map +1 -0
- package/dist/mastra/workflows/commit-message.js +138 -0
- package/dist/mastra/workflows/first-contributor.d.ts +16 -0
- package/dist/mastra/workflows/first-contributor.d.ts.map +1 -0
- package/dist/mastra/workflows/first-contributor.js +122 -0
- package/dist/mastra/workflows/index.d.ts +1 -0
- package/dist/mastra/workflows/index.d.ts.map +1 -1
- package/dist/mastra/workflows/index.js +1 -0
- package/dist/mastra/workflows/issue-labeler.js +1 -1
- package/dist/mastra/workflows/link-checker.d.ts +13 -0
- package/dist/mastra/workflows/link-checker.d.ts.map +1 -0
- package/dist/mastra/workflows/link-checker.js +102 -0
- package/dist/mastra/workflows/publish-packages.d.ts +3 -0
- package/dist/mastra/workflows/publish-packages.d.ts.map +1 -0
- package/dist/mastra/workflows/publish-packages.js +273 -0
- package/dist/mastra/workflows/telephone-game.d.ts +3 -0
- package/dist/mastra/workflows/telephone-game.d.ts.map +1 -0
- package/dist/mastra/workflows/telephone-game.js +95 -0
- package/package.json +13 -9
- package/test-files/716a95a5c57a56d32a32b1c9592d6df0.png +0 -0
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { Step, Workflow } from '@mastra/core';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import { existsSync, readFileSync } from 'fs';
|
|
4
|
+
import path from 'path';
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export const packagePublisher = new Workflow({
|
|
7
|
+
name: 'pnpm-changset-publisher',
|
|
8
|
+
});
|
|
9
|
+
const getPacakgesToPublish = new Step({
|
|
10
|
+
id: 'getPacakgesToPublish',
|
|
11
|
+
outputSchema: z.object({
|
|
12
|
+
packages: z.array(z.string()),
|
|
13
|
+
integrations: z.array(z.string()),
|
|
14
|
+
danePackage: z.string(),
|
|
15
|
+
}),
|
|
16
|
+
execute: async ({ mastra }) => {
|
|
17
|
+
const agent = mastra?.agents?.['danePackagePublisher'];
|
|
18
|
+
if (!agent) {
|
|
19
|
+
throw new Error('Agent not found');
|
|
20
|
+
}
|
|
21
|
+
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.
|
|
26
|
+
|
|
27
|
+
Can you tell me which packages within these folders need to be published to npm?
|
|
28
|
+
`);
|
|
29
|
+
const resultObj = await agent.generate(`
|
|
30
|
+
Can you format the following text with my described format?
|
|
31
|
+
|
|
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}
|
|
39
|
+
|
|
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.
|
|
45
|
+
`, {
|
|
46
|
+
output: z.object({
|
|
47
|
+
packages: z.array(z.string()),
|
|
48
|
+
integrations: z.array(z.string()),
|
|
49
|
+
deployers: z.array(z.string()),
|
|
50
|
+
danePackage: z.string(),
|
|
51
|
+
}),
|
|
52
|
+
});
|
|
53
|
+
console.log(resultObj.object);
|
|
54
|
+
return {
|
|
55
|
+
packages: resultObj?.object?.packages,
|
|
56
|
+
integrations: resultObj?.object?.integrations,
|
|
57
|
+
deployers: resultObj?.object?.deployers,
|
|
58
|
+
danePackage: resultObj?.object?.danePackage,
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
const assemblePackages = new Step({
|
|
63
|
+
id: 'assemblePackages',
|
|
64
|
+
outputSchema: z.object({
|
|
65
|
+
packages: z.array(z.string()),
|
|
66
|
+
}),
|
|
67
|
+
execute: async ({ context }) => {
|
|
68
|
+
if (context.machineContext?.stepResults.getPacakgesToPublish?.status !== 'success') {
|
|
69
|
+
return {
|
|
70
|
+
packages: [],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
const payload = context.machineContext.stepResults.getPacakgesToPublish.payload;
|
|
74
|
+
const packagesToBuild = new Set();
|
|
75
|
+
if (payload?.packages) {
|
|
76
|
+
payload.packages.forEach((pkg) => {
|
|
77
|
+
let pkgName = pkg.replace('@mastra/', '');
|
|
78
|
+
if (pkgName === 'mastra') {
|
|
79
|
+
pkgName = 'cli';
|
|
80
|
+
}
|
|
81
|
+
const pkgPath = path.join(process.cwd(), 'packages', pkgName);
|
|
82
|
+
packagesToBuild.add(pkgPath);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
if (payload?.deployers) {
|
|
86
|
+
payload.deployers.forEach((pkg) => {
|
|
87
|
+
let pkgName = pkg.replace('@mastra/deployer-', '');
|
|
88
|
+
if (pkgName === 'mastra') {
|
|
89
|
+
pkgName = 'cli';
|
|
90
|
+
}
|
|
91
|
+
const pkgPath = path.join(process.cwd(), 'deployers', pkgName);
|
|
92
|
+
packagesToBuild.add(pkgPath);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
if (payload?.integrations) {
|
|
96
|
+
const integrations = payload.integrations;
|
|
97
|
+
integrations.forEach((integration) => {
|
|
98
|
+
let pkgName = integration.replace('@mastra/', '');
|
|
99
|
+
const integrationPath = path.join(process.cwd(), 'integrations', pkgName);
|
|
100
|
+
packagesToBuild.add(integrationPath);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
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
|
+
const pkgSet = Array.from(packagesToBuild.keys());
|
|
129
|
+
if (!packagesToBuild.size) {
|
|
130
|
+
console.error(chalk.red('No packages to build.'));
|
|
131
|
+
return {
|
|
132
|
+
packages: [],
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
return { packages: pkgSet };
|
|
136
|
+
},
|
|
137
|
+
});
|
|
138
|
+
const buildPackages = new Step({
|
|
139
|
+
id: 'buildPackages',
|
|
140
|
+
outputSchema: z.object({
|
|
141
|
+
packages: z.array(z.string()),
|
|
142
|
+
}),
|
|
143
|
+
execute: async ({ context, mastra }) => {
|
|
144
|
+
if (context.machineContext?.stepResults.assemblePackages?.status !== 'success') {
|
|
145
|
+
return {
|
|
146
|
+
packages: [],
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
const pkgSet = context.machineContext.stepResults.assemblePackages.payload.packages;
|
|
150
|
+
const agent = mastra?.agents?.['danePackagePublisher'];
|
|
151
|
+
if (!agent) {
|
|
152
|
+
throw new Error('Agent not found');
|
|
153
|
+
}
|
|
154
|
+
console.log(chalk.green(`Building packages:`));
|
|
155
|
+
pkgSet.forEach((pkg) => {
|
|
156
|
+
console.log(chalk.green(pkg));
|
|
157
|
+
});
|
|
158
|
+
let res = await agent.generate(`
|
|
159
|
+
Here are the packages that need to be built: ${pkgSet.join(',')}.
|
|
160
|
+
|
|
161
|
+
## Follow the rules:
|
|
162
|
+
* @mastra/core must be first.
|
|
163
|
+
* @mastra/deployer must be second.
|
|
164
|
+
* mastra must be third.
|
|
165
|
+
|
|
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.
|
|
169
|
+
|
|
170
|
+
Build @mastra/dane last.
|
|
171
|
+
`);
|
|
172
|
+
console.log(chalk.green(res.text));
|
|
173
|
+
return { packages: pkgSet };
|
|
174
|
+
},
|
|
175
|
+
});
|
|
176
|
+
const verifyBuild = new Step({
|
|
177
|
+
id: 'verifyBuild',
|
|
178
|
+
outputSchema: z.object({
|
|
179
|
+
packages: z.array(z.string()),
|
|
180
|
+
}),
|
|
181
|
+
execute: async ({ context }) => {
|
|
182
|
+
if (context.machineContext?.stepResults.buildPackages?.status !== 'success') {
|
|
183
|
+
return {
|
|
184
|
+
packages: [],
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
const pkgSet = context.machineContext.stepResults.buildPackages.payload.packages;
|
|
188
|
+
for (const pkg of pkgSet) {
|
|
189
|
+
if (!existsSync(`${pkg}/dist`)) {
|
|
190
|
+
console.error(chalk.red(`Failed to build ${pkg}.`));
|
|
191
|
+
throw new Error(`Failed to build ${pkg}.`);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
console.log(pkgSet);
|
|
195
|
+
return {
|
|
196
|
+
packages: pkgSet,
|
|
197
|
+
};
|
|
198
|
+
},
|
|
199
|
+
});
|
|
200
|
+
const publishChangeset = new Step({
|
|
201
|
+
id: 'publishChangeset',
|
|
202
|
+
outputSchema: z.object({
|
|
203
|
+
packages: z.array(z.string()),
|
|
204
|
+
}),
|
|
205
|
+
execute: async ({ context, mastra }) => {
|
|
206
|
+
if (context.machineContext?.stepResults.buildPackages?.status !== 'success') {
|
|
207
|
+
return {
|
|
208
|
+
packages: [],
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
const pkgSet = context.machineContext.stepResults.buildPackages.payload.packages;
|
|
212
|
+
const agent = mastra?.agents?.['danePackagePublisher'];
|
|
213
|
+
if (!agent) {
|
|
214
|
+
throw new Error('Agent not found');
|
|
215
|
+
}
|
|
216
|
+
let res = await agent.generate(`
|
|
217
|
+
Publish the changeset.
|
|
218
|
+
`);
|
|
219
|
+
console.log(chalk.green(res.text));
|
|
220
|
+
return { packages: pkgSet };
|
|
221
|
+
},
|
|
222
|
+
});
|
|
223
|
+
const setLatestDistTag = new Step({
|
|
224
|
+
id: 'setLatestDistTag',
|
|
225
|
+
outputSchema: z.object({
|
|
226
|
+
packages: z.array(z.string()),
|
|
227
|
+
}),
|
|
228
|
+
execute: async ({ context, mastra }) => {
|
|
229
|
+
if (context.machineContext?.stepResults.publishChangeset?.status !== 'success') {
|
|
230
|
+
return {
|
|
231
|
+
packages: [],
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
const pkgSet = context.machineContext.stepResults.publishChangeset.payload.packages;
|
|
235
|
+
const agent = mastra?.agents?.['danePackagePublisher'];
|
|
236
|
+
if (!agent) {
|
|
237
|
+
throw new Error('Agent not found');
|
|
238
|
+
}
|
|
239
|
+
let res = await agent.generate(`
|
|
240
|
+
Set the active tag for these packages ${pkgSet.join(',')}.
|
|
241
|
+
`);
|
|
242
|
+
console.log(chalk.green(res.text));
|
|
243
|
+
return { packages: pkgSet };
|
|
244
|
+
},
|
|
245
|
+
});
|
|
246
|
+
packagePublisher
|
|
247
|
+
.step(getPacakgesToPublish)
|
|
248
|
+
.then(assemblePackages)
|
|
249
|
+
.then(buildPackages, {
|
|
250
|
+
when: async ({ context }) => {
|
|
251
|
+
return (context.stepResults.assemblePackages?.status === 'success' &&
|
|
252
|
+
context.stepResults.assemblePackages?.payload?.packages.length > 0);
|
|
253
|
+
},
|
|
254
|
+
})
|
|
255
|
+
.then(verifyBuild, {
|
|
256
|
+
when: async ({ context }) => {
|
|
257
|
+
return (context.stepResults.buildPackages?.status === 'success' &&
|
|
258
|
+
context.stepResults.buildPackages?.payload?.packages.length > 0);
|
|
259
|
+
},
|
|
260
|
+
})
|
|
261
|
+
.then(publishChangeset, {
|
|
262
|
+
when: async ({ context }) => {
|
|
263
|
+
return (context.stepResults.buildPackages?.status === 'success' &&
|
|
264
|
+
context.stepResults.buildPackages?.payload?.packages.length > 0);
|
|
265
|
+
},
|
|
266
|
+
})
|
|
267
|
+
.then(setLatestDistTag, {
|
|
268
|
+
when: async ({ context }) => {
|
|
269
|
+
return (context.stepResults.publishChangeset?.status === 'success' &&
|
|
270
|
+
context.stepResults.publishChangeset?.payload?.packages.length > 0);
|
|
271
|
+
},
|
|
272
|
+
})
|
|
273
|
+
.commit();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telephone-game.d.ts","sourceRoot":"","sources":["../../../src/mastra/workflows/telephone-game.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,QAAQ,EAAiB,MAAM,cAAc,CAAC;AAG7D,eAAO,MAAM,qBAAqB,oBAEhC,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { input } from '@inquirer/prompts';
|
|
2
|
+
import { Step, Workflow, getStepResult } from '@mastra/core';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
export const telephoneGameWorkflow = new Workflow({
|
|
5
|
+
name: 'telephoneGame',
|
|
6
|
+
});
|
|
7
|
+
const stepA1 = new Step({
|
|
8
|
+
id: 'stepA1',
|
|
9
|
+
description: 'Starts the message',
|
|
10
|
+
outputSchema: z.object({
|
|
11
|
+
message: z.string(),
|
|
12
|
+
}),
|
|
13
|
+
execute: async () => {
|
|
14
|
+
return {
|
|
15
|
+
message: 'Test',
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
const stepA2 = new Step({
|
|
20
|
+
id: 'stepA2',
|
|
21
|
+
description: 'Pass the message through',
|
|
22
|
+
outputSchema: z.object({
|
|
23
|
+
message: z.string(),
|
|
24
|
+
}),
|
|
25
|
+
execute: async () => {
|
|
26
|
+
const content = await input({
|
|
27
|
+
message: 'Give me a message',
|
|
28
|
+
validate: input => input.trim().length > 0 || 'Message cannot be empty',
|
|
29
|
+
});
|
|
30
|
+
return {
|
|
31
|
+
message: content,
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
const stepB2 = new Step({
|
|
36
|
+
id: 'stepB2',
|
|
37
|
+
description: 'Checks if the file exists',
|
|
38
|
+
outputSchema: z.object({
|
|
39
|
+
message: z.string(),
|
|
40
|
+
}),
|
|
41
|
+
execute: async ({ context }) => {
|
|
42
|
+
if (context.machineContext?.stepResults.stepA2?.status !== 'success') {
|
|
43
|
+
throw new Error('Message not found');
|
|
44
|
+
}
|
|
45
|
+
const msg = context.machineContext.stepResults.stepA2.payload.message;
|
|
46
|
+
return {
|
|
47
|
+
message: msg,
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
const stepC2 = new Step({
|
|
52
|
+
id: 'stepC2',
|
|
53
|
+
description: 'Ask if you should modify the message',
|
|
54
|
+
outputSchema: z.object({
|
|
55
|
+
message: z.string(),
|
|
56
|
+
}),
|
|
57
|
+
execute: async ({ suspend, context, mastra }) => {
|
|
58
|
+
const oMsg = getStepResult(context?.machineContext?.stepResults.stepA2);
|
|
59
|
+
if (context?.machineContext?.stepResults.stepC2?.status === 'success') {
|
|
60
|
+
const msg = getStepResult(context?.machineContext?.stepResults.stepC2);
|
|
61
|
+
if (msg.confirm) {
|
|
62
|
+
if (mastra?.llm) {
|
|
63
|
+
const llm = mastra?.llm({
|
|
64
|
+
provider: 'ANTHROPIC',
|
|
65
|
+
name: 'claude-3-5-haiku-20241022',
|
|
66
|
+
});
|
|
67
|
+
const result = await llm.generate(`
|
|
68
|
+
You are playing a game of telephone.
|
|
69
|
+
Here is the message the previous person sent ${oMsg.message}.
|
|
70
|
+
But you want to change the message.
|
|
71
|
+
Only return the message
|
|
72
|
+
`);
|
|
73
|
+
return {
|
|
74
|
+
message: result.text,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return oMsg;
|
|
79
|
+
}
|
|
80
|
+
await suspend();
|
|
81
|
+
return { message: 'Suspended' };
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
const stepD2 = new Step({
|
|
85
|
+
id: 'stepD2',
|
|
86
|
+
description: 'Pass the message',
|
|
87
|
+
outputSchema: z.object({
|
|
88
|
+
message: z.string(),
|
|
89
|
+
}),
|
|
90
|
+
execute: async ({ context }) => {
|
|
91
|
+
const msg = getStepResult(context?.machineContext?.stepResults.stepC2);
|
|
92
|
+
return msg;
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
telephoneGameWorkflow.step(stepA1).step(stepA2).then(stepB2).then(stepC2).then(stepD2).commit();
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/dane",
|
|
3
|
-
"version": "0.0.2-alpha.
|
|
3
|
+
"version": "0.0.2-alpha.71",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
8
|
+
"data",
|
|
8
9
|
"test",
|
|
9
10
|
"test-files"
|
|
10
11
|
],
|
|
@@ -21,12 +22,14 @@
|
|
|
21
22
|
"tsx": "^4.19.2"
|
|
22
23
|
},
|
|
23
24
|
"dependencies": {
|
|
25
|
+
"@inquirer/prompts": "^7.2.1",
|
|
24
26
|
"boxen": "^8.0.1",
|
|
25
27
|
"chalk": "^5.3.0",
|
|
26
28
|
"cli-table3": "^0.6.5",
|
|
27
29
|
"commander": "^12.1.0",
|
|
30
|
+
"dotenv": "^16.4.7",
|
|
31
|
+
"drizzle-kit": "^0.30.1",
|
|
28
32
|
"execa": "^9.3.1",
|
|
29
|
-
"inquirer": "^12.2.0",
|
|
30
33
|
"luxon": "^3.5.0",
|
|
31
34
|
"node-ical": "^0.20.1",
|
|
32
35
|
"node-screenshots": "^0.2.1",
|
|
@@ -36,16 +39,17 @@
|
|
|
36
39
|
"sqlite3": "^5.1.7",
|
|
37
40
|
"typescript": "^5.5.4",
|
|
38
41
|
"zod": "^3.24.0",
|
|
39
|
-
"@mastra/core": "0.1.27-alpha.
|
|
40
|
-
"@mastra/engine": "0.0.5-alpha.
|
|
41
|
-
"@mastra/github": "1.0.3-alpha.
|
|
42
|
-
"@mastra/
|
|
43
|
-
"@mastra/
|
|
44
|
-
"@mastra/rag": "0.0.2-alpha.
|
|
42
|
+
"@mastra/core": "0.1.27-alpha.67",
|
|
43
|
+
"@mastra/engine": "0.0.5-alpha.61",
|
|
44
|
+
"@mastra/github": "1.0.3-alpha.51",
|
|
45
|
+
"@mastra/firecrawl": "1.0.4-alpha.55",
|
|
46
|
+
"@mastra/memory": "0.0.2-alpha.47",
|
|
47
|
+
"@mastra/rag": "0.0.2-alpha.53",
|
|
48
|
+
"@mastra/stabilityai": "1.0.1-alpha.42",
|
|
49
|
+
"@mastra/mcp": "0.0.1-alpha.7"
|
|
45
50
|
},
|
|
46
51
|
"scripts": {
|
|
47
52
|
"build": "npx tsc",
|
|
48
|
-
"issue-labeler": "npx bun src/issue-labeler.ts",
|
|
49
53
|
"start": "npx bun src/index.ts",
|
|
50
54
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
51
55
|
}
|
|
Binary file
|