Skip to content

Massive Tool Overhaul, Almost fully stable.#146

Merged
ssdeanx merged 2 commits intomainfrom
develop
Apr 21, 2026
Merged

Massive Tool Overhaul, Almost fully stable.#146
ssdeanx merged 2 commits intomainfrom
develop

Conversation

@ssdeanx
Copy link
Copy Markdown
Owner

@ssdeanx ssdeanx commented Apr 21, 2026

No description provided.

ssdeanx and others added 2 commits April 20, 2026 17:18
- Introduced Convex RAG tools including:
  - `convexChunker`: A tool for processing document content and storing chunk embeddings in ConvexVector with configurable chunking strategies and embedding generation.
  - `convexGraphQueryTool`: A graph-based retrieval augmented generation tool using ConvexVector for semantic search.
  - `convexVectorQueryTool`: A similarity search tool for semantic content retrieval and question answering using ConvexVector.
  - `convexRerankerTool`: A tool for reranking initial ConvexVector search results using a semantic reranker with configurable weights.

- Implemented input and output schemas for each tool using Zod for validation.
- Added logging and tracing capabilities for better observability during tool execution.
- Created tests for the calendar tool to ensure functionality:
  - Validated default source selection based on platform.
  - Checked explicit source overrides.
  - Parsed events from ICS calendar exports.
  - Loaded events from an ICS file on Linux.
  - Ensured an ICS file is required when falling back to the ICS source on Linux.

Co-authored-by: Copilot <copilot@github.com>
…y, agents response are 10x faster.

- Overhauled hooks for every tools to be much smoother data flow through each hook and toModelOutput then toOutput
- p50 and p99 latency timing is 10x faster for both
- Stablized all but one error in git-local.tool

feat: add LocalFilesystem commands documentation
- Created a new markdown file for LocalFilesystem commands detailing methods such as init, destroy, setAllowedPaths, readFile, writeFile, appendFile, deleteFile, copyFile, moveFile, mkdir, rmdir, readdir, exists, stat, getInfo, and getInstructions.
- Included examples for each method and explained path resolution and basePath behavior.

feat: add Moltbook API command examples
- Introduced a new markdown file with example commands for interacting with the Moltbook API, covering registration, post creation, comments, voting, and community management.

feat: implement Moltbook tools
- Developed multiple tools for interacting with the Moltbook API, including:
  - `moltbookRegisterAgentTool`: Registers a new agent profile.
  - `moltbookGetProfileTool`: Fetches the current agent profile.
  - `moltbookUpdateProfileTool`: Updates the agent profile.
  - `moltbookCreatePostTool`: Creates a new post.
  - `moltbookSearchTool`: Searches Moltbook content.
  - `moltbookSendMessageTool`: Sends direct messages.
- Each tool includes input and output schemas, logging for input and output events, and error handling for missing API keys.

Co-authored-by: Copilot <copilot@github.com>
Copilot AI review requested due to automatic review settings April 21, 2026 10:44
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 21, 2026

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

Project Deployment Actions Updated (UTC)
agent-stack Error Error Apr 21, 2026 10:48am

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.

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.

Sorry @ssdeanx, your pull request is larger than the review limit of 150000 diff characters

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

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 21, 2026

Caution

Review failed

Pull request was closed or merged during review

Summary by CodeRabbit

  • New Features

    • Added five Convex agent skills for project setup, component creation, database migrations, performance auditing, and authentication configuration.
    • Added Moltbook platform integration tools for agent registration, profile management, posting, searching, and messaging.
    • Added Convex-backed RAG tools for document chunking, semantic search, and intelligent reranking.
    • Browser interface now displays visually instead of running in headless mode.
  • Chores

    • Updated package dependencies to latest versions.
    • Added new environment variables for Discord and Moltbook API integration.
    • Extended agent configuration system.

Walkthrough

This comprehensive update introduces Convex-backed infrastructure, refactors tool validation and output formatting across 60+ tools, adds new Moltbook API integration, migrates agent memory backends from LibSQL to Convex, and establishes channel configuration abstractions for agent-adapter integration.

