@mastra/core 1.31.0-alpha.1 → 1.31.0-alpha.2
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.
- package/CHANGELOG.md +6 -0
- package/dist/agent/durable/index.cjs +22 -22
- package/dist/agent/durable/index.js +4 -4
- package/dist/agent/index.cjs +9 -9
- package/dist/agent/index.js +1 -1
- package/dist/browser/index.cjs +2 -2
- package/dist/browser/index.js +1 -1
- package/dist/channels/index.cjs +4 -4
- package/dist/channels/index.js +1 -1
- package/dist/{chunk-K4RFAZEH.js → chunk-2ZK5IF7F.js} +3 -3
- package/dist/{chunk-K4RFAZEH.js.map → chunk-2ZK5IF7F.js.map} +1 -1
- package/dist/{chunk-WT2IVQBJ.js → chunk-56YX4QXF.js} +9 -9
- package/dist/{chunk-WT2IVQBJ.js.map → chunk-56YX4QXF.js.map} +1 -1
- package/dist/{chunk-JCSNUAZW.js → chunk-7K3DRXR5.js} +3 -3
- package/dist/{chunk-JCSNUAZW.js.map → chunk-7K3DRXR5.js.map} +1 -1
- package/dist/{chunk-DL4C5DUI.cjs → chunk-BBGULRCO.cjs} +9 -9
- package/dist/{chunk-DL4C5DUI.cjs.map → chunk-BBGULRCO.cjs.map} +1 -1
- package/dist/{chunk-YVTA4K6K.js → chunk-CVPDCNSV.js} +8 -8
- package/dist/{chunk-YVTA4K6K.js.map → chunk-CVPDCNSV.js.map} +1 -1
- package/dist/{chunk-CF4OVR4V.cjs → chunk-DOKVBCA6.cjs} +389 -389
- package/dist/{chunk-CF4OVR4V.cjs.map → chunk-DOKVBCA6.cjs.map} +1 -1
- package/dist/{chunk-GYTX6IH2.cjs → chunk-GM5PX2CG.cjs} +224 -224
- package/dist/{chunk-GYTX6IH2.cjs.map → chunk-GM5PX2CG.cjs.map} +1 -1
- package/dist/{chunk-5D3IKSJ3.js → chunk-HQ5T3ORE.js} +6 -6
- package/dist/{chunk-5D3IKSJ3.js.map → chunk-HQ5T3ORE.js.map} +1 -1
- package/dist/{chunk-ZFAQVP7L.js → chunk-IXX6CCDW.js} +4 -4
- package/dist/{chunk-ZFAQVP7L.js.map → chunk-IXX6CCDW.js.map} +1 -1
- package/dist/{chunk-ATWCWU4A.cjs → chunk-JGRV2X4U.cjs} +3 -3
- package/dist/{chunk-ATWCWU4A.cjs.map → chunk-JGRV2X4U.cjs.map} +1 -1
- package/dist/{chunk-OS6YC5Q4.cjs → chunk-JHS4KPNK.cjs} +5 -5
- package/dist/{chunk-OS6YC5Q4.cjs.map → chunk-JHS4KPNK.cjs.map} +1 -1
- package/dist/{chunk-EFCRYCP4.cjs → chunk-N6L3UFHQ.cjs} +3 -3
- package/dist/{chunk-EFCRYCP4.cjs.map → chunk-N6L3UFHQ.cjs.map} +1 -1
- package/dist/{chunk-LAPVI43X.cjs → chunk-NJPEAYX3.cjs} +20 -20
- package/dist/{chunk-LAPVI43X.cjs.map → chunk-NJPEAYX3.cjs.map} +1 -1
- package/dist/{chunk-4GCGRFND.js → chunk-NWMUCSF3.js} +4 -4
- package/dist/{chunk-4GCGRFND.js.map → chunk-NWMUCSF3.js.map} +1 -1
- package/dist/{chunk-V5IWNIFA.cjs → chunk-PMPEPPEM.cjs} +18 -17
- package/dist/chunk-PMPEPPEM.cjs.map +1 -0
- package/dist/{chunk-VL3337EG.js → chunk-Q6ZGFUVB.js} +3 -3
- package/dist/{chunk-VL3337EG.js.map → chunk-Q6ZGFUVB.js.map} +1 -1
- package/dist/{chunk-FPWDEJ5W.cjs → chunk-QIFCHCII.cjs} +18 -18
- package/dist/{chunk-FPWDEJ5W.cjs.map → chunk-QIFCHCII.cjs.map} +1 -1
- package/dist/{chunk-GBQCYCSH.cjs → chunk-RB5GPVWV.cjs} +59 -59
- package/dist/{chunk-GBQCYCSH.cjs.map → chunk-RB5GPVWV.cjs.map} +1 -1
- package/dist/{chunk-4SXW4BMV.js → chunk-RPNNSCCV.js} +8 -7
- package/dist/chunk-RPNNSCCV.js.map +1 -0
- package/dist/{chunk-DY3EL2XK.cjs → chunk-RRYFFH4I.cjs} +7 -7
- package/dist/{chunk-DY3EL2XK.cjs.map → chunk-RRYFFH4I.cjs.map} +1 -1
- package/dist/{chunk-MVVXAPBL.js → chunk-TBGATHGK.js} +3 -3
- package/dist/{chunk-MVVXAPBL.js.map → chunk-TBGATHGK.js.map} +1 -1
- package/dist/{chunk-V5E2OIV6.cjs → chunk-VKILDR4Y.cjs} +6 -6
- package/dist/{chunk-V5E2OIV6.cjs.map → chunk-VKILDR4Y.cjs.map} +1 -1
- package/dist/{chunk-3K3ANRQO.js → chunk-VRSJM3W2.js} +3 -3
- package/dist/{chunk-3K3ANRQO.js.map → chunk-VRSJM3W2.js.map} +1 -1
- package/dist/{chunk-CTG4B5FM.js → chunk-W6637N6M.js} +4 -4
- package/dist/{chunk-CTG4B5FM.js.map → chunk-W6637N6M.js.map} +1 -1
- package/dist/datasets/index.cjs +17 -17
- package/dist/datasets/index.js +2 -2
- package/dist/docs/SKILL.md +2 -1
- package/dist/docs/assets/SOURCE_MAP.json +225 -225
- package/dist/docs/references/reference-tools-perplexity.md +155 -0
- package/dist/docs/references/reference.md +1 -0
- package/dist/evals/index.cjs +6 -6
- package/dist/evals/index.js +2 -2
- package/dist/evals/scoreTraces/index.cjs +3 -3
- package/dist/evals/scoreTraces/index.js +1 -1
- package/dist/harness/index.cjs +7 -7
- package/dist/harness/index.js +5 -5
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/llm/index.cjs +20 -20
- package/dist/llm/index.js +5 -5
- package/dist/loop/index.cjs +14 -14
- package/dist/loop/index.js +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.js +1 -1
- package/dist/mastra-GU4WOJJ6.js +3 -0
- package/dist/{mastra-SGOF2FOS.js.map → mastra-GU4WOJJ6.js.map} +1 -1
- package/dist/mastra-HZ6MUPHV.cjs +12 -0
- package/dist/{mastra-CGB7BBSZ.cjs.map → mastra-HZ6MUPHV.cjs.map} +1 -1
- package/dist/memory/index.cjs +19 -19
- package/dist/memory/index.js +1 -1
- package/dist/models-dev-2U52GDNO.cjs +12 -0
- package/dist/{models-dev-IOEEN3JP.cjs.map → models-dev-2U52GDNO.cjs.map} +1 -1
- package/dist/models-dev-GBYVKYLD.js +3 -0
- package/dist/{models-dev-TJARBWXY.js.map → models-dev-GBYVKYLD.js.map} +1 -1
- package/dist/netlify-26S2YWQC.js +3 -0
- package/dist/{netlify-ZXYH6R7F.js.map → netlify-26S2YWQC.js.map} +1 -1
- package/dist/netlify-JNHXGWXV.cjs +12 -0
- package/dist/{netlify-AQ2SWPGA.cjs.map → netlify-JNHXGWXV.cjs.map} +1 -1
- package/dist/processor-provider/index.cjs +10 -10
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/index.cjs +49 -49
- package/dist/processors/index.js +1 -1
- package/dist/processors/processors/batch-parts.d.ts.map +1 -1
- package/dist/provider-registry-2V4UUBCN.cjs +44 -0
- package/dist/{provider-registry-LFSFCOQ6.cjs.map → provider-registry-2V4UUBCN.cjs.map} +1 -1
- package/dist/provider-registry-ZOKLGIOR.js +3 -0
- package/dist/{provider-registry-E2XHEEJ2.js.map → provider-registry-ZOKLGIOR.js.map} +1 -1
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/runner-DCM7XKBG.cjs +16 -0
- package/dist/{runner-LCX6F5B5.cjs.map → runner-DCM7XKBG.cjs.map} +1 -1
- package/dist/runner-LXMA6PBE.js +3 -0
- package/dist/{runner-3WGI2L4I.js.map → runner-LXMA6PBE.js.map} +1 -1
- package/dist/storage/index.cjs +59 -59
- package/dist/storage/index.js +2 -2
- package/dist/stream/index.cjs +11 -11
- package/dist/stream/index.js +1 -1
- package/dist/tool-loop-agent/index.cjs +4 -4
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/vector/index.cjs +7 -7
- package/dist/vector/index.js +1 -1
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/index.cjs +24 -24
- package/dist/workflows/index.js +1 -1
- package/package.json +6 -6
- package/dist/chunk-4SXW4BMV.js.map +0 -1
- package/dist/chunk-V5IWNIFA.cjs.map +0 -1
- package/dist/mastra-CGB7BBSZ.cjs +0 -12
- package/dist/mastra-SGOF2FOS.js +0 -3
- package/dist/models-dev-IOEEN3JP.cjs +0 -12
- package/dist/models-dev-TJARBWXY.js +0 -3
- package/dist/netlify-AQ2SWPGA.cjs +0 -12
- package/dist/netlify-ZXYH6R7F.js +0 -3
- package/dist/provider-registry-E2XHEEJ2.js +0 -3
- package/dist/provider-registry-LFSFCOQ6.cjs +0 -44
- package/dist/runner-3WGI2L4I.js +0 -3
- package/dist/runner-LCX6F5B5.cjs +0 -16
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# Perplexity tools
|
|
2
|
+
|
|
3
|
+
Added in: `@mastra/perplexity@0.1.0-alpha.0`
|
|
4
|
+
|
|
5
|
+
The `@mastra/perplexity` package wraps the [Perplexity Search API](https://docs.perplexity.ai/docs/search/quickstart) as a Mastra-compatible tool. It exposes a factory function that returns a tool created with [`createTool()`](https://mastra.ai/reference/tools/create-tool) and full Zod input/output schemas.
|
|
6
|
+
|
|
7
|
+
For chat completions or agentic workflows powered by Perplexity, use Mastra's built-in [Perplexity model provider](https://mastra.ai/models/providers/perplexity) or [Perplexity Agent provider](https://mastra.ai/models/providers/perplexity-agent). Those are separate from this Search tool.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
Install the package alongside Zod:
|
|
12
|
+
|
|
13
|
+
**npm**:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npm install @mastra/perplexity zod
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**pnpm**:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
pnpm add @mastra/perplexity zod
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Yarn**:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
yarn add @mastra/perplexity zod
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Bun**:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
bun add @mastra/perplexity zod
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Usage example
|
|
38
|
+
|
|
39
|
+
The following example creates the search tool with the default configuration. By default, the tool reads `PERPLEXITY_API_KEY` (with `PPLX_API_KEY` as a fallback) from the environment. Pass `{ apiKey }` explicitly to override.
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
import { createPerplexitySearchTool } from '@mastra/perplexity'
|
|
43
|
+
|
|
44
|
+
const searchTool = createPerplexitySearchTool()
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
To pass an API key explicitly:
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
import { createPerplexitySearchTool } from '@mastra/perplexity'
|
|
51
|
+
|
|
52
|
+
const searchTool = createPerplexitySearchTool({ apiKey: 'pplx-...' })
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Configuration
|
|
56
|
+
|
|
57
|
+
All factory functions accept a `PerplexityClientOptions` object:
|
|
58
|
+
|
|
59
|
+
**apiKey** (`string`): Perplexity API key. Falls back to the \`PERPLEXITY\_API\_KEY\` then \`PPLX\_API\_KEY\` environment variables.
|
|
60
|
+
|
|
61
|
+
**baseUrl** (`string`): Override the API base URL. (Default: `'https://api.perplexity.ai'`)
|
|
62
|
+
|
|
63
|
+
**fetch** (`typeof fetch`): Custom \`fetch\` implementation. Useful for tests, retries, or instrumentation.
|
|
64
|
+
|
|
65
|
+
## Methods
|
|
66
|
+
|
|
67
|
+
### Factory functions
|
|
68
|
+
|
|
69
|
+
#### `createPerplexityTools(config?)`
|
|
70
|
+
|
|
71
|
+
Returns an object containing all Perplexity tools that share the supplied configuration.
|
|
72
|
+
|
|
73
|
+
```typescript
|
|
74
|
+
import { createPerplexityTools } from '@mastra/perplexity'
|
|
75
|
+
|
|
76
|
+
const tools = createPerplexityTools({ apiKey: 'pplx-...' })
|
|
77
|
+
// tools.perplexitySearch
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Returns: `{ perplexitySearch }`
|
|
81
|
+
|
|
82
|
+
#### `createPerplexitySearchTool(config?)`
|
|
83
|
+
|
|
84
|
+
Creates a tool that searches the web using the Perplexity Search API. Returns ranked results with titles, URLs, snippets, and optional publication dates.
|
|
85
|
+
|
|
86
|
+
The tool is registered with the ID `perplexity-search`.
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
import { createPerplexitySearchTool } from '@mastra/perplexity'
|
|
90
|
+
|
|
91
|
+
const searchTool = createPerplexitySearchTool()
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
##### Input
|
|
95
|
+
|
|
96
|
+
**query** (`string`): The search query.
|
|
97
|
+
|
|
98
|
+
**maxResults** (`number`): Maximum number of results to return (1-20).
|
|
99
|
+
|
|
100
|
+
**searchDomainFilter** (`string[]`): Restrict (or exclude) results by domain. Prefix a domain with \`-\` to exclude it (for example, \`-pinterest.com\`). Do not mix allow- and deny-list entries in the same call.
|
|
101
|
+
|
|
102
|
+
**searchRecencyFilter** (`'hour' | 'day' | 'week' | 'month' | 'year'`): Only return results from within the given recency window.
|
|
103
|
+
|
|
104
|
+
**searchAfterDateFilter** (`string`): Only return results published on or after this date. Format: m/d/yyyy.
|
|
105
|
+
|
|
106
|
+
**searchBeforeDateFilter** (`string`): Only return results published on or before this date. Format: m/d/yyyy.
|
|
107
|
+
|
|
108
|
+
##### Output
|
|
109
|
+
|
|
110
|
+
**query** (`string`): The original search query.
|
|
111
|
+
|
|
112
|
+
**results** (`SearchResult[]`): Array of search results.
|
|
113
|
+
|
|
114
|
+
**results.title** (`string`): Result title.
|
|
115
|
+
|
|
116
|
+
**results.url** (`string`): Result URL.
|
|
117
|
+
|
|
118
|
+
**results.snippet** (`string`): Content snippet.
|
|
119
|
+
|
|
120
|
+
**results.date** (`string`): Publication date when available.
|
|
121
|
+
|
|
122
|
+
## Agent example
|
|
123
|
+
|
|
124
|
+
The following example registers the search tool on an agent so it can fetch fresh web results before answering.
|
|
125
|
+
|
|
126
|
+
```typescript
|
|
127
|
+
import { Agent } from '@mastra/core/agent'
|
|
128
|
+
import { createPerplexitySearchTool } from '@mastra/perplexity'
|
|
129
|
+
|
|
130
|
+
const agent = new Agent({
|
|
131
|
+
id: 'research-agent',
|
|
132
|
+
name: 'Research Agent',
|
|
133
|
+
model: 'anthropic/claude-sonnet-4-6',
|
|
134
|
+
instructions:
|
|
135
|
+
'You are a research assistant. Use the perplexity-search tool to find up-to-date information from the web before answering.',
|
|
136
|
+
tools: {
|
|
137
|
+
search: createPerplexitySearchTool(),
|
|
138
|
+
},
|
|
139
|
+
})
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Environment variables
|
|
143
|
+
|
|
144
|
+
| Variable | Description |
|
|
145
|
+
| -------------------- | ----------------------------------------------------------------------------------------------- |
|
|
146
|
+
| `PERPLEXITY_API_KEY` | Your Perplexity API key. Used as the default when `apiKey` is not passed to a factory function. |
|
|
147
|
+
| `PPLX_API_KEY` | Fallback used when `PERPLEXITY_API_KEY` is unset. |
|
|
148
|
+
|
|
149
|
+
## Related
|
|
150
|
+
|
|
151
|
+
- [`createTool()`](https://mastra.ai/reference/tools/create-tool)
|
|
152
|
+
- [Perplexity Search quickstart](https://docs.perplexity.ai/docs/search/quickstart)
|
|
153
|
+
- [Perplexity Agent quickstart](https://docs.perplexity.ai/docs/agent/quickstart)
|
|
154
|
+
- [Perplexity model provider](https://mastra.ai/models/providers/perplexity)
|
|
155
|
+
- [Perplexity Agent provider](https://mastra.ai/models/providers/perplexity-agent)
|
|
@@ -224,6 +224,7 @@ The Reference section provides documentation of Mastra's API, including paramete
|
|
|
224
224
|
- [createVectorQueryTool()](https://mastra.ai/reference/tools/vector-query-tool)
|
|
225
225
|
- [MCPClient](https://mastra.ai/reference/tools/mcp-client)
|
|
226
226
|
- [MCPServer](https://mastra.ai/reference/tools/mcp-server)
|
|
227
|
+
- [Perplexity Tools](https://mastra.ai/reference/tools/perplexity)
|
|
227
228
|
- [Tavily Tools](https://mastra.ai/reference/tools/tavily)
|
|
228
229
|
- [Amazon S3 Vector Store](https://mastra.ai/reference/vectors/s3vectors)
|
|
229
230
|
- [Astra Vector Store](https://mastra.ai/reference/vectors/astra)
|
package/dist/evals/index.cjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkJHS4KPNK_cjs = require('../chunk-JHS4KPNK.cjs');
|
|
4
|
+
var chunkPMPEPPEM_cjs = require('../chunk-PMPEPPEM.cjs');
|
|
5
5
|
var chunkEEC3EO3T_cjs = require('../chunk-EEC3EO3T.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "runEvals", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkJHS4KPNK_cjs.runEvals; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "MastraScorer", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkPMPEPPEM_cjs.MastraScorer; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "createScorer", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkPMPEPPEM_cjs.createScorer; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "filterRun", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkPMPEPPEM_cjs.filterRun; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "extractTrajectory", {
|
|
26
26
|
enumerable: true,
|
package/dist/evals/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { runEvals } from '../chunk-
|
|
2
|
-
export { MastraScorer, createScorer, filterRun } from '../chunk-
|
|
1
|
+
export { runEvals } from '../chunk-TBGATHGK.js';
|
|
2
|
+
export { MastraScorer, createScorer, filterRun } from '../chunk-RPNNSCCV.js';
|
|
3
3
|
export { extractTrajectory, extractTrajectoryFromTrace, extractWorkflowTrajectory, listScoresResponseSchema, saveScorePayloadSchema, scoreResultSchema, scoreRowDataSchema, scoringEntityTypeSchema, scoringExtractStepResultSchema, scoringHookInputSchema, scoringInputSchema, scoringInputWithExtractStepResultAndAnalyzeStepResultSchema, scoringInputWithExtractStepResultAndScoreAndReasonSchema, scoringInputWithExtractStepResultSchema, scoringPromptsSchema, scoringSourceSchema, scoringValueSchema } from '../chunk-I6R27AUG.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkRB5GPVWV_cjs = require('../../chunk-RB5GPVWV.cjs');
|
|
4
4
|
var chunkEEC3EO3T_cjs = require('../../chunk-EEC3EO3T.cjs');
|
|
5
5
|
var chunkYGD6CZV4_cjs = require('../../chunk-YGD6CZV4.cjs');
|
|
6
6
|
var chunk4U7ZLI36_cjs = require('../../chunk-4U7ZLI36.cjs');
|
|
@@ -234,7 +234,7 @@ function transformTraceToScorerInputAndOutput(trace) {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
// src/evals/scoreTraces/scoreTracesWorkflow.ts
|
|
237
|
-
var getTraceStep =
|
|
237
|
+
var getTraceStep = chunkRB5GPVWV_cjs.createStep({
|
|
238
238
|
id: "__process-trace-scoring",
|
|
239
239
|
inputSchema: v4.z.object({
|
|
240
240
|
targets: v4.z.array(
|
|
@@ -429,7 +429,7 @@ async function attachScoreToSpan({
|
|
|
429
429
|
} catch {
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
|
-
var scoreTracesWorkflow =
|
|
432
|
+
var scoreTracesWorkflow = chunkRB5GPVWV_cjs.createWorkflow({
|
|
433
433
|
id: "__batch-scoring-traces",
|
|
434
434
|
inputSchema: v4.z.object({
|
|
435
435
|
targets: v4.z.array(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createStep, createWorkflow } from '../../chunk-
|
|
1
|
+
import { createStep, createWorkflow } from '../../chunk-IXX6CCDW.js';
|
|
2
2
|
import { saveScorePayloadSchema } from '../../chunk-I6R27AUG.js';
|
|
3
3
|
import { getEntityTypeForSpan } from '../../chunk-G2SVLNSC.js';
|
|
4
4
|
import { MastraError } from '../../chunk-FJEVLHJT.js';
|
package/dist/harness/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkQIFCHCII_cjs = require('../chunk-QIFCHCII.cjs');
|
|
4
|
+
var chunkPMPEPPEM_cjs = require('../chunk-PMPEPPEM.cjs');
|
|
5
5
|
var chunkYQR772OH_cjs = require('../chunk-YQR772OH.cjs');
|
|
6
6
|
var chunkYNE3ZCU5_cjs = require('../chunk-YNE3ZCU5.cjs');
|
|
7
7
|
var chunkM4KUR53T_cjs = require('../chunk-M4KUR53T.cjs');
|
|
@@ -610,7 +610,7 @@ ${FORKED_SUBAGENT_NESTING_NOTICE}`;
|
|
|
610
610
|
isError: true
|
|
611
611
|
};
|
|
612
612
|
}
|
|
613
|
-
subagentToRun = new
|
|
613
|
+
subagentToRun = new chunkPMPEPPEM_cjs.Agent({
|
|
614
614
|
id: `subagent-${definition.id}`,
|
|
615
615
|
name: `${definition.name} Subagent`,
|
|
616
616
|
instructions: definition.instructions,
|
|
@@ -890,7 +890,7 @@ var Harness = class {
|
|
|
890
890
|
*/
|
|
891
891
|
async init() {
|
|
892
892
|
if (this.config.storage) {
|
|
893
|
-
this.#internalMastra = new
|
|
893
|
+
this.#internalMastra = new chunkQIFCHCII_cjs.Mastra({
|
|
894
894
|
logger: false,
|
|
895
895
|
storage: this.config.storage,
|
|
896
896
|
...this.config.observability ? { observability: this.config.observability } : {}
|
|
@@ -1150,7 +1150,7 @@ var Harness = class {
|
|
|
1150
1150
|
}
|
|
1151
1151
|
}
|
|
1152
1152
|
try {
|
|
1153
|
-
const { PROVIDER_REGISTRY } = await import('../provider-registry-
|
|
1153
|
+
const { PROVIDER_REGISTRY } = await import('../provider-registry-2V4UUBCN.cjs');
|
|
1154
1154
|
const registry = PROVIDER_REGISTRY;
|
|
1155
1155
|
const providerConfig = registry[provider];
|
|
1156
1156
|
const envVars = providerConfig?.apiKeyEnvVar;
|
|
@@ -1170,7 +1170,7 @@ var Harness = class {
|
|
|
1170
1170
|
*/
|
|
1171
1171
|
async listAvailableModels() {
|
|
1172
1172
|
try {
|
|
1173
|
-
const { PROVIDER_REGISTRY } = await import('../provider-registry-
|
|
1173
|
+
const { PROVIDER_REGISTRY } = await import('../provider-registry-2V4UUBCN.cjs');
|
|
1174
1174
|
if (!PROVIDER_REGISTRY) return [];
|
|
1175
1175
|
const registry = PROVIDER_REGISTRY;
|
|
1176
1176
|
const providers = Object.keys(registry);
|
|
@@ -1229,7 +1229,7 @@ var Harness = class {
|
|
|
1229
1229
|
}
|
|
1230
1230
|
async getProviderApiKeyEnvVar(provider) {
|
|
1231
1231
|
try {
|
|
1232
|
-
const { PROVIDER_REGISTRY } = await import('../provider-registry-
|
|
1232
|
+
const { PROVIDER_REGISTRY } = await import('../provider-registry-2V4UUBCN.cjs');
|
|
1233
1233
|
const registry = PROVIDER_REGISTRY;
|
|
1234
1234
|
const envVars = registry[provider]?.apiKeyEnvVar;
|
|
1235
1235
|
return Array.isArray(envVars) ? envVars[0] : envVars;
|
package/dist/harness/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Mastra } from '../chunk-
|
|
2
|
-
import { Agent } from '../chunk-
|
|
1
|
+
import { Mastra } from '../chunk-56YX4QXF.js';
|
|
2
|
+
import { Agent } from '../chunk-RPNNSCCV.js';
|
|
3
3
|
import { Workspace, createWorkspaceTools } from '../chunk-KGL33Q5K.js';
|
|
4
4
|
import { safeStringify } from '../chunk-ARNDQ2SQ.js';
|
|
5
5
|
import { createTool } from '../chunk-PXOIM2JE.js';
|
|
@@ -1148,7 +1148,7 @@ var Harness = class {
|
|
|
1148
1148
|
}
|
|
1149
1149
|
}
|
|
1150
1150
|
try {
|
|
1151
|
-
const { PROVIDER_REGISTRY } = await import('../provider-registry-
|
|
1151
|
+
const { PROVIDER_REGISTRY } = await import('../provider-registry-ZOKLGIOR.js');
|
|
1152
1152
|
const registry = PROVIDER_REGISTRY;
|
|
1153
1153
|
const providerConfig = registry[provider];
|
|
1154
1154
|
const envVars = providerConfig?.apiKeyEnvVar;
|
|
@@ -1168,7 +1168,7 @@ var Harness = class {
|
|
|
1168
1168
|
*/
|
|
1169
1169
|
async listAvailableModels() {
|
|
1170
1170
|
try {
|
|
1171
|
-
const { PROVIDER_REGISTRY } = await import('../provider-registry-
|
|
1171
|
+
const { PROVIDER_REGISTRY } = await import('../provider-registry-ZOKLGIOR.js');
|
|
1172
1172
|
if (!PROVIDER_REGISTRY) return [];
|
|
1173
1173
|
const registry = PROVIDER_REGISTRY;
|
|
1174
1174
|
const providers = Object.keys(registry);
|
|
@@ -1227,7 +1227,7 @@ var Harness = class {
|
|
|
1227
1227
|
}
|
|
1228
1228
|
async getProviderApiKeyEnvVar(provider) {
|
|
1229
1229
|
try {
|
|
1230
|
-
const { PROVIDER_REGISTRY } = await import('../provider-registry-
|
|
1230
|
+
const { PROVIDER_REGISTRY } = await import('../provider-registry-ZOKLGIOR.js');
|
|
1231
1231
|
const registry = PROVIDER_REGISTRY;
|
|
1232
1232
|
const envVars = registry[provider]?.apiKeyEnvVar;
|
|
1233
1233
|
return Array.isArray(envVars) ? envVars[0] : envVars;
|
package/dist/index.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkQIFCHCII_cjs = require('./chunk-QIFCHCII.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "Mastra", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkQIFCHCII_cjs.Mastra; }
|
|
10
10
|
});
|
|
11
11
|
//# sourceMappingURL=index.cjs.map
|
|
12
12
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
package/dist/llm/index.cjs
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
3
|
+
var chunkDOKVBCA6_cjs = require('../chunk-DOKVBCA6.cjs');
|
|
4
|
+
var chunkNJPEAYX3_cjs = require('../chunk-NJPEAYX3.cjs');
|
|
5
|
+
var chunkGM5PX2CG_cjs = require('../chunk-GM5PX2CG.cjs');
|
|
6
|
+
var chunkBBGULRCO_cjs = require('../chunk-BBGULRCO.cjs');
|
|
7
|
+
var chunkN6L3UFHQ_cjs = require('../chunk-N6L3UFHQ.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
Object.defineProperty(exports, "AzureOpenAIGateway", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkDOKVBCA6_cjs.AzureOpenAIGateway; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "EMBEDDING_MODELS", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkDOKVBCA6_cjs.EMBEDDING_MODELS; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "ModelRouterEmbeddingModel", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkDOKVBCA6_cjs.ModelRouterEmbeddingModel; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "ModelRouterLanguageModel", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkDOKVBCA6_cjs.ModelRouterLanguageModel; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "defaultGateways", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkDOKVBCA6_cjs.defaultGateways; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "resolveModelConfig", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkDOKVBCA6_cjs.resolveModelConfig; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "GatewayRegistry", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkNJPEAYX3_cjs.GatewayRegistry; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "MastraGateway", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkNJPEAYX3_cjs.MastraGateway; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "PROVIDER_REGISTRY", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkNJPEAYX3_cjs.PROVIDER_REGISTRY; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "getProviderConfig", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkNJPEAYX3_cjs.getProviderConfig; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "parseModelString", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkNJPEAYX3_cjs.parseModelString; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "ModelsDevGateway", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkGM5PX2CG_cjs.ModelsDevGateway; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "NetlifyGateway", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkBBGULRCO_cjs.NetlifyGateway; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "GATEWAY_AUTH_HEADER", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkN6L3UFHQ_cjs.GATEWAY_AUTH_HEADER; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "MastraModelGateway", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkN6L3UFHQ_cjs.MastraModelGateway; }
|
|
70
70
|
});
|
|
71
71
|
//# sourceMappingURL=index.cjs.map
|
|
72
72
|
//# sourceMappingURL=index.cjs.map
|
package/dist/llm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { AzureOpenAIGateway, EMBEDDING_MODELS, ModelRouterEmbeddingModel, ModelRouterLanguageModel, defaultGateways, resolveModelConfig } from '../chunk-
|
|
2
|
-
export { GatewayRegistry, MastraGateway, PROVIDER_REGISTRY, getProviderConfig, parseModelString } from '../chunk-
|
|
3
|
-
export { ModelsDevGateway } from '../chunk-
|
|
4
|
-
export { NetlifyGateway } from '../chunk-
|
|
5
|
-
export { GATEWAY_AUTH_HEADER, MastraModelGateway } from '../chunk-
|
|
1
|
+
export { AzureOpenAIGateway, EMBEDDING_MODELS, ModelRouterEmbeddingModel, ModelRouterLanguageModel, defaultGateways, resolveModelConfig } from '../chunk-HQ5T3ORE.js';
|
|
2
|
+
export { GatewayRegistry, MastraGateway, PROVIDER_REGISTRY, getProviderConfig, parseModelString } from '../chunk-CVPDCNSV.js';
|
|
3
|
+
export { ModelsDevGateway } from '../chunk-2ZK5IF7F.js';
|
|
4
|
+
export { NetlifyGateway } from '../chunk-Q6ZGFUVB.js';
|
|
5
|
+
export { GATEWAY_AUTH_HEADER, MastraModelGateway } from '../chunk-VRSJM3W2.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/dist/loop/index.cjs
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkPMPEPPEM_cjs = require('../chunk-PMPEPPEM.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "createScorer", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkPMPEPPEM_cjs.createScorer; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "formatCheckFeedback", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkPMPEPPEM_cjs.formatCheckFeedback; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "formatCompletionFeedback", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkPMPEPPEM_cjs.formatCompletionFeedback; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "formatStreamCompletionFeedback", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkPMPEPPEM_cjs.formatStreamCompletionFeedback; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "formatValidationFeedback", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkPMPEPPEM_cjs.formatValidationFeedback; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "generateFinalResult", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkPMPEPPEM_cjs.generateFinalResult; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "generateStructuredFinalResult", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkPMPEPPEM_cjs.generateStructuredFinalResult; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "loop", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkPMPEPPEM_cjs.loop; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "runChecks", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkPMPEPPEM_cjs.runChecks; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "runCompletionScorers", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkPMPEPPEM_cjs.runCompletionScorers; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "runDefaultCompletionCheck", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkPMPEPPEM_cjs.runDefaultCompletionCheck; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "runStreamCompletionScorers", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkPMPEPPEM_cjs.runStreamCompletionScorers; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "runValidation", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkPMPEPPEM_cjs.runValidation; }
|
|
58
58
|
});
|
|
59
59
|
//# sourceMappingURL=index.cjs.map
|
|
60
60
|
//# sourceMappingURL=index.cjs.map
|
package/dist/loop/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createScorer, formatCheckFeedback, formatCompletionFeedback, formatStreamCompletionFeedback, formatValidationFeedback, generateFinalResult, generateStructuredFinalResult, loop, runChecks, runCompletionScorers, runDefaultCompletionCheck, runStreamCompletionScorers, runValidation } from '../chunk-
|
|
1
|
+
export { createScorer, formatCheckFeedback, formatCompletionFeedback, formatStreamCompletionFeedback, formatValidationFeedback, generateFinalResult, generateStructuredFinalResult, loop, runChecks, runCompletionScorers, runDefaultCompletionCheck, runStreamCompletionScorers, runValidation } from '../chunk-RPNNSCCV.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/mastra/index.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkQIFCHCII_cjs = require('../chunk-QIFCHCII.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "Mastra", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkQIFCHCII_cjs.Mastra; }
|
|
10
10
|
});
|
|
11
11
|
//# sourceMappingURL=index.cjs.map
|
|
12
12
|
//# sourceMappingURL=index.cjs.map
|
package/dist/mastra/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"mastra-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"mastra-GU4WOJJ6.js"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkNJPEAYX3_cjs = require('./chunk-NJPEAYX3.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "MastraGateway", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkNJPEAYX3_cjs.MastraGateway; }
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=mastra-HZ6MUPHV.cjs.map
|
|
12
|
+
//# sourceMappingURL=mastra-HZ6MUPHV.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"mastra-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"mastra-HZ6MUPHV.cjs"}
|