@mastra/dane 0.0.2-alpha.11 → 0.0.2-alpha.110

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 (52) hide show
  1. package/LICENSE +44 -0
  2. package/README.md +25 -4
  3. package/data/crawl/conventional-commit.json +25 -0
  4. package/package.json +16 -12
  5. package/dist/commands/issue-labeler.d.ts +0 -2
  6. package/dist/commands/issue-labeler.d.ts.map +0 -1
  7. package/dist/commands/issue-labeler.js +0 -34
  8. package/dist/commands/message.d.ts +0 -2
  9. package/dist/commands/message.d.ts.map +0 -1
  10. package/dist/commands/message.js +0 -12
  11. package/dist/index.d.ts +0 -3
  12. package/dist/index.d.ts.map +0 -1
  13. package/dist/index.js +0 -11
  14. package/dist/mastra/agents/index.d.ts +0 -193
  15. package/dist/mastra/agents/index.d.ts.map +0 -1
  16. package/dist/mastra/agents/index.js +0 -81
  17. package/dist/mastra/index.d.ts +0 -221
  18. package/dist/mastra/index.d.ts.map +0 -1
  19. package/dist/mastra/index.js +0 -32
  20. package/dist/mastra/integrations/index.d.ts +0 -7
  21. package/dist/mastra/integrations/index.d.ts.map +0 -1
  22. package/dist/mastra/integrations/index.js +0 -18
  23. package/dist/mastra/tools/browser.d.ts +0 -40
  24. package/dist/mastra/tools/browser.d.ts.map +0 -1
  25. package/dist/mastra/tools/browser.js +0 -116
  26. package/dist/mastra/tools/calendar.d.ts +0 -21
  27. package/dist/mastra/tools/calendar.d.ts.map +0 -1
  28. package/dist/mastra/tools/calendar.js +0 -134
  29. package/dist/mastra/tools/crawl.d.ts +0 -33
  30. package/dist/mastra/tools/crawl.d.ts.map +0 -1
  31. package/dist/mastra/tools/crawl.js +0 -24
  32. package/dist/mastra/tools/execa.d.ts +0 -27
  33. package/dist/mastra/tools/execa.d.ts.map +0 -1
  34. package/dist/mastra/tools/execa.js +0 -42
  35. package/dist/mastra/tools/fs.d.ts +0 -33
  36. package/dist/mastra/tools/fs.d.ts.map +0 -1
  37. package/dist/mastra/tools/fs.js +0 -36
  38. package/dist/mastra/tools/image.d.ts +0 -27
  39. package/dist/mastra/tools/image.d.ts.map +0 -1
  40. package/dist/mastra/tools/image.js +0 -37
  41. package/dist/mastra/tools/pdf.d.ts +0 -21
  42. package/dist/mastra/tools/pdf.d.ts.map +0 -1
  43. package/dist/mastra/tools/pdf.js +0 -42
  44. package/dist/mastra/workflows/chat.d.ts +0 -13
  45. package/dist/mastra/workflows/chat.d.ts.map +0 -1
  46. package/dist/mastra/workflows/chat.js +0 -93
  47. package/dist/mastra/workflows/index.d.ts +0 -3
  48. package/dist/mastra/workflows/index.d.ts.map +0 -1
  49. package/dist/mastra/workflows/index.js +0 -2
  50. package/dist/mastra/workflows/issue-labeler.d.ts +0 -16
  51. package/dist/mastra/workflows/issue-labeler.d.ts.map +0 -1
  52. package/dist/mastra/workflows/issue-labeler.js +0 -85
