@mastra/dane 0.0.2-alpha.11 → 0.0.2-alpha.111
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 +2 -1
- 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 +4 -2
- 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 -4
- package/dist/mastra/agents/index.d.ts +17 -11
- package/dist/mastra/agents/index.d.ts.map +1 -1
- package/dist/mastra/agents/index.js +61 -29
- 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/agents/package-publisher.d.ts +65 -0
- package/dist/mastra/agents/package-publisher.d.ts.map +1 -0
- package/dist/mastra/agents/package-publisher.js +168 -0
- package/dist/mastra/index.d.ts +123 -19
- package/dist/mastra/index.d.ts.map +1 -1
- package/dist/mastra/index.js +35 -21
- package/dist/mastra/integrations/index.d.ts.map +1 -1
- package/dist/mastra/integrations/index.js +14 -3
- package/dist/mastra/tools/browser.d.ts +2 -2
- package/dist/mastra/tools/browser.js +1 -1
- package/dist/mastra/tools/calendar.d.ts +1 -1
- package/dist/mastra/tools/calendar.js +1 -1
- package/dist/mastra/tools/crawl.d.ts +4 -1
- package/dist/mastra/tools/crawl.d.ts.map +1 -1
- package/dist/mastra/tools/crawl.js +8 -5
- package/dist/mastra/tools/execa.d.ts +1 -1
- package/dist/mastra/tools/execa.d.ts.map +1 -1
- package/dist/mastra/tools/execa.js +2 -1
- package/dist/mastra/tools/fs.d.ts +1 -1
- package/dist/mastra/tools/fs.js +1 -1
- package/dist/mastra/tools/image.d.ts +1 -1
- package/dist/mastra/tools/image.d.ts.map +1 -1
- package/dist/mastra/tools/image.js +5 -5
- 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 +1 -1
- package/dist/mastra/tools/pdf.d.ts.map +1 -1
- package/dist/mastra/tools/pdf.js +3 -3
- 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 +127 -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 +4 -4
- package/dist/mastra/workflows/chat.d.ts.map +1 -1
- package/dist/mastra/workflows/chat.js +20 -23
- 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.d.ts +1 -1
- package/dist/mastra/workflows/issue-labeler.d.ts.map +1 -1
- package/dist/mastra/workflows/issue-labeler.js +3 -3
- 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 +358 -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 +16 -12
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { input } from '@inquirer/prompts';
|
|
2
|
+
import { Step, Workflow, getStepResult } from '@mastra/core/workflows';
|
|
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.111",
|
|
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
|
],
|
|
@@ -18,16 +19,19 @@
|
|
|
18
19
|
"devDependencies": {
|
|
19
20
|
"@types/node": "^22.10.2",
|
|
20
21
|
"@types/pdf-parse": "^1.1.4",
|
|
21
|
-
"tsx": "^4.19.2"
|
|
22
|
+
"tsx": "^4.19.2",
|
|
23
|
+
"mastra": "0.2.0-alpha.140"
|
|
22
24
|
},
|
|
23
25
|
"dependencies": {
|
|
26
|
+
"@inquirer/prompts": "^7.2.1",
|
|
27
|
+
"@libsql/client": "^0.14.0",
|
|
24
28
|
"boxen": "^8.0.1",
|
|
25
29
|
"chalk": "^5.3.0",
|
|
26
30
|
"cli-table3": "^0.6.5",
|
|
27
31
|
"commander": "^12.1.0",
|
|
28
32
|
"dotenv": "^16.4.7",
|
|
33
|
+
"drizzle-kit": "^0.30.1",
|
|
29
34
|
"execa": "^9.3.1",
|
|
30
|
-
"inquirer": "^12.2.0",
|
|
31
35
|
"luxon": "^3.5.0",
|
|
32
36
|
"node-ical": "^0.20.1",
|
|
33
37
|
"node-screenshots": "^0.2.1",
|
|
@@ -35,19 +39,19 @@
|
|
|
35
39
|
"playwright": "^1.49.1",
|
|
36
40
|
"playwright-core": "^1.49.1",
|
|
37
41
|
"sqlite3": "^5.1.7",
|
|
38
|
-
"typescript": "^5.
|
|
42
|
+
"typescript": "^5.7.3",
|
|
39
43
|
"zod": "^3.24.0",
|
|
40
|
-
"@mastra/
|
|
41
|
-
"@mastra/
|
|
42
|
-
"@mastra/
|
|
43
|
-
"@mastra/
|
|
44
|
-
"@mastra/
|
|
45
|
-
"@mastra/
|
|
46
|
-
"@mastra/rag": "0.0
|
|
44
|
+
"@mastra/memory": "0.1.0-alpha.69",
|
|
45
|
+
"@mastra/store-upstash": "0.0.0-alpha.5",
|
|
46
|
+
"@mastra/github": "1.0.3-alpha.72",
|
|
47
|
+
"@mastra/stabilityai": "1.0.1-alpha.62",
|
|
48
|
+
"@mastra/core": "0.2.0-alpha.87",
|
|
49
|
+
"@mastra/firecrawl": "1.1.0-alpha.81",
|
|
50
|
+
"@mastra/rag": "0.1.0-alpha.79",
|
|
51
|
+
"@mastra/mcp": "0.1.0-alpha.29"
|
|
47
52
|
},
|
|
48
53
|
"scripts": {
|
|
49
54
|
"build": "npx tsc",
|
|
50
|
-
"issue-labeler": "npx bun src/issue-labeler.ts",
|
|
51
55
|
"start": "npx bun src/index.ts",
|
|
52
56
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
53
57
|
}
|