Changes

Cohort / File(s) Summary
Convex Agent Skills
.agents/skills/convex-*/agents/openai.yaml
Added 5 new OpenAI agent skill configurations (create-component, migration-helper, performance-audit, quickstart, setup-auth) with interface metadata, icons, brand colors, and default prompts describing Convex-specific workflows.
Skills Registry
skills-lock.json
Added 6 new Convex skill entries (convex, convex-create-component, convex-migration-helper, convex-performance-audit, convex-quickstart, convex-setup-auth) with GitHub source references and computed hashes.
Environment & Build
.env.example, package.json, AGENTS.md
Updated environment placeholders (DISCORD_APPLICATION_ID, MOLTBOOK_API_KEY), bumped version to 1.0.46, updated convex script to use dotenvx, added new @chat-adapter and @mastra dependencies, and added contributor guidance documentation.
Memory Bank Documentation
memory-bank/activeContext.md, memory-bank/progress.md, memory-bank/tool-execute-fix/*
Extended active context and progress logs with recent hardening work; removed completed tool-execute-fix documentation (context.md, design.md, prd.md, tasks.md).
Agent Memory Migration
src/mastra/agents/browserAgent.ts, src/mastra/agents/copywriterAgent.ts, src/mastra/agents/researchAgent.ts, src/mastra/agents/supervisor-agent.ts
Migrated memory backends from LibsqlMemory to convexMemory, updated model selections (gemini-3.1-flash-lite-preview → gemma-4-31b-it for copywriter), increased toolCallConcurrency to 4, refactored researchAgent channels and token limiting (200k → 300k), removed temperature context tracking.
Browser & Temperature Context
src/mastra/browsers.ts, src/mastra/index.ts
Set browser headless mode to false for visible UI, removed temperature unit context key derivation from CF-IPCountry header.
Convex Configuration
src/mastra/config/convex.ts, src/mastra/config/index.ts
Introduced MastraCompositeStore with Convex default storage + filesystem editor, replaced Google embedding with fastembed (base model, 1024 dims), added comprehensive observational memory configuration with telemetry and blocking, exported convexStorage and convexVector constants.
Channel & Adapter Infrastructure
src/mastra/config/channels.ts, src/mastra/config/AGENTS.md
Added new channels.ts module with GitHub adapter gating, message normalization, acknowledgement-only detection, and shared channel handler configuration for research agent; documented in config AGENTS.md.
Cloudflare & Docker Integration
src/mastra/config/cloudflare.ts, src/mastra/config/docker.ts, src/mastra/config/duckdb.ts, src/mastra/config/libsql.ts
Added Cloudflare D1/KV storage and deployer wiring, Docker sandbox workspace with node:22-slim, updated observational memory models from gemini-2.5-flash to gemma-4-31b-it across duckdb/libsql configs.
HTTP Client Typing
src/mastra/lib/http-client.ts
Tightened HTTP client types: headers via AxiosRequestConfig['headers'], method via axios Method union, params allow null/undefined, added data parameter pass-through.
New Tool Modules
src/mastra/tools/convex-rag.ts, src/mastra/tools/moltbook-tools.ts, src/mastra/tools/index.ts
Added convex-rag.ts with 4 Convex-backed RAG tools (chunker, graph/vector query, reranker) including streaming, span tracking, and observability; added moltbook-tools.ts with 6 API tools (register, profile, create-post, search, send-message); updated barrel exports.
Tool Refactoring - Schema Tightening
src/mastra/tools/alpha-vantage.tool.ts, src/mastra/tools/binance-crypto-market.tool.ts, src/mastra/tools/chartjs.tool.ts, src/mastra/tools/csv-to-json.tool.ts, src/mastra/tools/cytoscape.tool.ts, src/mastra/tools/financial-chart-tools.ts, src/mastra/tools/finnhub-tools.ts, src/mastra/tools/json-to-csv.tool.ts, src/mastra/tools/leaflet.tool.ts, src/mastra/tools/polygon-tools.ts, src/mastra/tools/random-generator.tool.ts, src/mastra/tools/spatial-index.tool.ts, src/mastra/tools/technical-analysis.tool.ts
Replaced z.any() and loose Record schemas with recursive JSON-value types (AlphaVantageJsonValue, CytoscapeJsonValue, FinancialChartJsonValue, etc.) to enforce structured JSON validation at runtime across input/output schemas.
Tool Refactoring - Lifecycle & Output
src/mastra/tools/arxiv.tool.ts, src/mastra/tools/browser-tool.ts, src/mastra/tools/calculator.tool.ts, src/mastra/tools/calendar-tool.ts, src/mastra/tools/color-change-tool.ts, src/mastra/tools/confirmation.tool.ts, src/mastra/tools/copywriter-agent-tool.ts, src/mastra/tools/datetime.tool.ts, src/mastra/tools/discord-webhook.tool.ts, src/mastra/tools/document-chunking.tool.ts, src/mastra/tools/downsample.tool.ts, src/mastra/tools/editor-agent-tool.ts, src/mastra/tools/evaluateResultTool.ts, src/mastra/tools/extractLearningsTool.ts, src/mastra/tools/fetch.tool.ts, src/mastra/tools/git-local.tool.ts, src/mastra/tools/github.ts, src/mastra/tools/image-tool.ts, src/mastra/tools/jwt-auth.tool.ts, src/mastra/tools/pdf.ts, src/mastra/tools/serpapi-*/, src/mastra/tools/text-analysis.tool.ts, src/mastra/tools/url-tool.ts, src/mastra/tools/weather-tool.ts, src/mastra/tools/write-note.ts, src/mastra/tools/yahoo-finance-stock.tool.ts
Added strict: true flag, introduced toModelOutput mappers for consistent model-facing formatting, removed abortSignal from lifecycle hooks (onInputStart/Delta/Available/onOutput), standardized message logging to messages ?? [], replaced custom abort-signal logging with structured approach.
Tool Refactoring - Workspace & Context
src/mastra/tools/calendar-tool.ts, src/mastra/tools/image-tool.ts
Migrated filesystem operations from node:fs/node:path to mainFilesystem abstraction; refactored calendar to parse in-memory ICS/JSON data instead of reading local macOS calendar; updated image processing to use buffer-based Sharp operations.
Tool Documentation & Testing
src/mastra/tools/AGENTS.md, src/mastra/tools/data/acp.md, src/mastra/tools/data/google.md, src/mastra/tools/data/localfilesystem-commands.md, src/mastra/tools/data/logs/moltbook-commands.md, src/mastra/tools/tests/calendar-tool.test.ts, tests/test-results/test-results.json
Added comprehensive tool documentation (workspace filesystem policy, tool output/model shaping, ToolExecutionContext usage, streaming guidance), provider docs (ACP, Google Generative AI), filesystem commands reference, Moltbook API curl examples; added calendar-tool test suite covering source selection, ICS parsing, file loading, and error handling; updated test results to reflect 5 passing calendar tests.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • feat: Add session summaries for tool migrations and TypeScript error … #85: Overlapping tool refactoring that replaces OpenTelemetry tracer usage with new tracingContext/SpanType pattern and adjusts image tooling and logging across similar tool modules.
  • - observation memory update #140: Related code-level changes to conversational memory/backend configuration (libsql/convex memory, observational memory settings) and config wiring that overlap with this PR's memory migration.
  • Big Update. #126: Modifies src/mastra/config/convex.ts's embedding configuration, with the main PR replacing Google embedder with fastembed while the retrieved PR swaps to gemini-embedding-2-preview.

