@mastra/dane 0.0.4 → 0.0.5-alpha.1

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,97 +0,0 @@
1
- import { anthropic } from '@ai-sdk/anthropic';
2
- import { input } from '@inquirer/prompts';
3
- import { Agent } from '@mastra/core/agent';
4
- import { Step, Workflow, getStepResult } from '@mastra/core/workflows';
5
- import { z } from 'zod';
6
- const llm = anthropic('claude-3-5-sonnet-20241022');
7
- const agent = new Agent({
8
- name: 'telephoneGameAgent',
9
- instructions: `Telephone game agent`,
10
- model: llm,
11
- });
12
- export const telephoneGameWorkflow = new Workflow({
13
- name: 'telephoneGame',
14
- });
15
- const stepA1 = new Step({
16
- id: 'stepA1',
17
- description: 'Starts the message',
18
- outputSchema: z.object({
19
- message: z.string(),
20
- }),
21
- execute: async () => {
22
- return {
23
- message: 'Test',
24
- };
25
- },
26
- });
27
- const stepA2 = new Step({
28
- id: 'stepA2',
29
- description: 'Pass the message through',
30
- outputSchema: z.object({
31
- message: z.string(),
32
- }),
33
- execute: async () => {
34
- const content = await input({
35
- message: 'Give me a message',
36
- validate: input => input.trim().length > 0 || 'Message cannot be empty',
37
- });
38
- return {
39
- message: content,
40
- };
41
- },
42
- });
43
- const stepB2 = new Step({
44
- id: 'stepB2',
45
- description: 'Checks if the file exists',
46
- outputSchema: z.object({
47
- message: z.string(),
48
- }),
49
- execute: async ({ context }) => {
50
- if (context?.steps.stepA2?.status !== 'success') {
51
- throw new Error('Message not found');
52
- }
53
- const msg = context.steps.stepA2.output.message;
54
- return {
55
- message: msg,
56
- };
57
- },
58
- });
59
- const stepC2 = new Step({
60
- id: 'stepC2',
61
- description: 'Ask if you should modify the message',
62
- outputSchema: z.object({
63
- message: z.string(),
64
- }),
65
- execute: async ({ suspend, context }) => {
66
- const oMsg = getStepResult(context?.steps.stepA2);
67
- if (context?.steps.stepC2?.status === 'success') {
68
- const msg = getStepResult(context?.steps.stepC2);
69
- if (msg.confirm) {
70
- const result = await agent.generate(`
71
- You are playing a game of telephone.
72
- Here is the message the previous person sent ${oMsg.message}.
73
- But you want to change the message.
74
- Only return the message
75
- `);
76
- return {
77
- message: result.text,
78
- };
79
- }
80
- return oMsg;
81
- }
82
- await suspend();
83
- return { message: 'Suspended' };
84
- },
85
- });
86
- const stepD2 = new Step({
87
- id: 'stepD2',
88
- description: 'Pass the message',
89
- outputSchema: z.object({
90
- message: z.string(),
91
- }),
92
- execute: async ({ context }) => {
93
- const msg = getStepResult(context?.steps.stepC2);
94
- return msg;
95
- },
96
- });
97
- telephoneGameWorkflow.step(stepA1).step(stepA2).then(stepB2).then(stepC2).then(stepD2).commit();