Skip to content

feat: Update dependencies and improve research agent configuration#145

Merged
ssdeanx merged 1 commit intomainfrom
develop
Apr 19, 2026
Merged

feat: Update dependencies and improve research agent configuration#145
ssdeanx merged 1 commit intomainfrom
develop

Conversation

@ssdeanx
Copy link
Copy Markdown
Owner

@ssdeanx ssdeanx commented Apr 19, 2026

  • Added @chat-adapter/state-redis dependency to package.json.
  • Updated @mastra/client-js from ^1.13.5-alpha.5 to ^1.13.5-alpha.7.
  • Updated @mastra/core from ^1.26.0-alpha.5 to ^1.26.0-alpha.7.
  • Added @mastra/duckdb dependency to package.json.
  • Updated @mastra/mcp from ^1.5.1-alpha.1 to ^1.5.0.
  • Updated @mastra/observability from ^1.9.2-alpha.0 to ^1.10.0-alpha.2.
  • Updated @mastra/pg from ^1.9.1 to ^1.9.2-alpha.0.
  • Updated @mastra/posthog from ^1.0.17 to ^1.0.18-alpha.0.
  • Updated @mastra/react from ^0.2.26 to ^1.0.0-beta.25.
  • Updated @mastra/schema-compat from ^1.2.8 to ^1.2.9-alpha.1.
  • Updated @mastra/upstash from ^1.0.4 to ^1.0.5-alpha.0.
  • Updated @tanstack/react-query and @tanstack/react-query-devtools from ^5.99.0 to ^5.99.2.
  • Updated marked from ^18.0.1 to ^18.0.2.
  • Updated @mastra/core in devDependencies from ^1.26.0-alpha.5 to ^1.26.0-alpha.7.

refactor: Modify research agent response modalities and token limits

  • Changed responseModalities in researchAgent.ts from ['TEXT'] to ['TEXT', 'IMAGE'].
  • Updated TokenLimiter from 64000 to 8000.
  • Commented out thinkingConfig options in providerOptions.

feat: Introduce DuckDB configuration for observability

  • Created new file src/mastra/config/duckdb.ts to configure DuckDB storage and vector.
  • Implemented DuckDBStore, DuckDBVector, and Memory for enhanced memory management.

fix: Update Composio MCP client configuration

  • Changed the URL for googleSheets in composio-mcp.ts to the new backend endpoint.

Summary by Sourcery

Update agent storage and observability configuration while refreshing dependencies and internal research context notes.

New Features:

  • Introduce DuckDB-backed storage, vector, and memory configuration for observability and semantic recall.
  • Add a composite storage setup combining libSQL with filesystem storage for editor usage.
  • Enable Composio MCP Google Sheets client integration via the new backend endpoint.
  • Add Redis-backed chat adapter state dependency for scalable state management.

Enhancements:

  • Adjust research agent limits and processing pipeline to use updated token limiters and output processors.
  • Reconfigure research agent defaults to simplify/disable provider-specific Google options pending future tuning.
  • Expand memory options with advanced observational, reflective, semantic, and working-memory settings for long‑lived context.

Build:

  • Upgrade multiple Mastra, TanStack, and other third-party dependencies and align @mastra/core across runtime and devDependencies.

Documentation:

  • Update active context and progress markdown logs with the latest Blender MCP and FPV redesign work.

- Added `@chat-adapter/state-redis` dependency to package.json.
- Updated `@mastra/client-js` from `^1.13.5-alpha.5` to `^1.13.5-alpha.7`.
- Updated `@mastra/core` from `^1.26.0-alpha.5` to `^1.26.0-alpha.7`.
- Added `@mastra/duckdb` dependency to package.json.
- Updated `@mastra/mcp` from `^1.5.1-alpha.1` to `^1.5.0`.
- Updated `@mastra/observability` from `^1.9.2-alpha.0` to `^1.10.0-alpha.2`.
- Updated `@mastra/pg` from `^1.9.1` to `^1.9.2-alpha.0`.
- Updated `@mastra/posthog` from `^1.0.17` to `^1.0.18-alpha.0`.
- Updated `@mastra/react` from `^0.2.26` to `^1.0.0-beta.25`.
- Updated `@mastra/schema-compat` from `^1.2.8` to `^1.2.9-alpha.1`.
- Updated `@mastra/upstash` from `^1.0.4` to `^1.0.5-alpha.0`.
- Updated `@tanstack/react-query` and `@tanstack/react-query-devtools` from `^5.99.0` to `^5.99.2`.
- Updated `marked` from `^18.0.1` to `^18.0.2`.
- Updated `@mastra/core` in devDependencies from `^1.26.0-alpha.5` to `^1.26.0-alpha.7`.

refactor: Modify research agent response modalities and token limits
- Changed `responseModalities` in `researchAgent.ts` from `['TEXT']` to `['TEXT', 'IMAGE']`.
- Updated `TokenLimiter` from `64000` to `8000`.
- Commented out `thinkingConfig` options in `providerOptions`.

