@mastra/mcp-docs-server 0.13.22-alpha.1 → 0.13.22-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.
@@ -1,5 +1,12 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 0.12.4-alpha.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`60c9cec`](https://github.com/mastra-ai/mastra/commit/60c9cec7048a79a87440f7840c383875bd710d93), [`897995e`](https://github.com/mastra-ai/mastra/commit/897995e630d572fe2891e7ede817938cabb43251)]:
8
+ - @mastra/core@0.16.4-alpha.2
9
+
3
10
  ## 0.12.4-alpha.1
4
11
 
5
12
  ### Patch Changes
@@ -292,11 +299,4 @@
292
299
 
293
300
  ### Patch Changes
294
301
 
295
- - Updated dependencies [[`637f323`](https://github.com/mastra-ai/mastra/commit/637f32371d79a8f78c52c0d53411af0915fcec67), [`29de0e1`](https://github.com/mastra-ai/mastra/commit/29de0e1b0a7173317ae7d1ab0c0993167c659f2b), [`6ac697e`](https://github.com/mastra-ai/mastra/commit/6ac697edcc2435482c247cba615277ec4765dcc4)]:
296
- - @mastra/core@0.15.3-alpha.1
297
-
298
- ## 0.11.3-alpha.0
299
-
300
- ### Patch Changes
301
-
302
- ... 2507 more lines hidden. See full changelog in package directory.
302
+ ... 2514 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,13 @@
1
1
  # @mastra/core
2
2
 
3
+ ## 0.16.4-alpha.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Postgresql Storage Query Index Performance: Adds index operations and automatic indexing for Postgresql ([#7757](https://github.com/mastra-ai/mastra/pull/7757))
8
+
9
+ - Fixes assistant message ids when using toUIMessageStream, preserves the original messageId rather than creating a new id for this message. ([#7783](https://github.com/mastra-ai/mastra/pull/7783))
10
+
3
11
  ## 0.16.4-alpha.1
4
12
 
5
13
  ### Patch Changes
@@ -290,13 +298,5 @@
290
298
  - 6f5eb7a: Throw if an empty or whitespace-only threadId is passed when getting messages
291
299
  - a9e50ee: Allow both workflow stream message formats for now
292
300
  - 5397eb4: Add public URL support when adding files in Multi Modal
293
- - c9f4e4a: Pass tracing context to scorer run
294
- - 0acbc80: Add InferUITools and related type helpers for AI SDK compatibility
295
-
296
- Adds new type utility functions to help with type inference when using Mastra tools with the AI SDK's UI components:
297
- - `InferUITools` - Infers input/output types for a collection of tools
298
- - `InferUITool` - Infers input/output types for a single tool
299
-
300
- These type helpers allow developers to easily integrate Mastra tools with AI SDK UI components like `useChat` by providing proper type inference for tool inputs and outputs.
301
301
 
302
- ... 3290 more lines hidden. See full changelog in package directory.
302
+ ... 3298 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,13 @@
1
1
  # @mastra/deployer-cloud
2
2
 
3
+ ## 0.16.4-alpha.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`60c9cec`](https://github.com/mastra-ai/mastra/commit/60c9cec7048a79a87440f7840c383875bd710d93), [`897995e`](https://github.com/mastra-ai/mastra/commit/897995e630d572fe2891e7ede817938cabb43251)]:
8
+ - @mastra/core@0.16.4-alpha.2
9
+ - @mastra/deployer@0.16.4-alpha.2
10
+
3
11
  ## 0.16.4-alpha.1
4
12
 
5
13
  ### Patch Changes
@@ -290,13 +298,5 @@
290
298
 
291
299
  ### Patch Changes
292
300
 
293
- - Updated dependencies [[`822c2e8`](https://github.com/mastra-ai/mastra/commit/822c2e88a3ecbffb7c680e6227976006ccefe6a8)]:
294
- - @mastra/core@0.15.3-alpha.2
295
- - @mastra/deployer@0.15.3-alpha.2
296
-
297
- ## 0.15.3-alpha.1
298
-
299
- ### Patch Changes
300
-
301
301
 
302
- ... 70 more lines hidden. See full changelog in package directory.
302
+ ... 78 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,13 @@
1
1
  # @mastra/deployer
2
2
 
3
+ ## 0.16.4-alpha.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`60c9cec`](https://github.com/mastra-ai/mastra/commit/60c9cec7048a79a87440f7840c383875bd710d93), [`897995e`](https://github.com/mastra-ai/mastra/commit/897995e630d572fe2891e7ede817938cabb43251)]:
8
+ - @mastra/core@0.16.4-alpha.2
9
+ - @mastra/server@0.16.4-alpha.2
10
+
3
11
  ## 0.16.4-alpha.1
4
12
 
5
13
  ### Patch Changes
@@ -290,13 +298,5 @@
290
298
 
291
299
  ## 0.15.3-alpha.9
292
300
 
293
- ### Patch Changes
294
-
295
- - Updated dependencies [[`599d04c`](https://github.com/mastra-ai/mastra/commit/599d04cebe92c1d536fee3190434941b8c91548e)]:
296
- - @mastra/core@0.15.3-alpha.9
297
- - @mastra/server@0.15.3-alpha.9
298
-
299
- ## 0.15.3-alpha.8
300
-
301
301
 
302
- ... 4062 more lines hidden. See full changelog in package directory.
302
+ ... 4070 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,12 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 0.13.22-alpha.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`60c9cec`](https://github.com/mastra-ai/mastra/commit/60c9cec7048a79a87440f7840c383875bd710d93), [`897995e`](https://github.com/mastra-ai/mastra/commit/897995e630d572fe2891e7ede817938cabb43251)]:
8
+ - @mastra/core@0.16.4-alpha.2
9
+
3
10
  ## 0.13.22-alpha.1
4
11
 
5
12
  ### Patch Changes
@@ -291,12 +298,5 @@
291
298
  - @mastra/mcp@0.11.2
292
299
  - @mastra/core@0.15.2
293
300
 
294
- ## 0.13.15
295
-
296
- ### Patch Changes
297
-
298
- - Updated dependencies [[`95b2aa9`](https://github.com/mastra-ai/mastra/commit/95b2aa908230919e67efcac0d69005a2d5745298)]:
299
- - @mastra/mcp@0.11.1
300
- - @mastra/core@0.15.1
301
301
 
302
- ... 1740 more lines hidden. See full changelog in package directory.
302
+ ... 1747 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,14 @@
1
1
  # @mastra/pg
2
2
 
3
+ ## 0.15.3-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Postgresql Storage Query Index Performance: Adds index operations and automatic indexing for Postgresql ([#7757](https://github.com/mastra-ai/mastra/pull/7757))
8
+
9
+ - Updated dependencies [[`60c9cec`](https://github.com/mastra-ai/mastra/commit/60c9cec7048a79a87440f7840c383875bd710d93), [`897995e`](https://github.com/mastra-ai/mastra/commit/897995e630d572fe2891e7ede817938cabb43251)]:
10
+ - @mastra/core@0.16.4-alpha.2
11
+
3
12
  ## 0.15.3-alpha.0
4
13
 
5
14
  ### Patch Changes
@@ -289,14 +298,5 @@
289
298
  - Updated dependencies [63449d0]
290
299
  - Updated dependencies [121a3f8]
291
300
  - Updated dependencies [ec510e7]
292
- - @mastra/core@0.13.2
293
-
294
- ## 0.14.0-alpha.0
295
-
296
- ### Minor Changes
297
-
298
- - 79d34ce: improve cloudflare workers compatibility
299
-
300
- ### Patch Changes
301
301
 
302
- ... 2310 more lines hidden. See full changelog in package directory.
302
+ ... 2319 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,12 @@
1
1
  # @mastra/server
2
2
 
3
+ ## 0.16.4-alpha.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`60c9cec`](https://github.com/mastra-ai/mastra/commit/60c9cec7048a79a87440f7840c383875bd710d93), [`897995e`](https://github.com/mastra-ai/mastra/commit/897995e630d572fe2891e7ede817938cabb43251)]:
8
+ - @mastra/core@0.16.4-alpha.2
9
+
3
10
  ## 0.16.4-alpha.1
4
11
 
5
12
  ### Patch Changes
@@ -291,12 +298,5 @@
291
298
  ### Patch Changes
292
299
 
293
300
  - Updated dependencies [[`637f323`](https://github.com/mastra-ai/mastra/commit/637f32371d79a8f78c52c0d53411af0915fcec67), [`29de0e1`](https://github.com/mastra-ai/mastra/commit/29de0e1b0a7173317ae7d1ab0c0993167c659f2b), [`6ac697e`](https://github.com/mastra-ai/mastra/commit/6ac697edcc2435482c247cba615277ec4765dcc4)]:
294
- - @mastra/core@0.15.3-alpha.1
295
-
296
- ## 0.15.3-alpha.0
297
-
298
- ### Patch Changes
299
-
300
- - [#7109](https://github.com/mastra-ai/mastra/pull/7109) [`5de1555`](https://github.com/mastra-ai/mastra/commit/5de15554d3d6695211945a36928f6657e76cddc9) Thanks [@epinzur](https://github.com/epinzur)! - Fixed tracingContext on tool executions in AI tracing
301
301
 
302
- ... 3316 more lines hidden. See full changelog in package directory.
302
+ ... 3323 more lines hidden. See full changelog in package directory.
@@ -112,3 +112,194 @@ This enables direct queries and custom transaction management. When using these
112
112
 
113
113
  This approach is intended for advanced scenarios where low-level access is required.
114
114
 
115
+ ## Index Management
116
+
117
+ PostgreSQL storage provides comprehensive index management capabilities to optimize query performance.
118
+
119
+ ### Automatic Performance Indexes
120
+
121
+ PostgreSQL storage automatically creates composite indexes during initialization for common query patterns:
122
+
123
+ - `mastra_threads_resourceid_createdat_idx`: (resourceId, createdAt DESC)
124
+ - `mastra_messages_thread_id_createdat_idx`: (thread_id, createdAt DESC)
125
+ - `mastra_traces_name_starttime_idx`: (name, startTime DESC)
126
+ - `mastra_evals_agent_name_created_at_idx`: (agent_name, created_at DESC)
127
+
128
+ These indexes significantly improve performance for filtered queries with sorting.
129
+
130
+ ### Creating Custom Indexes
131
+
132
+ Create additional indexes to optimize specific query patterns:
133
+
134
+ ```typescript copy
135
+ // Basic index for common queries
136
+ await storage.createIndex({
137
+ name: 'idx_threads_resource',
138
+ table: 'mastra_threads',
139
+ columns: ['resourceId']
140
+ });
141
+
142
+ // Composite index with sort order for filtering + sorting
143
+ await storage.createIndex({
144
+ name: 'idx_messages_composite',
145
+ table: 'mastra_messages',
146
+ columns: ['thread_id', 'createdAt DESC']
147
+ });
148
+
149
+ // GIN index for JSONB columns (fast JSON queries)
150
+ await storage.createIndex({
151
+ name: 'idx_traces_attributes',
152
+ table: 'mastra_traces',
153
+ columns: ['attributes'],
154
+ method: 'gin'
155
+ });
156
+ ```
157
+
158
+ For more advanced use cases, you can also use:
159
+ - `unique: true` for unique constraints
160
+ - `where: 'condition'` for partial indexes
161
+ - `method: 'brin'` for time-series data
162
+ - `storage: { fillfactor: 90 }` for update-heavy tables
163
+ - `concurrent: true` for non-blocking creation (default)
164
+
165
+ ### Index Options
166
+
167
+ <PropertiesTable
168
+ content={[
169
+ {
170
+ name: "name",
171
+ type: "string",
172
+ description: "Unique name for the index",
173
+ isOptional: false,
174
+ },
175
+ {
176
+ name: "table",
177
+ type: "string",
178
+ description: "Table name (e.g., 'mastra_threads')",
179
+ isOptional: false,
180
+ },
181
+ {
182
+ name: "columns",
183
+ type: "string[]",
184
+ description: "Array of column names with optional sort order (e.g., ['id', 'createdAt DESC'])",
185
+ isOptional: false,
186
+ },
187
+ {
188
+ name: "unique",
189
+ type: "boolean",
190
+ description: "Creates a unique constraint index",
191
+ isOptional: true,
192
+ },
193
+ {
194
+ name: "concurrent",
195
+ type: "boolean",
196
+ description: "Creates index without locking table (default: true)",
197
+ isOptional: true,
198
+ },
199
+ {
200
+ name: "where",
201
+ type: "string",
202
+ description: "Partial index condition (PostgreSQL specific)",
203
+ isOptional: true,
204
+ },
205
+ {
206
+ name: "method",
207
+ type: "'btree' | 'hash' | 'gin' | 'gist' | 'spgist' | 'brin'",
208
+ description: "Index method (default: 'btree')",
209
+ isOptional: true,
210
+ },
211
+ {
212
+ name: "opclass",
213
+ type: "string",
214
+ description: "Operator class for GIN/GIST indexes",
215
+ isOptional: true,
216
+ },
217
+ {
218
+ name: "storage",
219
+ type: "Record<string, any>",
220
+ description: "Storage parameters (e.g., { fillfactor: 90 })",
221
+ isOptional: true,
222
+ },
223
+ {
224
+ name: "tablespace",
225
+ type: "string",
226
+ description: "Tablespace name for index placement",
227
+ isOptional: true,
228
+ }
229
+ ]}
230
+ />
231
+
232
+ ### Managing Indexes
233
+
234
+ List and monitor existing indexes:
235
+
236
+ ```typescript copy
237
+ // List all indexes
238
+ const allIndexes = await storage.listIndexes();
239
+ console.log(allIndexes);
240
+ // [
241
+ // {
242
+ // name: 'mastra_threads_pkey',
243
+ // table: 'mastra_threads',
244
+ // columns: ['id'],
245
+ // unique: true,
246
+ // size: '16 KB',
247
+ // definition: 'CREATE UNIQUE INDEX...'
248
+ // },
249
+ // ...
250
+ // ]
251
+
252
+ // List indexes for specific table
253
+ const threadIndexes = await storage.listIndexes('mastra_threads');
254
+
255
+ // Get detailed statistics for an index
256
+ const stats = await storage.describeIndex('idx_threads_resource');
257
+ console.log(stats);
258
+ // {
259
+ // name: 'idx_threads_resource',
260
+ // table: 'mastra_threads',
261
+ // columns: ['resourceId', 'createdAt'],
262
+ // unique: false,
263
+ // size: '128 KB',
264
+ // definition: 'CREATE INDEX idx_threads_resource...',
265
+ // method: 'btree',
266
+ // scans: 1542, // Number of index scans
267
+ // tuples_read: 45230, // Tuples read via index
268
+ // tuples_fetched: 12050 // Tuples fetched via index
269
+ // }
270
+
271
+ // Drop an index
272
+ await storage.dropIndex('idx_threads_status');
273
+ ```
274
+
275
+ ### Schema-Specific Indexes
276
+
277
+ When using custom schemas, indexes are created with schema prefixes:
278
+
279
+ ```typescript copy
280
+ const storage = new PostgresStore({
281
+ connectionString: process.env.DATABASE_URL,
282
+ schemaName: 'custom_schema'
283
+ });
284
+
285
+ // Creates index as: custom_schema_idx_threads_status
286
+ await storage.createIndex({
287
+ name: 'idx_threads_status',
288
+ table: 'mastra_threads',
289
+ columns: ['status']
290
+ });
291
+ ```
292
+
293
+ ### Index Types and Use Cases
294
+
295
+ PostgreSQL offers different index types optimized for specific scenarios:
296
+
297
+ | Index Type | Best For | Storage | Speed |
298
+ |------------|----------|---------|-------|
299
+ | **btree** (default) | Range queries, sorting, general purpose | Moderate | Fast |
300
+ | **hash** | Equality comparisons only | Small | Very fast for `=` |
301
+ | **gin** | JSONB, arrays, full-text search | Large | Fast for contains |
302
+ | **gist** | Geometric data, full-text search | Moderate | Fast for nearest-neighbor |
303
+ | **spgist** | Non-balanced data, text patterns | Small | Fast for specific patterns |
304
+ | **brin** | Large tables with natural ordering | Very small | Fast for ranges |
305
+
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 0.13.22-alpha.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`60c9cec`](https://github.com/mastra-ai/mastra/commit/60c9cec7048a79a87440f7840c383875bd710d93), [`897995e`](https://github.com/mastra-ai/mastra/commit/897995e630d572fe2891e7ede817938cabb43251)]:
8
+ - @mastra/core@0.16.4-alpha.2
9
+
3
10
  ## 0.13.22-alpha.1
4
11
 
5
12
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mcp-docs-server",
3
- "version": "0.13.22-alpha.1",
3
+ "version": "0.13.22-alpha.2",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -33,11 +33,11 @@
33
33
  "uuid": "^11.1.0",
34
34
  "zod": "^3.25.76",
35
35
  "zod-to-json-schema": "^3.24.6",
36
- "@mastra/core": "0.16.4-alpha.1",
36
+ "@mastra/core": "0.16.4-alpha.2",
37
37
  "@mastra/mcp": "^0.12.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@hono/node-server": "^1.19.1",
40
+ "@hono/node-server": "^1.19.2",
41
41
  "@types/jsdom": "^21.1.7",
42
42
  "@types/node": "^20.19.0",
43
43
  "@types/turndown": "^5.0.5",
@@ -49,8 +49,8 @@
49
49
  "tsx": "^4.19.4",
50
50
  "typescript": "^5.8.3",
51
51
  "vitest": "^3.2.4",
52
- "@internal/lint": "0.0.39",
53
- "@mastra/core": "0.16.4-alpha.1"
52
+ "@mastra/core": "0.16.4-alpha.2",
53
+ "@internal/lint": "0.0.39"
54
54
  },
55
55
  "homepage": "https://mastra.ai",
56
56
  "repository": {