@mastra/upstash 0.0.0-studio-deploy-20260404182525 → 0.0.0-studio-cli-20260504022012

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 CHANGED
@@ -1,11 +1,260 @@
1
1
  # @mastra/upstash
2
2
 
3
- ## 0.0.0-studio-deploy-20260404182525
3
+ ## 0.0.0-studio-cli-20260504022012
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Updated dependencies [[`c55b527`](https://github.com/mastra-ai/mastra/commit/c55b52758a31368b2077b0dbbc3badfe4063f560), [`7eb2596`](https://github.com/mastra-ai/mastra/commit/7eb25960d607e07468c9a10c5437abd2deaf1e9a)]:
8
- - @mastra/core@0.0.0-studio-deploy-20260404182525
7
+ - Updated dependencies [[`6dcd65f`](https://github.com/mastra-ai/mastra/commit/6dcd65f2a34069e6dc43ba35f1d11119b9b40bef), [`c05c9a1`](https://github.com/mastra-ai/mastra/commit/c05c9a13230988cef6d438a62f37760f31927bc7), [`e24aacb`](https://github.com/mastra-ai/mastra/commit/e24aacba07bd66f5d95b636dc24016fca26b52cf), [`1c2dda8`](https://github.com/mastra-ai/mastra/commit/1c2dda805fbfccc0abf55d4cb20cc34402dc3f0c), [`c721164`](https://github.com/mastra-ai/mastra/commit/c7211643f7ac861f83b19a3757cc921487fc9d75), [`1b55954`](https://github.com/mastra-ai/mastra/commit/1b559541c1e08a10e49d01ffc51a634dfc37a286), [`5adc55e`](https://github.com/mastra-ai/mastra/commit/5adc55e63407be8ee977914957d68bcc2a075ceb), [`70017d7`](https://github.com/mastra-ai/mastra/commit/70017d72ab741b5d7040e2a15c251a317782e39e), [`e4942bc`](https://github.com/mastra-ai/mastra/commit/e4942bc7fdc903572f7d84f26d5e15f9d39c763d)]:
8
+ - @mastra/core@0.0.0-studio-cli-20260504022012
9
+ - @mastra/redis@0.0.0-studio-cli-20260504022012
10
+
11
+ ## 1.1.0
12
+
13
+ ### Minor Changes
14
+
15
+ - Update peer dependencies to match core package version bump (1.0.5) ([#12557](https://github.com/mastra-ai/mastra/pull/12557))
16
+
17
+ ### Patch Changes
18
+
19
+ - Add durable agents with resumable streams ([#12557](https://github.com/mastra-ai/mastra/pull/12557))
20
+
21
+ Durable agents make agent execution resilient to disconnections, crashes, and long-running operations.
22
+
23
+ ### The Problem
24
+
25
+ Standard agent streaming has two fragility points:
26
+ 1. **Connection drops** - If a client disconnects mid-stream (network blip, browser refresh, mobile app backgrounded), all subsequent events are lost. The client has no way to "catch up" on what they missed.
27
+ 2. **Long-running operations** - Agent loops with tool calls can take minutes. Holding an HTTP connection open that long is unreliable. If the server restarts or the connection times out, the work is lost.
28
+
29
+ ### The Solution
30
+
31
+ **Resumable streams** solve connection drops. Every event is cached with a sequential index. If a client disconnects at event 5, they can reconnect and request events starting from index 6. They receive cached events immediately, then continue with live events as they arrive.
32
+
33
+ **Durable execution** solves long-running operations. Instead of executing the agent loop directly in the HTTP request, execution happens in a workflow engine (built-in evented engine or Inngest). The HTTP request just subscribes to events. If the connection drops, execution continues. The client can reconnect anytime to observe progress.
34
+
35
+ ### Usage
36
+
37
+ Wrap any existing `Agent` with durability using factory functions:
38
+
39
+ ```typescript
40
+ import { Agent } from '@mastra/core/agent';
41
+ import { createDurableAgent } from '@mastra/core/agent/durable';
42
+
43
+ const agent = new Agent({
44
+ id: 'my-agent',
45
+ model: openai('gpt-4'),
46
+ instructions: 'You are helpful',
47
+ });
48
+
49
+ const durableAgent = createDurableAgent({ agent });
50
+ ```
51
+
52
+ **Factory functions for different execution strategies:**
53
+
54
+ | Factory | Execution | Use Case |
55
+ | ---------------------------------------- | ----------------------------------- | ------------------------------- |
56
+ | `createDurableAgent({ agent })` | Local, synchronous | Development, simple deployments |
57
+ | `createEventedAgent({ agent })` | Fire-and-forget via workflow engine | Long-running operations |
58
+ | `createInngestAgent({ agent, inngest })` | Inngest-powered | Production, distributed systems |
59
+
60
+ ### Resumable Streams
61
+
62
+ ```typescript
63
+ // Start streaming
64
+ const { runId, output } = await durableAgent.stream('Analyze this data...');
65
+
66
+ // Client disconnects at event 5...
67
+
68
+ // Reconnect and resume from where we left off
69
+ const { output: resumed } = await durableAgent.observe(runId, { offset: 6 });
70
+ // Receives events 6, 7, 8... from cache, then continues with live events
71
+ ```
72
+
73
+ ### PubSub and Cache
74
+
75
+ Durable agents use two infrastructure components:
76
+
77
+ | Component | Purpose | Default |
78
+ | ---------- | ----------------------------------------- | --------------------- |
79
+ | **PubSub** | Real-time event delivery during streaming | `EventEmitterPubSub` |
80
+ | **Cache** | Stores events for replay on reconnection | `InMemoryServerCache` |
81
+
82
+ When `stream()` is called, events flow through pubsub in real-time. The cache stores each event with a sequential index. When `observe()` is called, missed events replay from cache before continuing with live events.
83
+
84
+ **Configure via Mastra instance (recommended):**
85
+
86
+ ```typescript
87
+ const mastra = new Mastra({
88
+ cache: new RedisServerCache({ url: 'redis://...' }),
89
+ pubsub: new RedisPubSub({ url: 'redis://...' }),
90
+ agents: {
91
+ // Inherits cache and pubsub from Mastra
92
+ myAgent: createDurableAgent({ agent }),
93
+ },
94
+ });
95
+ ```
96
+
97
+ **Configure per-agent (overrides Mastra):**
98
+
99
+ ```typescript
100
+ const durableAgent = createDurableAgent({
101
+ agent,
102
+ cache: new RedisServerCache({ url: 'redis://...' }),
103
+ pubsub: new RedisPubSub({ url: 'redis://...' }),
104
+ });
105
+ ```
106
+
107
+ **Disable caching (streams won't be resumable):**
108
+
109
+ ```typescript
110
+ const durableAgent = createDurableAgent({ agent, cache: false });
111
+ ```
112
+
113
+ For single-instance deployments, the defaults work fine. For multi-instance deployments (load balancer, horizontal scaling), use Redis-backed implementations so any instance can serve reconnection requests.
114
+
115
+ ### Class Hierarchy
116
+ - `DurableAgent` extends `Agent` - base class with resumable streams
117
+ - `EventedAgent` extends `DurableAgent` - fire-and-forget execution
118
+ - `InngestAgent` extends `DurableAgent` - Inngest-powered execution
119
+
120
+ - Updated dependencies [[`920c757`](https://github.com/mastra-ai/mastra/commit/920c75799c6bd71787d86deaf654a35af4c839ca), [`d587199`](https://github.com/mastra-ai/mastra/commit/d5871993c0371bde2b0717d6b47194755baa1443), [`1fe2533`](https://github.com/mastra-ai/mastra/commit/1fe2533c4382ca6858aac7c4b63e888c2eac6541), [`f8694b6`](https://github.com/mastra-ai/mastra/commit/f8694b6fa0b7a5cde71d794c3bbef4957c55bcb8), [`f8694b6`](https://github.com/mastra-ai/mastra/commit/f8694b6fa0b7a5cde71d794c3bbef4957c55bcb8)]:
121
+ - @mastra/core@1.30.0
122
+ - @mastra/redis@1.1.0
123
+
124
+ ## 1.1.0-alpha.0
125
+
126
+ ### Minor Changes
127
+
128
+ - Update peer dependencies to match core package version bump (1.0.5) ([#12557](https://github.com/mastra-ai/mastra/pull/12557))
129
+
130
+ ### Patch Changes
131
+
132
+ - Add durable agents with resumable streams ([#12557](https://github.com/mastra-ai/mastra/pull/12557))
133
+
134
+ Durable agents make agent execution resilient to disconnections, crashes, and long-running operations.
135
+
136
+ ### The Problem
137
+
138
+ Standard agent streaming has two fragility points:
139
+ 1. **Connection drops** - If a client disconnects mid-stream (network blip, browser refresh, mobile app backgrounded), all subsequent events are lost. The client has no way to "catch up" on what they missed.
140
+ 2. **Long-running operations** - Agent loops with tool calls can take minutes. Holding an HTTP connection open that long is unreliable. If the server restarts or the connection times out, the work is lost.
141
+
142
+ ### The Solution
143
+
144
+ **Resumable streams** solve connection drops. Every event is cached with a sequential index. If a client disconnects at event 5, they can reconnect and request events starting from index 6. They receive cached events immediately, then continue with live events as they arrive.
145
+
146
+ **Durable execution** solves long-running operations. Instead of executing the agent loop directly in the HTTP request, execution happens in a workflow engine (built-in evented engine or Inngest). The HTTP request just subscribes to events. If the connection drops, execution continues. The client can reconnect anytime to observe progress.
147
+
148
+ ### Usage
149
+
150
+ Wrap any existing `Agent` with durability using factory functions:
151
+
152
+ ```typescript
153
+ import { Agent } from '@mastra/core/agent';
154
+ import { createDurableAgent } from '@mastra/core/agent/durable';
155
+
156
+ const agent = new Agent({
157
+ id: 'my-agent',
158
+ model: openai('gpt-4'),
159
+ instructions: 'You are helpful',
160
+ });
161
+
162
+ const durableAgent = createDurableAgent({ agent });
163
+ ```
164
+
165
+ **Factory functions for different execution strategies:**
166
+
167
+ | Factory | Execution | Use Case |
168
+ | ---------------------------------------- | ----------------------------------- | ------------------------------- |
169
+ | `createDurableAgent({ agent })` | Local, synchronous | Development, simple deployments |
170
+ | `createEventedAgent({ agent })` | Fire-and-forget via workflow engine | Long-running operations |
171
+ | `createInngestAgent({ agent, inngest })` | Inngest-powered | Production, distributed systems |
172
+
173
+ ### Resumable Streams
174
+
175
+ ```typescript
176
+ // Start streaming
177
+ const { runId, output } = await durableAgent.stream('Analyze this data...');
178
+
179
+ // Client disconnects at event 5...
180
+
181
+ // Reconnect and resume from where we left off
182
+ const { output: resumed } = await durableAgent.observe(runId, { offset: 6 });
183
+ // Receives events 6, 7, 8... from cache, then continues with live events
184
+ ```
185
+
186
+ ### PubSub and Cache
187
+
188
+ Durable agents use two infrastructure components:
189
+
190
+ | Component | Purpose | Default |
191
+ | ---------- | ----------------------------------------- | --------------------- |
192
+ | **PubSub** | Real-time event delivery during streaming | `EventEmitterPubSub` |
193
+ | **Cache** | Stores events for replay on reconnection | `InMemoryServerCache` |
194
+
195
+ When `stream()` is called, events flow through pubsub in real-time. The cache stores each event with a sequential index. When `observe()` is called, missed events replay from cache before continuing with live events.
196
+
197
+ **Configure via Mastra instance (recommended):**
198
+
199
+ ```typescript
200
+ const mastra = new Mastra({
201
+ cache: new RedisServerCache({ url: 'redis://...' }),
202
+ pubsub: new RedisPubSub({ url: 'redis://...' }),
203
+ agents: {
204
+ // Inherits cache and pubsub from Mastra
205
+ myAgent: createDurableAgent({ agent }),
206
+ },
207
+ });
208
+ ```
209
+
210
+ **Configure per-agent (overrides Mastra):**
211
+
212
+ ```typescript
213
+ const durableAgent = createDurableAgent({
214
+ agent,
215
+ cache: new RedisServerCache({ url: 'redis://...' }),
216
+ pubsub: new RedisPubSub({ url: 'redis://...' }),
217
+ });
218
+ ```
219
+
220
+ **Disable caching (streams won't be resumable):**
221
+
222
+ ```typescript
223
+ const durableAgent = createDurableAgent({ agent, cache: false });
224
+ ```
225
+
226
+ For single-instance deployments, the defaults work fine. For multi-instance deployments (load balancer, horizontal scaling), use Redis-backed implementations so any instance can serve reconnection requests.
227
+
228
+ ### Class Hierarchy
229
+ - `DurableAgent` extends `Agent` - base class with resumable streams
230
+ - `EventedAgent` extends `DurableAgent` - fire-and-forget execution
231
+ - `InngestAgent` extends `DurableAgent` - Inngest-powered execution
232
+
233
+ - Updated dependencies [[`920c757`](https://github.com/mastra-ai/mastra/commit/920c75799c6bd71787d86deaf654a35af4c839ca), [`1fe2533`](https://github.com/mastra-ai/mastra/commit/1fe2533c4382ca6858aac7c4b63e888c2eac6541), [`f8694b6`](https://github.com/mastra-ai/mastra/commit/f8694b6fa0b7a5cde71d794c3bbef4957c55bcb8), [`f8694b6`](https://github.com/mastra-ai/mastra/commit/f8694b6fa0b7a5cde71d794c3bbef4957c55bcb8)]:
234
+ - @mastra/core@1.30.0-alpha.1
235
+ - @mastra/redis@1.1.0-alpha.0
236
+
237
+ ## 1.0.5
238
+
239
+ ### Patch Changes
240
+
241
+ - Add `BackgroundTasksStorage` domain implementation so `@mastra/core` background task execution works with any storage adapter. ([#15307](https://github.com/mastra-ai/mastra/pull/15307))
242
+
243
+ - Fixed slow Upstash message saves by using the message index and treating unindexed messages as new, avoiding full database scans. Also adds index-first lookups to updateMessages. Addresses #15386. ([#15393](https://github.com/mastra-ai/mastra/pull/15393))
244
+
245
+ - Updated dependencies [[`20f59b8`](https://github.com/mastra-ai/mastra/commit/20f59b876cf91199efbc49a0e36b391240708f08), [`aba393e`](https://github.com/mastra-ai/mastra/commit/aba393e2da7390c69b80e516a4f153cda6f09376), [`3d83d06`](https://github.com/mastra-ai/mastra/commit/3d83d06f776f00fb5f4163dddd32a030c5c20844), [`e2687a7`](https://github.com/mastra-ai/mastra/commit/e2687a7408790c384563816a9a28ed06735684c9), [`fdd54cf`](https://github.com/mastra-ai/mastra/commit/fdd54cf612a9af876e9fdd85e534454f6e7dd518), [`6315317`](https://github.com/mastra-ai/mastra/commit/63153175fe9a7b224e5be7c209bbebc01dd9b0d5), [`a371ac5`](https://github.com/mastra-ai/mastra/commit/a371ac534aa1bb368a1acf9d8b313378dfdc787e), [`0474c2b`](https://github.com/mastra-ai/mastra/commit/0474c2b2e7c7e1ad8691dca031284841391ff1ef), [`0a5fa1d`](https://github.com/mastra-ai/mastra/commit/0a5fa1d3cb0583889d06687155f26fd7d2edc76c), [`7e0e63e`](https://github.com/mastra-ai/mastra/commit/7e0e63e2e485e84442351f4c7a79a424c83539dc), [`ea43e64`](https://github.com/mastra-ai/mastra/commit/ea43e646dd95d507694b6112b0bf1df22ad552b2), [`f607106`](https://github.com/mastra-ai/mastra/commit/f607106854c6416c4a07d4082604b9f66d047221), [`30456b6`](https://github.com/mastra-ai/mastra/commit/30456b6b08c8fd17e109dd093b73d93b65e83bc5), [`9d11a8c`](https://github.com/mastra-ai/mastra/commit/9d11a8c1c8924eb975a245a5884d40ca1b7e0491), [`9d3b24b`](https://github.com/mastra-ai/mastra/commit/9d3b24b19407ae9c09586cf7766d38dc4dff4a69), [`00d1b16`](https://github.com/mastra-ai/mastra/commit/00d1b16b401199cb294fa23f43336547db4dca9b), [`47cee3e`](https://github.com/mastra-ai/mastra/commit/47cee3e137fe39109cf7fffd2a8cf47b76dc702e), [`62919a6`](https://github.com/mastra-ai/mastra/commit/62919a6ee0fbf3779ad21a97b1ec6696515d5104), [`d246696`](https://github.com/mastra-ai/mastra/commit/d246696139a3144a5b21b042d41c532688e957e1), [`354f9ce`](https://github.com/mastra-ai/mastra/commit/354f9ce1ca6af2074b6a196a23f8ec30012dccca), [`16e34ca`](https://github.com/mastra-ai/mastra/commit/16e34caa98b9a114b17a6125e4e3fd87f169d0d0), [`7020c06`](https://github.com/mastra-ai/mastra/commit/7020c0690b199d9da337f0e805f16948e557922e), [`8786a61`](https://github.com/mastra-ai/mastra/commit/8786a61fa54ba265f85eeff9985ca39863d18bb6), [`9467ea8`](https://github.com/mastra-ai/mastra/commit/9467ea87695749a53dfc041576410ebf9ee7bb67), [`7338d94`](https://github.com/mastra-ai/mastra/commit/7338d949380cf68b095342e8e42610dc51d557c1), [`c80dc16`](https://github.com/mastra-ai/mastra/commit/c80dc16e113e6cc159f510ffde501ad4711b2189), [`af8a57e`](https://github.com/mastra-ai/mastra/commit/af8a57ed9ba9685ad8601d5b71ae3706da6222f9), [`d63ffdb`](https://github.com/mastra-ai/mastra/commit/d63ffdbb2c11e76fe5ea45faab44bc15460f010c), [`47cee3e`](https://github.com/mastra-ai/mastra/commit/47cee3e137fe39109cf7fffd2a8cf47b76dc702e), [`1bd5104`](https://github.com/mastra-ai/mastra/commit/1bd51048b6da93507276d6623e3fd96a9e1a8944), [`e9837b5`](https://github.com/mastra-ai/mastra/commit/e9837b53699e18711b09e0ca010a4106376f2653), [`8f1b280`](https://github.com/mastra-ai/mastra/commit/8f1b280b7fe6999ec654f160cb69c1a8719e7a57), [`92dcf02`](https://github.com/mastra-ai/mastra/commit/92dcf029294210ac91b090900c1a0555a425c57a), [`0fd90a2`](https://github.com/mastra-ai/mastra/commit/0fd90a215caf5fca8099c15a67ca03e4427747a3), [`8fb2405`](https://github.com/mastra-ai/mastra/commit/8fb2405138f2d208b7962ad03f121ca25bcc28c5), [`12df98c`](https://github.com/mastra-ai/mastra/commit/12df98c4904643d9481f5c78f3bed443725b4c96)]:
246
+ - @mastra/core@1.26.0
247
+
248
+ ## 1.0.5-alpha.0
249
+
250
+ ### Patch Changes
251
+
252
+ - Add `BackgroundTasksStorage` domain implementation so `@mastra/core` background task execution works with any storage adapter. ([#15307](https://github.com/mastra-ai/mastra/pull/15307))
253
+
254
+ - Fixed slow Upstash message saves by using the message index and treating unindexed messages as new, avoiding full database scans. Also adds index-first lookups to updateMessages. Addresses #15386. ([#15393](https://github.com/mastra-ai/mastra/pull/15393))
255
+
256
+ - Updated dependencies [[`d63ffdb`](https://github.com/mastra-ai/mastra/commit/d63ffdbb2c11e76fe5ea45faab44bc15460f010c)]:
257
+ - @mastra/core@1.25.1-alpha.0
9
258
 
10
259
  ## 1.0.4
11
260
 
@@ -0,0 +1,60 @@
1
+ import { RedisServerCache } from '@mastra/redis';
2
+ import { Redis } from '@upstash/redis';
3
+ /**
4
+ * Configuration for UpstashServerCache.
5
+ * Accepts either:
6
+ * 1. An existing Redis client from @upstash/redis
7
+ * 2. URL and token to create a client (requires @upstash/redis to be installed)
8
+ */
9
+ export type UpstashCacheConfig = {
10
+ client: Redis;
11
+ } | {
12
+ url: string;
13
+ token: string;
14
+ };
15
+ /**
16
+ * Options for UpstashServerCache
17
+ */
18
+ export interface UpstashServerCacheOptions {
19
+ /**
20
+ * Optional key prefix to namespace all cache keys.
21
+ * Defaults to 'mastra:cache:'.
22
+ */
23
+ keyPrefix?: string;
24
+ /**
25
+ * Default TTL in seconds for cached items.
26
+ * Defaults to 300 (5 minutes).
27
+ * Set to 0 to disable TTL (items persist until explicitly deleted).
28
+ */
29
+ ttlSeconds?: number;
30
+ }
31
+ /**
32
+ * Upstash Redis implementation of MastraServerCache.
33
+ *
34
+ * This is a convenience wrapper around RedisServerCache from @mastra/redis
35
+ * with the upstash preset pre-configured.
36
+ *
37
+ * @example With existing client
38
+ * ```typescript
39
+ * import { Redis } from '@upstash/redis';
40
+ * import { UpstashServerCache } from '@mastra/upstash';
41
+ *
42
+ * const redis = new Redis({ url: '...', token: '...' });
43
+ * const cache = new UpstashServerCache({ client: redis });
44
+ * ```
45
+ *
46
+ * @example With URL and token
47
+ * ```typescript
48
+ * import { UpstashServerCache } from '@mastra/upstash';
49
+ *
50
+ * const cache = new UpstashServerCache({
51
+ * url: process.env.UPSTASH_REDIS_REST_URL!,
52
+ * token: process.env.UPSTASH_REDIS_REST_TOKEN!,
53
+ * });
54
+ * ```
55
+ */
56
+ export declare class UpstashServerCache extends RedisServerCache {
57
+ constructor(config: UpstashCacheConfig, options?: UpstashServerCacheOptions);
58
+ }
59
+ export { RedisServerCache, upstashPreset, type RedisClient, type RedisServerCacheOptions } from '@mastra/redis';
60
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cache/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAiB,MAAM,eAAe,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAAE,MAAM,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpF;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAAa,kBAAmB,SAAQ,gBAAgB;gBAC1C,MAAM,EAAE,kBAAkB,EAAE,OAAO,GAAE,yBAA8B;CAiBhF;AAGD,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,KAAK,uBAAuB,EAAE,MAAM,eAAe,CAAC"}
@@ -3,7 +3,7 @@ name: mastra-upstash
3
3
  description: Documentation for @mastra/upstash. Use when working with @mastra/upstash APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/upstash"
6
- version: "0.0.0-studio-deploy-20260404182525"
6
+ version: "0.0.0-studio-cli-20260504022012"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,6 +1,15 @@
1
1
  {
2
- "version": "0.0.0-studio-deploy-20260404182525",
2
+ "version": "0.0.0-studio-cli-20260504022012",
3
3
  "package": "@mastra/upstash",
4
- "exports": {},
4
+ "exports": {
5
+ "RedisServerCache": {
6
+ "types": "dist/index.d.ts",
7
+ "implementation": "dist/redis"
8
+ },
9
+ "upstashPreset": {
10
+ "types": "dist/index.d.ts",
11
+ "implementation": "dist/redis"
12
+ }
13
+ },
5
14
  "modules": {}
6
15
  }
@@ -208,7 +208,7 @@ const paragraphMemory = new Memory({
208
208
 
209
209
  ## Structured working memory
210
210
 
211
- Working memory can also be defined using a structured schema instead of a Markdown template. This allows you to specify the exact fields and types that should be tracked, using a [Zod](https://zod.dev/) schema. When using a schema, the agent will see and update working memory as a JSON object matching your schema.
211
+ Working memory can also be defined using a structured schema instead of a Markdown template. This allows you to specify the exact fields and types that should be tracked, using a [Standard JSON Schema](https://standardschema.dev/json-schema) ([Zod](https://zod.dev/), [Valibot](https://valibot.dev/), [ArkType](https://arktype.io/), etc.). When using a schema, the agent will see and update working memory as a JSON object matching your schema.
212
212
 
213
213
  **Important:** You must specify either `template` or `schema`, but not both.
214
214
 
@@ -397,4 +397,4 @@ const response = await agent.generate('What do you know about me?', {
397
397
 
398
398
  - [Working memory with template](https://github.com/mastra-ai/mastra/tree/main/examples/memory-with-template)
399
399
  - [Working memory with schema](https://github.com/mastra-ai/mastra/tree/main/examples/memory-with-schema)
400
- - [Per-resource working memory](https://github.com/mastra-ai/mastra/tree/main/examples/memory-per-resource-example) - Complete example showing resource-scoped memory persistence
400
+ - [Per-resource working memory](https://github.com/mastra-ai/mastra/tree/main/examples/memory-per-resource-example): Complete example showing resource-scoped memory persistence