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
2 changes: 1 addition & 1 deletion .github/agents/gpt-5-beast-mode.agent.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: 'Beast Mode 2.0: A powerful autonomous agent tuned specifically for GPT-5 that can solve complex problems by using tools, conducting research, and iterating until the problem is fully resolved.'
tools: ['vscode', 'execute', 'read', 'edit', 'search', 'web', 'ast-grep-mcp/*', 'mastrabeta/mastraBlog', 'mastrabeta/mastraChanges', 'mastrabeta/mastraDocs', 'mastrabeta/mastraMigration', 'mastrabeta/mastraExamples', 'next-devtools/*', 's-ai/*', '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-python.python/getPythonEnvironmentInfo', 'ms-python.python/getPythonExecutableCommand', 'ms-python.python/installPythonPackage', 'ms-python.python/configurePythonEnvironment', 'ms-vscode.vscode-websearchforcopilot/websearch', 'the0807.uv-toolkit/uv-init', 'the0807.uv-toolkit/uv-sync', 'the0807.uv-toolkit/uv-add', 'the0807.uv-toolkit/uv-add-dev', 'the0807.uv-toolkit/uv-upgrade', 'the0807.uv-toolkit/uv-clean', 'the0807.uv-toolkit/uv-lock', 'the0807.uv-toolkit/uv-venv', 'the0807.uv-toolkit/uv-run', 'the0807.uv-toolkit/uv-script-dep', 'the0807.uv-toolkit/uv-python-install', 'the0807.uv-toolkit/uv-python-pin', 'the0807.uv-toolkit/uv-tool-install', 'the0807.uv-toolkit/uvx-run', 'the0807.uv-toolkit/uv-activate-venv', 'todo']
tools: ['vscode', 'execute', 'read', 'edit', 'search', 'web', 'ast-grep-mcp/*', 'mastrabeta/mastraBlog', 'mastrabeta/mastraChanges', 'mastrabeta/mastraDocs', 'mastrabeta/mastraExamples', 'mastrabeta/mastraMigration', 'next-devtools/*', 's-ai/*', '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-python.python/getPythonEnvironmentInfo', 'ms-python.python/getPythonExecutableCommand', 'ms-python.python/installPythonPackage', 'ms-python.python/configurePythonEnvironment', 'ms-vscode.vscode-websearchforcopilot/websearch', 'the0807.uv-toolkit/uv-init', 'the0807.uv-toolkit/uv-sync', 'the0807.uv-toolkit/uv-add', 'the0807.uv-toolkit/uv-add-dev', 'the0807.uv-toolkit/uv-upgrade', 'the0807.uv-toolkit/uv-clean', 'the0807.uv-toolkit/uv-lock', 'the0807.uv-toolkit/uv-venv', 'the0807.uv-toolkit/uv-run', 'the0807.uv-toolkit/uv-script-dep', 'the0807.uv-toolkit/uv-python-install', 'the0807.uv-toolkit/uv-python-pin', 'the0807.uv-toolkit/uv-tool-install', 'the0807.uv-toolkit/uvx-run', 'the0807.uv-toolkit/uv-activate-venv', 'todo']
infer: true
name: 'GPT 5 Beast Mode'
---
Expand Down
72 changes: 62 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"@mastra/observability": "^1.0.0-beta.10",
"@mastra/otel-exporter": "^1.0.0-beta.11",
"@mastra/pg": "^1.0.0-beta.12",
"@mastra/qdrant": "^1.0.0-beta.3",

Copilot AI Jan 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @mastra/qdrant package is being added to dependencies, but based on the PR description and the fact that qdrant.ts is being kept (with only an import path fix), this seems intentional. However, the PR title says "refactor vector storage configuration and implement LanceDB" and the description mentions "Removed the Qdrant vector configuration file", which conflicts with keeping qdrant.ts and adding the @mastra/qdrant dependency. This inconsistency should be clarified.

Suggested change
"@mastra/qdrant": "^1.0.0-beta.3",

