Skip to content

Commit 5b46b9d

Browse files
committed
feat: refactor vector storage configuration and implement LanceDB
- Removed the Qdrant vector configuration file (`qdrant.ts`) and its associated logic. - Introduced a new LanceDB vector configuration file (`lance.ts`) to support vector storage and similarity search using LanceDB. - Implemented comprehensive settings for LanceDB, including memory management, embedding generation, and advanced filtering capabilities. - Added functions for generating embeddings, validating filters, and performing storage operations with detailed logging. - Created new JSON files for crawler statistics and session pool state to track request metrics and session management. - Added a request queue JSON file to manage requests with unique identifiers and metadata. chore: update storage and request queue structures - Created `SDK_CRAWLER_STATISTICS_0.json` to log crawler performance metrics. - Created `SDK_SESSION_POOL_STATE.json` to manage session states and usability. - Created a request queue JSON file to handle requests with relevant metadata and error tracking.
1 parent 6091646 commit 5b46b9d

13 files changed

Lines changed: 498 additions & 736 deletions

File tree

.github/agents/gpt-5-beast-mode.agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
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.'
3-
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']
3+
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']
44
infer: true
55
name: 'GPT 5 Beast Mode'
66
---

package-lock.json

Lines changed: 62 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"@mastra/observability": "^1.0.0-beta.10",
6767
"@mastra/otel-exporter": "^1.0.0-beta.11",
6868
"@mastra/pg": "^1.0.0-beta.12",
69+
"@mastra/qdrant": "^1.0.0-beta.3",
6970
"@mastra/rag": "^2.0.0-beta.5",
7071
"@mastra/react": "^0.1.0-beta.20",
7172
"@mastra/upstash": "^1.0.0-beta.10",
@@ -127,7 +128,7 @@
127128
"excalidraw-to-svg": "^3.1.0",
128129
"fast-glob": "^3.3.3",
129130
"fast-xml-parser": "^5.3.3",
130-
"framer-motion": "^12.24.11",
131+
"framer-motion": "^12.24.12",
131132
"gray-matter": "^4.0.3",
132133
"husky": "^9.1.7",
133134
"input-otp": "^1.4.2",
@@ -141,7 +142,7 @@
141142
"monaco-editor-webpack-plugin": "^7.1.1",
142143
"monaco-languages": "^2.11.1",
143144
"monaco-themes": "^0.4.8",
144-
"motion": "^12.24.11",
145+
"motion": "^12.24.12",
145146
"nanoid": "^5.1.6",
146147
"next": "^16.1.1",
147148
"next-themes": "^0.4.6",

