@mastra/mcp-docs-server 1.2.19-alpha.13 → 1.2.19-alpha.15
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/.docs/docs/channels.md +1 -0
- package/.docs/docs/storage.md +1 -0
- package/.docs/integrations/channels/imessage.md +150 -8
- package/.docs/integrations/databases/elasticsearch.md +156 -0
- package/.docs/integrations/databases/libsql.md +16 -0
- package/.docs/integrations/databases/postgresql.md +24 -0
- package/.docs/integrations.md +1 -0
- package/.docs/models/gateways/netlify.md +2 -1
- package/.docs/models/gateways/vercel.md +1 -6
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/digitalocean.md +3 -3
- package/.docs/models/providers/hyper.md +3 -3
- package/.docs/models/providers/kilo.md +3 -3
- package/.docs/models/providers/llmgateway-providers.md +7 -1
- package/.docs/models/providers/nano-gpt.md +14 -9
- package/.docs/reference/agents/channels.md +1 -1
- package/.docs/reference/streaming/agents/stream.md +1 -3
- package/.docs/reference/workspace/sandbox.md +29 -1
- package/CHANGELOG.md +14 -0
- package/package.json +5 -5
package/.docs/docs/channels.md
CHANGED
package/.docs/docs/storage.md
CHANGED
|
@@ -197,6 +197,7 @@ Each provider page includes installation instructions, configuration parameters,
|
|
|
197
197
|
- [Convex](https://mastra.ai/integrations/databases/convex)
|
|
198
198
|
- [DuckDB](https://mastra.ai/integrations/databases/duckdb)
|
|
199
199
|
- [DynamoDB](https://mastra.ai/integrations/databases/dynamodb)
|
|
200
|
+
- [Elasticsearch](https://mastra.ai/integrations/databases/elasticsearch)
|
|
200
201
|
- [Google Cloud Spanner](https://mastra.ai/integrations/databases/spanner)
|
|
201
202
|
- [LanceDB](https://mastra.ai/integrations/databases/lancedb)
|
|
202
203
|
- [libSQL](https://mastra.ai/integrations/databases/libsql)
|
|
@@ -2,10 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
# iMessage
|
|
4
4
|
|
|
5
|
-
iMessage channels let a Mastra agent receive direct messages and group messages from iMessage. Mastra handles the agent wiring
|
|
5
|
+
iMessage channels let a Mastra agent receive direct messages and group messages from iMessage. Two vendor-maintained adapters connect Mastra to iMessage: [Photon](https://app.photon.codes) and [Linq](https://linqapp.com). Mastra handles the agent wiring and the webhook route; the adapter docs cover number provisioning, credentials, and webhook registration.
|
|
6
|
+
|
|
7
|
+
## Choose an adapter
|
|
8
|
+
|
|
9
|
+
Both adapters follow the same Mastra wiring, so pick the provider first:
|
|
10
|
+
|
|
11
|
+
- **Photon**: Hosted or self-hosted iMessage service. Supports webhooks and a [gateway listener](#gateway-listener) that streams messages over an open connection.
|
|
12
|
+
- **Linq**: Hosted iMessage, RCS, and SMS API. Webhook-driven, with tapback reactions and media mapped in both directions.
|
|
6
13
|
|
|
7
14
|
## Install the adapter
|
|
8
15
|
|
|
16
|
+
**Photon**:
|
|
17
|
+
|
|
9
18
|
Install the Photon iMessage adapter:
|
|
10
19
|
|
|
11
20
|
**npm**:
|
|
@@ -32,9 +41,87 @@ yarn add @photon-ai/chat-adapter-imessage
|
|
|
32
41
|
bun add @photon-ai/chat-adapter-imessage
|
|
33
42
|
```
|
|
34
43
|
|
|
44
|
+
**Linq**:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm install @photon-ai/chat-adapter-imessage
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Tab 3**:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pnpm add @photon-ai/chat-adapter-imessage
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Tab 4**:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
yarn add @photon-ai/chat-adapter-imessage
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Tab 5**:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
bun add @photon-ai/chat-adapter-imessage
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Tab 6**:
|
|
69
|
+
|
|
70
|
+
Install the Linq Chat SDK adapter:
|
|
71
|
+
|
|
72
|
+
**npm**:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
npm install @linqapp/chat-sdk-adapter
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**pnpm**:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
pnpm add @linqapp/chat-sdk-adapter
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Yarn**:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
yarn add @linqapp/chat-sdk-adapter
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Bun**:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
bun add @linqapp/chat-sdk-adapter
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Tab 7**:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
npm install @linqapp/chat-sdk-adapter
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Tab 8**:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
pnpm add @linqapp/chat-sdk-adapter
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Tab 9**:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
yarn add @linqapp/chat-sdk-adapter
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Tab 10**:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
bun add @linqapp/chat-sdk-adapter
|
|
118
|
+
```
|
|
119
|
+
|
|
35
120
|
## Agent configuration
|
|
36
121
|
|
|
37
|
-
Add
|
|
122
|
+
Add the adapter factory to the agent's `channels.adapters` object:
|
|
123
|
+
|
|
124
|
+
**Photon**:
|
|
38
125
|
|
|
39
126
|
```typescript
|
|
40
127
|
import { Agent } from '@mastra/core/agent'
|
|
@@ -57,6 +144,35 @@ export const imessageAgent = new Agent({
|
|
|
57
144
|
})
|
|
58
145
|
```
|
|
59
146
|
|
|
147
|
+
`threadContext: { maxMessages: 0 }` skips the platform history lookup Mastra runs when an agent is first mentioned in a group chat, which the Photon adapter can't perform.
|
|
148
|
+
|
|
149
|
+
**Linq**:
|
|
150
|
+
|
|
151
|
+
```typescript
|
|
152
|
+
import { Agent } from '@mastra/core/agent'
|
|
153
|
+
import { createLinqAdapter } from '@linqapp/chat-sdk-adapter'
|
|
154
|
+
|
|
155
|
+
export const imessageAgent = new Agent({
|
|
156
|
+
id: 'imessage-agent',
|
|
157
|
+
name: 'iMessage Agent',
|
|
158
|
+
instructions: 'Answer questions and help with tasks over iMessage.',
|
|
159
|
+
model: 'openai/gpt-5.6-sol',
|
|
160
|
+
channels: {
|
|
161
|
+
adapters: {
|
|
162
|
+
imessage: {
|
|
163
|
+
adapter: createLinqAdapter({
|
|
164
|
+
apiKey: process.env.LINQ_API_KEY!,
|
|
165
|
+
signingSecret: process.env.LINQ_WEBHOOK_SECRET!,
|
|
166
|
+
}),
|
|
167
|
+
toolDisplay: 'text',
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
})
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
`createLinqAdapter()` takes the credentials directly: `apiKey` is your Linq API key and `signingSecret` comes from the [webhook subscription](#webhook-url). The Linq adapter can fetch thread history, so the default `threadContext` behavior works.
|
|
175
|
+
|
|
60
176
|
Register the agent on the Mastra instance:
|
|
61
177
|
|
|
62
178
|
```typescript
|
|
@@ -70,10 +186,14 @@ export const mastra = new Mastra({
|
|
|
70
186
|
|
|
71
187
|
Use `imessage` as the adapter key. Mastra derives the webhook path and the `platform` value on `requestContext` from this key.
|
|
72
188
|
|
|
73
|
-
`toolDisplay: 'text'` describes tool calls in the message, since iMessage has no interactive cards for Approve and Deny actions.
|
|
189
|
+
`toolDisplay: 'text'` describes tool calls in the message, since iMessage has no interactive cards for Approve and Deny actions. Both adapters need it: Photon has no card rendering, and Linq flattens cards to plain text where buttons show their labels but can't trigger actions.
|
|
190
|
+
|
|
191
|
+
> **Warning:** Text rendering can't submit approval decisions. A tool with `requireApproval: true` stays suspended until a UI or API action, such as Studio, submits an explicit approval or decline, so avoid approval-gated tools on iMessage agents unless another surface handles the decision. See [Tool approval](https://mastra.ai/docs/channels).
|
|
74
192
|
|
|
75
193
|
## Adapter setup
|
|
76
194
|
|
|
195
|
+
**Photon**:
|
|
196
|
+
|
|
77
197
|
Follow the [Photon iMessage adapter docs](https://github.com/photon-hq/vercel-chat-adapter-imessage) for iMessage-specific setup, including number provisioning, hosted and self-hosted modes, and webhook registration. The adapter picks its mode from the environment variables you set.
|
|
78
198
|
|
|
79
199
|
For the hosted service, create a project at [app.photon.codes](https://app.photon.codes) and use the project credentials:
|
|
@@ -94,6 +214,17 @@ IMESSAGE_PHONE=+15551234567
|
|
|
94
214
|
|
|
95
215
|
`IMESSAGE_PHONE` is optional and routes messages when a self-hosted server has several numbers. You can also pass these values to `createiMessageAdapter()` directly, including a `credentials` function that resolves the project ID and secret at first use from a secret store.
|
|
96
216
|
|
|
217
|
+
**Linq**:
|
|
218
|
+
|
|
219
|
+
Follow the [Linq API docs](https://docs.linqapp.com/) for Linq-specific setup, including phone number provisioning and API keys. Create a Linq account, copy your API key, and set the credentials the agent configuration reads:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
LINQ_API_KEY=your-linq-api-key
|
|
223
|
+
LINQ_WEBHOOK_SECRET=your-webhook-signing-secret
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
`LINQ_WEBHOOK_SECRET` is the signing secret returned when you create a webhook subscription in the next section. The adapter also accepts a `baseURL` option to target a different Linq API base URL, such as a sandbox.
|
|
227
|
+
|
|
97
228
|
## Webhook URL
|
|
98
229
|
|
|
99
230
|
Mastra generates the iMessage webhook route from the agent ID and adapter key:
|
|
@@ -108,13 +239,25 @@ Use your public Mastra server URL as the base URL:
|
|
|
108
239
|
https://your-app.example.com/api/agents/imessage-agent/channels/imessage/webhook
|
|
109
240
|
```
|
|
110
241
|
|
|
242
|
+
**Photon**:
|
|
243
|
+
|
|
111
244
|
Register this URL in the [Photon dashboard](https://app.photon.codes), then set the signing secret it returns as `IMESSAGE_WEBHOOK_SECRET`. The secret is shown once at registration. The adapter verifies the signature on every delivery and rejects requests that don't match. Webhooks are available in hosted mode only.
|
|
112
245
|
|
|
113
|
-
|
|
246
|
+
**Linq**:
|
|
247
|
+
|
|
248
|
+
Create a [webhook subscription](https://docs.linqapp.com/guides/webhooks/subscriptions/) with this URL as the target and subscribe to at least these events:
|
|
249
|
+
|
|
250
|
+
- `message.received`
|
|
251
|
+
- `reaction.added`
|
|
252
|
+
- `reaction.removed`
|
|
253
|
+
|
|
254
|
+
Set the `signing_secret` the subscription returns as `LINQ_WEBHOOK_SECRET`. The secret is shown once at creation and can't be retrieved later. The adapter verifies the HMAC signature on every delivery, checks for replayed requests, and rejects requests that don't match.
|
|
255
|
+
|
|
256
|
+
> **Note:** Both providers deliver to public HTTPS endpoints only, not to `http://` or private addresses like `localhost`. For local development, use a tunnel as described in the [Channels overview](https://mastra.ai/docs/channels).
|
|
114
257
|
|
|
115
258
|
## Duplicate deliveries
|
|
116
259
|
|
|
117
|
-
Photon
|
|
260
|
+
Photon and Linq retry failed deliveries with backoff and deliver at least once, so the same message can arrive twice. Chat SDK drops the repeat using the channel state adapter, and Mastra's default keeps those dedup keys in memory. That covers a single long-running server.
|
|
118
261
|
|
|
119
262
|
A repeat can still reach the agent after a restart, or on serverless where the retry is routed to a different instance. Pass a shared state adapter on `channels.state` so dedup keys are visible everywhere. Install one alongside the adapter:
|
|
120
263
|
|
|
@@ -154,7 +297,6 @@ channels: {
|
|
|
154
297
|
toolDisplay: 'text',
|
|
155
298
|
},
|
|
156
299
|
},
|
|
157
|
-
threadContext: { maxMessages: 0 },
|
|
158
300
|
state: createRedisState(),
|
|
159
301
|
},
|
|
160
302
|
```
|
|
@@ -163,13 +305,13 @@ This matters most for tools with side effects, where handling the same message t
|
|
|
163
305
|
|
|
164
306
|
## Read receipts
|
|
165
307
|
|
|
166
|
-
iPhone Messages sends a read receipt for every message the agent posts, and the adapter delivers those receipts as inbound messages with no text and no attachments. Mastra skips them, so the agent doesn't answer its own reply in a loop. Their message IDs carry a `:read:` suffix, and they show up as skipped messages at `debug` log level.
|
|
308
|
+
iPhone Messages sends a read receipt for every message the agent posts, and the Photon adapter delivers those receipts as inbound messages with no text and no attachments. Mastra skips them, so the agent doesn't answer its own reply in a loop. Their message IDs carry a `:read:` suffix, and they show up as skipped messages at `debug` log level.
|
|
167
309
|
|
|
168
310
|
The same rule applies to every adapter: an inbound message with neither text nor attachments never starts an agent run. A custom `onDirectMessage`, `onMention`, or `onSubscribedMessage` handler still receives it and can act on it before calling `defaultHandler`.
|
|
169
311
|
|
|
170
312
|
## Gateway listener
|
|
171
313
|
|
|
172
|
-
The adapter can hold an open connection and stream messages in real time instead of receiving webhooks. This works in both hosted and self-hosted modes.
|
|
314
|
+
The Photon adapter can hold an open connection and stream messages in real time instead of receiving webhooks. This works in both hosted and self-hosted modes. The Linq adapter is webhook-driven and has no gateway mode.
|
|
173
315
|
|
|
174
316
|
Mastra starts this listener during initialization and reconnects it if it drops, so no cron job or extra route is needed on a long-running server. Set `gateway: false` on the adapter config to turn it off when you use webhooks:
|
|
175
317
|
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
3
|
+
# Elasticsearch
|
|
4
|
+
|
|
5
|
+
The Elasticsearch storage implementation provides agent memory, workflow snapshot, and score storage on top of an Elasticsearch cluster using the official [`@elastic/elasticsearch`](https://github.com/elastic/elasticsearch-js) client. It shares the same connection configuration as `ElasticSearchVector`, so a single cluster (and even a single client instance) can serve both agent memory and semantic recall.
|
|
6
|
+
|
|
7
|
+
`ElasticSearchStore` currently implements the `memory`, `workflows`, and `scores` storage domains.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @mastra/elasticsearch
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
### Using a URL
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { ElasticSearchStore } from '@mastra/elasticsearch'
|
|
21
|
+
|
|
22
|
+
const storage = new ElasticSearchStore({
|
|
23
|
+
id: 'elasticsearch-storage',
|
|
24
|
+
url: 'http://localhost:9200',
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
await storage.init()
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Using authentication
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
import { ElasticSearchStore } from '@mastra/elasticsearch'
|
|
34
|
+
|
|
35
|
+
const storage = new ElasticSearchStore({
|
|
36
|
+
id: 'elasticsearch-storage',
|
|
37
|
+
url: 'https://my-cluster.example.com:9200',
|
|
38
|
+
auth: { apiKey: process.env.ELASTICSEARCH_API_KEY! },
|
|
39
|
+
})
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`auth` also accepts `{ username, password }` or `{ bearer }`.
|
|
43
|
+
|
|
44
|
+
### Using a pre-configured client
|
|
45
|
+
|
|
46
|
+
For advanced configurations (cloud IDs, TLS options, custom transport), pass a pre-configured client. The same client can be shared with `ElasticSearchVector`:
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
import { Client } from '@elastic/elasticsearch'
|
|
50
|
+
import { ElasticSearchStore, ElasticSearchVector } from '@mastra/elasticsearch'
|
|
51
|
+
|
|
52
|
+
const client = new Client({
|
|
53
|
+
node: 'https://my-cluster.example.com:9200',
|
|
54
|
+
auth: { apiKey: process.env.ELASTICSEARCH_API_KEY! },
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
const storage = new ElasticSearchStore({ id: 'elasticsearch-storage', client })
|
|
58
|
+
const vector = new ElasticSearchVector({ id: 'elasticsearch-vector', client })
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
When you provide your own client, `storage.close()` does not close it — you remain responsible for its lifecycle.
|
|
62
|
+
|
|
63
|
+
## Parameters
|
|
64
|
+
|
|
65
|
+
**id** (`string`): Unique identifier for the storage instance
|
|
66
|
+
|
|
67
|
+
**url** (`string`): Elasticsearch node URL (e.g., http\://localhost:9200)
|
|
68
|
+
|
|
69
|
+
**auth** (`ElasticSearchAuth`): Authentication options: { apiKey }, { username, password }, or { bearer }
|
|
70
|
+
|
|
71
|
+
**client** (`Client`): Pre-configured Elasticsearch client (from @elastic/elasticsearch) for advanced setups
|
|
72
|
+
|
|
73
|
+
**disableInit** (`boolean`): Disable automatic initialization; call storage.init() explicitly before use
|
|
74
|
+
|
|
75
|
+
> **Note:** You must provide either `url` or `client`. These options are mutually exclusive.
|
|
76
|
+
|
|
77
|
+
## Additional Notes
|
|
78
|
+
|
|
79
|
+
### Index Structure
|
|
80
|
+
|
|
81
|
+
Each Mastra storage table maps to one Elasticsearch index of the same name (for example `mastra_threads`, `mastra_messages`, `mastra_workflow_snapshot`, `mastra_scorers`). Records are stored as opaque JSON documents with a keyword `key` field, so no index mappings need to be managed manually — indexes are created on first use.
|
|
82
|
+
|
|
83
|
+
### Consistency
|
|
84
|
+
|
|
85
|
+
Elasticsearch search is near-real-time. All writes are performed with an immediate refresh so subsequent reads and searches observe them, and point reads use real-time get-by-ID lookups.
|
|
86
|
+
|
|
87
|
+
### Closing Connections
|
|
88
|
+
|
|
89
|
+
When shutting down your application, close the connection:
|
|
90
|
+
|
|
91
|
+
```typescript
|
|
92
|
+
await storage.close()
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
This only closes clients created by `ElasticSearchStore` from a `url`; user-provided clients are left open.
|
|
96
|
+
|
|
97
|
+
## Usage Example
|
|
98
|
+
|
|
99
|
+
### Adding memory to an agent
|
|
100
|
+
|
|
101
|
+
```typescript
|
|
102
|
+
import { Memory } from '@mastra/memory'
|
|
103
|
+
import { Agent } from '@mastra/core/agent'
|
|
104
|
+
import { ElasticSearchStore } from '@mastra/elasticsearch'
|
|
105
|
+
|
|
106
|
+
export const elasticsearchAgent = new Agent({
|
|
107
|
+
id: 'elasticsearch-agent',
|
|
108
|
+
name: 'Elasticsearch Agent',
|
|
109
|
+
instructions:
|
|
110
|
+
'You are an AI agent with the ability to automatically recall memories from previous interactions.',
|
|
111
|
+
model: 'openai/gpt-5.6-sol',
|
|
112
|
+
memory: new Memory({
|
|
113
|
+
storage: new ElasticSearchStore({
|
|
114
|
+
id: 'elasticsearch-agent-storage',
|
|
115
|
+
url: process.env.ELASTICSEARCH_URL!,
|
|
116
|
+
auth: { apiKey: process.env.ELASTICSEARCH_API_KEY! },
|
|
117
|
+
}),
|
|
118
|
+
options: {
|
|
119
|
+
lastMessages: 10,
|
|
120
|
+
},
|
|
121
|
+
}),
|
|
122
|
+
})
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Using with Mastra instance
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
import { Mastra } from '@mastra/core'
|
|
129
|
+
import { ElasticSearchStore } from '@mastra/elasticsearch'
|
|
130
|
+
|
|
131
|
+
const storage = new ElasticSearchStore({
|
|
132
|
+
id: 'mastra-storage',
|
|
133
|
+
url: 'http://localhost:9200',
|
|
134
|
+
})
|
|
135
|
+
|
|
136
|
+
const mastra = new Mastra({
|
|
137
|
+
storage, // init() called automatically
|
|
138
|
+
})
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
If using storage directly without Mastra, call `init()` explicitly:
|
|
142
|
+
|
|
143
|
+
```typescript
|
|
144
|
+
import { ElasticSearchStore } from '@mastra/elasticsearch'
|
|
145
|
+
|
|
146
|
+
const storage = new ElasticSearchStore({
|
|
147
|
+
id: 'elasticsearch-storage',
|
|
148
|
+
url: 'http://localhost:9200',
|
|
149
|
+
})
|
|
150
|
+
|
|
151
|
+
await storage.init()
|
|
152
|
+
|
|
153
|
+
// Access domain-specific stores via getStore()
|
|
154
|
+
const memoryStore = await storage.getStore('memory')
|
|
155
|
+
const thread = await memoryStore?.getThreadById({ threadId: '...' })
|
|
156
|
+
```
|
|
@@ -89,12 +89,28 @@ storage: new LibSQLStore({
|
|
|
89
89
|
|
|
90
90
|
> **Warning:** In-memory storage resets when the process changes. Only suitable for development.
|
|
91
91
|
|
|
92
|
+
Embedded replica synced with a remote primary (for example Turso):
|
|
93
|
+
|
|
94
|
+
```typescript
|
|
95
|
+
storage: new LibSQLStore({
|
|
96
|
+
id: 'libsql-storage',
|
|
97
|
+
url: 'file:./replica.db',
|
|
98
|
+
syncUrl: 'libsql://your-db-name.aws-ap-northeast-1.turso.io',
|
|
99
|
+
authToken: process.env.TURSO_AUTH_TOKEN,
|
|
100
|
+
syncInterval: 60,
|
|
101
|
+
})
|
|
102
|
+
```
|
|
103
|
+
|
|
92
104
|
## Options
|
|
93
105
|
|
|
94
106
|
**url** (`string`): Database URL. Use :memory: for in-memory database, file:filename.db for a file database, or a libSQL connection string (e.g., libsql://your-database.turso.io) for remote storage.
|
|
95
107
|
|
|
96
108
|
**authToken** (`string`): Authentication token for remote libSQL databases.
|
|
97
109
|
|
|
110
|
+
**syncUrl** (`string`): URL of the remote primary database to sync from, enabling an embedded replica. Requires a local file: url.
|
|
111
|
+
|
|
112
|
+
**syncInterval** (`number`): Interval in seconds for automatic sync with the remote primary. Only applies when syncUrl is set.
|
|
113
|
+
|
|
98
114
|
## Managed tables
|
|
99
115
|
|
|
100
116
|
The storage implementation creates the core storage tables automatically, including `mastra_notifications` for notification inbox records and delivery metadata.
|
|
@@ -148,6 +148,30 @@ PostgreSQL supports observability and can handle low trace volumes. Throughput c
|
|
|
148
148
|
|
|
149
149
|
`PostgresStoreVNext` uses the `event-sourced` [tracing strategy](https://mastra.ai/docs/observability/integrations/exporters/mastra-storage) instead. It writes one row when a span starts and another when it ends, never updating a row in place, and collapses those rows when a trace is read. Writes stay append-only, and traces appear in Studio while the run is still executing.
|
|
150
150
|
|
|
151
|
+
#### Filter suggestions
|
|
152
|
+
|
|
153
|
+
Studio's Traces, Logs, and Metrics pages offer filter values (tags, service names, environments, entity names, metric names and labels) discovered from your observability data. Those values are cached in the database and recomputed in the background when the cache goes stale.
|
|
154
|
+
|
|
155
|
+
To keep the refresh cheap on large datasets, it only scans events from the last 30 days. Values that appear exclusively in older events won't be suggested, though filtering by them still works. Use `discovery` to change the window or how often it refreshes:
|
|
156
|
+
|
|
157
|
+
```typescript
|
|
158
|
+
import { PostgresStoreVNext } from '@mastra/pg'
|
|
159
|
+
|
|
160
|
+
const storage = new PostgresStoreVNext({
|
|
161
|
+
id: 'pg-storage',
|
|
162
|
+
connectionString: process.env.DATABASE_URL,
|
|
163
|
+
observability: {
|
|
164
|
+
connectionString: process.env.OBSERVABILITY_DATABASE_URL,
|
|
165
|
+
discovery: {
|
|
166
|
+
lookbackSeconds: 7 * 24 * 60 * 60, // scan the last 7 days; 0 scans all history
|
|
167
|
+
ttlSeconds: 15 * 60, // refresh at most every 15 minutes
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
})
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Lower `lookbackSeconds` if refreshes are slow, and raise `ttlSeconds` if they run more often than your filter values change. Only one process refreshes a given cache entry at a time, so adding server instances doesn't multiply the work.
|
|
174
|
+
|
|
151
175
|
### Initialization
|
|
152
176
|
|
|
153
177
|
When you pass storage to the Mastra class, `init()` is called automatically before any storage operation:
|
package/.docs/integrations.md
CHANGED
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
- [Convex](https://mastra.ai/integrations/databases/convex)
|
|
70
70
|
- [DuckDB](https://mastra.ai/integrations/databases/duckdb)
|
|
71
71
|
- [DynamoDB](https://mastra.ai/integrations/databases/dynamodb)
|
|
72
|
+
- [Elasticsearch](https://mastra.ai/integrations/databases/elasticsearch)
|
|
72
73
|
- [Google Cloud Spanner](https://mastra.ai/integrations/databases/spanner)
|
|
73
74
|
- [LanceDB](https://mastra.ai/integrations/databases/lancedb)
|
|
74
75
|
- [libSQL](https://mastra.ai/integrations/databases/libsql)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Netlify
|
|
4
4
|
|
|
5
|
-
Netlify AI Gateway provides unified access to multiple providers with built-in caching and observability. Access
|
|
5
|
+
Netlify AI Gateway provides unified access to multiple providers with built-in caching and observability. Access 233 models through Mastra's model router.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Netlify documentation](https://docs.netlify.com/build/ai-gateway/overview/).
|
|
8
8
|
|
|
@@ -161,6 +161,7 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
161
161
|
| `openrouter/minimax/minimax-m2.5` |
|
|
162
162
|
| `openrouter/minimax/minimax-m2.7` |
|
|
163
163
|
| `openrouter/minimax/minimax-m3` |
|
|
164
|
+
| `openrouter/mistralai/codestral-2508` |
|
|
164
165
|
| `openrouter/mistralai/devstral-2512` |
|
|
165
166
|
| `openrouter/mistralai/ministral-14b-2512` |
|
|
166
167
|
| `openrouter/mistralai/ministral-3b-2512` |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Vercel
|
|
4
4
|
|
|
5
|
-
Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access
|
|
5
|
+
Vercel aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 348 models through Mastra's model router.
|
|
6
6
|
|
|
7
7
|
Learn more in the [Vercel documentation](https://ai-sdk.dev/providers/ai-sdk-providers).
|
|
8
8
|
|
|
@@ -96,7 +96,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
96
96
|
| `anthropic/claude-sonnet-4.6` |
|
|
97
97
|
| `anthropic/claude-sonnet-5` |
|
|
98
98
|
| `arcee-ai/trinity-large-thinking` |
|
|
99
|
-
| `arcee-ai/trinity-mini` |
|
|
100
99
|
| `bfl/flux-2-flex` |
|
|
101
100
|
| `bfl/flux-2-klein-4b` |
|
|
102
101
|
| `bfl/flux-2-klein-9b` |
|
|
@@ -210,8 +209,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
210
209
|
| `mistral/codestral-embed` |
|
|
211
210
|
| `mistral/devstral-2` |
|
|
212
211
|
| `mistral/devstral-small-2` |
|
|
213
|
-
| `mistral/magistral-medium` |
|
|
214
|
-
| `mistral/magistral-small` |
|
|
215
212
|
| `mistral/ministral-14b` |
|
|
216
213
|
| `mistral/ministral-3b` |
|
|
217
214
|
| `mistral/ministral-8b` |
|
|
@@ -251,7 +248,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
251
248
|
| `openai/gpt-4o-fast` |
|
|
252
249
|
| `openai/gpt-4o-mini` |
|
|
253
250
|
| `openai/gpt-4o-mini-fast` |
|
|
254
|
-
| `openai/gpt-4o-mini-search-preview` |
|
|
255
251
|
| `openai/gpt-4o-mini-transcribe` |
|
|
256
252
|
| `openai/gpt-4o-transcribe` |
|
|
257
253
|
| `openai/gpt-5` |
|
|
@@ -301,7 +297,6 @@ ANTHROPIC_API_KEY=ant-...
|
|
|
301
297
|
| `openai/gpt-realtime-whisper` |
|
|
302
298
|
| `openai/o1` |
|
|
303
299
|
| `openai/o3` |
|
|
304
|
-
| `openai/o3-deep-research` |
|
|
305
300
|
| `openai/o3-fast` |
|
|
306
301
|
| `openai/o3-mini` |
|
|
307
302
|
| `openai/o3-pro` |
|
package/.docs/models/index.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Model Providers
|
|
4
4
|
|
|
5
|
-
Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to
|
|
5
|
+
Mastra provides a unified interface for working with LLMs across multiple providers, giving you access to 6819 models from 182 providers through a single API.
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
@@ -104,9 +104,9 @@ for await (const chunk of stream) {
|
|
|
104
104
|
| `digitalocean/openai-gpt-5.4-nano` | 400K | | | | | | $0.20 | $1 |
|
|
105
105
|
| `digitalocean/openai-gpt-5.4-pro` | 1.1M | | | | | | $30 | $180 |
|
|
106
106
|
| `digitalocean/openai-gpt-5.5` | 1.0M | | | | | | $5 | $30 |
|
|
107
|
-
| `digitalocean/openai-gpt-5.6-luna` | 1.1M | | | | | | $0.
|
|
108
|
-
| `digitalocean/openai-gpt-5.6-sol` | 1.1M | | | | | | $
|
|
109
|
-
| `digitalocean/openai-gpt-5.6-terra` | 1.1M | | | | | | $
|
|
107
|
+
| `digitalocean/openai-gpt-5.6-luna` | 1.1M | | | | | | $0.10 | $0.60 |
|
|
108
|
+
| `digitalocean/openai-gpt-5.6-sol` | 1.1M | | | | | | $2 | $10 |
|
|
109
|
+
| `digitalocean/openai-gpt-5.6-terra` | 1.1M | | | | | | $1 | $6 |
|
|
110
110
|
| `digitalocean/openai-gpt-image-1` | — | | | | | | $5 | $40 |
|
|
111
111
|
| `digitalocean/openai-gpt-image-1.5` | — | | | | | | $5 | $10 |
|
|
112
112
|
| `digitalocean/openai-gpt-image-2` | — | | | | | | $8 | $30 |
|
|
@@ -37,17 +37,17 @@ for await (const chunk of stream) {
|
|
|
37
37
|
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|
|
38
38
|
| ---------------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
|
|
39
39
|
| `hyper/deepseek-v4-flash` | 1.0M | | | | | | $0.20 | $0.40 |
|
|
40
|
-
| `hyper/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.
|
|
40
|
+
| `hyper/deepseek-v4-flash-0731` | 1.0M | | | | | | $0.44 | $1 |
|
|
41
41
|
| `hyper/deepseek-v4-pro` | 1.0M | | | | | | $2 | $5 |
|
|
42
42
|
| `hyper/deepseek-v4-pro-0813` | 1.0M | | | | | | $1 | $4 |
|
|
43
43
|
| `hyper/gemma-4-26b-a4b-it` | 256K | | | | | | $0.11 | $0.41 |
|
|
44
44
|
| `hyper/glm-5` | 203K | | | | | | $0.86 | $3 |
|
|
45
45
|
| `hyper/glm-5.1` | 203K | | | | | | $1 | $4 |
|
|
46
46
|
| `hyper/glm-5.2` | 1.0M | | | | | | $2 | $5 |
|
|
47
|
-
| `hyper/gpt-oss-120b` |
|
|
47
|
+
| `hyper/gpt-oss-120b` | 128K | | | | | | $0.18 | $0.68 |
|
|
48
48
|
| `hyper/kimi-k2.5` | 262K | | | | | | $0.54 | $3 |
|
|
49
49
|
| `hyper/kimi-k2.6` | 262K | | | | | | $1 | $4 |
|
|
50
|
-
| `hyper/kimi-k2.7-code` |
|
|
50
|
+
| `hyper/kimi-k2.7-code` | 262K | | | | | | $1 | $4 |
|
|
51
51
|
| `hyper/kimi-k3` | 1.0M | | | | | | $3 | $16 |
|
|
52
52
|
| `hyper/llama-3.3-70b-instruct` | 128K | | | | | | $0.60 | $0.74 |
|
|
53
53
|
| `hyper/llama-4-maverick-17b-128e-instruct-fp8` | 430K | | | | | | $0.27 | $0.90 |
|
|
@@ -40,7 +40,7 @@ for await (const chunk of stream) {
|
|
|
40
40
|
| `kilo/~anthropic/claude-haiku-latest` | 200K | | | | | | $1 | $5 |
|
|
41
41
|
| `kilo/~anthropic/claude-opus-latest` | 1.0M | | | | | | $5 | $25 |
|
|
42
42
|
| `kilo/~anthropic/claude-sonnet-latest` | 1.0M | | | | | | $2 | $10 |
|
|
43
|
-
| `kilo/~deepseek/deepseek-v4-flash-latest` | 1.0M | | | | | | $0.04 | $0.
|
|
43
|
+
| `kilo/~deepseek/deepseek-v4-flash-latest` | 1.0M | | | | | | $0.04 | $0.12 |
|
|
44
44
|
| `kilo/~google/gemini-flash-latest` | 1.0M | | | | | | $0.38 | $2 |
|
|
45
45
|
| `kilo/~google/gemini-pro-latest` | 1.0M | | | | | | $2 | $12 |
|
|
46
46
|
| `kilo/~moonshotai/kimi-latest` | 975K | | | | | | $3 | $13 |
|
|
@@ -374,8 +374,8 @@ for await (const chunk of stream) {
|
|
|
374
374
|
| `kilo/thedrummer/unslopnemo-12b` | 33K | | | | | | $0.40 | $0.40 |
|
|
375
375
|
| `kilo/thinkingmachines/inkling` | 524K | | | | | | $0.95 | $4 |
|
|
376
376
|
| `kilo/thinkingmachines/inkling-small` | 524K | | | | | | $0.45 | $1 |
|
|
377
|
-
| `kilo/thinkingmachines/inkling-small:free` |
|
|
378
|
-
| `kilo/thinkingmachines/inkling:free` |
|
|
377
|
+
| `kilo/thinkingmachines/inkling-small:free` | 1.0M | | | | | | — | — |
|
|
378
|
+
| `kilo/thinkingmachines/inkling:free` | 1.0M | | | | | | — | — |
|
|
379
379
|
| `kilo/undi95/remm-slerp-l2-13b` | 6K | | | | | | $0.45 | $0.65 |
|
|
380
380
|
| `kilo/upstage/solar-pro-3` | 131K | | | | | | $0.15 | $0.60 |
|
|
381
381
|
| `kilo/upstage/solar-pro4` | 524K | | | | | | $0.30 | $1 |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# LLM Gateway
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 377 LLM Gateway models through Mastra's model router. Authentication is handled automatically using the `LLMGATEWAY_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [LLM Gateway documentation](https://llmgateway.io/docs).
|
|
8
8
|
|
|
@@ -97,6 +97,12 @@ for await (const chunk of stream) {
|
|
|
97
97
|
| `llmgateway-providers/azure-ai-foundry/grok-4-1-fast-non-reasoning` | 2.0M | | | | | | $0.20 | $0.50 |
|
|
98
98
|
| `llmgateway-providers/azure-ai-foundry/grok-4-1-fast-reasoning` | 2.0M | | | | | | $0.20 | $0.50 |
|
|
99
99
|
| `llmgateway-providers/azure-ai-foundry/grok-4-3` | 20K | | | | | | $1 | $3 |
|
|
100
|
+
| `llmgateway-providers/azure-anthropic/claude-fable-5` | 1.0M | | | | | | $10 | $50 |
|
|
101
|
+
| `llmgateway-providers/azure-anthropic/claude-opus-4-6` | 1.0M | | | | | | $5 | $25 |
|
|
102
|
+
| `llmgateway-providers/azure-anthropic/claude-opus-4-7` | 1.0M | | | | | | $5 | $25 |
|
|
103
|
+
| `llmgateway-providers/azure-anthropic/claude-opus-4-8` | 1.0M | | | | | | $5 | $25 |
|
|
104
|
+
| `llmgateway-providers/azure-anthropic/claude-opus-5` | 1.0M | | | | | | $5 | $25 |
|
|
105
|
+
| `llmgateway-providers/azure-anthropic/claude-sonnet-5` | 1.0M | | | | | | $2 | $10 |
|
|
100
106
|
| `llmgateway-providers/azure/gpt-3.5-turbo` | 16K | | | | | | $0.50 | $2 |
|
|
101
107
|
| `llmgateway-providers/azure/gpt-4` | 8K | | | | | | $30 | $60 |
|
|
102
108
|
| `llmgateway-providers/azure/gpt-4-turbo` | 128K | | | | | | $10 | $30 |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# NanoGPT
|
|
4
4
|
|
|
5
|
-
Access
|
|
5
|
+
Access 606 NanoGPT models through Mastra's model router. Authentication is handled automatically using the `NANO_GPT_API_KEY` environment variable.
|
|
6
6
|
|
|
7
7
|
Learn more in the [NanoGPT documentation](https://docs.nano-gpt.com).
|
|
8
8
|
|
|
@@ -211,6 +211,7 @@ for await (const chunk of stream) {
|
|
|
211
211
|
| `nano-gpt/Gemma-4-31B-DarkIdol` | 262K | | | | | | $0.31 | $0.31 |
|
|
212
212
|
| `nano-gpt/Gemma-4-31B-GarnetV2` | 262K | | | | | | $0.31 | $0.31 |
|
|
213
213
|
| `nano-gpt/Gemma-4-31B-MeroMero-v2` | 66K | | | | | | $0.08 | $0.33 |
|
|
214
|
+
| `nano-gpt/Gemma-4-31B-MeroMero-v2:thinking` | 66K | | | | | | $0.08 | $0.33 |
|
|
214
215
|
| `nano-gpt/Gemma-4-31B-Queen` | 262K | | | | | | $0.31 | $0.31 |
|
|
215
216
|
| `nano-gpt/gemma-4-e2b-it` | 131K | | | | | | $0.02 | $0.10 |
|
|
216
217
|
| `nano-gpt/gemma-4-e4b-it` | 131K | | | | | | $0.04 | $0.20 |
|
|
@@ -246,6 +247,7 @@ for await (const chunk of stream) {
|
|
|
246
247
|
| `nano-gpt/google/gemma-4-26b-a4b-it` | 262K | | | | | | $0.08 | $0.33 |
|
|
247
248
|
| `nano-gpt/google/gemma-4-26b-a4b-it:thinking` | 262K | | | | | | $0.13 | $0.40 |
|
|
248
249
|
| `nano-gpt/google/gemma-4-26b-a4b-uncensored` | 131K | | | | | | $0.08 | $0.33 |
|
|
250
|
+
| `nano-gpt/google/gemma-4-26b-a4b-uncensored:thinking` | 131K | | | | | | $0.08 | $0.33 |
|
|
249
251
|
| `nano-gpt/google/gemma-4-31b-it` | 262K | | | | | | $0.08 | $0.33 |
|
|
250
252
|
| `nano-gpt/google/gemma-4-31b-it:thinking` | 262K | | | | | | $0.10 | $0.35 |
|
|
251
253
|
| `nano-gpt/Gryphe/MythoMax-L2-13b` | 4K | | | | | | $0.10 | $0.10 |
|
|
@@ -260,11 +262,8 @@ for await (const chunk of stream) {
|
|
|
260
262
|
| `nano-gpt/huihui-ai/Qwen2.5-32B-Instruct-abliterated` | 33K | | | | | | $0.70 | $0.70 |
|
|
261
263
|
| `nano-gpt/hunyuan-turbos-20250226` | 24K | | | | | | $0.19 | $0.37 |
|
|
262
264
|
| `nano-gpt/ibm-granite/granite-4.1-8b` | 131K | | | | | | $0.05 | $0.10 |
|
|
263
|
-
| `nano-gpt/inclusionai/ling-2.6-1t` | 262K | | | | | | $0.30 | $3 |
|
|
264
|
-
| `nano-gpt/inclusionai/ling-2.6-flash` | 262K | | | | | | $0.10 | $0.30 |
|
|
265
265
|
| `nano-gpt/inclusionai/ling-3.0-flash` | 262K | | | | | | $0.07 | $0.22 |
|
|
266
266
|
| `nano-gpt/inclusionai/ling-3.0-flash:thinking` | 262K | | | | | | $0.07 | $0.22 |
|
|
267
|
-
| `nano-gpt/inclusionai/ring-2.6-1t` | 262K | | | | | | $0.30 | $3 |
|
|
268
267
|
| `nano-gpt/inflatebot/MN-12B-Mag-Mell-R1` | 16K | | | | | | $0.49 | $0.49 |
|
|
269
268
|
| `nano-gpt/inflection/inflection-3-pi` | 8K | | | | | | $2 | $10 |
|
|
270
269
|
| `nano-gpt/inflection/inflection-3-productivity` | 8K | | | | | | $2 | $10 |
|
|
@@ -403,12 +402,12 @@ for await (const chunk of stream) {
|
|
|
403
402
|
| `nano-gpt/openai/gpt-5.5` | 1.0M | | | | | | $5 | $30 |
|
|
404
403
|
| `nano-gpt/openai/gpt-5.6-luna` | 1.1M | | | | | | $0.10 | $0.60 |
|
|
405
404
|
| `nano-gpt/openai/gpt-5.6-luna-pro` | 1.1M | | | | | | $0.10 | $0.60 |
|
|
406
|
-
| `nano-gpt/openai/gpt-5.6-sol` | 1.1M | | | | | | $
|
|
407
|
-
| `nano-gpt/openai/gpt-5.6-sol-pro` | 1.1M | | | | | | $
|
|
405
|
+
| `nano-gpt/openai/gpt-5.6-sol` | 1.1M | | | | | | $2 | $10 |
|
|
406
|
+
| `nano-gpt/openai/gpt-5.6-sol-pro` | 1.1M | | | | | | $2 | $10 |
|
|
408
407
|
| `nano-gpt/openai/gpt-5.6-terra` | 1.1M | | | | | | $1 | $6 |
|
|
409
408
|
| `nano-gpt/openai/gpt-5.6-terra-pro` | 1.1M | | | | | | $1 | $6 |
|
|
410
|
-
| `nano-gpt/openai/gpt-chat-latest` | 1.1M | | | | | | $
|
|
411
|
-
| `nano-gpt/openai/gpt-latest` | 1.1M | | | | | | $
|
|
409
|
+
| `nano-gpt/openai/gpt-chat-latest` | 1.1M | | | | | | $2 | $10 |
|
|
410
|
+
| `nano-gpt/openai/gpt-latest` | 1.1M | | | | | | $2 | $10 |
|
|
412
411
|
| `nano-gpt/openai/gpt-oss-120b` | 128K | | | | | | $0.35 | $0.75 |
|
|
413
412
|
| `nano-gpt/openai/gpt-oss-20b` | 128K | | | | | | $0.20 | $0.30 |
|
|
414
413
|
| `nano-gpt/openai/gpt-oss-safeguard-20b` | 128K | | | | | | $0.07 | $0.30 |
|
|
@@ -426,7 +425,10 @@ for await (const chunk of stream) {
|
|
|
426
425
|
| `nano-gpt/openai/o4-mini-high` | 200K | | | | | | $1 | $4 |
|
|
427
426
|
| `nano-gpt/ornith-ai/ornith-1.5-35b-a3b` | 262K | | | | | | $0.10 | $0.40 |
|
|
428
427
|
| `nano-gpt/ornith-ai/ornith-1.5-35b-a3b:thinking` | 262K | | | | | | $0.10 | $0.40 |
|
|
428
|
+
| `nano-gpt/ornith-ai/ornith-1.5-397b` | 262K | | | | | | $0.90 | $4 |
|
|
429
|
+
| `nano-gpt/ornith-ai/ornith-1.5-397b:thinking` | 262K | | | | | | $0.90 | $4 |
|
|
429
430
|
| `nano-gpt/ornith-ai/ornith-1.5-9b` | 131K | | | | | | $0.05 | $0.10 |
|
|
431
|
+
| `nano-gpt/ornith-ai/ornith-1.5-9b:thinking` | 131K | | | | | | $0.05 | $0.10 |
|
|
430
432
|
| `nano-gpt/pamanseau/OpenReasoning-Nemotron-32B` | 33K | | | | | | $0.10 | $0.40 |
|
|
431
433
|
| `nano-gpt/perceptron/perceptron-mk1` | 33K | | | | | | $0.15 | $2 |
|
|
432
434
|
| `nano-gpt/perplexity-academic-researcher` | 127K | | | | | | $2 | $8 |
|
|
@@ -466,8 +468,10 @@ for await (const chunk of stream) {
|
|
|
466
468
|
| `nano-gpt/qwen/qwen3.5-plus-thinking` | 984K | | | | | | $0.40 | $2 |
|
|
467
469
|
| `nano-gpt/qwen/Qwen3.6-35B-A3B` | 262K | | | | | | $0.11 | $0.80 |
|
|
468
470
|
| `nano-gpt/qwen/qwen3.6-35b-a3b-uncensored` | 66K | | | | | | $0.15 | $0.50 |
|
|
471
|
+
| `nano-gpt/qwen/qwen3.6-35b-a3b-uncensored:thinking` | 66K | | | | | | $0.15 | $0.50 |
|
|
469
472
|
| `nano-gpt/qwen/Qwen3.6-35B-A3B:thinking` | 262K | | | | | | $0.11 | $0.80 |
|
|
470
|
-
| `nano-gpt/qwen/qwen3.8-27b-
|
|
473
|
+
| `nano-gpt/qwen/qwen3.8-27b-obliterated` | 262K | | | | | | $0.18 | $0.50 |
|
|
474
|
+
| `nano-gpt/qwen/qwen3.8-27b-obliterated:thinking` | 262K | | | | | | $0.18 | $0.50 |
|
|
471
475
|
| `nano-gpt/qwen25-vl-72b-instruct` | 32K | | | | | | $0.70 | $0.70 |
|
|
472
476
|
| `nano-gpt/qwen3-30b-a3b-instruct-2507` | 256K | | | | | | $0.20 | $0.50 |
|
|
473
477
|
| `nano-gpt/qwen3-coder-30b-a3b-instruct` | 128K | | | | | | $0.10 | $0.40 |
|
|
@@ -555,6 +559,7 @@ for await (const chunk of stream) {
|
|
|
555
559
|
| `nano-gpt/TEE/qwen3.6-27b` | 262K | | | | | | $0.32 | $3 |
|
|
556
560
|
| `nano-gpt/TEE/qwen3.6-35b-a3b` | 262K | | | | | | $0.20 | $1 |
|
|
557
561
|
| `nano-gpt/TEE/qwen3.6-35b-a3b-uncensored` | 131K | | | | | | $0.30 | $2 |
|
|
562
|
+
| `nano-gpt/TEE/qwen3.8-27b` | 262K | | | | | | $0.40 | $3 |
|
|
558
563
|
| `nano-gpt/tencent/Hunyuan-MT-7B` | 8K | | | | | | $10 | $20 |
|
|
559
564
|
| `nano-gpt/tencent/hy3` | 262K | | | | | | $0.07 | $0.26 |
|
|
560
565
|
| `nano-gpt/TheDrummer/Anubis-70B-v1` | 66K | | | | | | $0.31 | $0.31 |
|
|
@@ -162,7 +162,7 @@ const agent = new Agent({
|
|
|
162
162
|
|
|
163
163
|
## Custom typing status
|
|
164
164
|
|
|
165
|
-
Pass a function to `typingStatus` to customize the status copy. The function is called once per stream chunk; return a string to set the status, or `false` / `null` / `undefined` to leave the current status unchanged. Return values are de-duplicated so the platform only sees a call when the status changes.
|
|
165
|
+
Pass a function to `typingStatus` to customize the status copy. The function is called once per stream chunk; return a string to set the status, or `false` / `null` / `undefined` to leave the current status unchanged. Return values are de-duplicated so the platform only sees a call when the status changes. When the run ends, any status it set is cleared automatically so runs that finish without posting a message don't leave a stale status on the thread.
|
|
166
166
|
|
|
167
167
|
`defaultTypingStatus` is exported from `@mastra/core/channels` so you can fall back to the built-in defaults for chunks you don't handle.
|
|
168
168
|
|
|
@@ -82,7 +82,7 @@ const stream = await agent.stream('message for agent')
|
|
|
82
82
|
|
|
83
83
|
**options.onAbort** (`(event: { steps: any[]; text?: string }) => Promise<void> | void`): Callback function called when the stream is aborted. steps contains the steps that completed before the abort, and text contains the assistant text streamed so far for the step that was in flight.
|
|
84
84
|
|
|
85
|
-
**options.abortSignal** (`AbortSignal`): Signal object that allows you to abort the agent's execution. When
|
|
85
|
+
**options.abortSignal** (`AbortSignal`): Signal object that allows you to abort the agent's execution, including in-flight subagent runs. Canceled runs continue through output processors. When writable memory is configured, built-in memory processors persist submitted messages, completed tool results, and assistant output available when terminal processing runs. Output that doesn't reach terminal processing isn't persisted. Custom output processors can transform or interrupt this behavior before memory processors run.
|
|
86
86
|
|
|
87
87
|
**options.activeTools** (`Array<keyof ToolSet> | undefined`): Array of active tool names that can be used during execution.
|
|
88
88
|
|
|
@@ -180,8 +180,6 @@ const stream = await agent.stream('message for agent')
|
|
|
180
180
|
|
|
181
181
|
**options.savePerStep** (`boolean`): Save messages incrementally after each stream step completes (default: false).
|
|
182
182
|
|
|
183
|
-
**options.persistPartialOnAbort** (`boolean`): Save the assistant text that was streamed before an abort to memory (default: false). Only text emitted before the abort is persisted; output a provider keeps producing after cancellation is discarded, and nothing is saved when no text was streamed.
|
|
184
|
-
|
|
185
183
|
**options.requireToolApproval** (`boolean`): When true, all tool calls require explicit approval before execution. The stream will emit tool-call-approval chunks and pause until approveToolCall() or declineToolCall() is called.
|
|
186
184
|
|
|
187
185
|
**options.autoResumeSuspendedTools** (`boolean`): When true, automatically resumes suspended tools when the user sends a new message on the same thread. The agent extracts resumeData from the user's message based on the tool's resumeSchema. Requires memory to be configured.
|
|
@@ -69,12 +69,40 @@ const result = await sandbox.executeCommand('npm', ['install', 'lodash'])
|
|
|
69
69
|
|
|
70
70
|
**options.cwd** (`string`): Working directory for the command
|
|
71
71
|
|
|
72
|
-
**options.env** (`Record<string, string>`): Additional environment variables
|
|
72
|
+
**options.env** (`Record<string, string>`): Additional environment variables for this command. These take precedence over the sandbox environment for this command execution only.
|
|
73
73
|
|
|
74
74
|
**options.onStdout** (`(data: string) => void`): Callback for stdout streaming
|
|
75
75
|
|
|
76
76
|
**options.onStderr** (`(data: string) => void`): Callback for stderr streaming
|
|
77
77
|
|
|
78
|
+
### `setEnv(update)`
|
|
79
|
+
|
|
80
|
+
Update the sandbox's runtime environment. These values are merged into every command the sandbox runs, including `executeCommand()` and `processes.spawn()`, so credentials installed or rotated after the sandbox was created reach every subsequent command. Optional, so check for support or use optional chaining.
|
|
81
|
+
|
|
82
|
+
```typescript
|
|
83
|
+
sandbox.setEnv?.(env => ({ ...env, GH_TOKEN: token }))
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The updater receives a copy of the current environment and returns the replacement, so a single call can set, unset, or batch-update variables. Removing a key removes it from the sandbox's runtime environment only, so values the provider supplies on its own still apply. Seed the initial values with the `env` constructor option.
|
|
87
|
+
|
|
88
|
+
The runtime environment applies to commands executed through the sandbox rather than to the VM's own environment, so it's never written into the VM and survives provider pause and resume. When a command runs, provider defaults are applied first, the sandbox's runtime environment overrides them, and the per-call `env` option on `executeCommand()` wins over both.
|
|
89
|
+
|
|
90
|
+
**Parameters:**
|
|
91
|
+
|
|
92
|
+
**update** (`(env: Record<string, string | undefined>) => Record<string, string | undefined>`): Receives a copy of the sandbox's current runtime environment and returns the replacement.
|
|
93
|
+
|
|
94
|
+
**Returns:** `void`
|
|
95
|
+
|
|
96
|
+
### `getEnv()`
|
|
97
|
+
|
|
98
|
+
Returns a copy of the sandbox's current runtime environment. Mutating the returned object doesn't change the sandbox, so use `setEnv()` for updates.
|
|
99
|
+
|
|
100
|
+
```typescript
|
|
101
|
+
const token = sandbox.getEnv().GH_TOKEN
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Returns:** `Record<string, string | undefined>`
|
|
105
|
+
|
|
78
106
|
### `getInfo()`
|
|
79
107
|
|
|
80
108
|
Get sandbox status and resource information.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.2.19-alpha.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`eb9ecaa`](https://github.com/mastra-ai/mastra/commit/eb9ecaa89c36e889749e3b825cfc507ce7f7980b), [`3e8727e`](https://github.com/mastra-ai/mastra/commit/3e8727e11ec1a5d733acedb5c872896394be18c1)]:
|
|
8
|
+
- @mastra/core@1.62.0-alpha.9
|
|
9
|
+
|
|
10
|
+
## 1.2.19-alpha.14
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [[`aa3a85d`](https://github.com/mastra-ai/mastra/commit/aa3a85daf094c683bb97efdf4b6a696d2e474af5), [`d29d06f`](https://github.com/mastra-ai/mastra/commit/d29d06fe00bbd35b4571150ea04c59d2ed783c71), [`e6516df`](https://github.com/mastra-ai/mastra/commit/e6516dfcdae4f4ac0e7971d84359a81385ee602f), [`0b2a3d1`](https://github.com/mastra-ai/mastra/commit/0b2a3d1783875c5b97b7b36ab3d03d7360e0dde7), [`6bb5d71`](https://github.com/mastra-ai/mastra/commit/6bb5d7193fe9166b219f0fccae17db7a5ae86e65), [`57de7d6`](https://github.com/mastra-ai/mastra/commit/57de7d644ba7146edb4e9e6111ec4fa98c3a59e9), [`e8e299c`](https://github.com/mastra-ai/mastra/commit/e8e299cc6abdfc39947e2fec25803493015d3882), [`edfc548`](https://github.com/mastra-ai/mastra/commit/edfc548886bc7bae17b681f8b6b41a47eb32bcd2), [`a8a4871`](https://github.com/mastra-ai/mastra/commit/a8a4871215f51da95c47129602157ce5372f634a), [`5165cdc`](https://github.com/mastra-ai/mastra/commit/5165cdcdcf50e144bb8113278535196cc9b07065), [`6bb5d71`](https://github.com/mastra-ai/mastra/commit/6bb5d7193fe9166b219f0fccae17db7a5ae86e65), [`9ee8120`](https://github.com/mastra-ai/mastra/commit/9ee8120ce17f76b9f617489e05a283353742690a), [`d975e92`](https://github.com/mastra-ai/mastra/commit/d975e924d4936f46c386bd3dee39c671720289f6), [`1cfa878`](https://github.com/mastra-ai/mastra/commit/1cfa8784d8da0dfaa0317e5048bc48b6084a5ea5), [`c118318`](https://github.com/mastra-ai/mastra/commit/c1183181c9804303db4b511c2e2648f8b714712b), [`fc07c64`](https://github.com/mastra-ai/mastra/commit/fc07c6465043e08e99193a6751a01c56ffc2e7a1), [`542dee2`](https://github.com/mastra-ai/mastra/commit/542dee254167f974ff8cbbbfc0ce10f9a2616a7b), [`a58483c`](https://github.com/mastra-ai/mastra/commit/a58483cff1a9d41fce7c931843f48cb0ac450f64), [`a58483c`](https://github.com/mastra-ai/mastra/commit/a58483cff1a9d41fce7c931843f48cb0ac450f64), [`895e9df`](https://github.com/mastra-ai/mastra/commit/895e9dfc17d6f34299eca64e317ded9e5f5e5ef8)]:
|
|
15
|
+
- @mastra/core@1.62.0-alpha.8
|
|
16
|
+
|
|
3
17
|
## 1.2.19-alpha.13
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "1.2.19-alpha.
|
|
3
|
+
"version": "1.2.19-alpha.15",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"jsdom": "^26.1.0",
|
|
29
29
|
"local-pkg": "^1.1.2",
|
|
30
30
|
"zod": "^4.4.3",
|
|
31
|
-
"@mastra/
|
|
32
|
-
"@mastra/
|
|
31
|
+
"@mastra/core": "1.62.0-alpha.9",
|
|
32
|
+
"@mastra/mcp": "^1.17.2-alpha.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@hono/node-server": "^2.0.0",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"tsx": "^4.23.1",
|
|
46
46
|
"typescript": "^6.0.3",
|
|
47
47
|
"vitest": "4.1.10",
|
|
48
|
-
"@internal/types-builder": "0.0.100",
|
|
49
48
|
"@internal/lint": "0.0.125",
|
|
50
|
-
"@mastra/core": "1.62.0-alpha.
|
|
49
|
+
"@mastra/core": "1.62.0-alpha.9",
|
|
50
|
+
"@internal/types-builder": "0.0.100"
|
|
51
51
|
},
|
|
52
52
|
"homepage": "https://mastra.ai",
|
|
53
53
|
"repository": {
|