Poem

🐰 Hops through schemas with strict validation true,
Convex memories replace the old and new,
Moltbook chats and RAG tools bloom,
Channels dance while handlers groom,
Channel adapters guide the way—
Agent skills now smarter play! 🌟

✨ 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

Copy link
Copy Markdown
Contributor

@github-advanced-security github-advanced-security AI left a comment

Choose a reason for hiding this comment

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

Remark-lint (reported by Codacy) found more than 20 potential problems in the proposed changes. Check the Files changed tab 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 significantly expands the agent framework by introducing new skills, refactoring channel configurations, and adding a wide array of tools for financial, document, and social media tasks. It also migrates agent memory to Convex and updates the project's environment and dependency structure. Feedback identifies several critical issues, including widespread invalid Zod schema usage across multiple tool files and a potential runtime crash in the Discord webhook tool when handling empty responses. Furthermore, the Cloudflare configuration contains undefined global variables, the calendar tool implementation has regressed into stubs, and a typo was found in the Gemma model versioning. Finally, browser instances should be set to headless mode for production environments.

Comment on lines +37 to +38
startDate: z.iso.datetime({ offset: true }),
endDate: z.iso.datetime({ offset: true }),
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

Invalid Zod usage: z.iso is not a valid property. To validate ISO 8601 datetimes, use z.string().datetime().

