Skip to content

Commit d2aeeb8

Browse files
committed
update code
1 parent 4e06521 commit d2aeeb8

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

integrations/mastra/typescript/src/mastra.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import type {
1212
ToolCallStartEvent,
1313
} from "@ag-ui/client";
1414
import { AbstractAgent, EventType } from "@ag-ui/client";
15-
import type { StorageThreadType } from "@mastra/core";
15+
import type { StorageThreadType } from "@mastra/core/memory";
1616
import { Agent as LocalMastraAgent } from "@mastra/core/agent";
1717
import { RequestContext } from "@mastra/core/request-context";
1818
import { randomUUID } from "@ag-ui/client";

integrations/mastra/typescript/src/utils.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import type { InputContent, Message } from "@ag-ui/client";
22
import { AbstractAgent } from "@ag-ui/client";
33
import { MastraClient } from "@mastra/client-js";
4-
import type { CoreMessage, Mastra } from "@mastra/core";
4+
import type { Mastra } from "@mastra/core";
5+
import type { CoreMessage } from "@mastra/core/llm";
56
import { Agent as LocalMastraAgent } from "@mastra/core/agent";
67
import { RequestContext } from "@mastra/core/request-context";
78
import { MastraAgent } from "./mastra";
@@ -95,7 +96,7 @@ export async function getRemoteAgents({
9596
mastraClient,
9697
resourceId,
9798
}: GetRemoteAgentsOptions): Promise<Record<string, AbstractAgent>> {
98-
const agents = await mastraClient.getAgents();
99+
const agents = await mastraClient.listAgents();
99100

100101
return Object.entries(agents).reduce(
101102
(acc, [agentId]) => {
@@ -124,7 +125,7 @@ export function getLocalAgents({
124125
resourceId,
125126
requestContext,
126127
}: GetLocalAgentsOptions): Record<string, AbstractAgent> {
127-
const agents = mastra.getAgents() || {};
128+
const agents = mastra.listAgents() || {};
128129

129130
const agentAGUI = Object.entries(agents).reduce(
130131
(acc, [agentId, agent]) => {

0 commit comments

Comments
 (0)