feat: Introduce DuckDB configuration for observability
- Created new file `src/mastra/config/duckdb.ts` to configure DuckDB storage and vector.
- Implemented `DuckDBStore`, `DuckDBVector`, and `Memory` for enhanced memory management.

fix: Update Composio MCP client configuration
- Changed the URL for `googleSheets` in `composio-mcp.ts` to the new backend endpoint.
Copilot AI review requested due to automatic review settings April 19, 2026 21:29
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agent-stack Building Building Preview, Comment Apr 19, 2026 9:29pm

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 19, 2026

Reviewer's Guide

This PR updates a broad set of Mastra, TanStack, and utility dependencies, reconfigures the research agent to use adjusted token limits and disables provider-specific Google options, introduces a DuckDB-backed memory/observability configuration wired into Mastra via a composite store, and fixes the Composio MCP Google Sheets client URL while adding active context/progress documentation entries.

Sequence diagram for Composio MCP Google Sheets client with updated backend URL

sequenceDiagram
  participant AgentRuntime
  participant MCPClient
  participant GoogleSheetsBackend as GoogleSheetsBackend_v3

  AgentRuntime->>MCPClient: initialize(composioKey)
  MCPClient->>MCPClient: setEndpoint(googleSheets,
  MCPClient->>MCPClient:  "https://backend.composio.dev/v3/mcp/bdb604fb-b165-47cb-bf90-cc45ba604c20/mcp?user_id=agentstack")

  AgentRuntime->>MCPClient: invoke(googleSheets, request)
  MCPClient->>GoogleSheetsBackend: HTTP request with payload
  GoogleSheetsBackend-->>MCPClient: HTTP response
  MCPClient-->>AgentRuntime: parsed result
Loading

Class diagram for DuckDB-backed memory and composite storage

classDiagram
  class DuckDBStore {
    +string id
    +string path
  }

  class DuckDBVector {
    +string id
    +string path
  }

  class Memory {
    +DuckDBStore storage
    +DuckDBVector vector
    +any embedder
    +object embedderOptions
    +object options
  }

  class MastraCompositeStore {
    +string id
    +string name
    +any default
    +any editor
    +object domains
  }

  class FilesystemStore {
    +string dir
  }

  class LibSQLStore {
  }

  class Observability {
  }

  class duckStore {
  }

  class duckVector {
  }

  class duckDBMemory {
  }

  class libsqlstorage {
  }

  class mastra {
  }

  DuckDBStore <|-- duckStore
  DuckDBVector <|-- duckVector
  Memory <|-- duckDBMemory

  DuckDBStore --> Memory : storage
  DuckDBVector --> Memory : vector

  LibSQLStore <|-- libsqlstorage

  MastraCompositeStore --> LibSQLStore : default
  MastraCompositeStore --> FilesystemStore : editor

  class domains_observability {
  }

  MastraCompositeStore --> domains_observability : domains_observability
  domains_observability --> DuckDBStore : observability

  FilesystemStore <.. mastra : editor_files
  MastraCompositeStore <.. mastra : storage
  Observability <.. mastra : observability
Loading

File-Level Changes

Change Details Files
Reconfigure research agent behavior and resource limits.
  • Comment out the Google provider options block (responseModalities, thinkingConfig, streaming, mediaResolution, threshold, serviceTier) in researchAgent providerOptions/defaultOptions.
  • Adjust tracingPolicy to comment out InternalSpans.MODEL usage.
  • Replace the commented TokenLimiter(64000) with an active TokenLimiter(12000) in the middlewares list.
  • Enable TokenLimiterProcessor with a higher token limit (200000) instead of keeping it commented out.
  • Comment out includeRawChunks in defaultOptions to reduce raw chunk emission.
src/mastra/agents/researchAgent.ts
Introduce DuckDB-backed storage, vector, and memory configuration and hook it into Mastra via a composite store.
  • Create a new DuckDB configuration module that instantiates DuckDBStore, DuckDBVector, and a Memory instance wired to fastembed with detailed telemetry and provider options.
  • Configure advanced Memory options including observationalMemory, semanticRecall, and workingMemory templates with environment-driven limits.
  • Import MastraCompositeStore, FilesystemStore, and the new duckStore into the Mastra bootstrap.
  • Replace the single libsqlstorage backend with a MastraCompositeStore that uses libsqlstorage as default, FilesystemStore for editor, and the DuckDB store for the observability domain.
src/mastra/config/duckdb.ts
src/mastra/index.ts
Update Composio MCP Google Sheets client to the new backend endpoint.
  • Enable the googleSheets MCP client configuration and point it to the new backend.composio.dev v3 MCP URL with a fixed user_id parameter instead of the deprecated templated URL.
src/mastra/tools/composio-mcp.ts
Expand project dependencies to support Redis state and DuckDB, and bump various Mastra, TanStack, and utility versions.
  • Add @chat-adapter/state-redis and @mastra/duckdb runtime dependencies.
  • Bump multiple @mastra packages (client-js, core, mcp, observability, pg, posthog, react, schema-compat, upstash) to newer alpha or stable versions.
  • Update @tanstack/react-query, @tanstack/react-query-devtools, convert-csv-to-json, and marked to the latest patch releases.
  • Align devDependency on @mastra/core to the new alpha version and regenerate package-lock.json accordingly.
