@mastra/server 0.10.1-alpha.3 → 0.10.2-alpha.0

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.
@@ -3,8 +3,7 @@ import type { AgentCard } from '@mastra/core/a2a';
3
3
  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
- import { CoreMessage } from 'ai';
7
- import type { CoreMessage as CoreMessage_2 } from '@mastra/core/llm';
6
+ import type { CoreMessage } from '@mastra/core/llm';
8
7
  import { EvalRow } from '@mastra/core/storage';
9
8
  import { GenerateObjectResult } from 'ai';
10
9
  import { GenerateTextResult } from 'ai';
@@ -17,9 +16,9 @@ import { LegacyWorkflowRunResult } from '@mastra/core/workflows/legacy';
17
16
  import type { LegacyWorkflowRuns } from '@mastra/core/storage';
18
17
  import type { Mastra } from '@mastra/core/mastra';
19
18
  import type { MastraMemory } from '@mastra/core/memory';
20
- import { Message } from 'ai';
21
- import type { Message as Message_2 } from '@mastra/core/a2a';
22
- import { MessageType } from '@mastra/core/memory';
19
+ import { MastraMessageV1 } from '@mastra/core/memory';
20
+ import { MastraMessageV2 } from '@mastra/core/agent';
21
+ import type { Message } from '@mastra/core/a2a';
23
22
  import type { QueryResult } from '@mastra/core/vector';
24
23
  import { ReadableStream as ReadableStream_2 } from 'node:stream/web';
25
24
  import { RuntimeContext } from '@mastra/core/runtime-context';
@@ -37,6 +36,7 @@ import type { TaskQueryParams } from '@mastra/core/a2a';
37
36
  import type { TaskSendParams } from '@mastra/core/a2a';
38
37
  import type { TaskStatus } from '@mastra/core/a2a';
39
38
  import type { ToolAction } from '@mastra/core/tools';
39
+ import { UIMessage } from 'ai';
40
40
  import type { VercelTool } from '@mastra/core/tools';
41
41
  import { WatchEvent } from '@mastra/core/workflows';
42
42
  import type { Workflow } from '@mastra/core/workflows';
@@ -81,7 +81,7 @@ export declare interface Context {
81
81
  mastra: Mastra;
82
82
  }
83
83
 
84
- export declare function convertToCoreMessage(message: Message_2): CoreMessage_2;
84
+ export declare function convertToCoreMessage(message: Message): CoreMessage;
85
85
 
86
86
  export declare function createErrorResponse(id: number | string | null, error: JSONRPCError<unknown>): JSONRPCResponse<null, unknown>;
87
87
 