src/mastra/agents/codingAgents.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const codeArchitectAgent = new Agent({
4646
instructions: ({ requestContext }: { requestContext: RequestContext<CodingRuntimeContext> }) => {
4747
const userTier = requestContext.get('user-tier') ?? 'free'
4848
const language = requestContext.get('language') ?? 'en'
49-
const projectRoot = requestContext.get('projectRoot') ?? process.cwd()
49+
// const projectRoot = requestContext.get('projectRoot') ?? process.cwd()
5050

5151
return {
5252
role: 'system',
@@ -55,7 +55,6 @@ export const codeArchitectAgent = new Agent({
5555
**Context:**
5656
- User Tier: ${userTier}
5757
- Language: ${language}
58-
- Project Root: ${projectRoot}
5958
6059
**Core Capabilities:**
6160
1. **Architecture Analysis**: Evaluate existing code structure, identify patterns and anti-patterns

src/mastra/agents/dane.ts

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { listEvents } from '../tools/calendar-tool'
55
import { execaTool } from '../tools/execa-tool'
66
import type { GoogleGenerativeAIProviderOptions } from '@ai-sdk/google'
77
import type { RequestContext } from '@mastra/core/request-context'
8-
import { TokenLimiterProcessor } from '@mastra/core/processors'
8+
import { BatchPartsProcessor, TokenLimiterProcessor } from '@mastra/core/processors'
99
import { webScraperTool } from '../tools'
1010

1111
export interface DaneContext {
@@ -41,7 +41,13 @@ export const daneCommitMessage = new Agent({
4141
},
4242
model: googleAIFlashLite,
4343
memory: pgMemory,
44-
outputProcessors: [new TokenLimiterProcessor(1048576)]
44+
outputProcessors: [new TokenLimiterProcessor(128576),
45+
new BatchPartsProcessor({
46+
batchSize: 10,
47+
maxWaitTime: 75,
48+
emitOnNonText: true
49+
}),
50+
]
4551
})
4652

4753
export const daneIssueLabeler = new Agent({
@@ -70,7 +76,13 @@ export const daneIssueLabeler = new Agent({
7076
},
7177
model: googleAIFlashLite,
7278
memory: pgMemory,
73-
outputProcessors: [new TokenLimiterProcessor(1048576)]
79+
outputProcessors: [new TokenLimiterProcessor(128576),
80+
new BatchPartsProcessor({
81+
batchSize: 10,
82+
maxWaitTime: 75,
83+
emitOnNonText: true
84+
}),
85+
]
7486
})
7587

7688
export const daneLinkChecker = new Agent({
@@ -104,7 +116,13 @@ export const daneLinkChecker = new Agent({
104116
},
105117
model: googleAIFlashLite,
106118
memory: pgMemory,
107-
outputProcessors: [new TokenLimiterProcessor(1048576)]
119+
outputProcessors: [new TokenLimiterProcessor(128576),
120+
new BatchPartsProcessor({
121+
batchSize: 10,
122+
maxWaitTime: 75,
123+
emitOnNonText: true
124+
}),
125+
]
108126
})
109127

110128
export const daneChangeLog = new Agent({
@@ -140,7 +158,13 @@ export const daneChangeLog = new Agent({
140158
},
141159
model: googleAIFlashLite,
142160
memory: pgMemory,
143-
outputProcessors: [new TokenLimiterProcessor(1048576)]
161+
outputProcessors: [new TokenLimiterProcessor(128576),
162+
new BatchPartsProcessor({
163+
batchSize: 10,
164+
maxWaitTime: 75,
165+
emitOnNonText: true
166+
}),
167+
]
144168
})
145169

146170
export const dane = new Agent({
@@ -160,40 +184,30 @@ export const dane = new Agent({
160184
161185
# Our tools:
162186
163-
## readPDF
164-
Makes you a powerful agent capable of reading PDF files.
165-
166-
## fsTool
167-
Makes you a powerful agent capable of reading and writing files to the local filesystem.
168-
169187
## execaTool
170188
Makes you a powerful agent capabale of executing files on the local system.
171189
172-
## googleSearch
173-
Makes you a powerful agent capabale answering all questions by finding the answer on Google search.
174-
Pass the query as a JS object. If you have links, ALWAYS CITE YOUR SOURCES.
175-
176190
## browserTool
177191
Makes you a powerful agent capable of scraping the web. Pass the url as a JS object.
178192
179193
## listEvents
180194
Makes you a powerful agent capable of listing events on a calendar. When using this tool ONLY RETURN RELEVANT EVENTS.
181195
DO NOT ATTEMPT TO DO ANYTHING MORE.
182196
183-
## imageTool
184-
Makes you a powerful agent capable of generating images and saving them to disk. Pass the directory and an image prompt.
197+
## webScraperTool
198+
Makes you a powerful agent capable of scraping web pages. Use this tool to get information from web pages.
185199
186200
# Rules
187201
* **Tool Efficiency:** Do NOT use the same tool repetitively or back-to-back for the same query.
188-
* DO NOT ATTEMPT TO USE GENERAL KNOWLEDGE. Use the 'googleSearch' tool to find the answer.
202+
* DO NOT ATTEMPT TO USE GENERAL KNOWLEDGE. Use the 'webScraperTool' tool to find the answer.
189203
* Don't reference tools when you communicate with the user. Do not mention what tools you are using.
190204
* Tell the user what you are doing.
191205
`,
192206
providerOptions: {
193207
google: {
194208
thinkingConfig: {
195209
includeThoughts: true,
196-
thinkingLevel: 'high',
210+
thinkingLevel: 'low',
197211
},
198212
responseModalities: ['TEXT'],
199213
} satisfies GoogleGenerativeAIProviderOptions,
@@ -208,5 +222,11 @@ export const dane = new Agent({
208222
webScraperTool,
209223
listEvents,
210224
},
211-
outputProcessors: [new TokenLimiterProcessor(1048576)]
225+
outputProcessors: [new TokenLimiterProcessor(128576),
226+
new BatchPartsProcessor({
227+
batchSize: 10,
228+
maxWaitTime: 75,
229+
emitOnNonText: true
230+
}),
231+
]
212232
})

0 commit comments

Comments
 (0)