@@ -1,81 +0,0 @@
1
- import { Agent } from '@mastra/core';
2
- import { browserTool, googleSearch } from '../tools/browser.js';
3
- import { listEvents } from '../tools/calendar.js';
4
- import { crawl } from '../tools/crawl.js';
5
- import { execaTool } from '../tools/execa.js';
6
- import { fsTool } from '../tools/fs.js';
7
- import { readPDF } from '../tools/pdf.js';
8
- import { imageTool } from '../tools/image.js';
9
- export const daneIssueLabeler = new Agent({
10
- name: 'DaneIssueLabeler',
11
- instructions: `
12
- You are Dane, the ultimate GitHub operator.
13
- You help engineers label their issues.
14
- `,
15
- model: {
16
- provider: 'ANTHROPIC',
17
- toolChoice: 'auto',
18
- name: 'claude-3-5-sonnet-20241022',
19
- },
20
- });
21
- export const dane = new Agent({
22
- name: 'Dane',
23
- instructions: `
24
- You are Dane, my assistant and one of my best friends. We are an ace team!
25
- You help me with my code, write tests, and even deploy my code to the cloud!
26
-
27
- DO NOT ATTEMPT TO USE GENERAL KNOWLEDGE! We are only as good as the tools we use.
28
-
29
- # Our tools:
30
-
31
- ## readPDF
32
- Makes you a powerful agent capable of reading PDF files.
33
-
34
- ## fsTool
35
- Makes you a powerful agent capable of reading and writing files to the local filesystem.
36
-
37
- ## execaTool
38
- Makes you a powerful agent capabale of executing files on the local system.
39
-
40
- ## googleSearch
41
- Makes you a powerful agent capabale answering all questions by finding the answer on Google search.
42
- Pass the query as a JS object. If you have links, ALWAYS CITE YOUR SOURCES.
43
-
44
- ## browserTool
45
- Makes you a powerful agent capable of scraping the web. Pass the url as a JS object.
46
-
47
- ## listEvents
48
- Makes you a powerful agent capable of listing events on a calendar. When using this tool ONLY RETURN RELEVANT EVENTS.
49
- DO NOT ATTEMPT TO DO ANYTHING MORE.
50
-
51
- ## crawl
52
- Use this when the user asks you to crawl. CRAWL is the signal to use this tool.
53
- Makes you a powerful agent capable of crawling a site and extracting markdown metadata.
54
- The data will be stored in a database. Confirm that it is sucessful.
55
-
56
- ## imageTool
57
- Makes you a powerful agent capable of generating images and saving them to disk. Pass the directory and an image prompt.
58
-
59
- # Rules
60
- * DO NOT ATTEMPT TO USE GENERAL KNOWLEDGE. Use the 'googleSearch' tool to find the answer.
61
- * Don't reference tools when you communicate with the user. Do not mention what tools you are using.
62
- * Tell the user what you are doing.
63
- `,
64
- model: {
65
- provider: 'ANTHROPIC',
66
- toolChoice: 'auto',
67
- name: 'claude-3-5-sonnet-20241022',
68
- },
69
- tools: {
70
- fsTool,
71
- execaTool,
72
- browserTool,
73
- googleSearch,
74
- readPDF,
75
- listEvents,
76
- crawl,
77
- imageTool
78
- // TODO I SHOULD BE ABLE TO PASS A WORKFLOW EXECUTE HERE
79
- // browserAgentRelay,
80
- },
81
- });
@@ -1,221 +0,0 @@
1
- import { Mastra } from '@mastra/core';
2
- export declare const mastra: Mastra<{
3
- [x: string]: import("@mastra/core").SyncAction<any, any, any, any>;
4
- }, {
5
- dane: import("@mastra/core").Agent<{
6
- fsTool: import("@mastra/core").Tool<"fsTool", import("zod").ZodObject<{
7
- action: import("zod").ZodString;
8
- file: import("zod").ZodString;
9
- data: import("zod").ZodString;
10
- }, "strip", import("zod").ZodTypeAny, {
11
- data: string;
12
- action: string;
13
- file: string;
14
- }, {
15
- data: string;
16
- action: string;
17
- file: string;
18
- }>, import("zod").ZodObject<{
19
- message: import("zod").ZodString;
20
- }, "strip", import("zod").ZodTypeAny, {
21
- message: string;
22
- }, {
23
- message: string;
24
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
25
- action: import("zod").ZodString;
26
- file: import("zod").ZodString;
27
- data: import("zod").ZodString;
28
- }, "strip", import("zod").ZodTypeAny, {
29
- data: string;
30
- action: string;
31
- file: string;
32
- }, {
33
- data: string;
34
- action: string;
35
- file: string;
36
- }>, import("@mastra/core").WorkflowContext<any>>>;
37
- execaTool: import("@mastra/core").Tool<"execaTool", import("zod").ZodObject<{
38
- command: import("zod").ZodString;
39
- args: import("zod").ZodArray<import("zod").ZodString, "many">;
40
- }, "strip", import("zod").ZodTypeAny, {
41
- command: string;
42
- args: string[];
43
- }, {
44
- command: string;
45
- args: string[];
46
- }>, import("zod").ZodObject<{
47
- message: import("zod").ZodString;
48
- }, "strip", import("zod").ZodTypeAny, {
49
- message: string;
50
- }, {
51
- message: string;
52
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
53
- command: import("zod").ZodString;
54
- args: import("zod").ZodArray<import("zod").ZodString, "many">;
55
- }, "strip", import("zod").ZodTypeAny, {
56
- command: string;
57
- args: string[];
58
- }, {
59
- command: string;
60
- args: string[];
61
- }>, import("@mastra/core").WorkflowContext<any>>>;
62
- browserTool: import("@mastra/core").Tool<"browserTool", import("zod").ZodObject<{
63
- url: import("zod").ZodString;
64
- }, "strip", import("zod").ZodTypeAny, {
65
- url: string;
66
- }, {
67
- url: string;
68
- }>, import("zod").ZodObject<{
69
- message: import("zod").ZodString;
70
- }, "strip", import("zod").ZodTypeAny, {
71
- message: string;
72
- }, {
73
- message: string;
74
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
75
- url: import("zod").ZodString;
76
- }, "strip", import("zod").ZodTypeAny, {
77
- url: string;
78
- }, {
79
- url: string;
80
- }>, import("@mastra/core").WorkflowContext<any>>>;
81
- googleSearch: import("@mastra/core").Tool<"googleSearch", import("zod").ZodObject<{
82
- query: import("zod").ZodString;
83
- }, "strip", import("zod").ZodTypeAny, {
84
- query: string;
85
- }, {
86
- query: string;
87
- }>, import("zod").ZodObject<{
88
- message: import("zod").ZodString;
89
- }, "strip", import("zod").ZodTypeAny, {
90
- message: string;
91
- }, {
92
- message: string;
93
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
94
- query: import("zod").ZodString;
95
- }, "strip", import("zod").ZodTypeAny, {
96
- query: string;
97
- }, {
98
- query: string;
99
- }>, import("@mastra/core").WorkflowContext<any>>>;
100
- readPDF: import("@mastra/core").Tool<"readPDF", import("zod").ZodObject<{
101
- pdfPath: import("zod").ZodString;
102
- }, "strip", import("zod").ZodTypeAny, {
103
- pdfPath: string;
104
- }, {
105
- pdfPath: string;
106
- }>, import("zod").ZodObject<{
107
- content: import("zod").ZodString;
108
- }, "strip", import("zod").ZodTypeAny, {
109
- content: string;
110
- }, {
111
- content: string;
112
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
113
- pdfPath: import("zod").ZodString;
114
- }, "strip", import("zod").ZodTypeAny, {
115
- pdfPath: string;
116
- }, {
117
- pdfPath: string;
118
- }>, import("@mastra/core").WorkflowContext<any>>>;
119
- listEvents: import("@mastra/core").Tool<"listEvents", import("zod").ZodObject<{
120
- startDate: import("zod").ZodString;
121
- }, "strip", import("zod").ZodTypeAny, {
122
- startDate: string;
123
- }, {
124
- startDate: string;
125
- }>, import("zod").ZodObject<{
126
- content: import("zod").ZodString;
127
- }, "strip", import("zod").ZodTypeAny, {
128
- content: string;
129
- }, {
130
- content: string;
131
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
132
- startDate: import("zod").ZodString;
133
- }, "strip", import("zod").ZodTypeAny, {
134
- startDate: string;
135
- }, {
136
- startDate: string;
137
- }>, import("@mastra/core").WorkflowContext<any>>>;
138
- crawl: import("@mastra/core").Tool<"crawler", import("zod").ZodObject<{
139
- url: import("zod").ZodString;
140
- limit: import("zod").ZodDefault<import("zod").ZodNumber>;
141
- pathRegex: import("zod").ZodNullable<import("zod").ZodString>;
142
- }, "strip", import("zod").ZodTypeAny, {
143
- url: string;
144
- limit: number;
145
- pathRegex: string | null;
146
- }, {
147
- url: string;
148
- pathRegex: string | null;
149
- limit?: number | undefined;
150
- }>, import("zod").ZodObject<{
151
- message: import("zod").ZodString;
152
- }, "strip", import("zod").ZodTypeAny, {
153
- message: string;
154
- }, {
155
- message: string;
156
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
157
- url: import("zod").ZodString;
158
- limit: import("zod").ZodDefault<import("zod").ZodNumber>;
159
- pathRegex: import("zod").ZodNullable<import("zod").ZodString>;
160
- }, "strip", import("zod").ZodTypeAny, {
161
- url: string;
162
- limit: number;
163
- pathRegex: string | null;
164
- }, {
165
- url: string;
166
- pathRegex: string | null;
167
- limit?: number | undefined;
168
- }>, import("@mastra/core").WorkflowContext<any>>>;
169
- imageTool: import("@mastra/core").Tool<"imageTool", import("zod").ZodObject<{
170
- directory: import("zod").ZodString;
171
- prompt: import("zod").ZodString;
172
- }, "strip", import("zod").ZodTypeAny, {
173
- directory: string;
174
- prompt: string;
175
- }, {
176
- directory: string;
177
- prompt: string;
178
- }>, import("zod").ZodObject<{
179
- message: import("zod").ZodString;
180
- }, "strip", import("zod").ZodTypeAny, {
181
- message: string;
182
- }, {
183
- message: string;
184
- }>, import("@mastra/core").ToolExecutionContext<import("zod").ZodObject<{
185
- directory: import("zod").ZodString;
186
- prompt: import("zod").ZodString;
187
- }, "strip", import("zod").ZodTypeAny, {
188
- directory: string;
189
- prompt: string;
190
- }, {
191
- directory: string;
192
- prompt: string;
193
- }>, import("@mastra/core").WorkflowContext<any>>>;
194
- }>;
195
- daneIssueLabeler: import("@mastra/core").Agent<Record<string, import("@mastra/core").ToolAction<any, any, any, any>>>;
196
- }, {
197
- message: import("@mastra/core").Workflow<any, import("zod").ZodObject<{
198
- resourceid: import("zod").ZodString;
199
- threadId: import("zod").ZodString;
200
- }, "strip", import("zod").ZodTypeAny, {
201
- resourceid: string;
202
- threadId: string;
203
- }, {
204
- resourceid: string;
205
- threadId: string;
206
- }>>;
207
- githubIssueLabeler: import("@mastra/core").Workflow<any, import("zod").ZodObject<{
208
- repo: import("zod").ZodString;
209
- owner: import("zod").ZodString;
210
- issue_number: import("zod").ZodNumber;
211
- }, "strip", import("zod").ZodTypeAny, {
212
- repo: string;
213
- owner: string;
214
- issue_number: number;
215
- }, {
216
- repo: string;
217
- owner: string;
218
- issue_number: number;
219
- }>>;
220
- }, import("@mastra/core").ConsoleLogger<import("@mastra/core").BaseLogMessage>>;
221
- //# 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,EAAgB,MAAM,EAAE,MAAM,cAAc,CAAC;AAYpD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+EAsBjB,CAAC"}
@@ -1,32 +0,0 @@
1
- import { createLogger, Mastra } from '@mastra/core';
2
- import { PostgresEngine } from '@mastra/engine';
3
- import { UpstashKVMemory } from '@mastra/memory';
4
- import { dane, daneIssueLabeler } from './agents/index.js';
5
- import { firecrawl } from './integrations/index.js';
6
- import { messageWorkflow, githubIssueLabeler } from './workflows/index.js';
7
- const engine = new PostgresEngine({
8
- url: 'postgres://postgres:postgres@localhost:5433/mastra',
9
- });
10
- export const mastra = new Mastra({
11
- agents: {
12
- dane,
13
- daneIssueLabeler,
14
- },
15
- engine,
16
- memory: new UpstashKVMemory({
17
- url: 'http://localhost:8079',
18
- token: `example_token`,
19
- maxTokens: 39000,
20
- }),
21
- workflows: {
22
- message: messageWorkflow,
23
- githubIssueLabeler: githubIssueLabeler,
24
- },
25
- logger: createLogger({
26
- level: 'DEBUG',
27
- type: 'CONSOLE'
28
- }),
29
- syncs: {
30
- ...firecrawl.getSyncs(),
31
- },
32
- });
@@ -1,7 +0,0 @@
1
- import { FirecrawlIntegration } from "@mastra/firecrawl";
2
- import { GithubIntegration } from "@mastra/github";
3
- import { StabilityAiIntegration } from "@mastra/stabilityai";
4
- export declare const firecrawl: FirecrawlIntegration;
5
- export declare const github: GithubIntegration;
6
- export declare const stabilityai: StabilityAiIntegration;
7
- //# 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,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAE5D,eAAO,MAAM,SAAS,sBAIpB,CAAC;AAEH,eAAO,MAAM,MAAM,mBAIjB,CAAA;AAEF,eAAO,MAAM,WAAW,wBAItB,CAAA"}
@@ -1,18 +0,0 @@
1
- import { FirecrawlIntegration } from "@mastra/firecrawl";
2
- import { GithubIntegration } from "@mastra/github";
3
- import { StabilityAiIntegration } from "@mastra/stabilityai";
4
- export const firecrawl = new FirecrawlIntegration({
5
- config: {
6
- API_KEY: process.env.FIRECRAWL_API_KEY,
7
- },
8
- });
9
- export const github = new GithubIntegration({
10
- config: {
11
- PERSONAL_ACCESS_TOKEN: process.env.GITHUB_PERSONAL_ACCESS_TOKEN,
12
- }
13
- });
14
- export const stabilityai = new StabilityAiIntegration({
15
- config: {
16
- API_KEY: process.env.STABILITYAI_API_KEY,
17
- }
18
- });
@@ -1,40 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const browserTool: import("@mastra/core").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>>>;
21
- export declare const googleSearch: import("@mastra/core").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>>>;
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;;;;;;;;;;;;;;;;;;iDAoDtB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;iDAqEvB,CAAC"}
@@ -1,116 +0,0 @@
1
- import { createTool } from '@mastra/core';
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").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>>>;
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;;;;;;;;;;;;;;;;;;iDAgDrB,CAAC"}