Skip to content

feat: enhance write-note tool with logging and input/output hooks#73

Merged
ssdeanx merged 1 commit intomainfrom
develop
Jan 7, 2026
Merged

feat: enhance write-note tool with logging and input/output hooks#73
ssdeanx merged 1 commit intomainfrom
develop

Conversation

@ssdeanx
Copy link
Owner

@ssdeanx ssdeanx commented Jan 7, 2026

  • 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.

- 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.
Copilot AI review requested due to automatic review settings January 7, 2026 06:45
@continue
Copy link

continue bot commented Jan 7, 2026

All Green - Keep your PRs mergeable

Learn more

All Green is an AI agent that automatically:

✅ Addresses code review comments

✅ Fixes failing CI checks

✅ Resolves merge conflicts


Unsubscribe from All Green comments

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

🤖 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.

@coderabbitai
Copy link

coderabbitai bot commented Jan 7, 2026

Caution

Review failed

The pull request is closed.

Summary by CodeRabbit

  • New Features

    • Added layout controls (horizontal, vertical, grid) for workflow visualization
    • Expanded workflow ecosystem with new workflows and agent networks
    • Enhanced tool monitoring with improved input/output logging and streaming visibility
  • Bug Fixes & Improvements

    • Improved workflow UI with animated components and better status indicators
    • Optimized memory backend for improved performance
    • Enhanced visual hierarchy in workflow panels with updated styling and typography
  • Chores

    • Added CI/CD configuration for improved development tooling
    • Updated environment variables for vector database configuration

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

This 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

