0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00
mastra/integrations/parallel/tsconfig.json
George Pickett 856b7431a2
feat(integrations): add Parallel integration package (#22070)
## Description

Adds an official `@mastra/parallel` integration package with typed
Mastra-native Search and Extract tools. It uses the official
`parallel-web` client directly and provides individual tool factories
plus `createParallelTools()`.

Includes mocked tests, documentation, package registration, an
integration icon, and a changeset. This does not change Mastra Code
routing or provider precedence.

### Validation

- `pnpm --filter @mastra/parallel test` (19 tests passed)
- `pnpm --filter @mastra/parallel build:lib`
- `pnpm --filter @mastra/parallel lint`

## Related issue(s)

Closes #22068

## Type of change

- [ ] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [x] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [x] Test update

## Checklist

- [x] I have linked the related issue(s) in the description above
- [x] I have made corresponding changes to the documentation (if
applicable)
- [x] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have addressed all Coderabbit comments on this PR


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5

This PR adds official Parallel tools for Mastra agents. Agents can now
search the web and extract content through Parallel with typed inputs,
clear results, and shared configuration.

## Changes

- Added the new `@mastra/parallel` integration package.
- Added:
  - `createParallelSearchTool()`
  - `createParallelExtractTool()`
  - `createParallelTools()`
  - `getParallelClient()`
- Added lazy client creation with API-key validation and
environment-variable support.
- Added input validation for URLs, countries, calendar dates, fetch
policies, and other API options.
- Normalized Parallel results, errors, usage data, and warnings.
- Added mocked tests for client behavior, tool creation, request
mapping, validation, response handling, and SDK errors.
- Added package documentation, sidebar registration, icon, Renovate
configuration, and a changeset.
- Kept Mastra Code routing and provider precedence unchanged.

## Validation

- 19 tests pass.
- Library build succeeds.
- Linting succeeds.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-08-22 11:43:28 -07:00

5 lines
138 B