-
Notifications
You must be signed in to change notification settings - Fork 0
feat: migrate traces and artifacts storage to GCP deployed db #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| return mimeTypes[ext] || 'application/octet-stream'; | ||
| } | ||
|
|
||
| private extractIds(fileName: string): { traceId: string | null; threadId: string | null } { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still haven't been able to extract traceId and threadId yet for each artifact written to the table
| fileType, | ||
| mimeType, | ||
| size: content.length, | ||
| content: Buffer.isBuffer(content) ? content : Buffer.from(content), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still unable to confirm content is safely written to the db
| const outputDir = path.join(process.cwd(), 'artifacts', sessionId); | ||
|
|
||
| // Start the artifact watcher for this session | ||
| startArtifactWatcher(outputDir, sessionId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using fs.watch to look for new (expected) or existing (unexpected) files and handles them with artifactStorage.storeArtifact
…icts in web-automation-agent.ts by choosing main branch version
KayTV
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm approving so we can move forward - I still need to setup mine, but let's get going!
Looks good :)
Ticket
Adds Playwright artifact storage and management capabilities
Changes
PlaywrightArtifactmodel inprisma/schema.prisma; create migrationprisma/migrations/20250814205016_add_playwright_artifacts/migration.sqlwithmastra_artifactstable and indexes.src/mastra/storage-artifacts.tswithArtifactStorageclass for CRUD operations on Playwright artifacts.src/mastra/artifact-watcher.tswithArtifactWatcherclass to monitor output directories and auto-store files with metadata extraction.src/mastra/agents/data-ops-agent.tsto include artifact tools and descriptions; switchsrc/mastra/agents/web-automation-agent.tsmodel from Gemini to Claude.src/mastra/mcp.tsto create unique session-based output directories and start artifact watcher.vertex-ai-credentials.jsonto.gitignore(for future use)Context for reviewers
Implements automatic capture and database storage of Playwright artifacts (screenshots, traces, session data). The watcher monitors output directories in real-time and stores files with extracted trace/thread IDs. Data ops agent can now query and manage these artifacts. Session-based directories prevent file conflicts across concurrent runs.
Test Example
Database viewer showing the PlaywrightArtifa

cts table