@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,291 +0,0 @@
1
- import { Mastra } from '@mastra/core';
2
- export declare const mastra: Mastra<{
3
- dane: import("@mastra/core/agent").Agent<{
4
- fsTool: import("@mastra/core/tools").Tool<"fsTool", import("zod").ZodObject<{
5
- action: import("zod").ZodString;
6
- file: import("zod").ZodString;
7
- data: import("zod").ZodString;
8
- }, "strip", import("zod").ZodTypeAny, {
9
- data: string;
10
- action: string;
11
- file: string;
12
- }, {
13
- data: string;
14
- action: string;
15
- file: string;
16
- }>, import("zod").ZodObject<{
17
- message: import("zod").ZodString;
18
- }, "strip", import("zod").ZodTypeAny, {
19
- message: string;
20
- }, {
21
- message: string;
22
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
23
- action: import("zod").ZodString;
24
- file: import("zod").ZodString;
25
- data: import("zod").ZodString;
26
- }, "strip", import("zod").ZodTypeAny, {
27
- data: string;
28
- action: string;
29
- file: string;
30
- }, {
31
- data: string;
32
- action: string;
33
- file: string;
34
- }>, import("@mastra/core").WorkflowContext<any>>, unknown>;
35
- execaTool: import("@mastra/core/tools").Tool<"execaTool", import("zod").ZodObject<{
36
- command: import("zod").ZodString;
37
- args: import("zod").ZodArray<import("zod").ZodString, "many">;
38
- }, "strip", import("zod").ZodTypeAny, {
39
- command: string;
40
- args: string[];
41
- }, {
42
- command: string;
43
- args: string[];
44
- }>, import("zod").ZodObject<{
45
- message: import("zod").ZodString;
46
- }, "strip", import("zod").ZodTypeAny, {
47
- message: string;
48
- }, {
49
- message: string;
50
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
51
- command: import("zod").ZodString;
52
- args: import("zod").ZodArray<import("zod").ZodString, "many">;
53
- }, "strip", import("zod").ZodTypeAny, {
54
- command: string;
55
- args: string[];
56
- }, {
57
- command: string;
58
- args: string[];
59
- }>, import("@mastra/core").WorkflowContext<any>>, unknown>;
60
- browserTool: import("@mastra/core/tools").Tool<"browserTool", import("zod").ZodObject<{
61
- url: import("zod").ZodString;
62
- }, "strip", import("zod").ZodTypeAny, {
63
- url: string;
64
- }, {
65
- url: string;
66
- }>, import("zod").ZodObject<{
67
- message: import("zod").ZodString;
68
- }, "strip", import("zod").ZodTypeAny, {
69
- message: string;
70
- }, {
71
- message: string;
72
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
73
- url: import("zod").ZodString;
74
- }, "strip", import("zod").ZodTypeAny, {
75
- url: string;
76
- }, {
77
- url: string;
78
- }>, import("@mastra/core").WorkflowContext<any>>, unknown>;
79
- googleSearch: import("@mastra/core/tools").Tool<"googleSearch", import("zod").ZodObject<{
80
- query: import("zod").ZodString;
81
- }, "strip", import("zod").ZodTypeAny, {
82
- query: string;
83
- }, {
84
- query: string;
85
- }>, import("zod").ZodObject<{
86
- message: import("zod").ZodString;
87
- }, "strip", import("zod").ZodTypeAny, {
88
- message: string;
89
- }, {
90
- message: string;
91
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
92
- query: import("zod").ZodString;
93
- }, "strip", import("zod").ZodTypeAny, {
94
- query: string;
95
- }, {
96
- query: string;
97
- }>, import("@mastra/core").WorkflowContext<any>>, unknown>;
98
- readPDF: import("@mastra/core/tools").Tool<"readPDF", import("zod").ZodObject<{
99
- pdfPath: import("zod").ZodString;
100
- }, "strip", import("zod").ZodTypeAny, {
101
- pdfPath: string;
102
- }, {
103
- pdfPath: string;
104
- }>, import("zod").ZodObject<{
105
- content: import("zod").ZodString;
106
- }, "strip", import("zod").ZodTypeAny, {
107
- content: string;
108
- }, {
109
- content: string;
110
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
111
- pdfPath: import("zod").ZodString;
112
- }, "strip", import("zod").ZodTypeAny, {
113
- pdfPath: string;
114
- }, {
115
- pdfPath: string;
116
- }>, import("@mastra/core").WorkflowContext<any>>, unknown>;
117
- listEvents: import("@mastra/core/tools").Tool<"listEvents", import("zod").ZodObject<{
118
- startDate: import("zod").ZodString;
119
- }, "strip", import("zod").ZodTypeAny, {
120
- startDate: string;
121
- }, {
122
- startDate: string;
123
- }>, import("zod").ZodObject<{
124
- content: import("zod").ZodString;
125
- }, "strip", import("zod").ZodTypeAny, {
126
- content: string;
127
- }, {
128
- content: string;
129
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
130
- startDate: import("zod").ZodString;
131
- }, "strip", import("zod").ZodTypeAny, {
132
- startDate: string;
133
- }, {
134
- startDate: string;
135
- }>, import("@mastra/core").WorkflowContext<any>>, unknown>;
136
- imageTool: import("@mastra/core/tools").Tool<"imageTool", import("zod").ZodObject<{
137
- directory: import("zod").ZodString;
138
- prompt: import("zod").ZodString;
139
- }, "strip", import("zod").ZodTypeAny, {
140
- directory: string;
141
- prompt: string;
142
- }, {
143
- directory: string;
144
- prompt: string;
145
- }>, import("zod").ZodObject<{
146
- message: import("zod").ZodString;
147
- }, "strip", import("zod").ZodTypeAny, {
148
- message: string;
149
- }, {
150
- message: string;
151
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
152
- directory: import("zod").ZodString;
153
- prompt: import("zod").ZodString;
154
- }, "strip", import("zod").ZodTypeAny, {
155
- directory: string;
156
- prompt: string;
157
- }, {
158
- directory: string;
159
- prompt: string;
160
- }>, import("@mastra/core").WorkflowContext<any>>, unknown>;
161
- }, Record<string, import("@mastra/core").Metric>>;
162
- danePackagePublisher: import("@mastra/core/agent").Agent<{
163
- pnpmChangesetStatus: import("@mastra/core/tools").Tool<"pnpmChangesetStatus", import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("zod").ZodObject<{
164
- message: import("zod").ZodArray<import("zod").ZodString, "many">;
165
- }, "strip", import("zod").ZodTypeAny, {
166
- message: string[];
167
- }, {
168
- message: string[];
169
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("@mastra/core").WorkflowContext<any>>, unknown>;
170
- pnpmBuild: import("@mastra/core/tools").Tool<"pnpmBuild", import("zod").ZodObject<{
171
- name: import("zod").ZodString;
172
- packagePath: import("zod").ZodString;
173
- }, "strip", import("zod").ZodTypeAny, {
174
- name: string;
175
- packagePath: string;
176
- }, {
177
- name: string;
178
- packagePath: string;
179
- }>, import("zod").ZodObject<{
180
- message: import("zod").ZodString;
181
- }, "strip", import("zod").ZodTypeAny, {
182
- message: string;
183
- }, {
184
- message: string;
185
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
186
- name: import("zod").ZodString;
187
- packagePath: import("zod").ZodString;
188
- }, "strip", import("zod").ZodTypeAny, {
189
- name: string;
190
- packagePath: string;
191
- }, {
192
- name: string;
193
- packagePath: string;
194
- }>, import("@mastra/core").WorkflowContext<any>>, unknown>;
195
- pnpmChangesetPublish: import("@mastra/core/tools").Tool<"pnpmChangesetPublish", import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("zod").ZodObject<{
196
- message: import("zod").ZodString;
197
- }, "strip", import("zod").ZodTypeAny, {
198
- message: string;
199
- }, {
200
- message: string;
201
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>, import("@mastra/core").WorkflowContext<any>>, unknown>;
202
- activeDistTag: import("@mastra/core/tools").Tool<"activeDistTag", import("zod").ZodObject<{
203
- packagePath: import("zod").ZodString;
204
- }, "strip", import("zod").ZodTypeAny, {
205
- packagePath: string;
206
- }, {
207
- packagePath: 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
- packagePath: import("zod").ZodString;
216
- }, "strip", import("zod").ZodTypeAny, {
217
- packagePath: string;
218
- }, {
219
- packagePath: string;
220
- }>, import("@mastra/core").WorkflowContext<any>>, unknown>;
221
- }, Record<string, import("@mastra/core").Metric>>;
222
- daneLinkChecker: import("@mastra/core/agent").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any, unknown>>, Record<string, import("@mastra/core").Metric>>;
223
- daneIssueLabeler: import("@mastra/core/agent").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any, unknown>>, Record<string, import("@mastra/core").Metric>>;
224
- daneCommitMessage: import("@mastra/core/agent").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any, unknown>>, Record<string, import("@mastra/core").Metric>>;
225
- daneChangeLog: import("@mastra/core/agent").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any, unknown>>, Record<string, import("@mastra/core").Metric>>;
226
- daneNewContributor: import("@mastra/core/agent").Agent<{}, Record<string, import("@mastra/core").Metric>>;
227
- }, {
228
- message: import("@mastra/core/workflows").Workflow<any, import("zod").ZodObject<{
229
- resourceId: import("zod").ZodString;
230
- threadId: import("zod").ZodString;
231
- }, "strip", import("zod").ZodTypeAny, {
232
- resourceId: string;
233
- threadId: string;
234
- }, {
235
- resourceId: string;
236
- threadId: string;
237
- }>>;
238
- githubIssueLabeler: import("@mastra/core/workflows").Workflow<any, import("zod").ZodObject<{
239
- repo: import("zod").ZodString;
240
- owner: import("zod").ZodString;
241
- issue_number: import("zod").ZodNumber;
242
- }, "strip", import("zod").ZodTypeAny, {
243
- repo: string;
244
- owner: string;
245
- issue_number: number;
246
- }, {
247
- repo: string;
248
- owner: string;
249
- issue_number: number;
250
- }>>;
251
- commitMessage: import("@mastra/core/workflows").Workflow<any, import("zod").ZodObject<{
252
- repoPath: import("zod").ZodString;
253
- }, "strip", import("zod").ZodTypeAny, {
254
- repoPath: string;
255
- }, {
256
- repoPath: string;
257
- }>>;
258
- packagePublisher: import("@mastra/core/workflows").Workflow<any, any>;
259
- telephoneGame: import("@mastra/core/workflows").Workflow<any, any>;
260
- changelog: import("@mastra/core/workflows").Workflow<any, import("zod").ZodObject<{
261
- channelId: import("zod").ZodString;
262
- }, "strip", import("zod").ZodTypeAny, {
263
- channelId: string;
264
- }, {
265
- channelId: string;
266
- }>>;
267
- githubFirstContributorMessage: import("@mastra/core/workflows").Workflow<any, import("zod").ZodObject<{
268
- repo: import("zod").ZodString;
269
- owner: import("zod").ZodString;
270
- pr_number: import("zod").ZodNumber;
271
- }, "strip", import("zod").ZodTypeAny, {
272
- repo: string;
273
- owner: string;
274
- pr_number: number;
275
- }, {
276
- repo: string;
277
- owner: string;
278
- pr_number: number;
279
- }>>;
280
- linkChecker: import("@mastra/core/workflows").Workflow<any, import("zod").ZodObject<{
281
- channelId: import("zod").ZodString;
282
- targetUrl: import("zod").ZodString;
283
- }, "strip", import("zod").ZodTypeAny, {
284
- channelId: string;
285
- targetUrl: string;
286
- }, {
287
- channelId: string;
288
- targetUrl: string;
289
- }>>;
290
- }, Record<string, import("@mastra/core/vector").MastraVector>, Record<string, import("@mastra/core/tts").MastraTTS>, import("@mastra/core").Logger>;
291
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mastra/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAatC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mJAyBjB,CAAC"}
@@ -1,37 +0,0 @@
1
- import { Mastra } from '@mastra/core';
2
- import { LibSQLStore } from '@mastra/core/storage/libsql';
3
- import { dane, daneChangeLog, daneCommitMessage, daneIssueLabeler, daneLinkChecker } from './agents/index.js';
4
- import { daneNewContributor } from './agents/new-contributor.js';
5
- import { danePackagePublisher } from './agents/package-publisher.js';
6
- import { changelogWorkflow } from './workflows/changelog.js';
7
- import { githubFirstContributorMessage } from './workflows/first-contributor.js';
8
- import { messageWorkflow, githubIssueLabeler, commitMessageGenerator } from './workflows/index.js';
9
- import { linkCheckerWorkflow } from './workflows/link-checker.js';
10
- import { packagePublisher } from './workflows/publish-packages.js';
11
- import { telephoneGameWorkflow } from './workflows/telephone-game.js';
12
- export const mastra = new Mastra({
13
- agents: {
14
- dane,
15
- danePackagePublisher,
16
- daneLinkChecker,
17
- daneIssueLabeler,
18
- daneCommitMessage,
19
- daneChangeLog,
20
- daneNewContributor,
21
- },
22
- storage: new LibSQLStore({
23
- config: {
24
- url: ':memory:',
25
- },
26
- }),
27
- workflows: {
28
- message: messageWorkflow,
29
- githubIssueLabeler: githubIssueLabeler,
30
- commitMessage: commitMessageGenerator,
31
- packagePublisher: packagePublisher,
32
- telephoneGame: telephoneGameWorkflow,
33
- changelog: changelogWorkflow,
34
- githubFirstContributorMessage: githubFirstContributorMessage,
35
- linkChecker: linkCheckerWorkflow,
36
- },
37
- });
@@ -1,5 +0,0 @@
1
- import { GithubIntegration } from "@mastra/github";
2
- import { StabilityAiIntegration } from "@mastra/stabilityai";
3
- export declare const github: GithubIntegration;
4
- export declare const stabilityai: StabilityAiIntegration;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mastra/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAc7D,eAAO,MAAM,MAAM,mBAIjB,CAAC;AAEH,eAAO,MAAM,WAAW,wBAItB,CAAC"}
@@ -1,23 +0,0 @@
1
- import { GithubIntegration } from "@mastra/github";
2
- import { StabilityAiIntegration } from "@mastra/stabilityai";
3
- import { config } from "../../config/index.js";
4
- // Helper function to get key from config or env
5
- const getApiKey = (configKey, envKey) => {
6
- const configValue = config.get(configKey);
7
- if (configValue)
8
- return configValue;
9
- const envValue = process.env[envKey];
10
- if (envValue)
11
- return envValue;
12
- return '';
13
- };
14
- export const github = new GithubIntegration({
15
- config: {
16
- PERSONAL_ACCESS_TOKEN: getApiKey('GITHUB_PERSONAL_ACCESS_TOKEN', 'GITHUB_PERSONAL_ACCESS_TOKEN'),
17
- }
18
- });
19
- export const stabilityai = new StabilityAiIntegration({
20
- config: {
21
- API_KEY: getApiKey('STABILITYAI_API_KEY', 'STABILITYAI_API_KEY'),
22
- }
23
- });
@@ -1,40 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const browserTool: import("@mastra/core/tools").Tool<"browserTool", z.ZodObject<{
3
- url: z.ZodString;
4
- }, "strip", z.ZodTypeAny, {
5
- url: string;
6
- }, {
7
- url: string;
8
- }>, z.ZodObject<{
9
- message: z.ZodString;
10
- }, "strip", z.ZodTypeAny, {
11
- message: string;
12
- }, {
13
- message: string;
14
- }>, import("@mastra/core").ToolExecutionContext<z.ZodObject<{
15
- url: z.ZodString;
16
- }, "strip", z.ZodTypeAny, {
17
- url: string;
18
- }, {
19
- url: string;
20
- }>, import("@mastra/core").WorkflowContext<any>>, unknown>;
21
- export declare const googleSearch: import("@mastra/core/tools").Tool<"googleSearch", z.ZodObject<{
22
- query: z.ZodString;
23
- }, "strip", z.ZodTypeAny, {
24
- query: string;
25
- }, {
26
- query: string;
27
- }>, z.ZodObject<{
28
- message: z.ZodString;
29
- }, "strip", z.ZodTypeAny, {
30
- message: string;
31
- }, {
32
- message: string;
33
- }>, import("@mastra/core").ToolExecutionContext<z.ZodObject<{
34
- query: z.ZodString;
35
- }, "strip", z.ZodTypeAny, {
36
- query: string;
37
- }, {
38
- query: string;
39
- }>, import("@mastra/core").WorkflowContext<any>>, unknown>;
40
- //# sourceMappingURL=browser.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../src/mastra/tools/browser.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;0DAoDtB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;0DAqEvB,CAAC"}
@@ -1,116 +0,0 @@
1
- import { createTool } from '@mastra/core/tools';
2
- import { MDocument } from '@mastra/rag';
3
- import chalk from 'chalk';
4
- import { chromium } from 'playwright-core';
5
- import { z } from 'zod';
6
- export const browserTool = createTool({
7
- id: 'browserTool',
8
- name: 'Browser Tool',
9
- description: 'Browser Tool, opens a browser and navigates to a url capturing the content',
10
- inputSchema: z.object({
11
- url: z.string(),
12
- }),
13
- outputSchema: z.object({
14
- message: z.string(),
15
- }),
16
- execute: async ({ context: { url } }) => {
17
- try {
18
- const browser = await chromium.launch({
19
- headless: true,
20
- });
21
- const page = await browser.newPage();
22
- await page.goto(url);
23
- const docs = MDocument.fromHTML(await page.content());
24
- await docs.chunk({
25
- strategy: 'html',
26
- size: 300,
27
- sections: [
28
- ['h1', 'Header 1'],
29
- ['h2', 'Header 2'],
30
- ['h3', 'Header 3'],
31
- ['h4', 'Header 4'],
32
- ['h5', 'Header 5'],
33
- ['h6', 'Header 6'],
34
- ['p', 'Paragraph'],
35
- ],
36
- });
37
- await page.close();
38
- await browser.close();
39
- if (!docs.getText().length) {
40
- return { message: 'No content' };
41
- }
42
- return { message: docs.getText().join('\n') };
43
- }
44
- catch (e) {
45
- if (e instanceof Error) {
46
- console.log(`\n${chalk.red(e.message)}`);
47
- return { message: `Error: ${e.message}` };
48
- }
49
- return { message: 'Error' };
50
- }
51
- },
52
- });
53
- export const googleSearch = createTool({
54
- id: 'googleSearch',
55
- name: 'Google Search',
56
- description: 'Google Search. Passes the query to Google and returns the search results.',
57
- inputSchema: z.object({
58
- query: z.string(),
59
- }),
60
- outputSchema: z.object({
61
- message: z.string(),
62
- }),
63
- execute: async ({ context: { query } }) => {
64
- let browser;
65
- try {
66
- browser = await chromium.launch({
67
- headless: true,
68
- });
69
- }
70
- catch (e) {
71
- if (e instanceof Error) {
72
- console.log(`\n${chalk.red(e.message)}`);
73
- return { message: `Error: ${e.message}` };
74
- }
75
- return { message: 'Error' };
76
- }
77
- try {
78
- const page = await browser.newPage();
79
- await page.goto(`https://www.google.com/search?q=${encodeURIComponent(query)}`);
80
- console.log(`\n`);
81
- console.log(chalk.blue('Waiting for search results...'));
82
- try {
83
- await page.click('button:has-text("Accept all")', { timeout: 5000 });
84
- }
85
- catch (e) {
86
- // Cookie dialog didn't appear, continue
87
- }
88
- // Wait for results and click first organic result
89
- await page.waitForSelector('#search');
90
- const text = await page.evaluate(() => {
91
- const links = [];
92
- const searchResults = document.querySelectorAll('div.g a');
93
- searchResults.forEach(link => {
94
- const href = link.getAttribute('href');
95
- if (href && href.startsWith('http')) {
96
- links.push(href);
97
- }
98
- });
99
- return links;
100
- });
101
- await page.close();
102
- await browser.close();
103
- if (!text.length) {
104
- return { message: 'No results' };
105
- }
106
- return { message: text.join('\n') };
107
- }
108
- catch (e) {
109
- if (e instanceof Error) {
110
- console.log(`\n${chalk.red(e.message)}`);
111
- return { message: `Error: ${e.message}` };
112
- }
113
- return { message: `Error` };
114
- }
115
- },
116
- });
@@ -1,21 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const listEvents: import("@mastra/core/tools").Tool<"listEvents", z.ZodObject<{
3
- startDate: z.ZodString;
4
- }, "strip", z.ZodTypeAny, {
5
- startDate: string;
6
- }, {
7
- startDate: string;
8
- }>, z.ZodObject<{
9
- content: z.ZodString;
10
- }, "strip", z.ZodTypeAny, {
11
- content: string;
12
- }, {
13
- content: string;
14
- }>, import("@mastra/core").ToolExecutionContext<z.ZodObject<{
15
- startDate: z.ZodString;
16
- }, "strip", z.ZodTypeAny, {
17
- startDate: string;
18
- }, {
19
- startDate: string;
20
- }>, import("@mastra/core").WorkflowContext<any>>, unknown>;
21
- //# sourceMappingURL=calendar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/mastra/tools/calendar.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqGxB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;0DAgDrB,CAAC"}