package.json
package-lock.json
Document recent Blender MCP / FPV research context and progress in the memory bank.
  • Add a detailed Active Context Update section describing Blender MCP setup, Rocket Drone redesign iterations, and print-release artifacts.
  • Add a matching Progress Update section summarizing research steps, redesign passes, and release packaging work.
memory-bank/activeContext.md
memory-bank/progress.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@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
Copy Markdown

🤖 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
Copy Markdown

coderabbitai Bot commented Apr 19, 2026

Caution

Review failed

Pull request was closed or merged during review

Summary by CodeRabbit

  • New Features

    • Enabled Google Sheets integration for enhanced data connectivity
    • Added DuckDB-based persistent memory storage with semantic recall capabilities
  • Improvements

    • Enhanced research agent with improved token management and limits
    • Upgraded to latest dependency versions for better performance and stability
  • Chores

    • Updated multiple package dependencies and internal storage configuration

Walkthrough

This pull request introduces DuckDB-based memory and storage infrastructure to the Mastra framework, updates agent and tool configurations, enables new MCP servers, manages dependency versions, and documents ongoing Blender/FPV CAD research progress in memory bank files.

Changes

Cohort / File(s) Summary
DuckDB Memory & Storage Infrastructure
src/mastra/config/duckdb.ts, src/mastra/index.ts
New DuckDB configuration module exports duckStore, duckVector, and duckDBMemory with embeddings, observational/working memory, and semantic recall. Main index now uses MastraCompositeStore with DuckDB as observability backend and FilesystemStore for editor.
Research Agent Configuration
src/mastra/agents/researchAgent.ts
Enabled TokenLimiter(12000) and TokenLimiterProcessor(200000), disabled internal tracing spans, commented out Google provider configuration (including responseModalities and thinkingConfig), and disabled includeRawChunks.
MCP Tools
src/mastra/tools/composio-mcp.ts
Activated googleSheets MCP server configuration pointing to Composio backend URL.
Dependency Management
package.json
Added @chat-adapter/state-redis@^4.26.0, updated multiple @mastra/* packages (client-js, core, mcp, observability, pg, react, schema-compat, upstash to newer/alpha versions), added @mastra/duckdb@^1.1.2, bumped TanStack React Query to ^5.99.2, and updated CSV/markdown utility versions.
Project Metadata & Documentation
.gitignore, memory-bank/activeContext.md, memory-bank/progress.md
Added .gitignore patterns for DuckDB files (store.duckdb, store.duckdb.wal) and blender.md. Appended Blender MCP / FPV research context and detailed CAD redesign progress notes (R1–R6 iterations, STL validation, production packaging) to memory bank.

Sequence Diagram(s)

This change set does not meet the sequence diagram criteria. The modifications consist primarily of configuration updates, dependency management, documentation additions, and isolated agent/tool enablement rather than introducing new multi-component interaction flows with clear sequential dependencies that would benefit from visualization.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 A storage sanctuary in DuckDB's nest,
Composio's sheets and tokens pass the test,
Blender dreams spin in memory's embrace,
While research agents learn a smarter pace!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: dependency updates and improvements to research agent configuration are the core focus of this PR.
Description check ✅ Passed The description comprehensively covers the key changes across package.json, researchAgent.ts, DuckDB configuration, and Composio MCP setup, all of which align with the actual changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

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.

@github-actions
Copy link
Copy Markdown

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

Copy link
Copy Markdown
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 DuckDB for storage and vector persistence, updates various dependencies, and provides extensive documentation on FPV drone redesign progress. Key technical updates include the setup of a MastraCompositeStore and advanced memory configurations. Feedback identifies several issues: a critical anti-pattern of importing directly from node_modules, the use of incompatible or invalid model identifiers for fastembed and Gemini, hardcoded sensitive URLs in the MCP configuration, and discrepancies between the code and PR description regarding token limits and commented-out provider options.

Comment thread src/mastra/index.ts
@@ -1,3 +1,4 @@
import { ObservabilityDuckDBConfig } from './../../node_modules/@mastra/duckdb/dist/storage/domains/observability/index.d';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

critical

Importing directly from node_modules using a relative path to a type definition file is a critical anti-pattern. It makes the codebase extremely fragile and dependent on the local file system structure of the node_modules directory. Furthermore, the imported type ObservabilityDuckDBConfig is not used anywhere in this file. This line should be removed.

},
providerOptions: {
fastembed: {
model: "text-embedding-3-small",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The model text-embedding-3-small is an OpenAI model, but it is being passed to fastembed, which is intended for running local embedding models. This will likely cause a runtime error as fastembed will not find a local model with this name.

Suggested change
model: "text-embedding-3-small",
model: "BAAI/bge-small-en-v1.5",

// url: new URL(`https://mcp.composio.dev/googlesheets/${composioKey}`),
//},
googleSheets: {
url: new URL(`https://backend.composio.dev/v3/mcp/bdb604fb-b165-47cb-bf90-cc45ba604c20/mcp?user_id=agentstack`),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

security-high high

Hardcoding a specific backend URL containing a UUID and a user_id is a security and maintainability risk. This sensitive configuration should be managed via environment variables to ensure the code is portable across different environments and to avoid exposing internal identifiers in the source code.

search: { topK: 5 },
}),
//new TokenLimiter(64000),
new TokenLimiter(12000),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

There is a discrepancy between the code and the pull request description. The description states that the TokenLimiter was updated to 8000, but the code implementation sets it to 12000. Please ensure the value aligns with the intended configuration.

Suggested change
new TokenLimiter(12000),
new TokenLimiter(8000),

Comment on lines +406 to +418
//google: {
// responseModalities: ['TEXT', 'IMAGE'],
// thinkingConfig: {
// includeThoughts: true,
// thinkingLevel: 'medium',
// },
//cachedContent: "Use cached content when available to reduce latency and costs, but ensure freshness for time-sensitive queries. Prefer cached data for static information and use real-time fetches for news, trends, and financial data.",
streamFunctionCallArguments: true,
mediaResolution: "MEDIA_RESOLUTION_MEDIUM",
threshold: 'OFF', // Set to 'OFF' to disable thresholding and allow all tool calls
//streamFunctionCallArguments: true,
//mediaResolution: "MEDIA_RESOLUTION_MEDIUM",
//threshold: 'OFF', // Set to 'OFF' to disable thresholding and allow all tool calls
//labels: "research-agent",
serviceTier: 'flex',
} satisfies GoogleLanguageModelOptions,
//serviceTier: 'standard',
// } satisfies GoogleLanguageModelOptions,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The entire providerOptions block for Google is commented out, which contradicts the pull request description stating that responseModalities was updated to include IMAGE. If these configurations are required for the agent's functionality, they should be active. If they are no longer needed, the code should be removed rather than commented out to maintain cleanliness.

observationalMemory: {
enabled: true,
scope: 'thread', // 'resource' | 'thread'
model: 'google/gemini-2.5-flash',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

google/gemini-2.5-flash appears to be an invalid model identifier. Current Gemini models are in the 1.5 or 2.0 series. This will likely cause an error when the observationalMemory attempts to call the model.

Suggested change
model: 'google/gemini-2.5-flash',
model: 'google/gemini-2.0-flash',

Copy link
Copy Markdown

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

Hey - I've found 4 issues, and left some high level feedback:

  • The googleSheets MCP client is configured with a hard-coded backend URL, API key, and user_id; consider moving these values to environment variables or config so they can be rotated and differentiated across environments.
  • The new DuckDB store/vector paths (./store.duckdb, ./vectors.duckdb) are currently hard-coded; it may be safer to make these configurable (e.g., via env vars or a shared config helper) so they can be relocated for different deploy targets and storage policies.
  • There are large blocks of now-unused Google provider options in researchAgent.ts that are commented out; if this configuration is no longer needed, consider removing it or gating it behind a feature flag to keep the agent configuration easier to read and maintain.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `googleSheets` MCP client is configured with a hard-coded backend URL, API key, and `user_id`; consider moving these values to environment variables or config so they can be rotated and differentiated across environments.
- The new DuckDB store/vector paths (`./store.duckdb`, `./vectors.duckdb`) are currently hard-coded; it may be safer to make these configurable (e.g., via env vars or a shared config helper) so they can be relocated for different deploy targets and storage policies.
- There are large blocks of now-unused Google provider options in `researchAgent.ts` that are commented out; if this configuration is no longer needed, consider removing it or gating it behind a feature flag to keep the agent configuration easier to read and maintain.

## Individual Comments

### Comment 1
<location path="src/mastra/index.ts" line_range="382" />
<code_context>
+    editor: new FilesystemStore({ dir: '.mastra-storage' }),
+    domains: {
+      //memory: new MemoryLibSQL({ url: 'file:./local.db' }),
+      observability: duckStore.observability,
+        }
+    }),
</code_context>
<issue_to_address>
**issue (bug_risk):** Accessing `duckStore.observability` looks incorrect for a `DuckDBStore` instance and may cause runtime errors.

The `duckStore` from `config/duckdb.ts` is a `DuckDBStore`, which doesn’t normally have an `observability` property. Using `duckStore.observability` in the `domains` map will likely be `undefined` or cause a type/runtime error. If observability data should live in DuckDB, pass `duckStore` itself (or a separate observability-specific store) instead of a nested property.
</issue_to_address>

### Comment 2
<location path="src/mastra/tools/composio-mcp.ts" line_range="24-25" />
<code_context>
-    //googleSheets: {
-    //  url: new URL(`https://mcp.composio.dev/googlesheets/${composioKey}`),
-    //},
+    googleSheets: {
+      url: new URL(`https://backend.composio.dev/v3/mcp/bdb604fb-b165-47cb-bf90-cc45ba604c20/mcp?user_id=agentstack`),
+    },
     //gmail: {
</code_context>
<issue_to_address>
**issue:** The Google Sheets MCP URL is hardcoded with specific IDs and user information instead of using configuration.

Embedding `bdb604fb-b165-47cb-bf90-cc45ba604c20` and `user_id=agentstack` in the URL tightly couples this client to a single environment/user and may expose tenant-specific details in code. Please parameterize these values (e.g., via env vars or `composioKey`) so the client can be reused safely across deployments, similar to the existing `composio` configuration.
</issue_to_address>

### Comment 3
<location path="memory-bank/activeContext.md" line_range="23" />
<code_context>
+- R08 production pass introduced defects in bottom-only variant (`RocketBody_Bottom_ReferenceMatch_R08_Production` nonmanifold/boundary). Hotfix release now uses clean-bottom swap in `FINAL-BODY-SECTION/reference-match-r08-production-hotfix` with `RocketBody_Main_ReferenceMatch_R08_Hotfix.stl` + `RocketBody_Bottom_ReferenceMatch_R08_Hotfix.stl` (from clean R06 bottom) + `RocketBody_Nose_ReferenceMatch_R08_Hotfix.stl`.
</code_context>
<issue_to_address>
**suggestion (typo):** Consider hyphenating "nonmanifold" to match earlier usage of "non-manifold".

To stay consistent with earlier bullets (e.g., "non-manifold edges"), consider changing "nonmanifold/boundary" to "non-manifold/boundary" here.

```suggestion
- R08 production pass introduced defects in bottom-only variant (`RocketBody_Bottom_ReferenceMatch_R08_Production` non-manifold/boundary). Hotfix release now uses clean-bottom swap in `FINAL-BODY-SECTION/reference-match-r08-production-hotfix` with `RocketBody_Main_ReferenceMatch_R08_Hotfix.stl` + `RocketBody_Bottom_ReferenceMatch_R08_Hotfix.stl` (from clean R06 bottom) + `RocketBody_Nose_ReferenceMatch_R08_Hotfix.stl`.
```
</issue_to_address>

### Comment 4
<location path="memory-bank/progress.md" line_range="12" />
<code_context>
+- Completed full all-parts `R4` package to address every legacy STL slot: exported updated body, bottom, nose, motor-covers, and camera-mount files (plus stack-mount add-on) to `The Rocket Drone/redesign-r4`, with non-manifold checks reporting zero on key R4 parts.
</code_context>
<issue_to_address>
**nitpick (typo):** Consider making "motor-covers" consistent with other mentions of "motor covers".

Other occurrences use "motor covers" without a hyphen; consider matching that form here unless this variant is intentional.

```suggestion
- Completed full all-parts `R4` package to address every legacy STL slot: exported updated body, bottom, nose, motor covers, and camera-mount files (plus stack-mount add-on) to `The Rocket Drone/redesign-r4`, with non-manifold checks reporting zero on key R4 parts.
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread src/mastra/index.ts
editor: new FilesystemStore({ dir: '.mastra-storage' }),
domains: {
//memory: new MemoryLibSQL({ url: 'file:./local.db' }),
observability: duckStore.observability,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

issue (bug_risk): Accessing duckStore.observability looks incorrect for a DuckDBStore instance and may cause runtime errors.

The duckStore from config/duckdb.ts is a DuckDBStore, which doesn’t normally have an observability property. Using duckStore.observability in the domains map will likely be undefined or cause a type/runtime error. If observability data should live in DuckDB, pass duckStore itself (or a separate observability-specific store) instead of a nested property.

Comment on lines +24 to +25
googleSheets: {
url: new URL(`https://backend.composio.dev/v3/mcp/bdb604fb-b165-47cb-bf90-cc45ba604c20/mcp?user_id=agentstack`),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

issue: The Google Sheets MCP URL is hardcoded with specific IDs and user information instead of using configuration.

Embedding bdb604fb-b165-47cb-bf90-cc45ba604c20 and user_id=agentstack in the URL tightly couples this client to a single environment/user and may expose tenant-specific details in code. Please parameterize these values (e.g., via env vars or composioKey) so the client can be reused safely across deployments, similar to the existing composio configuration.

- User-reported protruding-bar issue was fixed by rebuilding from clean sources into a new set: `RocketBody_Main_CleanRearMount_v3` + `RocketBody_Bottom_RearMount_v3`, with corrected rear 30mm join and relocated `RocketBody_ControlFin_Left_v2/Right_v2` in `FINAL-BODY-SECTION/v3-clean-join-controlfins`.
- A production-oriented `RocketDrone_PrintRelease_R01` package was created with normalized file names, standardized M3 hole sizing (Ø3.40), v5-derived main/bottom + actuator mounts + 2205 motor plate exports, QC coupon STLs, and release runbook/checklist docs.
- For reference-shape fidelity, latest active set is `FINAL-BODY-SECTION/reference-match-r06-final` with `RocketBody_Main_ReferenceMatch_R06_Final.stl`, `RocketBody_Bottom_ReferenceMatch_R06_Final.stl`, and `RocketBody_Nose_ReferenceMatch_R06_Final.stl` (cleaned from prior protrusion-heavy reinforcement variants).
- R08 production pass introduced defects in bottom-only variant (`RocketBody_Bottom_ReferenceMatch_R08_Production` nonmanifold/boundary). Hotfix release now uses clean-bottom swap in `FINAL-BODY-SECTION/reference-match-r08-production-hotfix` with `RocketBody_Main_ReferenceMatch_R08_Hotfix.stl` + `RocketBody_Bottom_ReferenceMatch_R08_Hotfix.stl` (from clean R06 bottom) + `RocketBody_Nose_ReferenceMatch_R08_Hotfix.stl`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion (typo): Consider hyphenating "nonmanifold" to match earlier usage of "non-manifold".

To stay consistent with earlier bullets (e.g., "non-manifold edges"), consider changing "nonmanifold/boundary" to "non-manifold/boundary" here.

Suggested change
- R08 production pass introduced defects in bottom-only variant (`RocketBody_Bottom_ReferenceMatch_R08_Production` nonmanifold/boundary). Hotfix release now uses clean-bottom swap in `FINAL-BODY-SECTION/reference-match-r08-production-hotfix` with `RocketBody_Main_ReferenceMatch_R08_Hotfix.stl` + `RocketBody_Bottom_ReferenceMatch_R08_Hotfix.stl` (from clean R06 bottom) + `RocketBody_Nose_ReferenceMatch_R08_Hotfix.stl`.
- R08 production pass introduced defects in bottom-only variant (`RocketBody_Bottom_ReferenceMatch_R08_Production` non-manifold/boundary). Hotfix release now uses clean-bottom swap in `FINAL-BODY-SECTION/reference-match-r08-production-hotfix` with `RocketBody_Main_ReferenceMatch_R08_Hotfix.stl` + `RocketBody_Bottom_ReferenceMatch_R08_Hotfix.stl` (from clean R06 bottom) + `RocketBody_Nose_ReferenceMatch_R08_Hotfix.stl`.

Comment thread memory-bank/progress.md
- Started the actual Blender redesign pass: created backup and working collections, generated scaled `_R1` shell variants for 5-inch fitting, added `FitGuides_5inch` hardware envelopes, and created first custom-fit parts (`Cam_Mount_19mm_R1`, `Stack_Mount_30p5_R1`).
- Continued Blender redesign with `R2` shell edits: hollowed the main body, added diagonal arm-clearance tunnels, hollowed the rear/bottom shell with a service slot, cut the nose camera cavity/lens opening, and exported an interim STL set to `The Rocket Drone/redesign-r2`.
- Completed precision `R3` refinement: fixed incorrect custom mount sizing, performed BVH overlap checks against stack/VTX/camera guides, resolved the VTX interference, verified zero-overlap outcomes for the critical guides, and exported a precision STL set to `The Rocket Drone/redesign-r3`.
- Completed full all-parts `R4` package to address every legacy STL slot: exported updated body, bottom, nose, motor-covers, and camera-mount files (plus stack-mount add-on) to `The Rocket Drone/redesign-r4`, with non-manifold checks reporting zero on key R4 parts.
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 (typo): Consider making "motor-covers" consistent with other mentions of "motor covers".

Other occurrences use "motor covers" without a hyphen; consider matching that form here unless this variant is intentional.

Suggested change
- Completed full all-parts `R4` package to address every legacy STL slot: exported updated body, bottom, nose, motor-covers, and camera-mount files (plus stack-mount add-on) to `The Rocket Drone/redesign-r4`, with non-manifold checks reporting zero on key R4 parts.
- Completed full all-parts `R4` package to address every legacy STL slot: exported updated body, bottom, nose, motor covers, and camera-mount files (plus stack-mount add-on) to `The Rocket Drone/redesign-r4`, with non-manifold checks reporting zero on key R4 parts.

},
providerOptions: {
fastembed: {
model: "text-embedding-3-small",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

CRITICAL: Incorrect model specification for fastembed provider

The fastembed embedder uses local models and does not support OpenAI model names like "text-embedding-3-small". This will cause runtime errors when attempting to generate embeddings. Use a valid fastembed model identifier instead.

@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented Apr 19, 2026

Code Review Summary

Status: 1 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 1
WARNING 0
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
src/mastra/config/duckdb.ts 30 Incorrect model specification for fastembed provider
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
Files Reviewed (8 files)
  • .gitignore - No issues
  • memory-bank/activeContext.md - No issues
  • memory-bank/progress.md - No issues
  • package.json - No issues
  • package-lock.json - No issues
  • src/mastra/agents/researchAgent.ts - No issues
  • src/mastra/config/duckdb.ts - 1 issues
  • src/mastra/index.ts - No issues
  • src/mastra/tools/composio-mcp.ts - No issues

Reviewed by grok-code-fast-1:optimized:free · 498,321 tokens

@ssdeanx ssdeanx merged commit 1d79008 into main Apr 19, 2026
115 of 120 checks passed
Copy link
Copy Markdown
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 updates Mastra- and chat-adapter-related dependencies, introduces a DuckDB-backed observability storage configuration, and adjusts the research agent configuration and Composio MCP server wiring.

Changes:

  • Bump and add dependencies (notably @mastra/duckdb, @mastra/react, @chat-adapter/state-redis) and refresh lockfile.
  • Add DuckDB store/vector config and wire DuckDB into Mastra storage domains for observability.
  • Update Composio MCP server config and modify research agent processor/provider settings.

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/mastra/tools/composio-mcp.ts Enables a googleSheets MCP server entry with a new backend URL.
src/mastra/index.ts Wires composite storage and attempts to route observability storage to DuckDB.
src/mastra/config/duckdb.ts Introduces DuckDB store/vector instances and a Memory configuration.
src/mastra/agents/researchAgent.ts Adjusts token limiting and comments out provider options/thinking config.
package.json Adds/updates dependencies, including @mastra/duckdb and @mastra/react.
package-lock.json Updates resolved dependency graph for the new versions/additions.
.gitignore Adds ignore rules for DuckDB artifacts and blender.md.
memory-bank/progress.md Adds progress notes (Blender MCP / FPV research).
memory-bank/activeContext.md Adds active context notes (Blender MCP / FPV research).

Comment on lines +24 to +26
googleSheets: {
url: new URL(`https://backend.composio.dev/v3/mcp/bdb604fb-b165-47cb-bf90-cc45ba604c20/mcp?user_id=agentstack`),
},
Copy link

Copilot AI Apr 19, 2026

Choose a reason for hiding this comment

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

The googleSheets MCP server URL is hard-coded to a specific backend instance and user_id, bypassing COMPOSIO_API_KEY and making the deployment environment-specific. This is brittle and risks unintentionally routing requests to the wrong tenant/user in non-dev environments.

Suggested fix: make this URL configurable via env vars (and/or derive it from composioKey + a COMPOSIO_USER_ID), and avoid committing fixed instance IDs in code.

Copilot uses AI. Check for mistakes.
Comment thread src/mastra/index.ts
@@ -1,3 +1,4 @@
import { ObservabilityDuckDBConfig } from './../../node_modules/@mastra/duckdb/dist/storage/domains/observability/index.d';
Copy link

Copilot AI Apr 19, 2026

Choose a reason for hiding this comment

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

This import reaches into node_modules using a relative path and targets a .d file. That will be emitted as a runtime import (unless it’s a type-only import) and is very likely to break builds/bundling. It’s also unused in this file.

Suggested fix: remove the import if it’s not needed; otherwise import the symbol from the public @mastra/duckdb entrypoint (and use import type if it’s only for typing).

Suggested change
import { ObservabilityDuckDBConfig } from './../../node_modules/@mastra/duckdb/dist/storage/domains/observability/index.d';

Copilot uses AI. Check for mistakes.
Comment thread src/mastra/index.ts
import { ComposioToolProvider } from '@mastra/editor/composio'
//import { GoogleVoice } from '@mastra/voice-google'
//import { composioAgent } from './agents/compsio'
import { composioAgent } from './agents/compsio'
Copy link

Copilot AI Apr 19, 2026

Choose a reason for hiding this comment

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

composioAgent is imported but not actually registered (it’s still commented out in the agents map). If this stays unused, it can trigger TS unused-import linting and adds confusion about whether the agent is expected to be available.

Suggested fix: either register composioAgent in agents or remove the import until it’s needed.

Suggested change
import { composioAgent } from './agents/compsio'

Copilot uses AI. Check for mistakes.
Comment on lines +6 to +13
export const duckStore = new DuckDBStore({
id: "duckdb-store",
path: './store.duckdb', // or './store.duckdb' for file persistence
});

export const duckVector = new DuckDBVector({
id: "duckdb-vector",
path: './vectors.duckdb', // or './vectors.duckdb' for file persistence
Copy link

Copilot AI Apr 19, 2026

Choose a reason for hiding this comment

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

The DuckDB file path is set to ./store.duckdb (repo root at runtime), but .gitignore is currently ignoring src/mastra/public/store.duckdb instead. This mismatch makes it easy to accidentally create/commit DuckDB files in the repo root.

Suggested fix: either update the path to a consistently ignored directory (e.g. .mastra-storage/ or src/mastra/public/), or update .gitignore to match the actual runtime path (including *.wal/sidecar files).

Suggested change
export const duckStore = new DuckDBStore({
id: "duckdb-store",
path: './store.duckdb', // or './store.duckdb' for file persistence
});
export const duckVector = new DuckDBVector({
id: "duckdb-vector",
path: './vectors.duckdb', // or './vectors.duckdb' for file persistence
/**
* Stores DuckDB persistence files under a stable project subdirectory
* so runtime-generated database files are not created in the repo root.
*/
const DUCKDB_STORAGE_DIR = "src/mastra/public";
export const duckStore = new DuckDBStore({
id: "duckdb-store",
path: `${DUCKDB_STORAGE_DIR}/store.duckdb`,
});
export const duckVector = new DuckDBVector({
id: "duckdb-vector",
path: `${DUCKDB_STORAGE_DIR}/vectors.duckdb`,

Copilot uses AI. Check for mistakes.
Comment on lines +6 to +13
export const duckStore = new DuckDBStore({
id: "duckdb-store",
path: './store.duckdb', // or './store.duckdb' for file persistence
});

export const duckVector = new DuckDBVector({
id: "duckdb-vector",
path: './vectors.duckdb', // or './vectors.duckdb' for file persistence
Copy link

Copilot AI Apr 19, 2026

Choose a reason for hiding this comment

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

DuckDBVector persists to ./vectors.duckdb, but there’s no corresponding ignore entry for vectors.duckdb / vectors.duckdb.wal. This can lead to untracked binary DB artifacts appearing in git status during local runs.

Suggested fix: align the vector DB path with the chosen storage directory and add ignore patterns for the vector DuckDB file and WAL files.

Suggested change
export const duckStore = new DuckDBStore({
id: "duckdb-store",
path: './store.duckdb', // or './store.duckdb' for file persistence
});
export const duckVector = new DuckDBVector({
id: "duckdb-vector",
path: './vectors.duckdb', // or './vectors.duckdb' for file persistence
const DUCKDB_STORAGE_DIR = './.mastra';
const DUCKDB_STORE_PATH = `${DUCKDB_STORAGE_DIR}/store.duckdb`;
const DUCKDB_VECTOR_PATH = `${DUCKDB_STORAGE_DIR}/vectors.duckdb`;
export const duckStore = new DuckDBStore({
id: "duckdb-store",
path: DUCKDB_STORE_PATH,
});
export const duckVector = new DuckDBVector({
id: "duckdb-vector",
path: DUCKDB_VECTOR_PATH,

Copilot uses AI. Check for mistakes.
Comment on lines 370 to 375
}),
//new TokenLimiter(64000),
new TokenLimiter(12000),
],
outputProcessors: [
// new TokenLimiterProcessor(128000),
new TokenLimiterProcessor(200000),
// new BatchPartsProcessor({
Copy link

Copilot AI Apr 19, 2026

Choose a reason for hiding this comment

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

This diff diverges from the PR description for the research agent configuration: TokenLimiter is set to 12000 (not 8000), and an output TokenLimiterProcessor(200000) is added, while the Google responseModalities / thinkingConfig changes appear commented out elsewhere in the file.

Suggested fix: either update the PR description to reflect the actual behavior, or adjust the code so the intended token limit and provider options are applied (not commented).

Copilot uses AI. Check for mistakes.
Comment thread package.json
"@mastra/qdrant": "^1.0.2",
"@mastra/rag": "^2.2.0",
"@mastra/react": "^0.2.26",
"@mastra/react": "^1.0.0-beta.25",
Copy link

Copilot AI Apr 19, 2026

Choose a reason for hiding this comment

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

@mastra/react is upgraded to ^1.0.0-beta.25, but the lockfile shows it brings in @mastra/client-js@1.0.0-beta.25 and @mastra/core@1.0.0-beta.25 nested under it, while the app depends on @mastra/client-js@^1.13.5-alpha.7 and @mastra/core@^1.26.0-alpha.7. This kind of multi-version skew can cause hard-to-debug runtime issues (duplicate singletons, incompatible types/ABI expectations).

Suggested fix: align @mastra/react to a version line that depends on the same @mastra/client-js/@mastra/core series as the rest of the app, or add package manager overrides/resolutions to force a single compatible version set.

Copilot uses AI. Check for mistakes.
Comment thread src/mastra/index.ts
editor: new FilesystemStore({ dir: '.mastra-storage' }),
domains: {
//memory: new MemoryLibSQL({ url: 'file:./local.db' }),
observability: duckStore.observability,
Copy link

Copilot AI Apr 19, 2026

Choose a reason for hiding this comment

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

duckStore is exported as a DuckDBStore instance in src/mastra/config/duckdb.ts, but here it’s used as if it has an observability property (duckStore.observability). Unless DuckDBStore actually defines that property, this will be undefined at runtime and break observability storage.

Suggested fix: export the correct observability-domain store/config from duckdb.ts (e.g., duckObservabilityStore) and reference that here, or pass duckStore directly if the composite store expects a store instance for the observability domain.

Suggested change
observability: duckStore.observability,
observability: duckStore,

Copilot uses AI. Check for mistakes.
Comment thread package.json
Comment on lines +86 to 90
"@mastra/core": "^1.26.0-alpha.7",
"@mastra/daytona": "^0.2.1",
"@mastra/deployer": "^1.26.0-alpha.3",
"@mastra/duckdb": "^1.1.2",
"@mastra/editor": "^0.7.17-alpha.1",
Copy link

Copilot AI Apr 19, 2026

Choose a reason for hiding this comment

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

@mastra/duckdb (and several other @mastra packages) declare an engine requirement of Node >=22.13.0 (as reflected in the lockfile). The repo’s package.json currently advertises engines.node >=20.9.0, which can lead to installs succeeding on unsupported Node versions and then failing at runtime/build.

Suggested fix: bump engines.node to match the strictest @mastra dependency requirement (or document/enforce the required Node version via tooling like .nvmrc/Volta).

Copilot uses AI. Check for mistakes.
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.

2 participants