Cohort / File(s) Summary
CI/CD & Tooling Setup
.trunk/.gitignore, .trunk/configs/.yamllint.yaml, .trunk/trunk.yaml
Introduces Trunk CI/CD framework with linting configuration (yamllint rules for quoted-strings, key-duplicates, octal-values) and comprehensive tooling setup (actionlint, checkov, eslint, markdownlint, yamllint, etc.) with disabled/enabled actions for Trunk-specific checks.
Environment & Build Configuration
.env.example, next.config.ts
Adds PG_M environment variable for HNSW configuration (value: 32) and four new external server packages (uuid, zod, @e2b/code-interpreter, ai) to serverExternalPackages.
UI Styling
app/globals.css
Introduces two new utility classes: glow-amber (amber-hued glow box-shadow) and typing-effect (overflow handling with typing-fade keyframe animation).
Workflow UI Components - Layout & Canvas
app/workflows/components/workflow-actions.tsx, app/workflows/components/workflow-canvas.tsx
Adds layout control buttons (horizontal/vertical/grid) to workflow actions; enhances canvas with MiniMap (color-coded by status), Background layer, grid snapping, animated edges, defaultEdgeOptions, and interactive Panels displaying workflow metadata and runtime details.
Workflow UI Components - Header & Legend
app/workflows/components/workflow-header.tsx, app/workflows/components/workflow-legend.tsx
Redesigns header with new terminology ("System Overview", "Operational Nodes"), updated button labels (Suspend, Kill process, Reset Sequence), and reworked status badges; replaces legend styling with prominent translucent container and animated legend items (Neutral Path, Active Cell, Synced Node, System Breach, Static Node).
Workflow UI Components - Input & Output Panels
app/workflows/components/workflow-input-panel.tsx, app/workflows/components/workflow-output.tsx
Overhauls input panel with animated header ("Initiate Sequence"), enriched example mappings, enhanced prompt area styling, and animated Quick Run button ("Engage Protocol"/"Re-Deploy Unit"); updates output with animated status indicators, streaming message rendering, diagnostic footer (TRC_ID), and scrollable content area.
Workflow Nodes & Visualization
app/workflows/components/workflow-node.tsx
Adds memoization, optional selected prop, NodeResizer and NodeToolbar from @xyflow/react, enhanced card-3d styling, status-based visuals, toolbar actions (Settings, Maximize), amber-themed "Agent Thinking" panel, and bottom toolbar with DETAILS and RUN actions.
Workflow Context & Layout
app/workflows/providers/workflow-context.tsx
Introduces layout support (LR, TB, GRID directions) with corresponding node positioning logic; adds onNodesChange and onEdgesChange handlers using applyNodeChanges/applyEdgeChanges; exposes layoutNodes, onNodesChange, onEdgesChange in context value.
Workflow Configuration
app/workflows/config/workflows.ts
Adds four new public workflow configurations: governedRagIndex, marketingCampaignWorkflow, dataAnalysisWorkflow, automatedReportingWorkflow, each with descriptive steps and metadata.
Mastra Core Index
src/mastra/index.ts
Populates mastra instance with comprehensive workflows (16 total) and agents (40+ across multiple categories including Core, CSV/Data Pipeline, Research, Utility, Calendar, Financial, Business/Legal, Image, Coding Team, A2A Coordinators), expanding from minimal placeholder configuration.
Agent Memory Backend Migration
src/mastra/agents/codingAgents.ts
Replaces pgMemory with upstashMemory across four agents (codeArchitectAgent, codeReviewerAgent, testEngineerAgent, refactoringAgent); expands tool exposure by adding getFileContent, getRepositoryInfo, listRepositories, searchCode.
Research Agent Tool Pruning
src/mastra/agents/researchAgent.ts
Removes UnicodeNormalizer, pgQueryTool, arxivTool, googleNewsTool from tool set; narrows Academic tools to googleScholarTool only; reduces TokenLimiterProcessor from 1M to 128K tokens; increases BatchPartsProcessor batchSize from 5 to 10.
Storage & Vector Configuration
src/mastra/config/pg-storage.ts
Enhances pgMemory with env-driven HNSW parameters (PG_M, PG_EF); restructures memoryOptions nesting; increases pgStore max connections from 20 to 30; augments generateEmbeddings with OpenTelemetry tracing and logging; improves formatStorageMessages with detail masking.
Upstash Memory & Embedding Config
src/mastra/config/upstash.ts
Updates embedding call to google.textEmbedding('gemini-embedding-001'); simplifies upstashMemory workingMemory template from detailed profile to condensed "User Context"; adds GoogleGenerativeAIProviderOptions type assertion to upstashQueryTool.
Network Output Processing
src/mastra/networks/*.ts (businessIntelligenceNetwork, codingTeamNetwork, contentCreationNetwork, dataPipelineNetwork, devopsNetwork, financialIntelligenceNetwork, learningNetwork, marketingAutomationNetwork, reportGenerationNetwork, researchPipelineNetwork, securityNetwork)
Adds outputProcessors with TokenLimiterProcessor (128K-256K tokens) and BatchPartsProcessor (batchSize 20-50, maxWaitTime 100-100) to 11 networks; codingTeamNetwork additionally replaces pgMemory with upstashMemory.
Networks Index Export
src/mastra/networks/index.ts
Expands agentNetwork with outputProcessors; exports 8 new networks (reportGenerationNetwork, researchPipelineNetwork, codingTeamNetwork, contentCreationNetwork, financialIntelligenceNetwork, learningNetwork, marketingAutomationNetwork, devopsNetwork).
Tool Lifecycle Instrumentation
src/mastra/tools/AGENTS.md, src/mastra/tools/alpha-vantage.tool.ts, src/mastra/tools/arxiv.tool.ts, src/mastra/tools/browser-tool.ts, src/mastra/tools/calendar-tool.ts, src/mastra/tools/code-search.tool.ts, src/mastra/tools/color-change-tool.ts, src/mastra/tools/copywriter-agent-tool.ts, src/mastra/tools/csv-to-json.tool.ts, src/mastra/tools/data-file-manager.ts, src/mastra/tools/data-processing-tools.ts, src/mastra/tools/data-validator.tool.ts, src/mastra/tools/diff-review.tool.ts, src/mastra/tools/document-chunking.tool.ts, src/mastra/tools/e2b.ts, src/mastra/tools/editor-agent-tool.ts, src/mastra/tools/evaluateResultTool.ts, src/mastra/tools/execa-tool.ts, src/mastra/tools/extractLearningsTool.ts, src/mastra/tools/financial-chart-tools.ts, src/mastra/tools/find-references.tool.ts, src/mastra/tools/find-symbol.tool.ts, src/mastra/tools/finnhub-tools.ts, src/mastra/tools/fs.ts, src/mastra/tools/github.ts, src/mastra/tools/json-to-csv.tool.ts, src/mastra/tools/jwt-auth.tool.ts, src/mastra/tools/multi-string-edit.tool.ts, src/mastra/tools/pdf-data-conversion.tool.ts, src/mastra/tools/pdf.ts, src/mastra/tools/pnpm-tool.ts, src/mastra/tools/serpapi-*.tool.ts
Systematically adds onInputStart, onInputAvailable, onOutput lifecycle hooks across 35+ tools for structured logging and observability; multiple tools extend contexts to include RequestContext; enhances tracing with OpenTelemetry integration; updates tool documentation (AGENTS.md version 2.2.0 → 2.10.0) with new "Tool Lifecycle Hooks" section and implementation patterns.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Poem

🐰 Workflows bloom with layout grace, tools now sing their tales,
Memory flows swift through Upstash, as each network's anchor sails,
Lifecycle hooks whisper softly through each tool's embrace—
The system breathes in harmony, observing every trace! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop

📜 Recent review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3cdba49 and bd22041.

📒 Files selected for processing (72)
  • .env.example
  • .trunk/.gitignore
  • .trunk/configs/.yamllint.yaml
  • .trunk/trunk.yaml
  • app/globals.css
  • app/workflows/components/workflow-actions.tsx
  • app/workflows/components/workflow-canvas.tsx
  • app/workflows/components/workflow-header.tsx
  • app/workflows/components/workflow-input-panel.tsx
  • app/workflows/components/workflow-legend.tsx
  • app/workflows/components/workflow-node.tsx
  • app/workflows/components/workflow-output.tsx
  • app/workflows/config/workflows.ts
  • app/workflows/providers/workflow-context.tsx
  • next.config.ts
  • src/mastra/agents/codingAgents.ts
  • src/mastra/agents/researchAgent.ts
  • src/mastra/config/pg-storage.ts
  • src/mastra/config/upstash.ts
  • src/mastra/index.ts
  • src/mastra/networks/businessIntelligenceNetwork.ts
  • src/mastra/networks/codingTeamNetwork.ts
  • src/mastra/networks/contentCreationNetwork.ts
  • src/mastra/networks/dataPipelineNetwork.ts
  • src/mastra/networks/devopsNetwork.ts
  • src/mastra/networks/financialIntelligenceNetwork.ts
  • src/mastra/networks/index.ts
  • src/mastra/networks/learningNetwork.ts
  • src/mastra/networks/marketingAutomationNetwork.ts
  • src/mastra/networks/reportGenerationNetwork.ts
  • src/mastra/networks/researchPipelineNetwork.ts
  • src/mastra/networks/securityNetwork.ts
  • src/mastra/tools/AGENTS.md
  • src/mastra/tools/alpha-vantage.tool.ts
  • src/mastra/tools/arxiv.tool.ts
  • src/mastra/tools/browser-tool.ts
  • src/mastra/tools/calendar-tool.ts
  • src/mastra/tools/code-search.tool.ts
  • src/mastra/tools/color-change-tool.ts
  • src/mastra/tools/copywriter-agent-tool.ts
  • src/mastra/tools/csv-to-json.tool.ts
  • src/mastra/tools/data-file-manager.ts
  • src/mastra/tools/data-processing-tools.ts
  • src/mastra/tools/data-validator.tool.ts
  • src/mastra/tools/diff-review.tool.ts
  • src/mastra/tools/document-chunking.tool.ts
  • src/mastra/tools/e2b.ts
  • src/mastra/tools/editor-agent-tool.ts
  • src/mastra/tools/evaluateResultTool.ts
  • src/mastra/tools/execa-tool.ts
  • src/mastra/tools/extractLearningsTool.ts
  • src/mastra/tools/financial-chart-tools.ts
  • src/mastra/tools/find-references.tool.ts
  • src/mastra/tools/find-symbol.tool.ts
  • src/mastra/tools/finnhub-tools.ts
  • src/mastra/tools/fs.ts
  • src/mastra/tools/github.ts
  • src/mastra/tools/json-to-csv.tool.ts
  • src/mastra/tools/jwt-auth.tool.ts
  • src/mastra/tools/multi-string-edit.tool.ts
  • src/mastra/tools/pdf-data-conversion.tool.ts
  • src/mastra/tools/pdf.ts
  • src/mastra/tools/pnpm-tool.ts
  • src/mastra/tools/polygon-tools.ts
  • src/mastra/tools/serpapi-academic-local.tool.ts
  • src/mastra/tools/serpapi-news-trends.tool.ts
  • src/mastra/tools/serpapi-search.tool.ts
  • src/mastra/tools/serpapi-shopping.tool.ts
  • src/mastra/tools/test-generator.tool.ts
  • src/mastra/tools/weather-tool.ts
  • src/mastra/tools/web-scraper-tool.ts
  • src/mastra/tools/write-note.ts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Sorry, we are unable to review this pull request

The GitHub API does not allow us to fetch diffs exceeding 20000 lines

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 {
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
interface GeocodingResponse extends RequestContext {
interface GeocodingResponse {

Copilot uses AI. Check for mistakes.
wind_gusts_10m: number
weather_code: number
}
interface WeatherResponse extends RequestContext {
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
interface WeatherResponse extends RequestContext {
interface WeatherResponse {

Copilot uses AI. Check for mistakes.
preview: string;
module?: string;
isExported?: boolean;
interface SymbolInfo extends RequestContext {
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

The SymbolInfo interface incorrectly extends RequestContext. This interface represents information about a code symbol and should not extend RequestContext. Remove the extends clause.

Suggested change
interface SymbolInfo extends RequestContext {
interface SymbolInfo {

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

github-actions bot commented Jan 7, 2026

🤖 I'm sorry @ssdeanx, but I was unable to process your request. Please see the logs for more details.

@ssdeanx ssdeanx merged commit c5489f5 into main Jan 7, 2026
27 of 30 checks passed
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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

  • Enhanced Observability with Tool Lifecycle Hooks: Implemented onInputStart, onInputAvailable, and onOutput lifecycle hooks across 17 tools. These hooks provide detailed logging for tool execution stages, improving traceability, debugging, and analytics. A new utility script has also been added to generate these hooks consistently.
  • New Workflow Capabilities: Introduced several new workflows including Governed RAG Index for secure document indexing, Marketing Campaign for content generation, Data Analysis for production-grade data analysis using E2B sandboxes, and Automated Reporting for multi-section research and synthesis.
  • Improved Workflow UI/UX: The workflow visualization canvas received significant updates, including new layout options (horizontal, vertical, grid), a mini-map, and enhanced styling for nodes, headers, input, and output panels. Status indicators and action buttons have also been refined for better clarity and aesthetics.
  • Development Environment Standardization: Added Trunk configuration files (.gitignore, yamllint.yaml, trunk.yaml) to enforce consistent code quality, exclude unnecessary files from version control, and manage linters and runtimes.
  • Backend Memory and Agent Configuration Updates: Migrated several agents and networks from pgMemory to upstashMemory for enhanced memory management. PostgreSQL PgVector HNSW configuration now dynamically uses environment variables for m and efConstruction parameters.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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.

Comment on lines 133 to 139
outputProcessors: [
new TokenLimiterProcessor(1000000),
new TokenLimiterProcessor(128000),
new BatchPartsProcessor({
batchSize: 5,
batchSize: 10,
maxWaitTime: 75,
emitOnNonText: true
}),
Copy link
Contributor

Choose a reason for hiding this comment

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

high

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`,
Copy link
Contributor

Choose a reason for hiding this comment

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

security-high high

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
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The string 'CORE ENGINE 2026' is hardcoded. This should ideally be sourced from a configuration file or a constant to improve maintainability and make future updates easier.

Comment on lines +26 to 28
case "paused":
case "idle":
default:
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

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.

Comment on lines +68 to +72
<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>
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The version 'v1.0.4' is hardcoded here. It's better practice to retrieve the version dynamically from package.json or an environment variable to ensure it's always up-to-date and consistent across the application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant