@mastra/server 0.10.2-alpha.3 → 0.10.2-alpha.4

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,7 +3,8 @@ 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 type { CoreMessage } from '@mastra/core/llm';
6
+ import { CoreMessage } from 'ai';
7
+ import type { CoreMessage as CoreMessage_2 } from '@mastra/core/llm';
7
8
  import { EvalRow } from '@mastra/core/storage';
8
9
  import { GenerateObjectResult } from 'ai';
9
10
  import { GenerateTextResult } from 'ai';
@@ -17,7 +18,6 @@ import type { LegacyWorkflowRuns } from '@mastra/core/storage';
17
18
  import type { Mastra } from '@mastra/core/mastra';
18
19
  import type { MastraMemory } from '@mastra/core/memory';
19
20
  import { MastraMessageV1 } from '@mastra/core/memory';
20
- import { MastraMessageV2 } from '@mastra/core/agent';
21
21
  import type { Message } from '@mastra/core/a2a';
22
22
  import type { QueryResult } from '@mastra/core/vector';
23
23
  import { ReadableStream as ReadableStream_2 } from 'node:stream/web';
@@ -81,7 +81,7 @@ export declare interface Context {
81
81
  mastra: Mastra;
82
82
  }
83
83
 
84
- export declare function convertToCoreMessage(message: Message): CoreMessage;
84
+ export declare function convertToCoreMessage(message: Message): CoreMessage_2;
85
85
 
86
86
  export declare function createErrorResponse(id: number | string | null, error: JSONRPCError<unknown>): JSONRPCResponse<null, unknown>;
87
87
 
@@ -288,7 +288,7 @@ export declare function getMemoryStatusHandler({ mastra, agentId }: Pick<MemoryC
288
288
  export declare function getMessagesHandler({ mastra, agentId, threadId, limit, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId'> & {
289
289
  limit?: number;
290
290
  }): Promise<{
291
- messages: MastraMessageV1[];
291
+ messages: CoreMessage[];
292
292
  uiMessages: UIMessage[];
293
293
  }>;
294
294
 
@@ -611,7 +611,7 @@ export declare function saveMessagesHandler({ mastra, agentId, body, }: Pick<Mem
611
611
  body: {
612
612
  messages: Parameters<MastraMemory['saveMessages']>[0]['messages'];
613
613
  };
614
- }): Promise<MastraMessageV2[]>;
614
+ }): Promise<MastraMessageV1[]>;
615
615
 
616
616
  declare type SerializedStep = {
617
617
  id: string;
@@ -3,7 +3,8 @@ 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 type { CoreMessage } from '@mastra/core/llm';
6
+ import { CoreMessage } from 'ai';
7
+ import type { CoreMessage as CoreMessage_2 } from '@mastra/core/llm';
7
8
  import { EvalRow } from '@mastra/core/storage';
8
9
  import { GenerateObjectResult } from 'ai';
9
10
  import { GenerateTextResult } from 'ai';
@@ -17,7 +18,6 @@ import type { LegacyWorkflowRuns } from '@mastra/core/storage';
17
18
  import type { Mastra } from '@mastra/core/mastra';
18
19
  import type { MastraMemory } from '@mastra/core/memory';
19
20
  import { MastraMessageV1 } from '@mastra/core/memory';
20
- import { MastraMessageV2 } from '@mastra/core/agent';
21
21
  import type { Message } from '@mastra/core/a2a';
22
22
  import type { QueryResult } from '@mastra/core/vector';
23
23
  import { ReadableStream as ReadableStream_2 } from 'node:stream/web';
@@ -81,7 +81,7 @@ export declare interface Context {
81
81
  mastra: Mastra;
82
82
  }
83
83
 
84
- export declare function convertToCoreMessage(message: Message): CoreMessage;
84
+ export declare function convertToCoreMessage(message: Message): CoreMessage_2;
85
85
 
86
86
  export declare function createErrorResponse(id: number | string | null, error: JSONRPCError<unknown>): JSONRPCResponse<null, unknown>;
87
87
 
@@ -288,7 +288,7 @@ export declare function getMemoryStatusHandler({ mastra, agentId }: Pick<MemoryC
288
288
  export declare function getMessagesHandler({ mastra, agentId, threadId, limit, }: Pick<MemoryContext, 'mastra' | 'agentId' | 'threadId'> & {
289
289
  limit?: number;
290
290
  }): Promise<{
291
- messages: MastraMessageV1[];
291
+ messages: CoreMessage[];
292
292
  uiMessages: UIMessage[];
293
293
  }>;
294
294
 
@@ -611,7 +611,7 @@ export declare function saveMessagesHandler({ mastra, agentId, body, }: Pick<Mem
611
611
  body: {
612
612
  messages: Parameters<MastraMemory['saveMessages']>[0]['messages'];
613
613
  };
614
- }): Promise<MastraMessageV2[]>;
614
+ }): Promise<MastraMessageV1[]>;
615
615
 
616
616
  declare type SerializedStep = {
617
617
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/server",
3
- "version": "0.10.2-alpha.3",
3
+ "version": "0.10.2-alpha.4",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "files": [
@@ -61,7 +61,7 @@
61
61
  "zod": "^3.24.3",
62
62
  "zod-to-json-schema": "^3.24.5",
63
63
  "@internal/lint": "0.0.7",
64
- "@mastra/core": "0.10.2-alpha.3"
64
+ "@mastra/core": "0.10.2-alpha.4"
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",