Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/dojo-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ jobs:
test_path: tests/serverStarterAllFeaturesTests
services: ["dojo","server-starter-all"]
wait_on: http://localhost:9999,tcp:localhost:8001
- suite: vercel-ai-sdk
test_path: tests/vercelAISdkTests
services: ["dojo"]
wait_on: http://localhost:9999
# - suite: vercel-ai-sdk
# test_path: tests/vercelAISdkTests
# services: ["dojo"]
# wait_on: http://localhost:9999

steps:
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '22'

- name: Install protoc
uses: arduino/setup-protoc@v3
Expand Down
3 changes: 3 additions & 0 deletions typescript-sdk/apps/dojo/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

# mastra
.mastra
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test("[MastraAgentLocal] Agentic Chat sends and receives a message", async ({

await waitForAIResponse(page);
await chat.assertUserMessageVisible("Hi, I am duaa");
await chat.assertAgentReplyVisible(/Hello/i);
await chat.assertAgentReplyVisible(/Hello|Hi/i);
});
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import { test, expect } from "@playwright/test";
import { ToolBaseGenUIPage } from "../../featurePages/ToolBaseGenUIPage";

const pageURL =
"/mastra/feature/tool_based_generative_ui";
const pageURL = "/mastra/feature/tool_based_generative_ui";

// Fails. Not a test issue, issue with the integration or cpk.
test.fixme('[Mastra] Haiku generation and display verification', async ({
page,
}) => {
test("[Mastra] Haiku generation and display verification", async ({ page }) => {
await page.goto(pageURL);

const genAIAgent = new ToolBaseGenUIPage(page);
Expand All @@ -18,23 +14,24 @@ test.fixme('[Mastra] Haiku generation and display verification', async ({
await genAIAgent.checkHaikuDisplay(page);
});

// Fails. Not a test issue, issue with the integration or cpk.
test.fixme('[Mastra] Haiku generation and UI consistency for two different prompts', async ({
page,
}) => {
await page.goto(pageURL);
// test infra issue, not an integration issue
test.fixme(
"[Mastra] Haiku generation and UI consistency for two different prompts",
async ({ page }) => {
await page.goto(pageURL);

const genAIAgent = new ToolBaseGenUIPage(page);
const genAIAgent = new ToolBaseGenUIPage(page);

await expect(genAIAgent.haikuAgentIntro).toBeVisible();
await expect(genAIAgent.haikuAgentIntro).toBeVisible();

const prompt1 = 'Generate Haiku for "I will always win"';
await genAIAgent.generateHaiku(prompt1);
await genAIAgent.checkGeneratedHaiku();
await genAIAgent.checkHaikuDisplay(page);
const prompt1 = 'Generate Haiku for "I will always win"';
await genAIAgent.generateHaiku(prompt1);
await genAIAgent.checkGeneratedHaiku();
await genAIAgent.checkHaikuDisplay(page);

const prompt2 = 'Generate Haiku for "The moon shines bright"';
await genAIAgent.generateHaiku(prompt2);
await genAIAgent.checkGeneratedHaiku(); // Wait for second haiku to be generated
await genAIAgent.checkHaikuDisplay(page); // Now compare the second haiku
});
const prompt2 = 'Generate Haiku for "The moon shines bright"';
await genAIAgent.generateHaiku(prompt2);
await genAIAgent.checkGeneratedHaiku(); // Wait for second haiku to be generated
await genAIAgent.checkHaikuDisplay(page); // Now compare the second haiku
},
);
18 changes: 9 additions & 9 deletions typescript-sdk/apps/dojo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@
"@ag-ui/server-starter": "workspace:*",
"@ag-ui/server-starter-all-features": "workspace:*",
"@ag-ui/vercel-ai-sdk": "workspace:*",
"@ai-sdk/openai": "^1.3.22",
"@copilotkit/react-core": "1.10.5",
"@copilotkit/react-ui": "1.10.5",
"@copilotkit/runtime": "1.10.5",
"@copilotkit/runtime-client-gql": "1.10.5",
"@copilotkit/shared": "1.10.5",
"@mastra/client-js": "^0.10.18",
"@mastra/core": "^0.13.0",
"@mastra/dynamodb": "^0.13.3",
"@mastra/libsql": "^0.13.0",
"@mastra/loggers": "^0.10.5",
"@mastra/memory": "^0.12.0",
"@mastra/client-js": "^0.14.0",
"@mastra/core": "^0.19.0",
"@mastra/dynamodb": "^0.15.4",
"@mastra/libsql": "^0.15.0",
"@mastra/loggers": "^0.10.14",
"@mastra/memory": "^0.15.4",
"@ai-sdk/openai": "^2.0.42",
"@mdx-js/loader": "^3.1.0",
"@mdx-js/mdx": "^3.1.0",
"@mdx-js/react": "^3.1.0",
Expand Down Expand Up @@ -67,7 +67,7 @@
"tailwind-merge": "^3.0.2",
"tailwindcss-animate": "^1.0.7",
"uuid": "^11.1.0",
"zod": "^3.22.4"
"zod": "^3.25.67"
},
"peerDependencies": {
"@ag-ui/client": "workspace:*",
Expand All @@ -93,4 +93,4 @@
"typescript": "^5",
"wait-port": "^1.1.0"
}
}
}
17 changes: 9 additions & 8 deletions typescript-sdk/apps/dojo/src/agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,15 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
return MastraAgent.getLocalAgents({ mastra });
},
},
{
id: "vercel-ai-sdk",
agents: async () => {
return {
agentic_chat: new VercelAISDKAgent({ model: openai("gpt-4o") }),
};
},
},
// Disabled until we can support Vercel AI SDK v5
// {
// id: "vercel-ai-sdk",
// agents: async () => {
// return {
// agentic_chat: new VercelAISDKAgent({ model: openai("gpt-4o") }),
// };
// },
// },
{
id: "langgraph",
agents: async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const Chat = () => {
{
name: "background",
type: "string",
description: "The background. Prefer gradients.",
description: "The background. Prefer gradients. Only use when asked.",
},
],
handler: ({ background }) => {
Expand Down
Loading
Loading