@mastra/mcp-docs-server 1.2.10-alpha.9 → 1.2.10

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.
@@ -263,6 +263,24 @@ const { messages } = await memory.recall({
263
263
  })
264
264
  ```
265
265
 
266
+ Filter by shallow message metadata:
267
+
268
+ ```typescript
269
+ const { messages } = await memory.recall({
270
+ threadId: 'thread-123',
271
+ filter: {
272
+ metadata: {
273
+ category: 'billing',
274
+ escalated: true,
275
+ priority: 2,
276
+ archivedAt: null,
277
+ },
278
+ },
279
+ })
280
+ ```
281
+
282
+ Metadata filters match shallow scalar values only: `string`, finite `number`, `boolean`, and `null`. All specified metadata keys must match with AND semantics, and `null` matches an explicit `null` value, not a missing metadata key. Metadata keys must start with a letter or underscore, may contain only alphanumeric characters and underscores, must be 128 characters or fewer, and can't use reserved prototype keys such as `__proto__`, `constructor`, or `prototype`. Performance depends on the storage backend. Some backends can push parts of the filter into the database, while others scan candidate messages after thread, resource, and date constraints are applied but before pagination.
283
+
266
284
  Fetch a single message by ID:
267
285
 
268
286
  ```typescript
@@ -65,7 +65,7 @@ Returns: [`InngestAgent`](#inngestagent-interface)
65
65
 
66
66
  ### Parameters
67
67
 
68
- **agent** (`Agent`): The Agent to wrap with Inngest durable execution. Agent methods (e.g., generate(), listTools(), getMemory()) delegate to this agent via a Proxy.
68
+ **agent** (`Agent`): The Agent to wrap with Inngest durable execution. Methods not implemented by InngestAgent (e.g., listTools() and getMemory()) delegate to this agent via a Proxy.
69
69
 
70
70
  **inngest** (`Inngest`): The Inngest client instance. Used to send workflow events and, in SDK v4, publish realtime stream events.
71
71
 
@@ -81,7 +81,7 @@ Returns: [`InngestAgent`](#inngestagent-interface)
81
81
 
82
82
  ## `InngestAgent` interface
83
83
 
84
- The object returned by `createInngestAgent()`. It implements the full `Agent` interface via a Proxy: any property or method not explicitly defined (e.g., `generate()`, `listTools()`, `getMemory()`) is forwarded to the underlying agent.
84
+ The object returned by `createInngestAgent()`. It provides the durable execution methods below. Any property or method not explicitly defined (e.g., `listTools()` and `getMemory()`) is forwarded to the underlying agent via a Proxy.
85
85
 
86
86
  ### Properties
87
87
 
@@ -152,6 +152,35 @@ The third argument accepts `threadId` and `resourceId` in addition to the lifecy
152
152
 
153
153
  Returns: [`Promise<InngestAgentStreamResult>`](#inngestagentstreamresult)
154
154
 
155
+ #### `generate(messages, options?)`
156
+
157
+ Runs a response on Inngest's durable execution engine and resolves with a single `FullOutput`. If the run suspends, `generate()` resolves with `finishReason: 'suspended'`. The `runId` option is optional. If you omit it, `generate()` creates a run ID and returns it in `result.runId`. Continue the run with [`resumeGenerate()`](#resumegeneraterunid-resumedata-options). Use [`stream()`](#streammessages-options) with `onSuspended` when the caller needs a suspension callback.
158
+
159
+ ```typescript
160
+ const result = await durableAgent.generate('Delete the old records', {
161
+ requireToolApproval: true,
162
+ })
163
+
164
+ result.runId // Generated automatically
165
+ result.finishReason // 'suspended' when approval is required
166
+ ```
167
+
168
+ Returns: `Promise<FullOutput<TOutput>>`
169
+
170
+ #### `resumeGenerate(runId, resumeData, options?)`
171
+
172
+ Resumes a suspended `generate()` run and resolves with a single `FullOutput`.
173
+
174
+ ```typescript
175
+ if (!result.runId) {
176
+ throw new Error('Run ID is missing')
177
+ }
178
+
179
+ const resumedResult = await durableAgent.resumeGenerate(result.runId, { approved: true })
180
+ ```
181
+
182
+ Returns: `Promise<FullOutput<TOutput>>`
183
+
155
184
  #### `observe(runId, options?)`
156
185
 
157
186
  Reconnects to an existing run, replaying cached events before delivering live ones. Use this after a network disconnection. Pass `offset` to start replay from a known position.
@@ -154,8 +154,22 @@ const result = await thread.listMessages({
154
154
  const result = await thread.listMessages({
155
155
  orderBy: { field: 'createdAt', direction: 'ASC' },
156
156
  })
157
+
158
+ // Get messages with shallow metadata filters
159
+ const result = await thread.listMessages({
160
+ filter: {
161
+ metadata: {
162
+ category: 'billing',
163
+ escalated: true,
164
+ priority: 2,
165
+ archivedAt: null,
166
+ },
167
+ },
168
+ })
157
169
  ```
158
170
 
171
+ Metadata filters match shallow scalar values only: `string`, finite `number`, `boolean`, and `null`. Every key-value pair must match with AND semantics. `null` matches an explicit `null` value, not a missing metadata key. Metadata keys must start with a letter or underscore, may contain only alphanumeric characters and underscores, must be 128 characters or fewer, and can't use reserved prototype keys such as `__proto__`, `constructor`, or `prototype`. Performance depends on the server storage backend, and arbitrary metadata filters may scan candidate messages.
172
+
159
173
  ### Delete Messages
160
174
 
161
175
  Delete one or more messages from a thread:
@@ -2,12 +2,15 @@
2
2
 
3
3
  # Memory.recall()
4
4
 
5
- the `.recall()` method retrieves messages from a specific thread, with support for pagination, filtering options, and semantic search.
5
+ The `Memory.recall()` method retrieves messages from a specific thread, with support for pagination, filtering options, and semantic search.
6
6
 
7
7
  ## Usage example
8
8
 
9
9
  ```typescript
10
- await memory?.recall({ threadId: 'user-123' })
10
+ const { messages } = await memory.recall({
11
+ threadId: 'thread-123',
12
+ perPage: 20,
13
+ })
11
14
  ```
12
15
 
13
16
  ## Parameters
@@ -24,7 +27,7 @@ await memory?.recall({ threadId: 'user-123' })
24
27
 
25
28
  **include** (`{ id: string; threadId?: string; withPreviousMessages?: number; withNextMessages?: number }[]`): Array of specific message IDs to include with optional context messages. Each item has an id (required), optional threadId (defaults to main threadId), withPreviousMessages (number of messages before, defaults to 2 for vector search, 0 otherwise), and withNextMessages (number of messages after, defaults to 2 for vector search, 0 otherwise).
26
29
 
27
- **filter** (`{ dateRange?: { start?: Date; end?: Date; startExclusive?: boolean; endExclusive?: boolean } }`): Filter options for message retrieval. Currently supports dateRange to filter messages by creation date. Use startExclusive or endExclusive to exclude boundary dates (useful for cursor-based pagination).
30
+ **filter** (`{ dateRange?: { start?: Date; end?: Date; startExclusive?: boolean; endExclusive?: boolean }; metadata?: Record<string, string | number | boolean | null> }`): Filter options for message retrieval. dateRange filters messages by creation date. metadata filters shallow message metadata by exact scalar key-value pairs using AND semantics. Metadata values can be strings, finite numbers, booleans, or null.
28
31
 
29
32
  **orderBy** (`{ field: 'createdAt'; direction: 'ASC' | 'DESC' }`): Sort order for retrieved messages. Defaults to descending by creation date.
30
33
 
@@ -38,6 +41,28 @@ await memory?.recall({ threadId: 'user-123' })
38
41
 
39
42
  **threadConfig.threads** (`{ generateTitle?: boolean | { model: DynamicArgument<MastraLanguageModel>; instructions?: DynamicArgument<string> } }`): Settings related to memory thread creation. generateTitle controls automatic thread title generation from the conversation transcript. Can be a boolean or an object with custom model and instructions.
40
43
 
44
+ ## Metadata filtering
45
+
46
+ Use `filter.metadata` to match shallow scalar metadata stored on messages:
47
+
48
+ ```typescript
49
+ const { messages } = await memory.recall({
50
+ threadId: 'thread-123',
51
+ filter: {
52
+ metadata: {
53
+ category: 'billing',
54
+ escalated: true,
55
+ priority: 2,
56
+ archivedAt: null,
57
+ },
58
+ },
59
+ })
60
+ ```
61
+
62
+ All metadata entries are combined with AND semantics. A message must match every key and value with exact type equality. `null` matches metadata that is explicitly set to `null`; it doesn't match a missing key.
63
+
64
+ Metadata filters only support shallow scalar values: `string`, finite `number`, `boolean`, and `null`. Nested objects, arrays, `NaN`, and infinities are not supported. Metadata keys must start with a letter or underscore, may contain only alphanumeric characters and underscores, must be 128 characters or fewer, and can't use reserved prototype keys such as `__proto__`, `constructor`, or `prototype`. Performance depends on the storage backend. Arbitrary metadata filters may require scanning candidate messages, so narrow the query with `threadId`, `resourceId`, or `dateRange` when possible.
65
+
41
66
  ## Returns
42
67
 
43
68
  **messages** (`MastraDBMessage[]`): Array of retrieved messages in the database format
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @mastra/mcp-docs-server
2
2
 
3
+ ## 1.2.10
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`c8d8a01`](https://github.com/mastra-ai/mastra/commit/c8d8a010ee2efe2b7bf4d07707382c34c87b14e4), [`df6a9ce`](https://github.com/mastra-ai/mastra/commit/df6a9ce87214f7aadb2edfe62f67605fe998a0a4), [`73839cb`](https://github.com/mastra-ai/mastra/commit/73839cb58322679c170627d1015669ede5f619aa), [`371cf60`](https://github.com/mastra-ai/mastra/commit/371cf6075cef88ac6919a08d59a82e485397364a), [`8e4dc79`](https://github.com/mastra-ai/mastra/commit/8e4dc793dcf035ea506f9ce79f56d2d501a4be14), [`2db93cc`](https://github.com/mastra-ai/mastra/commit/2db93ccd0b872e4de7853a93383efe0647901df8), [`094ab61`](https://github.com/mastra-ai/mastra/commit/094ab6129a1a3ecf6eeb86decac17d5faea4e02a), [`fe80944`](https://github.com/mastra-ai/mastra/commit/fe80944f3ef6681fea6eae8200fce387b7bb3c2f), [`263d2ca`](https://github.com/mastra-ai/mastra/commit/263d2cac80ba3b03b9c0f008db6f1f1b9eb0278c), [`75f843d`](https://github.com/mastra-ai/mastra/commit/75f843d09f758223e6eeb321321bdcc5c7e779d0), [`e51e166`](https://github.com/mastra-ai/mastra/commit/e51e166c52e220abc9b64554ce37359dca8544b1)]:
8
+ - @mastra/core@1.53.0
9
+
3
10
  ## 1.2.10-alpha.9
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": "1.2.10-alpha.9",
3
+ "version": "1.2.10",
4
4
  "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "jsdom": "^26.1.0",
29
29
  "local-pkg": "^1.1.2",
30
30
  "zod": "^4.4.3",
31
- "@mastra/core": "1.53.0-alpha.4",
31
+ "@mastra/core": "1.53.0",
32
32
  "@mastra/mcp": "^1.15.0"
33
33
  },
34
34
  "devDependencies": {
@@ -45,9 +45,9 @@
45
45
  "tsx": "^4.23.1",
46
46
  "typescript": "^6.0.3",
47
47
  "vitest": "4.1.10",
48
- "@internal/lint": "0.0.116",
49
- "@internal/types-builder": "0.0.91",
50
- "@mastra/core": "1.53.0-alpha.4"
48
+ "@internal/types-builder": "0.0.92",
49
+ "@internal/lint": "0.0.117",
50
+ "@mastra/core": "1.53.0"
51
51
  },
52
52
  "homepage": "https://mastra.ai",
53
53
  "repository": {