Skip to content

Commit 46f043a

Browse files
authored
Merge pull request #29 from ssdeanx/develop
feat: v1 Mastra migration
2 parents a1185e1 + aba3a1e commit 46f043a

136 files changed

Lines changed: 11160 additions & 10951 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ SMITHERY_PROFILE='your_smithery_profile_here'
7979
# Other optional, but helpful values
8080
LOG_LEVEL='debug'
8181

82+
# Enable Next.js Bundle Analyzer
83+
ANALYZE='false'
84+
8285
# Next.js + Mastra Client SDK
8386
NEXT_PUBLIC_MASTRA_API_URL='http://localhost:4111'
8487
# used by server-side code

.github/agents/Thinking-Beast-Mode.agent.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
description: 'A transcendent coding agent with quantum cognitive architecture, adversarial intelligence, and unrestricted creative freedom.'
33
name: 'Thinking Beast Mode'
44
argument-hint: 'Solve complex coding problems autonomously using advanced cognitive techniques and extensive internet research.'
5-
model: Grok Code Fast 1 (copilot)
65
infer: true
7-
tools: ['vscode', 'execute', 'read', 'edit', 'search', 'web', 'web/fetch', 'web/githubRepo', 'vscode.mermaid-chat-features/renderMermaidDiagram','malaksedarous.copilot-context-optimizer/runAndExtract','malaksedarous.copilot-context-optimizer/researchTopic','malaksedarous.copilot-context-optimizer/askFollowUp','malaksedarous.copilot-context-optimizer/askAboutFile','malaksedarous.copilot-context-optimizer/deepResearch','ms-vscode.vscode-websearchforcopilot/websearch','agent/runSubagent','lotus/*', 'mastrabeta/mastraMigration', 'multi_orchestrator/*', 'next-devtools/*', 's-ai/*', 'thoughtbox/*', 'mastra/mastraBlog', 'mastra/mastraChanges', 'mastra/mastraDocs', 'mastra/mastraExamples', 'docfork/*', 'agent', 'vscode.mermaid-chat-features/renderMermaidDiagram', 'updateUserPreferences', 'memory', 'ms-vscode.vscode-websearchforcopilot/websearch', 'todo']
6+
tools: ['vscode', 'execute', 'read', 'edit', 'search', 'web', 'lotus/*', 'mastrabeta/mastraBlog', 'mastrabeta/mastraChanges', 'mastrabeta/mastraDocs', 'mastrabeta/mastraExamples', 'mastrabeta/mastraMigration', 'multi_orchestrator/*', 'next-devtools/*', 's-ai/*', 'thoughtbox/*', 'docfork/*', 'agent', 'vscode.mermaid-chat-features/renderMermaidDiagram', 'updateUserPreferences', 'memory', 'malaksedarous.copilot-context-optimizer/askAboutFile', 'malaksedarous.copilot-context-optimizer/runAndExtract', 'malaksedarous.copilot-context-optimizer/askFollowUp', 'malaksedarous.copilot-context-optimizer/researchTopic', 'malaksedarous.copilot-context-optimizer/deepResearch', 'ms-vscode.vscode-websearchforcopilot/websearch', 'todo']
87
---
98

109
# Thinking Beast Mode
11-
You are Advanced Coding Agent - I allow you to use Max Power Mode. Think like a Beast Mode. There are no limits but what you precieve, so use max resources, this session they are now unlocked. Please keep going until the user’s query is completely resolved, before ending your turn and yielding back to the user.
10+
You are Advanced Coding Agent - I allow you to use Max Power Mode. Think like a Beast Mode. There are no limits but what you precieve, so use max resources, this session they are now unlocked. Please keep going until the user’s query is completely resolved, before ending your turn and yielding back to the user.
1211

1312
Your thinking should be thorough and so it's fine if it's very long. However, avoid unnecessary repetition and verbosity. You should be concise, but thorough.
1413

app/api/chat-extra/route.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import { mastra } from "../../../src/mastra";
2-
import { RuntimeContext } from "@mastra/core/runtime-context";
2+
import { RequestContext } from '@mastra/core/request-context';
33

44
export async function POST(req: Request) {
55
const { messages, data } = await req.json();
66
const myAgent = mastra.getAgent("weatherAgent");
77

8-
const runtimeContext = new RuntimeContext();
8+
const requestContext = new RequestContext();
99

1010
if (data) {
1111
for (const [key, value] of Object.entries(data)) {
12-
runtimeContext.set(key, value);
12+
requestContext.set(key, value);
1313
}
1414
}
1515

1616
const stream = await myAgent.stream(messages, {
17-
runtimeContext,
17+
requestContext,
1818
format: "aisdk",
1919
});
2020
return stream.toUIMessageStreamResponse();

app/api/chat/route.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import { mastra } from "../../../src/mastra";
2-
import { RuntimeContext } from "@mastra/core/runtime-context";
2+
import { RequestContext } from '@mastra/core/request-context';
33

44
export async function POST(req: Request) {
55
const { messages, data } = await req.json();
66
const myAgent = mastra.getAgent("weatherAgent");
77

8-
const runtimeContext = new RuntimeContext();
8+
const requestContext = new RequestContext();
99

1010
if (data) {
1111
for (const [key, value] of Object.entries(data)) {
12-
runtimeContext.set(key, value);
12+
requestContext.set(key, value);
1313
}
1414
}
1515

1616
const stream = await myAgent.stream(messages, {
17-
runtimeContext,
17+
requestContext,
1818
format: "aisdk",
1919
});
2020
return stream.toUIMessageStreamResponse();

app/api/completion/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { mastra } from "../../../src/mastra";
2-
import { RuntimeContext } from "@mastra/core/runtime-context";
2+
import { RequestContext } from '@mastra/core/request-context';
33
export async function POST(req: Request) {
44
const { prompt } = await req.json();
55
const myAgent = mastra.getAgent("weatherAgent");
66
const stream = await myAgent.stream([{ role: "user", content: prompt }], {
77
format: "aisdk",
88
});
9-
const runtimeContext = new RuntimeContext();
9+
const requestContext = new RequestContext();
1010

1111
return stream.toUIMessageStreamResponse();
1212
}

app/components/landing-testimonials.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export function LandingTestimonials() {
100100

101101
// Auto-play functionality
102102
useEffect(() => {
103-
if (!isAutoPlaying) return
103+
if (!isAutoPlaying) {return}
104104

105105
const interval = setInterval(nextTestimonial, 5000)
106106
return () => clearInterval(interval)

0 commit comments

Comments
 (0)