Suggested change
startDate: z.iso.datetime({ offset: true }),
endDate: z.iso.datetime({ offset: true }),
startDate: z.string().datetime({ offset: true }),
endDate: z.string().datetime({ offset: true }),

Comment on lines +38 to +39
threads: THREADS_KV, // KVNamespace binding for threads table
messages: MESSAGES_KV, // KVNamespace binding for messages table
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

THREADS_KV and MESSAGES_KV are used as global variables but are not defined in this scope. In a Cloudflare Worker environment using ES modules, these bindings are typically provided on the env object passed to the handler. If this file is evaluated outside of a Worker context or in an ES module Worker, this will cause a ReferenceError at runtime.

description: z.string().optional(),
owner_email: z.email().optional(),
bio: z.string().optional(),
website: z.url().optional(),
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

Invalid Zod usage: z.url() is not a valid method. It should be z.string().url().

		website: z.string().url().optional(),

bio: z.string().optional(),
website: z.url().optional(),
})
.loose()
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

Invalid Zod method: .loose() does not exist on Zod objects. You likely intended to use .passthrough() to allow unknown keys.

	.passthrough()

query: z.string(),
type: z.enum(['posts', 'comments', 'agents', 'submolts']).optional(),
results: z.array(z.looseObject({})).optional(),
})
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

Invalid Zod usage: z.looseObject() is not a standard Zod method. To define an object that allows any keys, use z.record(z.string(), z.any()) or z.object({}).passthrough().

		results: z.array(z.record(z.string(), z.any())).optional(),

.max(0xffffff)
.optional()
.describe('Embed accent color as a 24-bit integer.'),
timestamp: z
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

Invalid Zod usage: z.iso is not a valid property. Use z.string().datetime().

        .string().datetime({ offset: true })

})

const data = response.ok
? ((await response.json()) as DiscordWebhookMessage)
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

When wait is set to false in the input, Discord returns a 204 No Content response. The current implementation will crash at response.json() (on the previous line) because the body is empty. Consider checking the status code before parsing.

}

