@mastra/server 0.0.0-ai-v5-20250710191716 → 0.0.0-ai-v5-20250718021026

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.
@@ -4,8 +4,8 @@ import type { AgentNetwork } from '@mastra/core/network';
4
4
  import type { Artifact } from '@mastra/core/a2a';
5
5
  import type { BaseLogMessage } from '@mastra/core/logger';
6
6
  import type { CoreMessage } from '@mastra/core/llm';
7
- import { DefaultEngineType } from '@mastra/core/workflows';
8
- import { EvalRow } from '@mastra/core/storage';
7
+ import { DefaultEngineType } from '@mastra/core';
8
+ import { EvalRow } from '@mastra/core';
9
9
  import { GenerateObjectResult } from 'ai';
10
10
  import { GenerateTextResult } from 'ai';
11
11
  import type { IMastraLogger } from '@mastra/core/logger';
@@ -19,7 +19,7 @@ import type { LogLevel } from '@mastra/core/logger';
19
19
  import type { Mastra } from '@mastra/core/mastra';
20
20
  import type { MastraError } from '@mastra/core/error';
21
21
  import type { MastraMemory } from '@mastra/core/memory';
22
- import { MastraMessageV1 } from '@mastra/core/memory';
22
+ import { MastraMessageV1 } from '@mastra/core';
23
23
  import type { Message } from '@mastra/core/a2a';
24
24
  import { ModelMessage } from 'ai';
25
25
  import type { QueryResult } from '@mastra/core/vector';
@@ -28,12 +28,12 @@ import { ReadableStream as ReadableStream_3 } from 'stream/web';
28
28
  import { RuntimeContext } from '@mastra/core/runtime-context';
29
29
  import type { RuntimeContext as RuntimeContext_2 } from '@mastra/core/di';
30
30
  import type { SerializedStepFlowEntry } from '@mastra/core/workflows';
31
- import { Step } from '@mastra/core/workflows';
31
+ import { Step } from '@mastra/core';
32
32
  import { StepExecutionContext } from '@mastra/core/workflows/legacy';
33
33
  import { StepGraph } from '@mastra/core/workflows/legacy';
34
- import { StepResult } from '@mastra/core/workflows';
35
- import { StorageThreadType } from '@mastra/core/memory';
36
- import { StreamEvent } from '@mastra/core/workflows';
34
+ import { StepResult } from '@mastra/core';
35
+ import { StorageThreadType } from '@mastra/core';
36
+ import { StreamEvent } from '@mastra/core';
37
37
  import { Task } from '@mastra/core/a2a';
38
38
  import { TaskAndHistory } from '@mastra/core/a2a';
39
39
  import type { TaskContext } from '@mastra/core/a2a';
@@ -46,8 +46,9 @@ import type { VercelTool } from '@mastra/core/tools';
46
46
  import type { WatchEvent } from '@mastra/core/workflows';
47
47
  import type { Workflow } from '@mastra/core/workflows';
48
48
  import { WorkflowContext as WorkflowContext_2 } from '@mastra/core/workflows/legacy';
49
- import { WorkflowResult } from '@mastra/core/workflows';
49
+ import { WorkflowResult } from '@mastra/core';
50
50
  import type { WorkflowRuns } from '@mastra/core/storage';
51
+ import { WorkingMemoryTemplate } from '@mastra/core';
51
52
  import { ZodBoolean } from 'zod';
52
53
  import { ZodEnum } from 'zod';
53
54
  import { ZodNumber } from 'zod';