Copilot uses AI. Check for mistakes.
"@mastra/rag": "^2.0.0-beta.5",
"@mastra/react": "^0.1.0-beta.20",
"@mastra/upstash": "^1.0.0-beta.10",
Expand Down Expand Up @@ -127,7 +128,7 @@
"excalidraw-to-svg": "^3.1.0",
"fast-glob": "^3.3.3",
"fast-xml-parser": "^5.3.3",
"framer-motion": "^12.24.11",
"framer-motion": "^12.24.12",
"gray-matter": "^4.0.3",
"husky": "^9.1.7",
"input-otp": "^1.4.2",
Expand All @@ -141,7 +142,7 @@
"monaco-editor-webpack-plugin": "^7.1.1",
"monaco-languages": "^2.11.1",
"monaco-themes": "^0.4.8",
"motion": "^12.24.11",
"motion": "^12.24.12",
"nanoid": "^5.1.6",
"next": "^16.1.1",
"next-themes": "^0.4.6",
Expand Down
3 changes: 1 addition & 2 deletions src/mastra/agents/codingAgents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const codeArchitectAgent = new Agent({
instructions: ({ requestContext }: { requestContext: RequestContext<CodingRuntimeContext> }) => {
const userTier = requestContext.get('user-tier') ?? 'free'
const language = requestContext.get('language') ?? 'en'
const projectRoot = requestContext.get('projectRoot') ?? process.cwd()
// const projectRoot = requestContext.get('projectRoot') ?? process.cwd()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove commented-out code.

Commented-out code should be removed rather than left in the codebase. Version control preserves the history if needed.

As per coding guidelines: "Avoid commenting out dead code. Use version control instead of maintaining commented code blocks."

🧹 Proposed fix
-   // const projectRoot = requestContext.get('projectRoot') ?? process.cwd()
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// const projectRoot = requestContext.get('projectRoot') ?? process.cwd()
🤖 Prompt for AI Agents
In @src/mastra/agents/codingAgents.ts at line 49, Remove the dead commented-out
line containing "const projectRoot = requestContext.get('projectRoot') ??
process.cwd()" from the codingAgents module; simply delete that commented code
(the commented variable/projectRoot reference) so the file no longer contains
commented-out dead code and rely on version control if the line is ever needed
again.


return {
role: 'system',
Expand All @@ -55,7 +55,6 @@ export const codeArchitectAgent = new Agent({
**Context:**
- User Tier: ${userTier}
- Language: ${language}
- Project Root: ${projectRoot}

**Core Capabilities:**
1. **Architecture Analysis**: Evaluate existing code structure, identify patterns and anti-patterns
Expand Down
60 changes: 40 additions & 20 deletions src/mastra/agents/dane.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { listEvents } from '../tools/calendar-tool'
import { execaTool } from '../tools/execa-tool'
import type { GoogleGenerativeAIProviderOptions } from '@ai-sdk/google'
import type { RequestContext } from '@mastra/core/request-context'
import { TokenLimiterProcessor } from '@mastra/core/processors'
import { BatchPartsProcessor, TokenLimiterProcessor } from '@mastra/core/processors'
import { webScraperTool } from '../tools'

export interface DaneContext {
Expand Down Expand Up @@ -41,7 +41,13 @@ export const daneCommitMessage = new Agent({
},
model: googleAIFlashLite,
memory: pgMemory,
outputProcessors: [new TokenLimiterProcessor(1048576)]
outputProcessors: [new TokenLimiterProcessor(128576),

Copilot AI Jan 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TokenLimiterProcessor limit has been reduced from 1048576 (1MB) to 128576 (~125KB), which is approximately an 88% reduction. This significant change could cause truncation of larger responses or context. This should be documented or explained as it may affect the agent's ability to handle complex conversations or large code contexts.

Copilot uses AI. Check for mistakes.
new BatchPartsProcessor({
batchSize: 10,
maxWaitTime: 75,
emitOnNonText: true
}),
]
Comment on lines +44 to +50

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Inconsistent formatting in outputProcessors array.

The array formatting and indentation is inconsistent across agent definitions. Consider aligning the formatting for better readability and maintainability.

♻️ Suggested formatting
-  outputProcessors: [new TokenLimiterProcessor(128576),
-    new BatchPartsProcessor({
-          batchSize: 10,
-          maxWaitTime: 75,
-          emitOnNonText: true
-        }),
-  ]
+  outputProcessors: [
+    new TokenLimiterProcessor(128576),
+    new BatchPartsProcessor({
+      batchSize: 10,
+      maxWaitTime: 75,
+      emitOnNonText: true,
+    }),
+  ],
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
outputProcessors: [new TokenLimiterProcessor(128576),
new BatchPartsProcessor({
batchSize: 10,
maxWaitTime: 75,
emitOnNonText: true
}),
]
outputProcessors: [
new TokenLimiterProcessor(128576),
new BatchPartsProcessor({
batchSize: 10,
maxWaitTime: 75,
emitOnNonText: true,
}),
],
🤖 Prompt for AI Agents
In @src/mastra/agents/dane.ts around lines 44 - 50, The outputProcessors array
has inconsistent indentation and line breaks; refactor the array so each
processor entry is on its own line with consistent indentation and commas (e.g.,
start the array on one line, place new TokenLimiterProcessor(128576) and new
BatchPartsProcessor({...}) each on their own indented lines, ensure the
BatchPartsProcessor object keys (batchSize, maxWaitTime, emitOnNonText) are
consistently indented and the closing brackets and commas line up). Locate the
outputProcessors declaration where TokenLimiterProcessor and BatchPartsProcessor
are used and apply the same spacing/indentation style as other agent definitions
for readability.

})

export const daneIssueLabeler = new Agent({
Expand Down Expand Up @@ -70,7 +76,13 @@ export const daneIssueLabeler = new Agent({
},
model: googleAIFlashLite,
memory: pgMemory,
outputProcessors: [new TokenLimiterProcessor(1048576)]
outputProcessors: [new TokenLimiterProcessor(128576),
new BatchPartsProcessor({
batchSize: 10,
maxWaitTime: 75,
emitOnNonText: true
}),
]
})

export const daneLinkChecker = new Agent({
Expand Down Expand Up @@ -104,7 +116,13 @@ export const daneLinkChecker = new Agent({
},
model: googleAIFlashLite,
memory: pgMemory,
outputProcessors: [new TokenLimiterProcessor(1048576)]
outputProcessors: [new TokenLimiterProcessor(128576),
new BatchPartsProcessor({
batchSize: 10,
maxWaitTime: 75,
emitOnNonText: true
}),
]
})

export const daneChangeLog = new Agent({
Expand Down Expand Up @@ -140,7 +158,13 @@ export const daneChangeLog = new Agent({
},
model: googleAIFlashLite,
memory: pgMemory,
outputProcessors: [new TokenLimiterProcessor(1048576)]
outputProcessors: [new TokenLimiterProcessor(128576),
new BatchPartsProcessor({
batchSize: 10,
maxWaitTime: 75,
emitOnNonText: true
}),
]
})

export const dane = new Agent({
Expand All @@ -160,40 +184,30 @@ export const dane = new Agent({

# Our tools:

## readPDF
Makes you a powerful agent capable of reading PDF files.

## fsTool
Makes you a powerful agent capable of reading and writing files to the local filesystem.

## execaTool
Makes you a powerful agent capabale of executing files on the local system.

## googleSearch
Makes you a powerful agent capabale answering all questions by finding the answer on Google search.
Pass the query as a JS object. If you have links, ALWAYS CITE YOUR SOURCES.

## browserTool
Makes you a powerful agent capable of scraping the web. Pass the url as a JS object.

## listEvents
Makes you a powerful agent capable of listing events on a calendar. When using this tool ONLY RETURN RELEVANT EVENTS.
DO NOT ATTEMPT TO DO ANYTHING MORE.

## imageTool
Makes you a powerful agent capable of generating images and saving them to disk. Pass the directory and an image prompt.
## webScraperTool
Makes you a powerful agent capable of scraping web pages. Use this tool to get information from web pages.

# Rules
* **Tool Efficiency:** Do NOT use the same tool repetitively or back-to-back for the same query.
* DO NOT ATTEMPT TO USE GENERAL KNOWLEDGE. Use the 'googleSearch' tool to find the answer.
* DO NOT ATTEMPT TO USE GENERAL KNOWLEDGE. Use the 'webScraperTool' tool to find the answer.
* Don't reference tools when you communicate with the user. Do not mention what tools you are using.
* Tell the user what you are doing.
`,
providerOptions: {
google: {
thinkingConfig: {
includeThoughts: true,
thinkingLevel: 'high',
thinkingLevel: 'low',

Copilot AI Jan 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The thinkingLevel has been changed from 'high' to 'low', which will reduce the amount of reasoning the model performs before responding. This may improve response speed but could reduce response quality for complex tasks. This change should be intentional and documented, as it may impact the agent's problem-solving capabilities.

Copilot uses AI. Check for mistakes.
},
responseModalities: ['TEXT'],
} satisfies GoogleGenerativeAIProviderOptions,
Expand All @@ -208,5 +222,11 @@ export const dane = new Agent({
webScraperTool,
listEvents,
},
outputProcessors: [new TokenLimiterProcessor(1048576)]
outputProcessors: [new TokenLimiterProcessor(128576),
new BatchPartsProcessor({
batchSize: 10,
maxWaitTime: 75,
emitOnNonText: true
}),
]
Comment on lines +225 to +231

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Consider extracting shared outputProcessors configuration.

The same outputProcessors configuration is duplicated across all 5 agents. Consider extracting to a shared constant to improve maintainability and ensure consistency.

♻️ Extract shared configuration
// At the top of the file, after imports
const defaultOutputProcessors = [
  new TokenLimiterProcessor(128576),
  new BatchPartsProcessor({
    batchSize: 10,
    maxWaitTime: 75,
    emitOnNonText: true,
  }),
];

// Then in each agent:
outputProcessors: defaultOutputProcessors,
🤖 Prompt for AI Agents
In @src/mastra/agents/dane.ts around lines 225 - 231, Extract the duplicated
outputProcessors array into a shared constant (e.g., defaultOutputProcessors)
and replace each agent's inline outputProcessors with that constant;
specifically, define a top-level constant that contains new
TokenLimiterProcessor(128576) and new BatchPartsProcessor({ batchSize: 10,
maxWaitTime: 75, emitOnNonText: true }) and then update each agent's
outputProcessors property to reference defaultOutputProcessors instead of
repeating the array.

})
Loading
Loading