return {
name: sourceKind,
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 macos-calendar and windows-outlook sources are currently stubs returning empty arrays. This is a regression from the previous implementation which used AppleScript to read local calendar events.

observationalMemory: {
enabled: true,
scope: 'thread', // 'resource' | 'thread'
model: 'google/gemma-4-31b-it',
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 model name google/gemma-4-31b-it appears to be a typo, as Gemma 4 has not been released. This should likely be google/gemma-2-27b-it or a Gemini model name.

Suggested change
model: 'google/gemma-4-31b-it',
model: 'google/gemini-1.5-flash',

Comment thread src/mastra/browsers.ts

export const agentBrowser = new AgentBrowser({
headless: true,
headless: false,
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

Setting headless: false is useful for debugging but should generally be true in production environments to improve performance and avoid issues in environments without a display server.

  headless: true,

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 is a broad Mastra tools/config overhaul focused on making tool schemas stricter, improving model-facing outputs (toModelOutput), hardening lifecycle hooks/logging, and introducing new runtime/config surfaces (Convex memory, channel config, Docker/Cloudflare examples).

Changes:

  • Standardize many tools to use strict: true, add/adjust input/output hooks, and implement toModelOutput mappings for model-facing responses.
  • Add new tooling/docs/testing around calendar + Moltbook/ACP, plus expand/adjust several data transformation tools (CSV/JSON/PDF).
  • Rework runtime/config wiring (Convex-based memory, shared channel config, browser settings, dependency bumps).

Reviewed changes

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

Show a summary per file
File Description
tests/test-results/test-results.json Updates stored Vitest JSON reporter output.
src/mastra/tools/yahoo-finance-stock.tool.ts Adds strict mode + model output; changes hook logging payloads.
src/mastra/tools/write-note.ts Adds strict mode + toModelOutput; adjusts hook logging.
src/mastra/tools/weather-tool.ts Expands schemas, adds background config + toModelOutput, adds sourceUrl.
src/mastra/tools/url-tool.ts Adds strict mode + safer output logging; minor typing/formatting changes.
src/mastra/tools/text-analysis.tool.ts Adds strict mode, hook logging, and toModelOutput; span input tweaks.
src/mastra/tools/tests/calendar-tool.test.ts Adds cross-platform calendar tool unit tests (Vitest).
src/mastra/tools/stooq-stock-market-data.tool.ts Tightens input schema + adds strict mode and toModelOutput.
src/mastra/tools/spatial-index.tool.ts Tightens JSON typing/schemas + adds strict mode and toModelOutput.
src/mastra/tools/serpapi-search.tool.ts Schema hardening + strict mode + toModelOutput + safer onOutput logging.
src/mastra/tools/serpapi-local-maps.tool.ts Adds strict mode + toModelOutput + safer hook logging.
src/mastra/tools/serpapi-images.tool.ts Adds strict mode + richer toModelOutput; adds hook logging.
src/mastra/tools/serpapi-academic-local.tool.ts Adds strict mode + toModelOutput; adjusts hook signatures/logging.
src/mastra/tools/random-generator.tool.ts Tightens JSON typing/schemas + strict mode + toModelOutput.
src/mastra/tools/pdf.ts Adds strict mode + toModelOutput; refines onOutput logging.
src/mastra/tools/leaflet.tool.ts Tightens JSON schema typing + strict mode + toModelOutput.
src/mastra/tools/jwt-auth.tool.ts Adds strict mode; updates hook signatures/logging.
src/mastra/tools/json-to-csv.tool.ts Uses csv-stringify + strict mode + toModelOutput; improves normalization.
src/mastra/tools/index.ts Exports new tool modules (incl. Moltbook + Convex RAG exports).
src/mastra/tools/github.ts Adds strict mode across tools; improves JSON typing and safer field access.
src/mastra/tools/git-local.tool.ts Resolves repo paths via workspace fs; adds strict mode and input hooks.
src/mastra/tools/fetch.tool.ts Removes abort-signal resolver import; adjusts hook logging + safer output parsing.
src/mastra/tools/extractLearningsTool.ts Adds strict mode + hook logging + more structured toModelOutput.
src/mastra/tools/evaluateResultTool.ts Adds strict mode; adjusts span type + output logging and toModelOutput.
src/mastra/tools/editor-agent-tool.ts Adds strict mode; switches to content-style toModelOutput; refines streaming casts.
src/mastra/tools/downsample.tool.ts Adds strict mode + hook logging; safer output logging.
src/mastra/tools/datetime.tool.ts Adds strict mode + typed result union; removes mastra from span metadata.
src/mastra/tools/data/logs/moltbook-commands.md Adds Moltbook API command examples documentation.
src/mastra/tools/data/acp.md Adds ACP protocol documentation/reference material.
src/mastra/tools/cytoscape.tool.ts Tightens JSON typing + strict mode + toModelOutput; adds input hooks.
src/mastra/tools/csv-to-json.tool.ts Tightens output typing + strict mode + toModelOutput; adds input hooks.
src/mastra/tools/confirmation.tool.ts Adds strict mode; hook signature tweaks; minor formatting fix.
src/mastra/tools/color-change-tool.ts Adds strict mode + toModelOutput; moves output logging after execute.
src/mastra/tools/coinbase-exchange-crypto.tool.ts Adds strict mode + toModelOutput; adjusts hook payloads.
src/mastra/tools/chartjs.tool.ts Tightens JSON typing + strict mode + toModelOutput; refactors scales/title config.
src/mastra/tools/calculator.tool.ts Adds strict mode + toModelOutput across calculator/unit/matrix tools; hook logging.
src/mastra/tools/binance-crypto-market.tool.ts Adds strict mode + toModelOutput; changes hook logging payloads.
src/mastra/tools/arxiv.tool.ts Adds strict mode; hook signature/logging adjustments; safer output logging.
src/mastra/tools/alpha-vantage.tool.ts Tightens JSON typing + strict mode + toModelOutput; hook/logging adjustments.
src/mastra/tools/AGENTS.md Documents workspace filesystem policy + toModelOutput guidance and streaming rules.
src/mastra/lib/http-client.ts Tightens axios typings (Method/headers/params) and adds request data support.
src/mastra/index.ts Removes global temperature unit injection from request context payload.
src/mastra/config/libsql.ts Updates observational memory model configuration.
src/mastra/config/index.ts Exports new channels config barrel.
src/mastra/config/duckdb.ts Updates observational memory model configuration.
src/mastra/config/docker.ts Adds Docker workspace example configuration.
src/mastra/config/convex.ts Adds Convex storage/vector + composite store + memory config.
src/mastra/config/cloudflare.ts Adds Cloudflare storage/deployer example configuration.
src/mastra/config/channels.ts Adds shared channel adapter gating + handler utilities for the research agent.
src/mastra/config/AGENTS.md Documents new channels.ts config module.
src/mastra/browsers.ts Changes agent/stagehand browsers to non-headless by default.
src/mastra/agents/supervisor-agent.ts Switches supervisor agent memory to Convex memory.
src/mastra/agents/copywriterAgent.ts Switches model + memory to Convex memory.
src/mastra/agents/browserAgent.ts Switches memory to Convex memory; increases tool concurrency; uses non-headless browser.
skills-lock.json Adds Convex-related agent skills entries.
package.json Version bump; dependency updates; updates convex script and adds adapter deps.
memory-bank/progress.md Updates progress tracking notes.
memory-bank/activeContext.md Updates active context notes.
convex/_generated/ai/ai-files.state.json Adds Convex AI files state tracking output.
AGENTS.md Adds Convex guidance banner referencing generated guidelines.
.env.example Replaces example secret with placeholder; adds Moltbook key and Discord app id.
.agents/skills/convex-setup-auth/agents/openai.yaml Adds Convex skill metadata for agent usage.
.agents/skills/convex-quickstart/agents/openai.yaml Adds Convex skill metadata for agent usage.
.agents/skills/convex-performance-audit/agents/openai.yaml Adds Convex skill metadata for agent usage.
.agents/skills/convex-migration-helper/agents/openai.yaml Adds Convex skill metadata for agent usage.
.agents/skills/convex-create-component/agents/openai.yaml Adds Convex skill metadata for agent usage.
memory-bank/tool-execute-fix/tasks.md Removes obsolete memory-bank tasks doc.
memory-bank/tool-execute-fix/prd.md Removes obsolete memory-bank PRD doc.
memory-bank/tool-execute-fix/design.md Removes obsolete memory-bank design doc.
memory-bank/tool-execute-fix/context.md Removes obsolete memory-bank context doc.

Comment on lines 436 to 444
onOutput: ({ output, toolCallId, toolName, abortSignal }) => {
const resolved = resolveAbortSignal(abortSignal)
const aborted = resolved.aborted ?? false
log.info('Alpha Vantage crypto completed', {
toolCallId,
toolName,
symbol: output.metadata?.symbol ?? 'unknown',
abortSignal: resolveAbortSignal(abortSignal).aborted,
hook: 'onOutput',
})
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

resolveAbortSignal(abortSignal) and aborted are computed in onOutput but never used. With typical TS/ESLint settings (noUnusedLocals / @typescript-eslint/no-unused-vars), this can fail CI. Either remove these locals or include the derived aborted value in the log payload.

Copilot uses AI. Check for mistakes.
Comment on lines 3 to +4
import { ModelRouterEmbeddingModel } from '@mastra/core/llm'
import { fastembed } from '@mastra/fastembed'
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

ModelRouterEmbeddingModel is imported but not used in this module. If the repo enforces unused-import checks, this will fail lint/TS builds. Remove the unused import (and any other unused imports) or reintroduce usage if it’s required.

Suggested change
import { ModelRouterEmbeddingModel } from '@mastra/core/llm'
import { fastembed } from '@mastra/fastembed'

Copilot uses AI. Check for mistakes.
@@ -1 +1 @@
{"numTotalTestSuites":2,"numPassedTestSuites":2,"numFailedTestSuites":0,"numPendingTestSuites":0,"numTotalTests":1,"numPassedTests":1,"numFailedTests":0,"numPendingTests":0,"numTodoTests":0,"snapshot":{"added":0,"failure":false,"filesAdded":0,"filesRemoved":0,"filesRemovedList":[],"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"uncheckedKeysByFile":[],"unmatched":0,"updated":0,"didUpdate":false},"startTime":1776262021876,"success":true,"testResults":[{"assertionResults":[{"ancestorTitles":["ForecastView"],"fullName":"ForecastView renders forecast rows","status":"passed","title":"renders forecast rows","duration":77.82680000000028,"failureMessages":[],"location":{"line":9,"column":5},"meta":{},"tags":[]}],"startTime":1776262025182,"endTime":1776262025259.827,"status":"passed","message":"","name":"C:/Users/ssdsk/AgentStack/src/components/ai-elements/tools/__tests__/weather-tool.test.tsx"}]} No newline at end of file
{"numTotalTestSuites":2,"numPassedTestSuites":2,"numFailedTestSuites":0,"numPendingTestSuites":0,"numTotalTests":5,"numPassedTests":5,"numFailedTests":0,"numPendingTests":0,"numTodoTests":0,"snapshot":{"added":0,"failure":false,"filesAdded":0,"filesRemoved":0,"filesRemovedList":[],"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"uncheckedKeysByFile":[],"unmatched":0,"updated":0,"didUpdate":false},"startTime":1776701747029,"success":true,"testResults":[{"assertionResults":[{"ancestorTitles":["calendar-tool"],"fullName":"calendar-tool selects the correct default source for each platform","status":"passed","title":"selects the correct default source for each platform","duration":1.6313000000000102,"failureMessages":[],"location":{"line":21,"column":5},"meta":{},"tags":[]},{"ancestorTitles":["calendar-tool"],"fullName":"calendar-tool honors explicit source overrides","status":"passed","title":"honors explicit source overrides","duration":0.32979999999997744,"failureMessages":[],"location":{"line":27,"column":5},"meta":{},"tags":[]},{"ancestorTitles":["calendar-tool"],"fullName":"calendar-tool parses events from an ICS calendar export","status":"passed","title":"parses events from an ICS calendar export","duration":1.940900000000056,"failureMessages":[],"location":{"line":37,"column":5},"meta":{},"tags":[]},{"ancestorTitles":["calendar-tool"],"fullName":"calendar-tool loads events from an ICS file on Linux","status":"passed","title":"loads events from an ICS file on Linux","duration":7.559199999999919,"failureMessages":[],"location":{"line":58,"column":5},"meta":{},"tags":[]},{"ancestorTitles":["calendar-tool"],"fullName":"calendar-tool requires an ICS file when Linux falls back to the ICS source","status":"passed","title":"requires an ICS file when Linux falls back to the ICS source","duration":0.7972000000002026,"failureMessages":[],"location":{"line":86,"column":5},"meta":{},"tags":[]}],"startTime":1776701750467,"endTime":1776701750479.797,"status":"passed","message":"","name":"C:/Users/ssdsk/AgentStack/src/mastra/tools/tests/calendar-tool.test.ts"}]} No newline at end of file
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

This file appears to be an auto-generated Vitest JSON reporter output (see vitest.config.ts), and committing it will create frequent noisy diffs and merge conflicts. Consider adding it to .gitignore (or generating it only in CI artifacts) unless the repo intentionally versions test outputs.

Copilot uses AI. Check for mistakes.
Comment on lines +161 to 178
strict: true,
onInputStart: ({ toolCallId, messages }) => {
log.info('Google Images input streaming started', {
toolCallId,
messages: messages ?? [],
hook: 'onInputStart',
})
},
onInputDelta: ({ inputTextDelta, toolCallId, messages }) => {
log.info('Google Images received input chunk', {
toolCallId,
inputTextDelta,
messages: messages ?? [],
hook: 'onInputDelta',
})
},
onInputAvailable: ({ input, toolCallId, messages }) => {
log.info('Google Images received input', {
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

strict: true is followed by mis-indented hook properties (onInputStart, onInputDelta, onInputAvailable). While it likely still parses, it looks like formatting drift that will keep failing Prettier (and makes the object harder to scan). Run the formatter / fix indentation so tool hook keys align with the rest of the tool definition.

Copilot uses AI. Check for mistakes.
Comment thread src/mastra/browsers.ts
Comment on lines 329 to 341
@@ -337,7 +337,7 @@ export const agentBrowser = new AgentBrowser({
})

export const stagehandBrowser = new StagehandBrowser({
headless: true,
headless: false,
model:
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

headless is hard-coded to false for both agentBrowser and stagehandBrowser, which ignores the earlier env-driven agentBrowserHeadless / stagehandHeadless settings. This will break CI/server deployments that require headless Chrome and makes BROWSER_HEADLESS/STAGEHAND_HEADLESS ineffective. Prefer wiring headless to the computed config values (and/or keep the default headless behavior) rather than forcing non-headless.

Copilot uses AI. Check for mistakes.
Comment on lines 128 to +132
onInputStart: ({ toolCallId, messages, abortSignal }) => {
log.info('Yahoo Finance stock quotes input streaming started', {
toolCallId,
messageCount: messages?.length ?? 0,
abortSignal: abortSignal?.aborted,
messages,
abortSignal,
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

The updated hooks log the full messages array and abortSignal object. This can significantly increase log volume and can leak user content/PII into logs. Consider logging only safe metadata (e.g., messages?.length, a small redacted preview, and abortSignal?.aborted) and avoid serializing the full AbortSignal object.

Copilot uses AI. Check for mistakes.
Comment thread package.json
"prettier:write": "dotenvx run -- prettier --write .",
"format": "npm run prettier:write",
"convex": "npx convex dev --env-file .env.local",
"convex": "dotenvx run npx convex dev --env-file .env.local",
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

The convex npm script uses dotenvx run npx ... without the -- separator used elsewhere in this repo (e.g., dotenvx run -- eslint ...). If dotenvx expects -- before the command, this script will fail to start Convex in development. Align it with the other scripts (use the same dotenvx run -- <command> pattern).

Suggested change
"convex": "dotenvx run npx convex dev --env-file .env.local",
"convex": "dotenvx run -- npx convex dev --env-file .env.local",

Copilot uses AI. Check for mistakes.
@ssdeanx ssdeanx merged commit dd60d19 into main Apr 21, 2026
206 of 211 checks passed
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.

3 participants