Commit 35d83e0
committed
feat: add text analysis and URL tools
- Introduced `text-analysis.tool.ts` for analyzing text with operations such as word count, sentence count, readability, sentiment analysis, language detection, and summarization.
- Implemented `text-processing.tool.ts` for processing and transforming text with operations like lowercase, uppercase, trim, and extracting information (numbers, emails, URLs).
- Added helper functions for text analysis including counting words, sentences, paragraphs, calculating readability, analyzing sentiment, detecting language, generating summaries, and extracting various data types.
- Created `url-tool.ts` which includes `urlValidationTool` for validating, parsing, normalizing, and analyzing URLs with operations like checking reachability and fetching metadata.
- Added `urlManipulationTool` for manipulating URLs by adding, removing, or updating query parameters, paths, and fragments.
- Implemented context schemas using Zod for both tools to define default settings and options.
- Enhanced logging for input and output stages of both tools to improve traceability and debugging.1 parent 3c588e5 commit 35d83e0
44 files changed
Lines changed: 17963 additions & 10879 deletions
File tree
- src/mastra/tools
- tests/test-results
- ui
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| |||
0 commit comments