@mastra/core 1.16.0 → 1.16.1-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.
- package/CHANGELOG.md +95 -0
- package/dist/agent/index.cjs +8 -8
- package/dist/agent/index.js +1 -1
- package/dist/{chunk-23RPY53R.js → chunk-4DFZ553O.js} +4 -4
- package/dist/{chunk-23RPY53R.js.map → chunk-4DFZ553O.js.map} +1 -1
- package/dist/{chunk-FDHJWYAS.cjs → chunk-6ZT4MY74.cjs} +185 -185
- package/dist/{chunk-FDHJWYAS.cjs.map → chunk-6ZT4MY74.cjs.map} +1 -1
- package/dist/{chunk-I36JFXNI.cjs → chunk-7O2GO5ZA.cjs} +15 -15
- package/dist/{chunk-I36JFXNI.cjs.map → chunk-7O2GO5ZA.cjs.map} +1 -1
- package/dist/{chunk-SNASZNHI.js → chunk-AGEYVARR.js} +2 -2
- package/dist/{chunk-SNASZNHI.js.map → chunk-AGEYVARR.js.map} +1 -1
- package/dist/{chunk-XORKQASI.cjs → chunk-AM2AF362.cjs} +7 -7
- package/dist/{chunk-XORKQASI.cjs.map → chunk-AM2AF362.cjs.map} +1 -1
- package/dist/{chunk-BO7R6ULB.cjs → chunk-EBPV22NT.cjs} +6 -6
- package/dist/{chunk-BO7R6ULB.cjs.map → chunk-EBPV22NT.cjs.map} +1 -1
- package/dist/{chunk-NTPT6K55.js → chunk-ESKXIAWT.js} +8 -8
- package/dist/{chunk-NTPT6K55.js.map → chunk-ESKXIAWT.js.map} +1 -1
- package/dist/{chunk-OS5EARJM.cjs → chunk-GKUIFIWB.cjs} +9 -9
- package/dist/{chunk-OS5EARJM.cjs.map → chunk-GKUIFIWB.cjs.map} +1 -1
- package/dist/{chunk-QLVULYXC.js → chunk-HFGULJ4Q.js} +4 -4
- package/dist/{chunk-QLVULYXC.js.map → chunk-HFGULJ4Q.js.map} +1 -1
- package/dist/{chunk-TP4WRFPO.cjs → chunk-JWTPUJWM.cjs} +14 -14
- package/dist/chunk-JWTPUJWM.cjs.map +1 -0
- package/dist/{chunk-7CYHTLUV.cjs → chunk-KDT3Y3ME.cjs} +75 -75
- package/dist/{chunk-7CYHTLUV.cjs.map → chunk-KDT3Y3ME.cjs.map} +1 -1
- package/dist/{chunk-2ET4GF54.cjs → chunk-LPCQ6RYF.cjs} +50 -50
- package/dist/{chunk-2ET4GF54.cjs.map → chunk-LPCQ6RYF.cjs.map} +1 -1
- package/dist/{chunk-CAMAJ3CA.cjs → chunk-NHYQRELK.cjs} +3 -3
- package/dist/chunk-NHYQRELK.cjs.map +1 -0
- package/dist/{chunk-R67VVUDR.cjs → chunk-OEOHECI4.cjs} +9 -9
- package/dist/{chunk-R67VVUDR.cjs.map → chunk-OEOHECI4.cjs.map} +1 -1
- package/dist/{chunk-GN63CXFX.js → chunk-P7HTEQ33.js} +4 -4
- package/dist/{chunk-GN63CXFX.js.map → chunk-P7HTEQ33.js.map} +1 -1
- package/dist/{chunk-MFODDNAA.js → chunk-PSJRMLRB.js} +3 -3
- package/dist/chunk-PSJRMLRB.js.map +1 -0
- package/dist/{chunk-C6AS2GSG.cjs → chunk-QJGJEX2X.cjs} +7 -7
- package/dist/{chunk-C6AS2GSG.cjs.map → chunk-QJGJEX2X.cjs.map} +1 -1
- package/dist/{chunk-SQACXTWK.cjs → chunk-QVQ3PGG2.cjs} +2 -2
- package/dist/{chunk-SQACXTWK.cjs.map → chunk-QVQ3PGG2.cjs.map} +1 -1
- package/dist/{chunk-BLBX5SP3.js → chunk-RGOEP34Y.js} +3 -3
- package/dist/{chunk-BLBX5SP3.js.map → chunk-RGOEP34Y.js.map} +1 -1
- package/dist/{chunk-NEQ2LAU6.js → chunk-TOPTRKIX.js} +10 -4
- package/dist/chunk-TOPTRKIX.js.map +1 -0
- package/dist/{chunk-KNNVTIAE.cjs → chunk-UCKOC22J.cjs} +11 -5
- package/dist/chunk-UCKOC22J.cjs.map +1 -0
- package/dist/{chunk-43Z3JRGQ.js → chunk-WJWWFBKT.js} +5 -5
- package/dist/chunk-WJWWFBKT.js.map +1 -0
- package/dist/{chunk-VY3657BH.js → chunk-X672Z4KM.js} +6 -6
- package/dist/{chunk-VY3657BH.js.map → chunk-X672Z4KM.js.map} +1 -1
- package/dist/{chunk-TUSWPI7Y.js → chunk-Y5EGGY3M.js} +3 -3
- package/dist/{chunk-TUSWPI7Y.js.map → chunk-Y5EGGY3M.js.map} +1 -1
- package/dist/{chunk-AH75C4TN.js → chunk-YB77ED7R.js} +3 -3
- package/dist/{chunk-AH75C4TN.js.map → chunk-YB77ED7R.js.map} +1 -1
- package/dist/{chunk-4VQMPMG2.js → chunk-YKW2LXON.js} +4 -4
- package/dist/{chunk-4VQMPMG2.js.map → chunk-YKW2LXON.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 +295 -295
- package/dist/docs/references/docs-memory-observational-memory.md +7 -5
- package/dist/docs/references/docs-observability-tracing-bridges-otel.md +3 -3
- package/dist/docs/references/guides-agent-frameworks-ai-sdk.md +3 -3
- package/dist/docs/references/reference-ai-sdk-with-mastra.md +2 -2
- package/dist/docs/references/reference-auth-okta.md +162 -0
- package/dist/docs/references/reference-client-js-agents.md +2 -2
- package/dist/docs/references/reference-memory-observational-memory.md +2 -2
- package/dist/docs/references/reference-observability-tracing-interfaces.md +1 -1
- package/dist/docs/references/reference-processors-message-history-processor.md +1 -1
- package/dist/docs/references/reference-processors-processor-interface.md +3 -3
- package/dist/docs/references/reference-processors-semantic-recall-processor.md +1 -1
- package/dist/docs/references/reference-processors-tool-call-filter.md +2 -2
- package/dist/docs/references/reference-processors-working-memory-processor.md +1 -1
- package/dist/docs/references/reference-tools-mcp-client.md +1 -1
- package/dist/docs/references/reference.md +1 -0
- package/dist/evals/index.cjs +20 -20
- package/dist/evals/index.js +3 -3
- package/dist/evals/scoreTraces/index.cjs +5 -5
- package/dist/evals/scoreTraces/index.js +2 -2
- 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 +16 -16
- package/dist/llm/index.js +5 -5
- package/dist/llm/model/provider-types.generated.d.ts +3 -0
- 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/memory/index.cjs +14 -14
- package/dist/memory/index.js +1 -1
- package/dist/memory/types.d.ts +4 -0
- package/dist/memory/types.d.ts.map +1 -1
- package/dist/models-dev-7F53M5Y6.js +3 -0
- package/dist/{models-dev-M7NTPTPL.js.map → models-dev-7F53M5Y6.js.map} +1 -1
- package/dist/models-dev-KMQOE3SL.cjs +12 -0
- package/dist/{models-dev-6VCUNQEZ.cjs.map → models-dev-KMQOE3SL.cjs.map} +1 -1
- package/dist/netlify-KUZQYG5K.js +3 -0
- package/dist/{netlify-KGXUFZAV.js.map → netlify-KUZQYG5K.js.map} +1 -1
- package/dist/netlify-MBDMAHGO.cjs +12 -0
- package/dist/{netlify-HRHLR3GM.cjs.map → netlify-MBDMAHGO.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 +42 -42
- package/dist/processors/index.js +1 -1
- package/dist/provider-registry-3B6CFW7R.cjs +40 -0
- package/dist/{provider-registry-5RO4SKEP.cjs.map → provider-registry-3B6CFW7R.cjs.map} +1 -1
- package/dist/provider-registry-EB75EFT7.js +3 -0
- package/dist/{provider-registry-W6Z6QAV7.js.map → provider-registry-EB75EFT7.js.map} +1 -1
- package/dist/provider-registry.json +6 -0
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/storage/constants.cjs +56 -56
- package/dist/storage/constants.js +1 -1
- package/dist/storage/index.cjs +160 -160
- package/dist/storage/index.js +2 -2
- package/dist/storage/types.d.ts +2 -0
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/stream/index.cjs +8 -8
- 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 +5 -5
- package/src/llm/model/provider-types.generated.d.ts +3 -0
- package/dist/chunk-43Z3JRGQ.js.map +0 -1
- package/dist/chunk-CAMAJ3CA.cjs.map +0 -1
- package/dist/chunk-KNNVTIAE.cjs.map +0 -1
- package/dist/chunk-MFODDNAA.js.map +0 -1
- package/dist/chunk-NEQ2LAU6.js.map +0 -1
- package/dist/chunk-TP4WRFPO.cjs.map +0 -1
- package/dist/models-dev-6VCUNQEZ.cjs +0 -12
- package/dist/models-dev-M7NTPTPL.js +0 -3
- package/dist/netlify-HRHLR3GM.cjs +0 -12
- package/dist/netlify-KGXUFZAV.js +0 -3
- package/dist/provider-registry-5RO4SKEP.cjs +0 -40
- package/dist/provider-registry-W6Z6QAV7.js +0 -3
|
@@ -150,17 +150,19 @@ const memory = new Memory({
|
|
|
150
150
|
observation: {
|
|
151
151
|
model: new ModelByInputTokens({
|
|
152
152
|
upTo: {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
153
|
+
// Faster, cheaper models for smaller inputs; stronger models for larger contexts
|
|
154
|
+
5_000: 'openrouter/mistralai/ministral-8b-2512',
|
|
155
|
+
20_000: 'openrouter/mistralai/mistral-small-2603',
|
|
156
|
+
40_000: 'openai/gpt-5.4-mini',
|
|
157
|
+
1_000_000: 'google/gemini-3.1-flash-lite-preview',
|
|
156
158
|
},
|
|
157
159
|
}),
|
|
158
160
|
},
|
|
159
161
|
reflection: {
|
|
160
162
|
model: new ModelByInputTokens({
|
|
161
163
|
upTo: {
|
|
162
|
-
20_000: '
|
|
163
|
-
|
|
164
|
+
20_000: 'openai/gpt-5.4-mini',
|
|
165
|
+
100_000: 'google/gemini-2.5-flash',
|
|
164
166
|
},
|
|
165
167
|
}),
|
|
166
168
|
},
|
|
@@ -151,10 +151,10 @@ With the OtelBridge, your traces maintain proper hierarchy across OTEL and Mastr
|
|
|
151
151
|
```text
|
|
152
152
|
HTTP POST /api/chat (from Hono middleware)
|
|
153
153
|
└── agent.assistant (from Mastra via OtelBridge)
|
|
154
|
-
├── chat gpt-
|
|
154
|
+
├── chat gpt-5.4 (LLM call)
|
|
155
155
|
├── tool.execute search (tool execution)
|
|
156
156
|
│ └── HTTP GET api.example.com (from OTEL auto-instrumentation)
|
|
157
|
-
└── chat gpt-
|
|
157
|
+
└── chat gpt-5.4 (follow-up LLM call)
|
|
158
158
|
```
|
|
159
159
|
|
|
160
160
|
## Multi-service distributed tracing
|
|
@@ -167,7 +167,7 @@ Service A: HTTP POST /api/process
|
|
|
167
167
|
|
|
168
168
|
Service B: HTTP POST /api/analyze (incoming call - same trace!)
|
|
169
169
|
└── agent.analyzer (Mastra agent inherits trace context)
|
|
170
|
-
└── chat gpt-
|
|
170
|
+
└── chat gpt-5.4
|
|
171
171
|
```
|
|
172
172
|
|
|
173
173
|
Both services must have:
|
|
@@ -56,7 +56,7 @@ const loggingProcessor: Processor<'logger'> = {
|
|
|
56
56
|
},
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
const model = withMastra(openai('gpt-
|
|
59
|
+
const model = withMastra(openai('gpt-5.4'), {
|
|
60
60
|
inputProcessors: [loggingProcessor],
|
|
61
61
|
outputProcessors: [loggingProcessor],
|
|
62
62
|
})
|
|
@@ -85,7 +85,7 @@ await storage.init()
|
|
|
85
85
|
|
|
86
86
|
const memoryStorage = await storage.getStore('memory')
|
|
87
87
|
|
|
88
|
-
const model = withMastra(openai('gpt-
|
|
88
|
+
const model = withMastra(openai('gpt-5.4'), {
|
|
89
89
|
memory: {
|
|
90
90
|
storage: memoryStorage!,
|
|
91
91
|
threadId: 'user-thread-123',
|
|
@@ -115,7 +115,7 @@ await storage.init()
|
|
|
115
115
|
|
|
116
116
|
const memoryStorage = await storage.getStore('memory')
|
|
117
117
|
|
|
118
|
-
const model = withMastra(openai('gpt-
|
|
118
|
+
const model = withMastra(openai('gpt-5.4'), {
|
|
119
119
|
inputProcessors: [myGuardProcessor],
|
|
120
120
|
outputProcessors: [myLoggingProcessor],
|
|
121
121
|
memory: {
|
|
@@ -18,7 +18,7 @@ const loggingProcessor: Processor<'logger'> = {
|
|
|
18
18
|
},
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
const model = withMastra(openai('gpt-
|
|
21
|
+
const model = withMastra(openai('gpt-5.4'), {
|
|
22
22
|
inputProcessors: [loggingProcessor],
|
|
23
23
|
})
|
|
24
24
|
|
|
@@ -30,7 +30,7 @@ const { text } = await generateText({
|
|
|
30
30
|
|
|
31
31
|
## Parameters
|
|
32
32
|
|
|
33
|
-
**model** (`LanguageModelV2 | LanguageModelV3`): Any AI SDK v5 or v6 language model (e.g., \`openai('gpt-
|
|
33
|
+
**model** (`LanguageModelV2 | LanguageModelV3`): Any AI SDK v5 or v6 language model (e.g., \`openai('gpt-5.4')\`, \`anthropic('claude-opus-4-6')\`).
|
|
34
34
|
|
|
35
35
|
**options** (`WithMastraOptions`): Configuration object for processors and memory.
|
|
36
36
|
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# MastraAuthOkta & MastraRBACOkta class
|
|
2
|
+
|
|
3
|
+
## MastraAuthOkta class
|
|
4
|
+
|
|
5
|
+
The `MastraAuthOkta` class provides authentication for Mastra using Okta. It implements an OAuth 2.0 / OIDC login flow with encrypted session cookies and integrates with the Mastra server using the `auth` option.
|
|
6
|
+
|
|
7
|
+
### Usage example
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
import { Mastra } from '@mastra/core'
|
|
11
|
+
import { MastraAuthOkta } from '@mastra/auth-okta'
|
|
12
|
+
|
|
13
|
+
export const mastra = new Mastra({
|
|
14
|
+
server: {
|
|
15
|
+
auth: new MastraAuthOkta({
|
|
16
|
+
domain: process.env.OKTA_DOMAIN,
|
|
17
|
+
clientId: process.env.OKTA_CLIENT_ID,
|
|
18
|
+
clientSecret: process.env.OKTA_CLIENT_SECRET,
|
|
19
|
+
redirectUri: process.env.OKTA_REDIRECT_URI,
|
|
20
|
+
}),
|
|
21
|
+
},
|
|
22
|
+
})
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
> **Note:** You can omit the constructor parameters if you have the appropriately named environment variables set. In that case, use `new MastraAuthOkta()` without any arguments.
|
|
26
|
+
|
|
27
|
+
### Constructor parameters
|
|
28
|
+
|
|
29
|
+
**domain** (`string`): Your Okta domain (e.g., \`dev-123456.okta.com\`). Used to construct the issuer URL and API endpoints. (Default: `process.env.OKTA_DOMAIN`)
|
|
30
|
+
|
|
31
|
+
**clientId** (`string`): The OAuth client ID from your Okta application. (Default: `process.env.OKTA_CLIENT_ID`)
|
|
32
|
+
|
|
33
|
+
**clientSecret** (`string`): The OAuth client secret. Required for the SSO authorization code flow. (Default: `process.env.OKTA_CLIENT_SECRET`)
|
|
34
|
+
|
|
35
|
+
**issuer** (`string`): The token issuer URL. Override this if you use a custom authorization server. (Default: `` `https://{domain}/oauth2/default` ``)
|
|
36
|
+
|
|
37
|
+
**redirectUri** (`string`): The OAuth redirect URI for the SSO callback. Must match the redirect URI configured in your Okta application. (Default: `process.env.OKTA_REDIRECT_URI`)
|
|
38
|
+
|
|
39
|
+
**scopes** (`string[]`): OAuth scopes to request during the login flow. (Default: `['openid', 'profile', 'email', 'groups']`)
|
|
40
|
+
|
|
41
|
+
**apiToken** (`string`): Okta API token for user lookups via the Users API. Required for \`getUser()\` to return user data by ID. (Default: `process.env.OKTA_API_TOKEN`)
|
|
42
|
+
|
|
43
|
+
**session** (`OktaSessionOptions`): Session cookie configuration.
|
|
44
|
+
|
|
45
|
+
**session.cookieName** (`string`): Name of the session cookie.
|
|
46
|
+
|
|
47
|
+
**session.cookieMaxAge** (`number`): Cookie max age in seconds.
|
|
48
|
+
|
|
49
|
+
**session.cookiePassword** (`string`): Password for encrypting session cookies. Must be at least 32 characters. If not set, an auto-generated value is used that does not survive restarts.
|
|
50
|
+
|
|
51
|
+
**session.secureCookies** (`boolean`): Set the \`Secure\` flag on session cookies.
|
|
52
|
+
|
|
53
|
+
**name** (`string`): Custom name for the auth provider instance. (Default: `'okta'`)
|
|
54
|
+
|
|
55
|
+
### Environment variables
|
|
56
|
+
|
|
57
|
+
The following environment variables are automatically used when constructor options are not provided:
|
|
58
|
+
|
|
59
|
+
**OKTA\_DOMAIN** (`string`): Your Okta domain (e.g., \`dev-123456.okta.com\`). Found in your Okta admin console.
|
|
60
|
+
|
|
61
|
+
**OKTA\_CLIENT\_ID** (`string`): The OAuth client ID from your Okta application.
|
|
62
|
+
|
|
63
|
+
**OKTA\_CLIENT\_SECRET** (`string`): The OAuth client secret from your Okta application.
|
|
64
|
+
|
|
65
|
+
**OKTA\_ISSUER** (`string`): Token issuer URL. Defaults to \`https\://{domain}/oauth2/default\` if not set.
|
|
66
|
+
|
|
67
|
+
**OKTA\_REDIRECT\_URI** (`string`): OAuth redirect URI for the SSO callback.
|
|
68
|
+
|
|
69
|
+
**OKTA\_COOKIE\_PASSWORD** (`string`): Password for encrypting session cookies. Must be at least 32 characters.
|
|
70
|
+
|
|
71
|
+
**OKTA\_API\_TOKEN** (`string`): Okta API token for user lookups and RBAC group resolution.
|
|
72
|
+
|
|
73
|
+
### Authentication flow
|
|
74
|
+
|
|
75
|
+
`MastraAuthOkta` authenticates requests in the following order:
|
|
76
|
+
|
|
77
|
+
1. **Session cookie**: Reads the encrypted session cookie and decrypts it. If the session is valid and not expired, the user is authenticated.
|
|
78
|
+
2. **JWT fallback**: If no session cookie is present, verifies the `Authorization` header token against Okta's JWKS endpoint.
|
|
79
|
+
|
|
80
|
+
After authentication, `authorizeUser` checks that the user has a valid `oktaId`. Provide a custom `authorizeUser` function to implement additional logic.
|
|
81
|
+
|
|
82
|
+
### `OktaUser` type
|
|
83
|
+
|
|
84
|
+
The `OktaUser` type extends the base `EEUser` interface with Okta-specific fields:
|
|
85
|
+
|
|
86
|
+
**id** (`string`): User identifier (maps to the \`sub\` claim).
|
|
87
|
+
|
|
88
|
+
**oktaId** (`string`): Okta user ID (same as \`id\`).
|
|
89
|
+
|
|
90
|
+
**email** (`string`): User email address.
|
|
91
|
+
|
|
92
|
+
**name** (`string`): User display name, constructed from token claims.
|
|
93
|
+
|
|
94
|
+
**avatarUrl** (`string`): URL to the user's profile picture.
|
|
95
|
+
|
|
96
|
+
**groups** (`string[]`): Okta groups the user belongs to, populated from the \`groups\` claim.
|
|
97
|
+
|
|
98
|
+
## MastraRBACOkta class
|
|
99
|
+
|
|
100
|
+
The `MastraRBACOkta` class maps Okta groups to Mastra permissions. It fetches user groups from the Okta API and resolves them against a configurable role mapping. Use it with `MastraAuthOkta` or any other auth provider.
|
|
101
|
+
|
|
102
|
+
> **Note:** RBAC requires a valid Enterprise Edition license. It works without a license in development so you can try it locally, but you’ll need a license for production. [Contact sales](https://mastra.ai/contact) for more information.
|
|
103
|
+
|
|
104
|
+
### Usage example
|
|
105
|
+
|
|
106
|
+
Use `MastraRBACOkta` alongside an auth provider by passing it to the `rbac` option:
|
|
107
|
+
|
|
108
|
+
```typescript
|
|
109
|
+
import { Mastra } from '@mastra/core'
|
|
110
|
+
import { MastraAuthOkta, MastraRBACOkta } from '@mastra/auth-okta'
|
|
111
|
+
|
|
112
|
+
export const mastra = new Mastra({
|
|
113
|
+
server: {
|
|
114
|
+
auth: new MastraAuthOkta(),
|
|
115
|
+
rbac: new MastraRBACOkta({
|
|
116
|
+
roleMapping: {
|
|
117
|
+
Admin: ['*'],
|
|
118
|
+
Engineering: ['agents:*', 'workflows:*', 'tools:*'],
|
|
119
|
+
Viewer: ['agents:read', 'workflows:read'],
|
|
120
|
+
_default: [],
|
|
121
|
+
},
|
|
122
|
+
}),
|
|
123
|
+
},
|
|
124
|
+
})
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
To use Okta RBAC with a different auth provider, pass a `getUserId` function to resolve the Okta user ID from the other provider's user object:
|
|
128
|
+
|
|
129
|
+
```typescript
|
|
130
|
+
import { MastraAuthAuth0 } from '@mastra/auth-auth0'
|
|
131
|
+
import { MastraRBACOkta } from '@mastra/auth-okta'
|
|
132
|
+
|
|
133
|
+
export const mastra = new Mastra({
|
|
134
|
+
server: {
|
|
135
|
+
auth: new MastraAuthAuth0(),
|
|
136
|
+
rbac: new MastraRBACOkta({
|
|
137
|
+
getUserId: user => user.metadata?.oktaUserId || user.email,
|
|
138
|
+
roleMapping: {
|
|
139
|
+
Engineering: ['agents:*', 'workflows:*'],
|
|
140
|
+
Admin: ['*'],
|
|
141
|
+
_default: [],
|
|
142
|
+
},
|
|
143
|
+
}),
|
|
144
|
+
},
|
|
145
|
+
})
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Constructor parameters
|
|
149
|
+
|
|
150
|
+
**roleMapping** (`RoleMapping`): Maps Okta group names to arrays of Mastra permission strings. Use \`'\_default'\` to assign permissions to users who do not match any group. Supports wildcards like \`'\*'\` (full access) and \`'agents:\*'\` (all agent actions).
|
|
151
|
+
|
|
152
|
+
**domain** (`string`): Your Okta domain. Used to initialize the Okta management SDK. (Default: `process.env.OKTA_DOMAIN`)
|
|
153
|
+
|
|
154
|
+
**apiToken** (`string`): Okta API token for the management SDK. Required to fetch user groups from the Okta API. (Default: `process.env.OKTA_API_TOKEN`)
|
|
155
|
+
|
|
156
|
+
**getUserId** (`(user: unknown) => string | undefined`): Extract the Okta user ID from a user object. Use this when combining Okta RBAC with a different auth provider. If not provided, falls back to \`oktaId\` or \`id\` on the user object.
|
|
157
|
+
|
|
158
|
+
**cache** (`PermissionCacheOptions`): Configure the LRU cache for group lookups.
|
|
159
|
+
|
|
160
|
+
**cache.maxSize** (`number`): Maximum number of users to cache.
|
|
161
|
+
|
|
162
|
+
**cache.ttlMs** (`number`): Time-to-live in milliseconds.
|
|
@@ -344,7 +344,7 @@ const agent = await mastraClient.createStoredAgent({
|
|
|
344
344
|
instructions: 'You are a helpful assistant.',
|
|
345
345
|
model: {
|
|
346
346
|
provider: 'openai',
|
|
347
|
-
name: 'gpt-4',
|
|
347
|
+
name: 'gpt-5.4',
|
|
348
348
|
},
|
|
349
349
|
})
|
|
350
350
|
```
|
|
@@ -359,7 +359,7 @@ const agent = await mastraClient.createStoredAgent({
|
|
|
359
359
|
instructions: 'You are a helpful assistant.',
|
|
360
360
|
model: {
|
|
361
361
|
provider: 'openai',
|
|
362
|
-
name: 'gpt-4',
|
|
362
|
+
name: 'gpt-5.4',
|
|
363
363
|
},
|
|
364
364
|
tools: ['calculator', 'weather'],
|
|
365
365
|
workflows: ['data-processing'],
|
|
@@ -632,8 +632,8 @@ import { ModelByInputTokens } from '@mastra/memory'
|
|
|
632
632
|
const selector = new ModelByInputTokens({
|
|
633
633
|
upTo: {
|
|
634
634
|
10_000: 'google/gemini-2.5-flash', // Fast for small inputs
|
|
635
|
-
40_000: 'openai/gpt-
|
|
636
|
-
1_000_000: 'openai/gpt-4
|
|
635
|
+
40_000: 'openai/gpt-5.4-mini', // Stronger for medium inputs
|
|
636
|
+
1_000_000: 'openai/gpt-5.4', // Most capable for large inputs
|
|
637
637
|
},
|
|
638
638
|
})
|
|
639
639
|
```
|
|
@@ -268,7 +268,7 @@ Model Generation attributes.
|
|
|
268
268
|
|
|
269
269
|
```typescript
|
|
270
270
|
interface ModelGenerationAttributes {
|
|
271
|
-
/** Model name (e.g., 'gpt-4', 'claude-
|
|
271
|
+
/** Model name (e.g., 'gpt-5.4', 'claude-opus-4-6') */
|
|
272
272
|
model?: string
|
|
273
273
|
|
|
274
274
|
/** Model provider (e.g., 'openai', 'anthropic') */
|
|
@@ -45,7 +45,7 @@ const storage = new PostgresStorage({
|
|
|
45
45
|
export const agent = new Agent({
|
|
46
46
|
name: 'memory-agent',
|
|
47
47
|
instructions: 'You are a helpful assistant with conversation memory',
|
|
48
|
-
model: 'openai
|
|
48
|
+
model: 'openai/gpt-5.4',
|
|
49
49
|
inputProcessors: [
|
|
50
50
|
new MessageHistory({
|
|
51
51
|
storage,
|
|
@@ -202,9 +202,9 @@ The method can return any combination of these properties:
|
|
|
202
202
|
When multiple processors implement `processInputStep`, they run in order and changes chain through:
|
|
203
203
|
|
|
204
204
|
```text
|
|
205
|
-
Processor 1: receives { model: 'gpt-
|
|
206
|
-
Processor 2: receives { model: 'gpt-
|
|
207
|
-
Final: model = 'gpt-
|
|
205
|
+
Processor 1: receives { model: 'gpt-5.4' } → returns { model: 'gpt-5.4-mini' }
|
|
206
|
+
Processor 2: receives { model: 'gpt-5.4-mini' } → returns { toolChoice: 'none' }
|
|
207
|
+
Final: model = 'gpt-5.4-mini', toolChoice = 'none'
|
|
208
208
|
```
|
|
209
209
|
|
|
210
210
|
#### System message isolation
|
|
@@ -82,7 +82,7 @@ const semanticRecall = new SemanticRecall({
|
|
|
82
82
|
export const agent = new Agent({
|
|
83
83
|
name: 'semantic-memory-agent',
|
|
84
84
|
instructions: 'You are a helpful assistant with semantic memory recall',
|
|
85
|
-
model: 'openai
|
|
85
|
+
model: 'openai/gpt-5.4',
|
|
86
86
|
inputProcessors: [semanticRecall, new MessageHistory({ storage, lastMessages: 50 })],
|
|
87
87
|
outputProcessors: [semanticRecall, new MessageHistory({ storage })],
|
|
88
88
|
})
|
|
@@ -39,7 +39,7 @@ import { ToolCallFilter } from '@mastra/core/processors'
|
|
|
39
39
|
export const agent = new Agent({
|
|
40
40
|
name: 'filtered-agent',
|
|
41
41
|
instructions: 'You are a helpful assistant',
|
|
42
|
-
model: 'openai
|
|
42
|
+
model: 'openai/gpt-5.4',
|
|
43
43
|
tools: {
|
|
44
44
|
searchDatabase,
|
|
45
45
|
sendEmail,
|
|
@@ -64,7 +64,7 @@ import { ToolCallFilter } from '@mastra/core/processors'
|
|
|
64
64
|
export const agent = new Agent({
|
|
65
65
|
name: 'no-tools-context-agent',
|
|
66
66
|
instructions: 'You are a helpful assistant',
|
|
67
|
-
model: 'openai
|
|
67
|
+
model: 'openai/gpt-5.4',
|
|
68
68
|
tools: {
|
|
69
69
|
searchDatabase,
|
|
70
70
|
sendEmail,
|
|
@@ -67,7 +67,7 @@ const storage = new PostgresStorage({
|
|
|
67
67
|
export const agent = new Agent({
|
|
68
68
|
name: 'personalized-agent',
|
|
69
69
|
instructions: 'You are a helpful assistant that remembers user preferences',
|
|
70
|
-
model: 'openai
|
|
70
|
+
model: 'openai/gpt-5.4',
|
|
71
71
|
inputProcessors: [
|
|
72
72
|
new WorkingMemory({
|
|
73
73
|
storage,
|
|
@@ -35,6 +35,7 @@ The Reference section provides documentation of Mastra's API, including paramete
|
|
|
35
35
|
- [Clerk](https://mastra.ai/reference/auth/clerk)
|
|
36
36
|
- [Firebase](https://mastra.ai/reference/auth/firebase)
|
|
37
37
|
- [JSON Web Token](https://mastra.ai/reference/auth/jwt)
|
|
38
|
+
- [Okta](https://mastra.ai/reference/auth/okta)
|
|
38
39
|
- [Supabase](https://mastra.ai/reference/auth/supabase)
|
|
39
40
|
- [WorkOS](https://mastra.ai/reference/auth/workos)
|
|
40
41
|
- [create-mastra](https://mastra.ai/reference/cli/create-mastra)
|
package/dist/evals/index.cjs
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkAM2AF362_cjs = require('../chunk-AM2AF362.cjs');
|
|
4
|
+
var chunkJWTPUJWM_cjs = require('../chunk-JWTPUJWM.cjs');
|
|
5
|
+
var chunkQVQ3PGG2_cjs = require('../chunk-QVQ3PGG2.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 chunkAM2AF362_cjs.runEvals; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "MastraScorer", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkJWTPUJWM_cjs.MastraScorer; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "createScorer", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkJWTPUJWM_cjs.createScorer; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "listScoresResponseSchema", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkQVQ3PGG2_cjs.listScoresResponseSchema; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "saveScorePayloadSchema", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkQVQ3PGG2_cjs.saveScorePayloadSchema; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "scoreResultSchema", {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkQVQ3PGG2_cjs.scoreResultSchema; }
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(exports, "scoreRowDataSchema", {
|
|
34
34
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkQVQ3PGG2_cjs.scoreRowDataSchema; }
|
|
36
36
|
});
|
|
37
37
|
Object.defineProperty(exports, "scoringEntityTypeSchema", {
|
|
38
38
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
39
|
+
get: function () { return chunkQVQ3PGG2_cjs.scoringEntityTypeSchema; }
|
|
40
40
|
});
|
|
41
41
|
Object.defineProperty(exports, "scoringExtractStepResultSchema", {
|
|
42
42
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkQVQ3PGG2_cjs.scoringExtractStepResultSchema; }
|
|
44
44
|
});
|
|
45
45
|
Object.defineProperty(exports, "scoringHookInputSchema", {
|
|
46
46
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunkQVQ3PGG2_cjs.scoringHookInputSchema; }
|
|
48
48
|
});
|
|
49
49
|
Object.defineProperty(exports, "scoringInputSchema", {
|
|
50
50
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkQVQ3PGG2_cjs.scoringInputSchema; }
|
|
52
52
|
});
|
|
53
53
|
Object.defineProperty(exports, "scoringInputWithExtractStepResultAndAnalyzeStepResultSchema", {
|
|
54
54
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunkQVQ3PGG2_cjs.scoringInputWithExtractStepResultAndAnalyzeStepResultSchema; }
|
|
56
56
|
});
|
|
57
57
|
Object.defineProperty(exports, "scoringInputWithExtractStepResultAndScoreAndReasonSchema", {
|
|
58
58
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunkQVQ3PGG2_cjs.scoringInputWithExtractStepResultAndScoreAndReasonSchema; }
|
|
60
60
|
});
|
|
61
61
|
Object.defineProperty(exports, "scoringInputWithExtractStepResultSchema", {
|
|
62
62
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunkQVQ3PGG2_cjs.scoringInputWithExtractStepResultSchema; }
|
|
64
64
|
});
|
|
65
65
|
Object.defineProperty(exports, "scoringPromptsSchema", {
|
|
66
66
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunkQVQ3PGG2_cjs.scoringPromptsSchema; }
|
|
68
68
|
});
|
|
69
69
|
Object.defineProperty(exports, "scoringSourceSchema", {
|
|
70
70
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunkQVQ3PGG2_cjs.scoringSourceSchema; }
|
|
72
72
|
});
|
|
73
73
|
Object.defineProperty(exports, "scoringValueSchema", {
|
|
74
74
|
enumerable: true,
|
|
75
|
-
get: function () { return
|
|
75
|
+
get: function () { return chunkQVQ3PGG2_cjs.scoringValueSchema; }
|
|
76
76
|
});
|
|
77
77
|
//# sourceMappingURL=index.cjs.map
|
|
78
78
|
//# sourceMappingURL=index.cjs.map
|
package/dist/evals/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { runEvals } from '../chunk-
|
|
2
|
-
export { MastraScorer, createScorer } from '../chunk-
|
|
3
|
-
export { listScoresResponseSchema, saveScorePayloadSchema, scoreResultSchema, scoreRowDataSchema, scoringEntityTypeSchema, scoringExtractStepResultSchema, scoringHookInputSchema, scoringInputSchema, scoringInputWithExtractStepResultAndAnalyzeStepResultSchema, scoringInputWithExtractStepResultAndScoreAndReasonSchema, scoringInputWithExtractStepResultSchema, scoringPromptsSchema, scoringSourceSchema, scoringValueSchema } from '../chunk-
|
|
1
|
+
export { runEvals } from '../chunk-4DFZ553O.js';
|
|
2
|
+
export { MastraScorer, createScorer } from '../chunk-WJWWFBKT.js';
|
|
3
|
+
export { listScoresResponseSchema, saveScorePayloadSchema, scoreResultSchema, scoreRowDataSchema, scoringEntityTypeSchema, scoringExtractStepResultSchema, scoringHookInputSchema, scoringInputSchema, scoringInputWithExtractStepResultAndAnalyzeStepResultSchema, scoringInputWithExtractStepResultAndScoreAndReasonSchema, scoringInputWithExtractStepResultSchema, scoringPromptsSchema, scoringSourceSchema, scoringValueSchema } from '../chunk-AGEYVARR.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkLPCQ6RYF_cjs = require('../../chunk-LPCQ6RYF.cjs');
|
|
4
|
+
var chunkQVQ3PGG2_cjs = require('../../chunk-QVQ3PGG2.cjs');
|
|
5
5
|
var chunkG5HKDGNT_cjs = require('../../chunk-G5HKDGNT.cjs');
|
|
6
6
|
var chunk4U7ZLI36_cjs = require('../../chunk-4U7ZLI36.cjs');
|
|
7
7
|
var pMap = require('p-map');
|
|
@@ -235,7 +235,7 @@ function transformTraceToScorerInputAndOutput(trace) {
|
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
// src/evals/scoreTraces/scoreTracesWorkflow.ts
|
|
238
|
-
var getTraceStep =
|
|
238
|
+
var getTraceStep = chunkLPCQ6RYF_cjs.createStep({
|
|
239
239
|
id: "__process-trace-scoring",
|
|
240
240
|
inputSchema: v4.z.object({
|
|
241
241
|
targets: v4.z.array(
|
|
@@ -383,7 +383,7 @@ async function validateAndSaveScore({ storage, scorerResult }) {
|
|
|
383
383
|
text: "Scores storage domain is not available"
|
|
384
384
|
});
|
|
385
385
|
}
|
|
386
|
-
const payloadToSave =
|
|
386
|
+
const payloadToSave = chunkQVQ3PGG2_cjs.saveScorePayloadSchema.parse(scorerResult);
|
|
387
387
|
const result = await scoresStore.saveScore(payloadToSave);
|
|
388
388
|
return result.score;
|
|
389
389
|
}
|
|
@@ -446,7 +446,7 @@ async function attachScoreToSpan({
|
|
|
446
446
|
} catch {
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
|
-
var scoreTracesWorkflow =
|
|
449
|
+
var scoreTracesWorkflow = chunkLPCQ6RYF_cjs.createWorkflow({
|
|
450
450
|
id: "__batch-scoring-traces",
|
|
451
451
|
inputSchema: v4.z.object({
|
|
452
452
|
targets: v4.z.array(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createStep, createWorkflow } from '../../chunk-
|
|
2
|
-
import { saveScorePayloadSchema } from '../../chunk-
|
|
1
|
+
import { createStep, createWorkflow } from '../../chunk-YKW2LXON.js';
|
|
2
|
+
import { saveScorePayloadSchema } from '../../chunk-AGEYVARR.js';
|
|
3
3
|
import { resolveObservabilityContext } from '../../chunk-CT4YYQI3.js';
|
|
4
4
|
import { MastraError } from '../../chunk-FJEVLHJT.js';
|
|
5
5
|
import pMap from 'p-map';
|
package/dist/harness/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunk7O2GO5ZA_cjs = require('../chunk-7O2GO5ZA.cjs');
|
|
4
|
+
var chunkJWTPUJWM_cjs = require('../chunk-JWTPUJWM.cjs');
|
|
5
5
|
var chunkXW4B2RAG_cjs = require('../chunk-XW4B2RAG.cjs');
|
|
6
6
|
var chunkK4NN2KQQ_cjs = require('../chunk-K4NN2KQQ.cjs');
|
|
7
7
|
var chunkXB4FLS7A_cjs = require('../chunk-XB4FLS7A.cjs');
|
|
@@ -312,7 +312,7 @@ Use this tool when:
|
|
|
312
312
|
};
|
|
313
313
|
}
|
|
314
314
|
const workspace = context?.workspace;
|
|
315
|
-
const subagent = new
|
|
315
|
+
const subagent = new chunkJWTPUJWM_cjs.Agent({
|
|
316
316
|
id: `subagent-${definition.id}`,
|
|
317
317
|
name: `${definition.name} Subagent`,
|
|
318
318
|
instructions: definition.instructions,
|
|
@@ -561,7 +561,7 @@ var Harness = class {
|
|
|
561
561
|
*/
|
|
562
562
|
async init() {
|
|
563
563
|
if (this.config.storage) {
|
|
564
|
-
this.#internalMastra = new
|
|
564
|
+
this.#internalMastra = new chunk7O2GO5ZA_cjs.Mastra({ logger: false, storage: this.config.storage });
|
|
565
565
|
await this.#internalMastra.getStorage().init();
|
|
566
566
|
}
|
|
567
567
|
if (this.config.workspace && !this.workspaceInitialized && !this.workspaceFn) {
|
|
@@ -813,7 +813,7 @@ var Harness = class {
|
|
|
813
813
|
}
|
|
814
814
|
}
|
|
815
815
|
try {
|
|
816
|
-
const { PROVIDER_REGISTRY } = await import('../provider-registry-
|
|
816
|
+
const { PROVIDER_REGISTRY } = await import('../provider-registry-3B6CFW7R.cjs');
|
|
817
817
|
const registry = PROVIDER_REGISTRY;
|
|
818
818
|
const providerConfig = registry[provider];
|
|
819
819
|
const envVars = providerConfig?.apiKeyEnvVar;
|
|
@@ -833,7 +833,7 @@ var Harness = class {
|
|
|
833
833
|
*/
|
|
834
834
|
async listAvailableModels() {
|
|
835
835
|
try {
|
|
836
|
-
const { PROVIDER_REGISTRY } = await import('../provider-registry-
|
|
836
|
+
const { PROVIDER_REGISTRY } = await import('../provider-registry-3B6CFW7R.cjs');
|
|
837
837
|
if (!PROVIDER_REGISTRY) return [];
|
|
838
838
|
const registry = PROVIDER_REGISTRY;
|
|
839
839
|
const providers = Object.keys(registry);
|
|
@@ -892,7 +892,7 @@ var Harness = class {
|
|
|
892
892
|
}
|
|
893
893
|
async getProviderApiKeyEnvVar(provider) {
|
|
894
894
|
try {
|
|
895
|
-
const { PROVIDER_REGISTRY } = await import('../provider-registry-
|
|
895
|
+
const { PROVIDER_REGISTRY } = await import('../provider-registry-3B6CFW7R.cjs');
|
|
896
896
|
const registry = PROVIDER_REGISTRY;
|
|
897
897
|
const envVars = registry[provider]?.apiKeyEnvVar;
|
|
898
898
|
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-ESKXIAWT.js';
|
|
2
|
+
import { Agent } from '../chunk-WJWWFBKT.js';
|
|
3
3
|
import { Workspace, createWorkspaceTools } from '../chunk-J3NJXIJ4.js';
|
|
4
4
|
import { createTool } from '../chunk-GRMC2OYN.js';
|
|
5
5
|
import { toStandardSchema } from '../chunk-6SRTDZ7S.js';
|
|
@@ -811,7 +811,7 @@ var Harness = class {
|
|
|
811
811
|
}
|
|
812
812
|
}
|
|
813
813
|
try {
|
|
814
|
-
const { PROVIDER_REGISTRY } = await import('../provider-registry-
|
|
814
|
+
const { PROVIDER_REGISTRY } = await import('../provider-registry-EB75EFT7.js');
|
|
815
815
|
const registry = PROVIDER_REGISTRY;
|
|
816
816
|
const providerConfig = registry[provider];
|
|
817
817
|
const envVars = providerConfig?.apiKeyEnvVar;
|
|
@@ -831,7 +831,7 @@ var Harness = class {
|
|
|
831
831
|
*/
|
|
832
832
|
async listAvailableModels() {
|
|
833
833
|
try {
|
|
834
|
-
const { PROVIDER_REGISTRY } = await import('../provider-registry-
|
|
834
|
+
const { PROVIDER_REGISTRY } = await import('../provider-registry-EB75EFT7.js');
|
|
835
835
|
if (!PROVIDER_REGISTRY) return [];
|
|
836
836
|
const registry = PROVIDER_REGISTRY;
|
|
837
837
|
const providers = Object.keys(registry);
|
|
@@ -890,7 +890,7 @@ var Harness = class {
|
|
|
890
890
|
}
|
|
891
891
|
async getProviderApiKeyEnvVar(provider) {
|
|
892
892
|
try {
|
|
893
|
-
const { PROVIDER_REGISTRY } = await import('../provider-registry-
|
|
893
|
+
const { PROVIDER_REGISTRY } = await import('../provider-registry-EB75EFT7.js');
|
|
894
894
|
const registry = PROVIDER_REGISTRY;
|
|
895
895
|
const envVars = registry[provider]?.apiKeyEnvVar;
|
|
896
896
|
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 chunk7O2GO5ZA_cjs = require('./chunk-7O2GO5ZA.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 chunk7O2GO5ZA_cjs.Mastra; }
|
|
10
10
|
});
|
|
11
11
|
//# sourceMappingURL=index.cjs.map
|
|
12
12
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED