Conversation
- Added logging for input streaming start, input availability, and output completion in the write-note tool. - Improved traceability of tool execution with detailed log messages. chore: add .gitignore for trunk directory - Created a .gitignore file to exclude unnecessary files and directories from version control. chore: add yamllint configuration - Introduced a yamllint configuration file to enforce YAML formatting rules. chore: initialize trunk configuration - Created a trunk.yaml file to configure the behavior of Trunk, including enabled runtimes and linters. - Specified versions for various tools and plugins to ensure consistent development environment.
Learn moreAll Green is an AI agent that automatically: ✅ Addresses code review comments ✅ Fixes failing CI checks ✅ Resolves merge conflicts |
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
🤖 Hi @ssdeanx, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
|
Caution Review failedThe pull request is closed. Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughThis PR introduces comprehensive instrumentation and interface enhancements to the Mastra workflow system. It adds layout controls and visual redesigns to the workflow canvas, replaces pgMemory with upstashMemory throughout the agent layer, adds lifecycle hooks (onInputStart, onInputAvailable, onOutput) across numerous tools for enhanced observability, configures new CI/CD tooling via Trunk, and introduces four new workflow configurations while removing certain agent tools and implementing structured output processing limits across multiple networks. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (72)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR enhances tool execution traceability by adding comprehensive logging hooks across multiple tools. The changes introduce onInputStart, onInputAvailable, and onOutput callbacks that log key execution events, enabling better observability and debugging of tool operations.
Key changes:
- Added three lifecycle logging hooks (onInputStart, onInputAvailable, onOutput) to 30+ tools
- Enhanced write-note tool with detailed logging for input streaming, input availability, and output completion
- Added trunk configuration files for development environment consistency
- Reorganized imports across multiple files for better code organization
Reviewed changes
Copilot reviewed 72 out of 72 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/mastra/tools/write-note.ts | Added logging hooks (onInputStart, onInputAvailable, onOutput) and reorganized imports |
| src/mastra/tools/web-scraper-tool.ts | Added logging hooks for web scraper, batch scraper, sitemap, link extractor, HTML converter, content cleaner, API fetcher, and scheduler tools; reformatted code |
| src/mastra/tools/weather-tool.ts | Added logging hooks for weather tool and enhanced progress messages with input context |
| src/mastra/tools/test-generator.tool.ts | Added logging hooks for test generator tool |
| src/mastra/tools/serpapi-shopping.tool.ts | Added logging hooks for Amazon, Walmart, eBay, and Home Depot shopping search tools |
| src/mastra/tools/serpapi-search.tool.ts | Added logging hooks for Google search and AI overview tools; reformatted code |
| src/mastra/tools/serpapi-news-trends.tool.ts | Added logging hooks for Google News, News Lite, Trends, and Autocomplete tools |
| src/mastra/tools/serpapi-academic-local.tool.ts | Added logging hooks for Google Scholar, Finance, and Yelp search tools |
| src/mastra/tools/polygon-tools.ts | Added logging hooks for Polygon stock quotes, aggregates, fundamentals, crypto quotes, aggregates, and snapshots tools; enhanced progress messages |
| src/mastra/tools/pnpm-tool.ts | Added logging hooks for pnpm build, changeset status, changeset publish, active dist tag, and run tools |
| src/mastra/tools/pdf.ts | Added logging hooks for PDF reader tool |
| src/mastra/tools/pdf-data-conversion.tool.ts | Added logging hooks for PDF to markdown conversion tool |
| src/mastra/tools/multi-string-edit.tool.ts | Added logging hooks for multi-string edit tool |
| src/mastra/tools/jwt-auth.tool.ts | Added logging hooks for JWT authentication tool |
| src/mastra/tools/json-to-csv.tool.ts | Added logging hooks for JSON to CSV conversion tool |
| src/mastra/tools/fs.ts | Added logging hooks for filesystem tool with success/failure detection |
| src/mastra/tools/finnhub-tools.ts | Added logging hooks for Finnhub quotes, company, financials, analysis, technical, and economic tools |
| src/mastra/tools/find-symbol.tool.ts | Added logging hooks for symbol finder tool |
| src/mastra/tools/find-references.tool.ts | Added logging hooks for references finder tool |
| src/mastra/tools/financial-chart-tools.ts | Added logging hooks for chart supervisor, generator, data processor, and type advisor tools |
| src/mastra/tools/extractLearningsTool.ts | Added logging hooks for learnings extraction tool |
| src/mastra/tools/execa-tool.ts | Added logging hooks for execa command execution tool |
| src/mastra/tools/evaluateResultTool.ts | Added logging hooks for result evaluation tool |
| src/mastra/tools/editor-agent-tool.ts | Added logging hooks for editor agent tool |
| src/mastra/tools/document-chunking.tool.ts | Added logging hooks for Mastra chunker, MDocument chunker, and document reranker tools |
| src/mastra/tools/data-validator.tool.ts | Added logging hooks for JSON data validator tool |
| longitude: number | ||
| name: string | ||
| }> | ||
| interface GeocodingResponse extends RequestContext { |
There was a problem hiding this comment.
The GeocodingResponse interface incorrectly extends RequestContext. This interface represents the shape of the geocoding API response and should not extend RequestContext, which is for request context data. Remove the extends clause.
| interface GeocodingResponse extends RequestContext { | |
| interface GeocodingResponse { |
| wind_gusts_10m: number | ||
| weather_code: number | ||
| } | ||
| interface WeatherResponse extends RequestContext { |
There was a problem hiding this comment.
The WeatherResponse interface incorrectly extends RequestContext. This interface represents the shape of the weather API response and should not extend RequestContext. Remove the extends clause.
| interface WeatherResponse extends RequestContext { | |
| interface WeatherResponse { |
| preview: string; | ||
| module?: string; | ||
| isExported?: boolean; | ||
| interface SymbolInfo extends RequestContext { |
There was a problem hiding this comment.
The SymbolInfo interface incorrectly extends RequestContext. This interface represents information about a code symbol and should not extend RequestContext. Remove the extends clause.
| interface SymbolInfo extends RequestContext { | |
| interface SymbolInfo { |
|
🤖 I'm sorry @ssdeanx, but I was unable to process your request. Please see the logs for more details. |
Summary of ChangesHello @ssdeanx, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the platform's observability, developer experience, and functional capabilities. A major focus was integrating comprehensive lifecycle hooks into numerous tools, providing granular insights into their execution. Alongside this, several new, powerful workflows have been introduced, expanding the system's automation and intelligence across data, marketing, and research domains. The user interface for workflow visualization has also been revamped to offer a more intuitive and aesthetically pleasing experience, complemented by standardized development environment configurations. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces significant UI/UX enhancements and new features to the workflow visualization and interaction components. Key changes include adding node layout options (horizontal, vertical, grid) to the workflow canvas, along with a minimap, background dots, and floating status panels. The workflow header, input panel, and node components have received extensive styling updates, incorporating new icons, animations, and more thematic text. Several new workflow configurations have been added, such as 'Governed RAG Index', 'Marketing Campaign', 'Data Analysis', and 'Automated Reporting', expanding the application's capabilities. Additionally, the pull request updates environment variable usage for PgVector HNSW parameters, adds new .trunk configuration files for linting and build processes, and updates dependencies in next.config.ts. Backend changes involve migrating several agents and networks from pgMemory to upstashMemory and removing PGVECTOR_PROMPT and arxivTool from researchAgent. The AGENTS.md documentation has been updated to reflect new tool lifecycle hooks and their implementation status across various tools, along with general version updates. Several review comments highlighted hardcoded strings for UI elements (e.g., 'CORE ENGINE 2026', 'v1.0.4'), suggesting they should be sourced from configuration or constants for better maintainability. Another comment noted a significant reduction in the TokenLimiterProcessor limit, requesting clarification on the reasoning behind this change. Lastly, a comment pointed out a potential log injection vulnerability in a progress message due to unsanitized input, recommending structured logging or proper sanitization.
| outputProcessors: [ | ||
| new TokenLimiterProcessor(1000000), | ||
| new TokenLimiterProcessor(128000), | ||
| new BatchPartsProcessor({ | ||
| batchSize: 5, | ||
| batchSize: 10, | ||
| maxWaitTime: 75, | ||
| emitOnNonText: true | ||
| }), |
There was a problem hiding this comment.
The TokenLimiterProcessor limit has been significantly reduced from 1,000,000 to 128,000 tokens. This is a substantial change that could affect the agent's ability to handle large contexts. Could you provide some context on this change? Was this for performance reasons or to align with model context window limits?
| type: 'data-tool-progress', | ||
| data: { | ||
| status: 'in-progress', | ||
| message: `Input: location="${inputData.location}" - 🚀 Starting weather lookup`, |
There was a problem hiding this comment.
The progress message string is constructed using a template literal that includes inputData.location directly inside quotes. If inputData.location contains a double quote character (\"), it could break the string and potentially lead to unexpected behavior or log injection. It's safer to sanitize the input or avoid quoting it directly in the log message. A better approach would be to pass structured data to the logger.\n\nFor example:\ntypescript\nlog.info('Starting weather lookup', { location: inputData.location });\n\nOr if you must use a string:\ntypescript\nmessage: `Input: location=${JSON.stringify(inputData.location)} - 🚀 Starting weather lookup`\n\nThis applies to the new logging hooks in other tool files as well.
| <Panel position="bottom-left" className="bg-background/40 backdrop-blur-xl border-border/20 rounded-full px-4 py-1.5 text-[10px] text-muted-foreground uppercase font-bold tracking-[0.2em] shadow-lg animate-fade-in"> | ||
| <span className="flex items-center gap-2"> | ||
| <div className="size-1.5 bg-primary rounded-full animate-pulse" /> | ||
| {workflowConfig?.name} • CORE ENGINE 2026 |
| case "paused": | ||
| case "idle": | ||
| default: |
There was a problem hiding this comment.
The paused status now falls into the default case for both statusIcon and statusText, which will display 'RUNTIME LOGS'. Previously, 'paused' had its own distinct state. If this change was unintentional, consider re-introducing a specific case for the 'paused' status to provide clearer UI feedback to the user.
| <div className="flex items-center gap-2 px-2 py-0.5 rounded-full bg-primary/5 border border-primary/10"> | ||
| <span className="text-[9px] font-bold text-primary/80 uppercase tracking-tighter"> | ||
| v1.0.4 | ||
| </span> | ||
| </div> |

chore: add .gitignore for trunk directory
chore: add yamllint configuration
chore: initialize trunk configuration