@@ -467,6 +468,21 @@ export declare function getWorkflowRunsHandler({ mastra, workflowId, fromDate, t
467
468
 
468
469
  export declare function getWorkflowsHandler({ mastra }: WorkflowContext_3): Promise<any>;
469
470
 
471
+ /**
472
+ * Handler to get the working memory for a thread (optionally resource-scoped).
473
+ * @returns workingMemory - the working memory for the thread
474
+ * @returns source - thread or resource
475
+ */
476
+ export declare function getWorkingMemoryHandler({ mastra, agentId, threadId, resourceId, networkId, runtimeContext, memoryConfig, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId' | 'networkId' | 'runtimeContext'> & {
477
+ resourceId?: Parameters<MastraMemory['getWorkingMemory']>[0]['resourceId'];
478
+ memoryConfig?: Parameters<MastraMemory['getWorkingMemory']>[0]['memoryConfig'];
479
+ }): Promise<{
480
+ workingMemory: string | null;
481
+ source: string;
482
+ workingMemoryTemplate: WorkingMemoryTemplate | null;
483
+ threadExists: boolean;
484
+ }>;
485
+
470
486
  export declare function handleError(error: unknown, defaultMessage: string): never;
471
487
 
472
488
  export declare function handleTaskCancel({ requestId, taskStore, agentId, taskId, logger, }: {
@@ -651,7 +667,7 @@ export declare function loopStreamVNextNetworkHandler({ mastra, networkId, body,
651
667
  getWorkflowState: () => Promise<WorkflowResult<ZodObject< {
652
668
  task: ZodString;
653
669
  resourceId: ZodString;
654
- resourceType: ZodEnum<["agent", "workflow", "none", "tool", "none"]>;
670
+ resourceType: ZodEnum<["agent", "workflow", "none", "tool"]>;
655
671
  prompt: ZodString;
656
672
  result: ZodString;
657
673
  isComplete: ZodOptional<ZodBoolean>;
@@ -703,7 +719,9 @@ export declare namespace memory {
703
719
  createThreadHandler,
704
720
  updateThreadHandler,
705
721
  deleteThreadHandler,
706
- getMessagesHandler
722
+ getMessagesHandler,
723
+ getWorkingMemoryHandler,
724
+ updateWorkingMemoryHandler
707
725
  }
708
726
  }
709
727
 
@@ -887,7 +905,7 @@ export declare function streamGenerateVNextNetworkHandler({ mastra, networkId, b
887
905
  getWorkflowState: () => Promise<WorkflowResult<ZodObject< {
888
906
  task: ZodString;
889
907
  resourceId: ZodString;
890
- resourceType: ZodEnum<["agent", "workflow", "none", "tool", "none"]>;
908
+ resourceType: ZodEnum<["agent", "workflow", "none", "tool"]>;
891
909
  prompt: ZodString;
892
910
  result: ZodString;
893
911
  isComplete: ZodOptional<ZodBoolean>;
@@ -1001,6 +1019,17 @@ export declare function updateThreadHandler({ mastra, agentId, threadId, body, n
1001
1019
  body?: Parameters<MastraMemory['saveThread']>[0]['thread'];
1002
1020
  }): Promise<StorageThreadType>;
1003
1021
 
1022
+ /**
1023
+ * Handler to update the working memory for a thread (optionally resource-scoped).
1024
+ * @param threadId - the thread id
1025
+ * @param body - the body containing the working memory to update and the resource id (optional)
1026
+ */
1027
+ export declare function updateWorkingMemoryHandler({ mastra, agentId, threadId, body, networkId, runtimeContext, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId' | 'networkId' | 'runtimeContext'> & {
1028
+ body: Omit<Parameters<MastraMemory['updateWorkingMemory']>[0], 'threadId'>;
1029
+ }): Promise<{
1030
+ success: boolean;
1031
+ }>;
1032
+
1004
1033
  declare interface UpsertRequest {
1005
1034
  indexName: string;
1006
1035
  vectors: number[][];
@@ -4,8 +4,8 @@ import type { AgentNetwork } from '@mastra/core/network';
4
4
  import type { Artifact } from '@mastra/core/a2a';
5
5
  import type { BaseLogMessage } from '@mastra/core/logger';
6
6
  import type { CoreMessage } from '@mastra/core/llm';
7
- import { DefaultEngineType } from '@mastra/core/workflows';
8
- import { EvalRow } from '@mastra/core/storage';
7
+ import { DefaultEngineType } from '@mastra/core';
8
+ import { EvalRow } from '@mastra/core';
9
9
  import { GenerateObjectResult } from 'ai';
10
10
  import { GenerateTextResult } from 'ai';
11
11
  import type { IMastraLogger } from '@mastra/core/logger';
@@ -19,7 +19,7 @@ import type { LogLevel } from '@mastra/core/logger';
19
19
  import type { Mastra } from '@mastra/core/mastra';
20
20
  import type { MastraError } from '@mastra/core/error';
21
21
  import type { MastraMemory } from '@mastra/core/memory';
22
- import { MastraMessageV1 } from '@mastra/core/memory';
22
+ import { MastraMessageV1 } from '@mastra/core';
23
23
  import type { Message } from '@mastra/core/a2a';
24
24
  import { ModelMessage } from 'ai';
25
25
  import type { QueryResult } from '@mastra/core/vector';
@@ -28,12 +28,12 @@ import { ReadableStream as ReadableStream_3 } from 'stream/web';
28
28
  import { RuntimeContext } from '@mastra/core/runtime-context';
29
29
  import type { RuntimeContext as RuntimeContext_2 } from '@mastra/core/di';
30
30
  import type { SerializedStepFlowEntry } from '@mastra/core/workflows';
31
- import { Step } from '@mastra/core/workflows';
31
+ import { Step } from '@mastra/core';
32
32
  import { StepExecutionContext } from '@mastra/core/workflows/legacy';
33
33
  import { StepGraph } from '@mastra/core/workflows/legacy';
34
- import { StepResult } from '@mastra/core/workflows';
35
- import { StorageThreadType } from '@mastra/core/memory';
36
- import { StreamEvent } from '@mastra/core/workflows';
34
+ import { StepResult } from '@mastra/core';
35
+ import { StorageThreadType } from '@mastra/core';
36
+ import { StreamEvent } from '@mastra/core';
37
37
  import { Task } from '@mastra/core/a2a';
38
38
  import { TaskAndHistory } from '@mastra/core/a2a';
39
39
  import type { TaskContext } from '@mastra/core/a2a';
@@ -46,8 +46,9 @@ import type { VercelTool } from '@mastra/core/tools';
46
46
  import type { WatchEvent } from '@mastra/core/workflows';
47
47
  import type { Workflow } from '@mastra/core/workflows';
48
48
  import { WorkflowContext as WorkflowContext_2 } from '@mastra/core/workflows/legacy';
49
- import { WorkflowResult } from '@mastra/core/workflows';
49
+ import { WorkflowResult } from '@mastra/core';
50
50
  import type { WorkflowRuns } from '@mastra/core/storage';
51
+ import { WorkingMemoryTemplate } from '@mastra/core';
51
52
  import { ZodBoolean } from 'zod';
52
53
  import { ZodEnum } from 'zod';
53
54
  import { ZodNumber } from 'zod';
@@ -467,6 +468,21 @@ export declare function getWorkflowRunsHandler({ mastra, workflowId, fromDate, t
467
468
 
468
469
  export declare function getWorkflowsHandler({ mastra }: WorkflowContext_3): Promise<any>;
469
470
 
471
+ /**
472
+ * Handler to get the working memory for a thread (optionally resource-scoped).
473
+ * @returns workingMemory - the working memory for the thread
474
+ * @returns source - thread or resource
475
+ */
476
+ export declare function getWorkingMemoryHandler({ mastra, agentId, threadId, resourceId, networkId, runtimeContext, memoryConfig, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId' | 'networkId' | 'runtimeContext'> & {
477
+ resourceId?: Parameters<MastraMemory['getWorkingMemory']>[0]['resourceId'];
478
+ memoryConfig?: Parameters<MastraMemory['getWorkingMemory']>[0]['memoryConfig'];
479
+ }): Promise<{
480
+ workingMemory: string | null;
481
+ source: string;
482
+ workingMemoryTemplate: WorkingMemoryTemplate | null;
483
+ threadExists: boolean;
484
+ }>;
485
+
470
486
  export declare function handleError(error: unknown, defaultMessage: string): never;
471
487
 
472
488
  export declare function handleTaskCancel({ requestId, taskStore, agentId, taskId, logger, }: {
@@ -651,7 +667,7 @@ export declare function loopStreamVNextNetworkHandler({ mastra, networkId, body,
651
667
  getWorkflowState: () => Promise<WorkflowResult<ZodObject< {
652
668
  task: ZodString;
653
669
  resourceId: ZodString;
654
- resourceType: ZodEnum<["agent", "workflow", "none", "tool", "none"]>;
670
+ resourceType: ZodEnum<["agent", "workflow", "none", "tool"]>;
655
671
  prompt: ZodString;
656
672
  result: ZodString;
657
673
  isComplete: ZodOptional<ZodBoolean>;
@@ -703,7 +719,9 @@ export declare namespace memory {
703
719
  createThreadHandler,
704
720
  updateThreadHandler,
705
721
  deleteThreadHandler,
706
- getMessagesHandler
722
+ getMessagesHandler,
723
+ getWorkingMemoryHandler,
724
+ updateWorkingMemoryHandler
707
725
  }
708
726
  }
709
727
 
@@ -887,7 +905,7 @@ export declare function streamGenerateVNextNetworkHandler({ mastra, networkId, b
887
905
  getWorkflowState: () => Promise<WorkflowResult<ZodObject< {
888
906
  task: ZodString;
889
907
  resourceId: ZodString;
890
- resourceType: ZodEnum<["agent", "workflow", "none", "tool", "none"]>;
908
+ resourceType: ZodEnum<["agent", "workflow", "none", "tool"]>;
891
909
  prompt: ZodString;
892
910
  result: ZodString;
893
911
  isComplete: ZodOptional<ZodBoolean>;
@@ -1001,6 +1019,17 @@ export declare function updateThreadHandler({ mastra, agentId, threadId, body, n
1001
1019
  body?: Parameters<MastraMemory['saveThread']>[0]['thread'];
1002
1020
  }): Promise<StorageThreadType>;
1003
1021
 
1022
+ /**
1023
+ * Handler to update the working memory for a thread (optionally resource-scoped).
1024
+ * @param threadId - the thread id
1025
+ * @param body - the body containing the working memory to update and the resource id (optional)
1026
+ */
1027
+ export declare function updateWorkingMemoryHandler({ mastra, agentId, threadId, body, networkId, runtimeContext, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId' | 'networkId' | 'runtimeContext'> & {
1028
+ body: Omit<Parameters<MastraMemory['updateWorkingMemory']>[0], 'threadId'>;
1029
+ }): Promise<{
1030
+ success: boolean;
1031
+ }>;
1032
+
1004
1033
  declare interface UpsertRequest {
1005
1034
  indexName: string;
1006
1035
  vectors: number[][];
@@ -2,6 +2,7 @@ import { validateBody } from './chunk-RSEO4XPX.js';
2
2
  import { handleError } from './chunk-LF7P5PLR.js';
3
3
  import { HTTPException } from './chunk-LCM566I4.js';
4
4
  import { __export } from './chunk-MLKGABMK.js';
5
+ import { generateEmptyFromSchema } from '@mastra/core';
5
6
 
6
7
  // src/server/handlers/memory.ts
7
8
  var memory_exports = {};
@@ -12,8 +13,10 @@ __export(memory_exports, {
12
13
  getMessagesHandler: () => getMessagesHandler,
13
14
  getThreadByIdHandler: () => getThreadByIdHandler,
14
15
  getThreadsHandler: () => getThreadsHandler,
16
+ getWorkingMemoryHandler: () => getWorkingMemoryHandler,
15
17
  saveMessagesHandler: () => saveMessagesHandler,
16
- updateThreadHandler: () => updateThreadHandler
18
+ updateThreadHandler: () => updateThreadHandler,
19
+ updateWorkingMemoryHandler: () => updateWorkingMemoryHandler
17
20
  });
18
21
  async function getMemoryFromContext({
19
22
  mastra,
@@ -250,5 +253,57 @@ async function getMessagesHandler({
250
253
  return handleError(error, "Error getting messages");
251
254
  }
252
255
  }
256
+ async function getWorkingMemoryHandler({
257
+ mastra,
258
+ agentId,
259
+ threadId,
260
+ resourceId,
261
+ networkId,
262
+ runtimeContext,
263
+ memoryConfig
264
+ }) {
265
+ try {
266
+ const memory = await getMemoryFromContext({ mastra, agentId, networkId, runtimeContext });
267
+ validateBody({ threadId });
268
+ if (!memory) {
269
+ throw new HTTPException(400, { message: "Memory is not initialized" });
270
+ }
271
+ const thread = await memory.getThreadById({ threadId });
272
+ const threadExists = !!thread;
273
+ const template = await memory.getWorkingMemoryTemplate({ memoryConfig });
274
+ const workingMemoryTemplate = template?.format === "json" ? { ...template, content: JSON.stringify(generateEmptyFromSchema(template.content)) } : template;
275
+ const workingMemory = await memory.getWorkingMemory({ threadId, resourceId, memoryConfig });
276
+ const config = memory.getMergedThreadConfig(memoryConfig || {});
277
+ const source = config.workingMemory?.scope === "resource" && resourceId ? "resource" : "thread";
278
+ return { workingMemory, source, workingMemoryTemplate, threadExists };
279
+ } catch (error) {
280
+ return handleError(error, "Error getting working memory");
281
+ }
282
+ }
283
+ async function updateWorkingMemoryHandler({
284
+ mastra,
285
+ agentId,
286
+ threadId,
287
+ body,
288
+ networkId,
289
+ runtimeContext
290
+ }) {
291
+ try {
292
+ validateBody({ threadId });
293
+ const memory = await getMemoryFromContext({ mastra, agentId, networkId, runtimeContext });
294
+ const { resourceId, memoryConfig, workingMemory } = body;
295
+ if (!memory) {
296
+ throw new HTTPException(400, { message: "Memory is not initialized" });
297
+ }
298
+ const thread = await memory.getThreadById({ threadId });
299
+ if (!thread) {
300
+ throw new HTTPException(404, { message: "Thread not found" });
301
+ }
302
+ await memory.updateWorkingMemory({ threadId, resourceId, workingMemory, memoryConfig });
303
+ return { success: true };
304
+ } catch (error) {
305
+ return handleError(error, "Error updating working memory");
306
+ }
307
+ }
253
308
 
254
- export { createThreadHandler, deleteThreadHandler, getMemoryStatusHandler, getMessagesHandler, getThreadByIdHandler, getThreadsHandler, memory_exports, saveMessagesHandler, updateThreadHandler };
309
+ export { createThreadHandler, deleteThreadHandler, getMemoryStatusHandler, getMessagesHandler, getThreadByIdHandler, getThreadsHandler, getWorkingMemoryHandler, memory_exports, saveMessagesHandler, updateThreadHandler, updateWorkingMemoryHandler };
@@ -4,6 +4,7 @@ var chunkCCGRCYWJ_cjs = require('./chunk-CCGRCYWJ.cjs');
4
4
  var chunkPZQDCRPV_cjs = require('./chunk-PZQDCRPV.cjs');
5
5
  var chunk2KZFMI6P_cjs = require('./chunk-2KZFMI6P.cjs');
6
6
  var chunk75ZPJI57_cjs = require('./chunk-75ZPJI57.cjs');
7
+ var core = require('@mastra/core');
7
8
 
8
9
  // src/server/handlers/memory.ts
9
10
  var memory_exports = {};
@@ -14,8 +15,10 @@ chunk75ZPJI57_cjs.__export(memory_exports, {
14
15
  getMessagesHandler: () => getMessagesHandler,
15
16
  getThreadByIdHandler: () => getThreadByIdHandler,
16
17
  getThreadsHandler: () => getThreadsHandler,
18
+ getWorkingMemoryHandler: () => getWorkingMemoryHandler,
17
19
  saveMessagesHandler: () => saveMessagesHandler,
18
- updateThreadHandler: () => updateThreadHandler
20
+ updateThreadHandler: () => updateThreadHandler,
21
+ updateWorkingMemoryHandler: () => updateWorkingMemoryHandler
19
22
  });
20
23
  async function getMemoryFromContext({
21
24
  mastra,
@@ -252,6 +255,58 @@ async function getMessagesHandler({
252
255
  return chunkPZQDCRPV_cjs.handleError(error, "Error getting messages");
253
256
  }
254
257
  }
258
+ async function getWorkingMemoryHandler({
259
+ mastra,
260
+ agentId,
261
+ threadId,
262
+ resourceId,
263
+ networkId,
264
+ runtimeContext,
265
+ memoryConfig
266
+ }) {
267
+ try {
268
+ const memory = await getMemoryFromContext({ mastra, agentId, networkId, runtimeContext });
269
+ chunkCCGRCYWJ_cjs.validateBody({ threadId });
270
+ if (!memory) {
271
+ throw new chunk2KZFMI6P_cjs.HTTPException(400, { message: "Memory is not initialized" });
272
+ }
273
+ const thread = await memory.getThreadById({ threadId });
274
+ const threadExists = !!thread;
275
+ const template = await memory.getWorkingMemoryTemplate({ memoryConfig });
276
+ const workingMemoryTemplate = template?.format === "json" ? { ...template, content: JSON.stringify(core.generateEmptyFromSchema(template.content)) } : template;
277
+ const workingMemory = await memory.getWorkingMemory({ threadId, resourceId, memoryConfig });
278
+ const config = memory.getMergedThreadConfig(memoryConfig || {});
279
+ const source = config.workingMemory?.scope === "resource" && resourceId ? "resource" : "thread";
280
+ return { workingMemory, source, workingMemoryTemplate, threadExists };
281
+ } catch (error) {
282
+ return chunkPZQDCRPV_cjs.handleError(error, "Error getting working memory");
283
+ }
284
+ }
285
+ async function updateWorkingMemoryHandler({
286
+ mastra,
287
+ agentId,
288
+ threadId,
289
+ body,
290
+ networkId,
291
+ runtimeContext
292
+ }) {
293
+ try {
294
+ chunkCCGRCYWJ_cjs.validateBody({ threadId });
295
+ const memory = await getMemoryFromContext({ mastra, agentId, networkId, runtimeContext });
296
+ const { resourceId, memoryConfig, workingMemory } = body;
297
+ if (!memory) {
298
+ throw new chunk2KZFMI6P_cjs.HTTPException(400, { message: "Memory is not initialized" });
299
+ }
300
+ const thread = await memory.getThreadById({ threadId });
301
+ if (!thread) {
302
+ throw new chunk2KZFMI6P_cjs.HTTPException(404, { message: "Thread not found" });
303
+ }
304
+ await memory.updateWorkingMemory({ threadId, resourceId, workingMemory, memoryConfig });
305
+ return { success: true };
306
+ } catch (error) {
307
+ return chunkPZQDCRPV_cjs.handleError(error, "Error updating working memory");
308
+ }
309
+ }
255
310
 
256
311
  exports.createThreadHandler = createThreadHandler;
257
312
  exports.deleteThreadHandler = deleteThreadHandler;
@@ -259,6 +314,8 @@ exports.getMemoryStatusHandler = getMemoryStatusHandler;
259
314
  exports.getMessagesHandler = getMessagesHandler;
260
315
  exports.getThreadByIdHandler = getThreadByIdHandler;
261
316
  exports.getThreadsHandler = getThreadsHandler;
317
+ exports.getWorkingMemoryHandler = getWorkingMemoryHandler;
262
318
  exports.memory_exports = memory_exports;
263
319
  exports.saveMessagesHandler = saveMessagesHandler;
264
320
  exports.updateThreadHandler = updateThreadHandler;
321
+ exports.updateWorkingMemoryHandler = updateWorkingMemoryHandler;
@@ -1,38 +1,46 @@
1
1
  'use strict';
2
2
 
3
- var chunkKQ6G2KOA_cjs = require('../../chunk-KQ6G2KOA.cjs');
3
+ var chunkVDTQM2M5_cjs = require('../../chunk-VDTQM2M5.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "createThreadHandler", {
8
8
  enumerable: true,
9
- get: function () { return chunkKQ6G2KOA_cjs.createThreadHandler; }
9
+ get: function () { return chunkVDTQM2M5_cjs.createThreadHandler; }
10
10
  });
11
11
  Object.defineProperty(exports, "deleteThreadHandler", {
12
12
  enumerable: true,
13
- get: function () { return chunkKQ6G2KOA_cjs.deleteThreadHandler; }
13
+ get: function () { return chunkVDTQM2M5_cjs.deleteThreadHandler; }
14
14
  });
15
15
  Object.defineProperty(exports, "getMemoryStatusHandler", {
16
16
  enumerable: true,
17
- get: function () { return chunkKQ6G2KOA_cjs.getMemoryStatusHandler; }
17
+ get: function () { return chunkVDTQM2M5_cjs.getMemoryStatusHandler; }
18
18
  });
19
19
  Object.defineProperty(exports, "getMessagesHandler", {
20
20
  enumerable: true,
21
- get: function () { return chunkKQ6G2KOA_cjs.getMessagesHandler; }
21
+ get: function () { return chunkVDTQM2M5_cjs.getMessagesHandler; }
22
22
  });
23
23
  Object.defineProperty(exports, "getThreadByIdHandler", {
24
24
  enumerable: true,
25
- get: function () { return chunkKQ6G2KOA_cjs.getThreadByIdHandler; }
25
+ get: function () { return chunkVDTQM2M5_cjs.getThreadByIdHandler; }
26
26
  });
27
27
  Object.defineProperty(exports, "getThreadsHandler", {
28
28
  enumerable: true,
29
- get: function () { return chunkKQ6G2KOA_cjs.getThreadsHandler; }
29
+ get: function () { return chunkVDTQM2M5_cjs.getThreadsHandler; }
30
+ });
31
+ Object.defineProperty(exports, "getWorkingMemoryHandler", {
32
+ enumerable: true,
33
+ get: function () { return chunkVDTQM2M5_cjs.getWorkingMemoryHandler; }
30
34
  });
31
35
  Object.defineProperty(exports, "saveMessagesHandler", {
32
36
  enumerable: true,
33
- get: function () { return chunkKQ6G2KOA_cjs.saveMessagesHandler; }
37
+ get: function () { return chunkVDTQM2M5_cjs.saveMessagesHandler; }
34
38
  });
35
39
  Object.defineProperty(exports, "updateThreadHandler", {
36
40
  enumerable: true,
37
- get: function () { return chunkKQ6G2KOA_cjs.updateThreadHandler; }
41
+ get: function () { return chunkVDTQM2M5_cjs.updateThreadHandler; }
42
+ });
43
+ Object.defineProperty(exports, "updateWorkingMemoryHandler", {
44
+ enumerable: true,
45
+ get: function () { return chunkVDTQM2M5_cjs.updateWorkingMemoryHandler; }
38
46
  });
@@ -6,3 +6,5 @@ export { createThreadHandler } from '../../_tsup-dts-rollup.cjs';
6
6
  export { updateThreadHandler } from '../../_tsup-dts-rollup.cjs';
7
7
  export { deleteThreadHandler } from '../../_tsup-dts-rollup.cjs';
8
8
  export { getMessagesHandler } from '../../_tsup-dts-rollup.cjs';
9
+ export { getWorkingMemoryHandler } from '../../_tsup-dts-rollup.cjs';
10
+ export { updateWorkingMemoryHandler } from '../../_tsup-dts-rollup.cjs';
@@ -6,3 +6,5 @@ export { createThreadHandler } from '../../_tsup-dts-rollup.js';
6
6
  export { updateThreadHandler } from '../../_tsup-dts-rollup.js';
7
7
  export { deleteThreadHandler } from '../../_tsup-dts-rollup.js';
8
8
  export { getMessagesHandler } from '../../_tsup-dts-rollup.js';
9
+ export { getWorkingMemoryHandler } from '../../_tsup-dts-rollup.js';
10
+ export { updateWorkingMemoryHandler } from '../../_tsup-dts-rollup.js';
@@ -1 +1 @@
1
- export { createThreadHandler, deleteThreadHandler, getMemoryStatusHandler, getMessagesHandler, getThreadByIdHandler, getThreadsHandler, saveMessagesHandler, updateThreadHandler } from '../../chunk-FGT53TTD.js';
1
+ export { createThreadHandler, deleteThreadHandler, getMemoryStatusHandler, getMessagesHandler, getThreadByIdHandler, getThreadsHandler, getWorkingMemoryHandler, saveMessagesHandler, updateThreadHandler, updateWorkingMemoryHandler } from '../../chunk-N6KVUULV.js';
@@ -10,7 +10,7 @@ var chunkT7WA465P_cjs = require('../chunk-T7WA465P.cjs');
10
10
  var chunk34GEZJPU_cjs = require('../chunk-34GEZJPU.cjs');
11
11
  var chunkUCV4247U_cjs = require('../chunk-UCV4247U.cjs');
12
12
  var chunkQGX47B5D_cjs = require('../chunk-QGX47B5D.cjs');
13
- var chunkKQ6G2KOA_cjs = require('../chunk-KQ6G2KOA.cjs');
13
+ var chunkVDTQM2M5_cjs = require('../chunk-VDTQM2M5.cjs');
14
14
 
15
15
 
16
16
 
@@ -56,5 +56,5 @@ Object.defineProperty(exports, "logs", {
56
56
  });
57
57
  Object.defineProperty(exports, "memory", {
58
58
  enumerable: true,
59
- get: function () { return chunkKQ6G2KOA_cjs.memory_exports; }
59
+ get: function () { return chunkVDTQM2M5_cjs.memory_exports; }
60
60
  });
@@ -8,4 +8,4 @@ export { a2a_exports as a2a } from '../chunk-B36R2PHA.js';
8
8
  export { agents_exports as agents } from '../chunk-OKL5JVWU.js';
9
9
  export { legacyWorkflows_exports as legacyWorkflows } from '../chunk-ZYAFP2AV.js';
10
10
  export { logs_exports as logs } from '../chunk-4D66QEKC.js';
11
- export { memory_exports as memory } from '../chunk-FGT53TTD.js';
11
+ export { memory_exports as memory } from '../chunk-N6KVUULV.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/server",
3
- "version": "0.0.0-ai-v5-20250710191716",
3
+ "version": "0.0.0-ai-v5-20250718021026",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "files": [
@@ -46,21 +46,21 @@
46
46
  "license": "Apache-2.0",
47
47
  "peerDependencies": {
48
48
  "zod": "^3.0.0",
49
- "@mastra/core": "0.0.0-ai-v5-20250710191716"
49
+ "@mastra/core": "0.0.0-ai-v5-20250718021026"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@ai-sdk/openai": "2.0.0-beta.6",
53
53
  "@microsoft/api-extractor": "^7.52.8",
54
54
  "@types/node": "^20.19.0",
55
- "eslint": "^9.29.0",
55
+ "eslint": "^9.30.1",
56
56
  "superjson": "^2.2.2",
57
57
  "tsup": "^8.5.0",
58
58
  "typescript": "^5.8.3",
59
59
  "vitest": "^3.2.4",
60
60
  "zod": "^3.25.67",
61
61
  "zod-to-json-schema": "^3.24.5",
62
- "@internal/lint": "0.0.0-ai-v5-20250710191716",
63
- "@mastra/core": "0.0.0-ai-v5-20250710191716"
62
+ "@internal/lint": "0.0.0-ai-v5-20250718021026",
63
+ "@mastra/core": "0.0.0-ai-v5-20250718021026"
64
64
  },
65
65
  "scripts": {
66
66
  "build": "tsup src/index.ts src/server/handlers.ts src/server/handlers/*.ts !src/server/handlers/*.test.ts --format esm,cjs --clean --experimental-dts --treeshake=smallest --splitting",