@@ -105,8 +105,8 @@ export declare function createSuccessResponse<T>(id: number | string | null, res
105
105
 
106
106
  export declare function createTaskContext({ task, userMessage, history, activeCancellations, }: {
107
107
  task: Task;
108
- userMessage: Message_2;
109
- history: Message_2[];
108
+ userMessage: Message;
109
+ history: Message[];
110
110
  activeCancellations: Set<string>;
111
111
  }): TaskContext;
112
112
 
@@ -281,8 +281,8 @@ export declare function getMemoryStatusHandler({ mastra, agentId }: Pick<MemoryC
281
281
  export declare function getMessagesHandler({ mastra, agentId, threadId, limit, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId'> & {
282
282
  limit?: number;
283
283
  }): Promise<{
284
- messages: CoreMessage[];
285
- uiMessages: Message[];
284
+ messages: MastraMessageV1[];
285
+ uiMessages: UIMessage[];
286
286
  }>;
287
287
 
288
288
  export declare function getNetworkByIdHandler({ mastra, networkId, runtimeContext, }: Pick<NetworkContext, 'mastra' | 'networkId' | 'runtimeContext'>): Promise<{
@@ -492,7 +492,7 @@ export declare function loadOrCreateTaskAndHistory({ agentId, taskId, taskStore,
492
492
  agentId: string;
493
493
  taskId: string;
494
494
  taskStore: InMemoryTaskStore;
495
- message: Message_2;
495
+ message: Message;
496
496
  sessionId?: string | null;
497
497
  metadata?: Record<string, unknown> | null;
498
498
  logger?: IMastraLogger;
@@ -602,7 +602,7 @@ export declare function saveMessagesHandler({ mastra, agentId, body, }: Pick<Mem
602
602
  body: {
603
603
  messages: Parameters<MastraMemory['saveMessages']>[0]['messages'];
604
604
  };
605
- }): Promise<MessageType[]>;
605
+ }): Promise<MastraMessageV2[]>;
606
606
 
607
607
  declare type SerializedStep = {
608
608
  id: string;
@@ -3,8 +3,7 @@ import type { AgentCard } from '@mastra/core/a2a';
3
3
  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
- import { CoreMessage } from 'ai';
7
- import type { CoreMessage as CoreMessage_2 } from '@mastra/core/llm';
6
+ import type { CoreMessage } from '@mastra/core/llm';
8
7
  import { EvalRow } from '@mastra/core/storage';
9
8
  import { GenerateObjectResult } from 'ai';
10
9
  import { GenerateTextResult } from 'ai';
@@ -17,9 +16,9 @@ import { LegacyWorkflowRunResult } from '@mastra/core/workflows/legacy';
17
16
  import type { LegacyWorkflowRuns } from '@mastra/core/storage';
18
17
  import type { Mastra } from '@mastra/core/mastra';
19
18
  import type { MastraMemory } from '@mastra/core/memory';
20
- import { Message } from 'ai';
21
- import type { Message as Message_2 } from '@mastra/core/a2a';
22
- import { MessageType } from '@mastra/core/memory';
19
+ import { MastraMessageV1 } from '@mastra/core/memory';
20
+ import { MastraMessageV2 } from '@mastra/core/agent';
21
+ import type { Message } from '@mastra/core/a2a';
23
22
  import type { QueryResult } from '@mastra/core/vector';
24
23
  import { ReadableStream as ReadableStream_2 } from 'node:stream/web';
25
24
  import { RuntimeContext } from '@mastra/core/runtime-context';
@@ -37,6 +36,7 @@ import type { TaskQueryParams } from '@mastra/core/a2a';
37
36
  import type { TaskSendParams } from '@mastra/core/a2a';
38
37
  import type { TaskStatus } from '@mastra/core/a2a';
39
38
  import type { ToolAction } from '@mastra/core/tools';
39
+ import { UIMessage } from 'ai';
40
40
  import type { VercelTool } from '@mastra/core/tools';
41
41
  import { WatchEvent } from '@mastra/core/workflows';
42
42
  import type { Workflow } from '@mastra/core/workflows';
@@ -81,7 +81,7 @@ export declare interface Context {
81
81
  mastra: Mastra;
82
82
  }
83
83
 
84
- export declare function convertToCoreMessage(message: Message_2): CoreMessage_2;
84
+ export declare function convertToCoreMessage(message: Message): CoreMessage;
85
85
 
86
86
  export declare function createErrorResponse(id: number | string | null, error: JSONRPCError<unknown>): JSONRPCResponse<null, unknown>;
87
87
 
@@ -105,8 +105,8 @@ export declare function createSuccessResponse<T>(id: number | string | null, res
105
105
 
106
106
  export declare function createTaskContext({ task, userMessage, history, activeCancellations, }: {
107
107
  task: Task;
108
- userMessage: Message_2;
109
- history: Message_2[];
108
+ userMessage: Message;
109
+ history: Message[];
110
110
  activeCancellations: Set<string>;
111
111
  }): TaskContext;
112
112
 
@@ -281,8 +281,8 @@ export declare function getMemoryStatusHandler({ mastra, agentId }: Pick<MemoryC
281
281
  export declare function getMessagesHandler({ mastra, agentId, threadId, limit, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId'> & {
282
282
  limit?: number;
283
283
  }): Promise<{
284
- messages: CoreMessage[];
285
- uiMessages: Message[];
284
+ messages: MastraMessageV1[];
285
+ uiMessages: UIMessage[];
286
286
  }>;
287
287
 
288
288
  export declare function getNetworkByIdHandler({ mastra, networkId, runtimeContext, }: Pick<NetworkContext, 'mastra' | 'networkId' | 'runtimeContext'>): Promise<{
@@ -492,7 +492,7 @@ export declare function loadOrCreateTaskAndHistory({ agentId, taskId, taskStore,
492
492
  agentId: string;
493
493
  taskId: string;
494
494
  taskStore: InMemoryTaskStore;
495
- message: Message_2;
495
+ message: Message;
496
496
  sessionId?: string | null;
497
497
  metadata?: Record<string, unknown> | null;
498
498
  logger?: IMastraLogger;
@@ -602,7 +602,7 @@ export declare function saveMessagesHandler({ mastra, agentId, body, }: Pick<Mem
602
602
  body: {
603
603
  messages: Parameters<MastraMemory['saveMessages']>[0]['messages'];
604
604
  };
605
- }): Promise<MessageType[]>;
605
+ }): Promise<MastraMessageV2[]>;
606
606
 
607
607
  declare type SerializedStep = {
608
608
  id: string;
@@ -37,7 +37,6 @@ async function getLogsByRunIdHandler({
37
37
  async function getLogTransports({ mastra }) {
38
38
  try {
39
39
  const logger = mastra.getLogger();
40
- console.log(logger);
41
40
  const transports = logger.getTransports();
42
41
  return {
43
42
  transports: transports ? [...transports.keys()] : []
@@ -39,7 +39,6 @@ async function getLogsByRunIdHandler({
39
39
  async function getLogTransports({ mastra }) {
40
40
  try {
41
41
  const logger = mastra.getLogger();
42
- console.log(logger);
43
42
  const transports = logger.getTransports();
44
43
  return {
45
44
  transports: transports ? [...transports.keys()] : []
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
 
3
- var chunk7DLZLWJV_cjs = require('../../chunk-7DLZLWJV.cjs');
3
+ var chunkNEOOQUKW_cjs = require('../../chunk-NEOOQUKW.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "getLogTransports", {
8
8
  enumerable: true,
9
- get: function () { return chunk7DLZLWJV_cjs.getLogTransports; }
9
+ get: function () { return chunkNEOOQUKW_cjs.getLogTransports; }
10
10
  });
11
11
  Object.defineProperty(exports, "getLogsByRunIdHandler", {
12
12
  enumerable: true,
13
- get: function () { return chunk7DLZLWJV_cjs.getLogsByRunIdHandler; }
13
+ get: function () { return chunkNEOOQUKW_cjs.getLogsByRunIdHandler; }
14
14
  });
15
15
  Object.defineProperty(exports, "getLogsHandler", {
16
16
  enumerable: true,
17
- get: function () { return chunk7DLZLWJV_cjs.getLogsHandler; }
17
+ get: function () { return chunkNEOOQUKW_cjs.getLogsHandler; }
18
18
  });
@@ -1 +1 @@
1
- export { getLogTransports, getLogsByRunIdHandler, getLogsHandler } from '../../chunk-WFBJJNCK.js';
1
+ export { getLogTransports, getLogsByRunIdHandler, getLogsHandler } from '../../chunk-DQLE3DVM.js';
@@ -9,7 +9,7 @@ var chunkMMO2HDM6_cjs = require('../chunk-MMO2HDM6.cjs');
9
9
  var chunk5SN4U5AC_cjs = require('../chunk-5SN4U5AC.cjs');
10
10
  var chunkA3KDUGS7_cjs = require('../chunk-A3KDUGS7.cjs');
11
11
  var chunkYIOVBYZH_cjs = require('../chunk-YIOVBYZH.cjs');
12
- var chunk7DLZLWJV_cjs = require('../chunk-7DLZLWJV.cjs');
12
+ var chunkNEOOQUKW_cjs = require('../chunk-NEOOQUKW.cjs');
13
13
  var chunkY7UWRW5X_cjs = require('../chunk-Y7UWRW5X.cjs');
14
14
 
15
15
 
@@ -52,7 +52,7 @@ Object.defineProperty(exports, "legacyWorkflows", {
52
52
  });
53
53
  Object.defineProperty(exports, "logs", {
54
54
  enumerable: true,
55
- get: function () { return chunk7DLZLWJV_cjs.logs_exports; }
55
+ get: function () { return chunkNEOOQUKW_cjs.logs_exports; }
56
56
  });
57
57
  Object.defineProperty(exports, "memory", {
58
58
  enumerable: true,
@@ -7,5 +7,5 @@ export { workflows_exports as workflows } from '../chunk-KUNQFY2W.js';
7
7
  export { a2a_exports as a2a } from '../chunk-P6SCPDYW.js';
8
8
  export { agents_exports as agents } from '../chunk-J3PKLB3A.js';
9
9
  export { legacyWorkflows_exports as legacyWorkflows } from '../chunk-W7VCKPAD.js';
10
- export { logs_exports as logs } from '../chunk-WFBJJNCK.js';
10
+ export { logs_exports as logs } from '../chunk-DQLE3DVM.js';
11
11
  export { memory_exports as memory } from '../chunk-DJJIUEL2.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/server",
3
- "version": "0.10.1-alpha.3",
3
+ "version": "0.10.2-alpha.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "files": [
@@ -60,8 +60,8 @@
60
60
  "vitest": "^2.1.9",
61
61
  "zod": "^3.24.3",
62
62
  "zod-to-json-schema": "^3.24.5",
63
- "@internal/lint": "0.0.6",
64
- "@mastra/core": "0.10.1-alpha.3"
63
+ "@internal/lint": "0.0.7",
64
+ "@mastra/core": "0.10.2-alpha.0"
65
65
  },
66
66
  "scripts": {
67
67
  "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",