From d90f34801835926469b0adfbc180f69dbc6646ca Mon Sep 17 00:00:00 2001 From: ssdeanx Date: Sun, 19 Apr 2026 17:28:40 -0400 Subject: [PATCH] feat: Update dependencies and improve research agent configuration - 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. --- .gitignore | 3 + memory-bank/activeContext.md | 25 ++ memory-bank/progress.md | 23 ++ package-lock.json | 511 ++++++++++++++++++++--------- package.json | 32 +- src/mastra/agents/researchAgent.ts | 45 +-- src/mastra/config/duckdb.ts | 119 +++++++ src/mastra/index.ts | 21 +- src/mastra/tools/composio-mcp.ts | 6 +- 9 files changed, 590 insertions(+), 195 deletions(-) create mode 100644 src/mastra/config/duckdb.ts diff --git a/.gitignore b/.gitignore index ddd219f..aa2d59c 100644 --- a/.gitignore +++ b/.gitignore @@ -235,3 +235,6 @@ src/mastra/public/workspace/tbc-shaman.md *storybook.log storybook-static +src/mastra/public/store.duckdb +src/mastra/public/store.duckdb.wal +blender.md diff --git a/memory-bank/activeContext.md b/memory-bank/activeContext.md index 571aa97..4a68a80 100644 --- a/memory-bank/activeContext.md +++ b/memory-bank/activeContext.md @@ -1,3 +1,28 @@ +# Active Context Update (2026-04-18 - Blender MCP / FPV research) + +- Blender 5.1 is compatible with the official Blender MCP server page, which requires Blender 5.1 or newer and warns that LLM-generated code executes in Blender without guards. +- The third-party Blender MCP tutorial flow confirms the practical setup loop: install the add-on, configure an API key, start one MCP server instance, and use the BlenderMCP sidebar tab for connection and commands. +- The Thingiverse reference `The Rocket Drone` is a 3" FPV rocket-style build, not a 5" frame, but it is useful as a shape and packaging reference: 3" props, 14xx motors, 20x20 stack, 14 mm camera, about 850 mAh 4S, and PLA/PLA+/PETG at 20–30% infill. +- Fiber-optic FPV references found so far point to a 5–10" universal mount with spool diameter up to 118 mm, zip-tie attachment, and a separate ABS 3D-printed fiber reel approach for long-range FPV systems. +- The verified SoloGood F722 stack uses the standard 30.5x30.5 mm M3 hole pattern; listings show the FC board area around 41.5x42 mm, 3–6S input, and a 5V/10V dual BEC plus 60A 4in1 ESC, so the Rocket Drone STLs need a 5"-frame-specific structural fit pass rather than a simple uniform scale-up. +- The current target hardware also includes a YoungRC 1800TVL micro FPV camera (19x19x20 mm, 2.1 mm lens, 5–40V) and a Readytosky 250 mm / 5" carbon-fiber frame with 4 mm arms and 30.5x30.5 FC mount holes, so the Rocket Drone nose and camera mount should be rebuilt for a 19 mm camera footprint and a 250 mm-class frame layout. +- `blender.md` is now rewritten into a reusable between-chat FPV build note that captures the current hardware, Blender MCP workflow, and 3D-print/export best practices. +- Blender is connected again; the Rocket Drone STL pack is imported into the scene, and the current integration status is: PolyHaven enabled, Sketchfab disabled, Hyper3D Rodin enabled (free_trial, MAIN_SITE), Hunyuan3D disabled. +- Redesign has started in Blender: originals were backed up to `Rocket_Original_Backup`, scaled working copies were created in `Rocket_Redesign_v1`, `FitGuides_5inch` was added for frame/stack/camera/VTX/motor envelopes, and initial custom parts `Cam_Mount_19mm_R1` and `Stack_Mount_30p5_R1` were created. +- A second Blender redesign pass now exists in `Rocket_Redesign_v2`: the main body was hollowed, arm-clearance tunnels were cut, the rear/bottom shell received a cavity and service slot, the nose received a camera cavity and lens opening, and an interim STL set was exported to `The Rocket Drone/redesign-r2`. +- A precision `R3` pass corrected custom mount dimensions to exact targets (camera mount 28x4x28 and stack plate 52x52x3), resolved a detected VTX overlap by adding clearance, and achieved zero-overlap checks for stack/VTX/camera guides before exporting `The Rocket Drone/redesign-r3`. +- A full all-parts `R4` set is now available at `The Rocket Drone/redesign-r4`, including updated counterparts for main body, bottom part, nose, motor covers, and camera mount, plus the stack mount add-on; key R4 parts report zero non-manifold edges. +- Scene placement was cleaned to address duplicate/misaligned visual clutter: older revisions and guides are hidden for review, a clean `R4` assembly view is shown, and motor covers were placed at motor positions (`Motor_Cover_RS2205_ASM_1..4`) while keeping print-layout objects separate. +- A targeted `R5` pass specifically repaired camera/nose/bottom/main fit by removing split-joint overlap and exporting only the corrected four parts to `The Rocket Drone/redesign-r5-targeted` for immediate fit testing. +- A follow-up `R6` optimization pass smoothed buggy outer shell surfaces (conservative remesh+smoothing), reinforced the bottom for stability, and exported the updated four-part test set to `The Rocket Drone/redesign-r6-stable`. +- Multiple experimental main-body closure variants (`R10`-`R14`) were tested and then rolled back; the current stable visible/selected main is `02_Main_Body_R8`, exported as `02_Main_Body_FINAL.stl` in `The Rocket Drone/redesign-r6-stable`. +- Final body section was updated to `Main_Body_SECTION_FINAL_v2` with integrated frame-mount optimization: added reinforced central frame interface and 30.5 mm M3 mount-hole pattern, then exported as canonical `FINAL-BODY-SECTION/Main_Body_SECTION_FINAL.stl`. +- 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`. +- User provided reference images and required strict visual match; scene was force-cleaned to hide all experimental/QC extras and rebuilt/exported from original geometry as `reference-match-r01-clean` (`RocketBody_Main_ReferenceMatch_R01`, `RocketBody_Bottom_ReferenceMatch_R01`, `RocketBody_Nose_ReferenceMatch_R01`). + # Active Context Update (2026-04-17 - weavingapi TBC timing cleanup) - Reworked `src/mastra/public/workspace/weavingapi.md` to use Vanilla/TBC-only shaman spell ranks, removing WotLK-only `Lava Burst` / `Hex` IDs from the weaving path. diff --git a/memory-bank/progress.md b/memory-bank/progress.md index b1c6a7d..44e037b 100644 --- a/memory-bank/progress.md +++ b/memory-bank/progress.md @@ -1,3 +1,26 @@ +# Progress Update (2026-04-18 - Blender MCP / FPV research) + +- Confirmed the official Blender MCP server supports Blender 5.1+ and found the key safety caveat: it runs LLM-generated code in Blender without guards, so it should be isolated from sensitive data. +- Collected official Blender 3D-printing guidance for STL export and mesh validation: use Selection Only, Apply Modifiers, Scene Unit, and validate meshes with the bundled 3D Print Toolbox for watertightness, non-manifold edges, thickness, intersections, distortion, and overhangs. +- Reviewed the Thingiverse Rocket Drone reference and the fiber-optic FPV reference pages to guide the upcoming Blender modeling pass for the rocket shell and fiber reel/spool components. +- Verified the SoloGood F722 stack mounting standard from live listings: 30.5x30.5 mm M3 mounting, FC board area around 41.5x42 mm, 3–6S input, 5V/10V dual BEC, and a 60A 4in1 ESC; this means the Rocket Drone shell needs a 5"-specific mount/clearance redesign rather than a uniform scale-up. +- Incorporated the current target camera/frame specs: YoungRC 1800TVL micro camera at 19x19x20 mm, and a Readytosky 250 mm / 5" carbon-fiber frame with 4 mm arms and 30.5x30.5 FC mounting holes; this shifts the nose and camera mount target away from the Rocket Drone’s original 14 mm nano-camera layout. +- Rewrote `blender.md` into a reusable between-chat FPV build note and confirmed the Blender scene is connected, the Rocket Drone STL pack is imported, and the current BlenderMCP integration status is PolyHaven enabled, Sketchfab disabled, Hyper3D Rodin enabled, and Hunyuan3D disabled. +- 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. +- Resolved "incorrect placement" scene confusion by hiding mixed revision/guides for review mode, creating a clean `R4` assembly display state, and placing four assembly motor covers at motor positions (while preserving print-layout objects separately). +- Completed targeted `R5` fix for the four requested parts (camera, nose, bottom, main): rebuilt joint boundaries to remove overlap, replaced the camera part with a non-flat U-bracket mount, and exported only those four corrected STLs to `The Rocket Drone/redesign-r5-targeted`. +- Completed `R6` stability/surface optimization for the same four parts: applied conservative outer-shell cleanup, reinforced the bottom with internal ribs, and exported verified files to `The Rocket Drone/redesign-r6-stable` (`01_Bottom_Part_R6.stl`, `02_Main_Body_R6.stl`, `Nose_V2.0_R6.stl`, `Cam_Mount_V3_R6.stl`). +- After testing several main-body closure experiments, finalized the stable main-body choice as `02_Main_Body_R8`, exported with canonical name `02_Main_Body_FINAL.stl` in `The Rocket Drone/redesign-r6-stable`. +- Updated the canonical single final body section with missing mounts and stronger frame connection: created `Main_Body_SECTION_FINAL_v2`, added reinforced mount platform with 30.5 mm M3 hole pattern + strap slots/ribs, and exported to `The Rocket Drone/FINAL-BODY-SECTION/Main_Body_SECTION_FINAL.stl`. +- Reworked after user feedback about protruding bars and ineffective fin placement: exported corrected clean v3 set in `The Rocket Drone/FINAL-BODY-SECTION/v3-clean-join-controlfins` with files `RocketBody_Main_CleanRearMount_v3.stl`, `RocketBody_Bottom_RearMount_v3.stl`, `RocketBody_ControlFin_Left_v2.stl`, and `RocketBody_ControlFin_Right_v2.stl`. +- Built and exported `RocketDrone_PrintRelease_R01` production package with clearly named release STLs, corrected sizing pass (M3 Ø3.40 policy), QC coupons for socket/motor pattern validation, and print go/no-go documentation (`00_README_PRINT_ORDER.txt`, `04_GO_NO_GO_CHECKLIST.txt`). +- Completed reference-fidelity optimization pass with final cleaned exports in `The Rocket Drone/FINAL-BODY-SECTION/reference-match-r06-final`: `RocketBody_Main_ReferenceMatch_R06_Final.stl`, `RocketBody_Bottom_ReferenceMatch_R06_Final.stl`, `RocketBody_Nose_ReferenceMatch_R06_Final.stl`. +- Per user escalation, executed subagent-driven repair workflow and produced `reference-match-r08-production`; identified bottom-only topology defect in R08 and released `reference-match-r08-production-hotfix` with clean-bottom replacement and consistent naming for print use. +- Replaced non-matching custom variants with a strict reference visual match based on user images and exported clean set to `The Rocket Drone/FINAL-BODY-SECTION/reference-match-r01-clean` with `RocketBody_Main_ReferenceMatch_R01.stl`, `RocketBody_Bottom_ReferenceMatch_R01.stl`, and `RocketBody_Nose_ReferenceMatch_R01.stl`. + # Progress Update (2026-04-17 - weavingapi TBC-only cache and world latency) - Updated `src/mastra/public/workspace/weavingapi.md` to a TBC-only shaman weaving implementation with cached spell-rank resolution and world-latency-aware cast timing. diff --git a/package-lock.json b/package-lock.json index 2da42ab..afd252e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,6 +24,7 @@ "@chat-adapter/github": "^4.26.0", "@chat-adapter/slack": "^4.26.0", "@chat-adapter/state-memory": "^4.26.0", + "@chat-adapter/state-redis": "^4.26.0", "@composio/core": "^0.6.10", "@composio/mastra": "^0.6.10", "@dotenvx/dotenvx": "^1.61.1", @@ -36,13 +37,14 @@ "@mastra/ai-sdk": "^1.4.0", "@mastra/auth-better-auth": "^1.0.2", "@mastra/auth-supabase": "^1.0.0", - "@mastra/client-js": "^1.13.5-alpha.5", + "@mastra/client-js": "^1.13.5-alpha.7", "@mastra/cloudflare": "^1.3.2-alpha.0", "@mastra/cloudflare-d1": "^1.0.5-alpha.0", "@mastra/convex": "^1.0.8-alpha.0", - "@mastra/core": "^1.26.0-alpha.5", + "@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", "@mastra/evals": "^1.2.1", "@mastra/fastembed": "^1.0.1", @@ -50,20 +52,20 @@ "@mastra/lance": "^1.0.4", "@mastra/libsql": "^1.8.2-alpha.0", "@mastra/loggers": "^1.1.1", - "@mastra/mcp": "^1.5.1-alpha.1", + "@mastra/mcp": "^1.5.0", "@mastra/memory": "^1.16.0-alpha.2", "@mastra/mongodb": "^1.7.2-alpha.0", - "@mastra/observability": "^1.9.2-alpha.0", + "@mastra/observability": "^1.10.0-alpha.2", "@mastra/otel-bridge": "^1.0.16", - "@mastra/pg": "^1.9.1", - "@mastra/posthog": "^1.0.17", + "@mastra/pg": "^1.9.2-alpha.0", + "@mastra/posthog": "^1.0.18-alpha.0", "@mastra/qdrant": "^1.0.2", "@mastra/rag": "^2.2.0", - "@mastra/react": "^0.2.26", + "@mastra/react": "^1.0.0-beta.25", "@mastra/s3": "^0.3.0", - "@mastra/schema-compat": "^1.2.8", + "@mastra/schema-compat": "^1.2.9-alpha.1", "@mastra/stagehand": "^0.2.0", - "@mastra/upstash": "^1.0.4", + "@mastra/upstash": "^1.0.5-alpha.0", "@mastra/vectorize": "^1.0.2", "@mastra/voice-google": "^0.12.0", "@mastra/voice-openai": "^0.12.1", @@ -97,8 +99,8 @@ "@streamdown/math": "^1.0.2", "@streamdown/mermaid": "^1.0.2", "@tanstack/react-form-nextjs": "^1.29.0", - "@tanstack/react-query": "^5.99.0", - "@tanstack/react-query-devtools": "^5.99.0", + "@tanstack/react-query": "^5.99.2", + "@tanstack/react-query-devtools": "^5.99.2", "@tanstack/react-store": "^0.10.0", "@tanstack/react-table": "^8.21.3", "@tanstack/react-virtual": "^3.13.24", @@ -128,7 +130,7 @@ "clsx": "^2.1.1", "cmdk": "^1.1.1", "concurrently": "^9.2.1", - "convert-csv-to-json": "^4.36.0", + "convert-csv-to-json": "^4.37.0", "convex": "^1.35.1", "crawlee": "^4.0.0-beta.47", "critters": "^0.0.25", @@ -159,7 +161,7 @@ "leaflet.markercluster": "^1.5.3", "lenis": "^1.3.23", "lucide-react": "^1.8.0", - "marked": "^18.0.1", + "marked": "^18.0.2", "mastracode": "^0.14.0", "mathjs": "^15.2.0", "media-chrome": "^4.19.0", @@ -5085,6 +5087,16 @@ "chat": "4.26.0" } }, + "node_modules/@chat-adapter/state-redis": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@chat-adapter/state-redis/-/state-redis-4.26.0.tgz", + "integrity": "sha512-NSX2E6wkDlg0AMfKFx4LPoV6cBHolL08Ht3cT+S01jss24t9GzlDw/BUsrWOeoTElwEhxZcQw5bUkStUAA7JMg==", + "license": "MIT", + "dependencies": { + "chat": "4.26.0", + "redis": "^5.11.0" + } + }, "node_modules/@chevrotain/cst-dts-gen": { "version": "12.0.0", "license": "Apache-2.0", @@ -5232,6 +5244,24 @@ "zod": "^3.25 || ^4" } }, + "node_modules/@composio/mastra/node_modules/@mastra/schema-compat": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@mastra/schema-compat/-/schema-compat-1.2.8.tgz", + "integrity": "sha512-XoFCtk2+wEY3ciQsuAcMF4/VvyPEZyA5mepC+nVBw5y4099e/oBUCUB/lu6/Zi9mrm99peFNwk60+iWV/C4FHA==", + "license": "Apache-2.0", + "dependencies": { + "json-schema-to-zod": "^2.7.0", + "zod-from-json-schema": "^0.5.2", + "zod-from-json-schema-v3": "npm:zod-from-json-schema@^0.0.5", + "zod-to-json-schema": "^3.25.1" + }, + "engines": { + "node": ">=22.13.0" + }, + "peerDependencies": { + "zod": "^3.25.0 || ^4.0.0" + } + }, "node_modules/@crawlee/basic": { "version": "4.0.0-beta.47", "resolved": "https://registry.npmjs.org/@crawlee/basic/-/basic-4.0.0-beta.47.tgz", @@ -7186,6 +7216,93 @@ "node": ">= 4" } }, + "node_modules/@duckdb/node-api": { + "version": "1.4.2-r.1", + "resolved": "https://registry.npmjs.org/@duckdb/node-api/-/node-api-1.4.2-r.1.tgz", + "integrity": "sha512-8Ef4R/Lq+rXTpcqZIJZe6ALfgMGxy88HmiPvRpWrRw1fUTy85x1U0NnGrqCklZsmWyZUdPwVYj90MQOF2MY/TA==", + "license": "MIT", + "dependencies": { + "@duckdb/node-bindings": "1.4.2-r.1" + } + }, + "node_modules/@duckdb/node-bindings": { + "version": "1.4.2-r.1", + "resolved": "https://registry.npmjs.org/@duckdb/node-bindings/-/node-bindings-1.4.2-r.1.tgz", + "integrity": "sha512-z0pJCdEnIj0Famkip6w7JZ/A17nm5VcYc6H7isOHXfEnPhBQ9PBusUTFgIzl6+3J8HOFQOv0szJq46zldbsHfQ==", + "license": "MIT", + "optionalDependencies": { + "@duckdb/node-bindings-darwin-arm64": "1.4.2-r.1", + "@duckdb/node-bindings-darwin-x64": "1.4.2-r.1", + "@duckdb/node-bindings-linux-arm64": "1.4.2-r.1", + "@duckdb/node-bindings-linux-x64": "1.4.2-r.1", + "@duckdb/node-bindings-win32-x64": "1.4.2-r.1" + } + }, + "node_modules/@duckdb/node-bindings-darwin-arm64": { + "version": "1.4.2-r.1", + "resolved": "https://registry.npmjs.org/@duckdb/node-bindings-darwin-arm64/-/node-bindings-darwin-arm64-1.4.2-r.1.tgz", + "integrity": "sha512-C4yBI3zBX7iZ9iq8zJDvPatXA+2xM22sg1kX3fx76nG+qTqKtU/dGFVYL7Fx6cBYxBO1ZZ8Y+vjgYb6/bich8A==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@duckdb/node-bindings-darwin-x64": { + "version": "1.4.2-r.1", + "resolved": "https://registry.npmjs.org/@duckdb/node-bindings-darwin-x64/-/node-bindings-darwin-x64-1.4.2-r.1.tgz", + "integrity": "sha512-dgTSBuEfWyhymYovsGoRESjqcJuZWwJqla9l89SSsBDrGYcUp+EHsXUF73oUCspzTesT2lOvHrDufO8pKgtudw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@duckdb/node-bindings-linux-arm64": { + "version": "1.4.2-r.1", + "resolved": "https://registry.npmjs.org/@duckdb/node-bindings-linux-arm64/-/node-bindings-linux-arm64-1.4.2-r.1.tgz", + "integrity": "sha512-r2Ml1LvU2vkVMx4YU04T79FjGkYg8YMVtbOz7j740SZGIi5Cch5P1/oy48jJBWRqoaXuqimpYWeTZiGVeCQiZA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@duckdb/node-bindings-linux-x64": { + "version": "1.4.2-r.1", + "resolved": "https://registry.npmjs.org/@duckdb/node-bindings-linux-x64/-/node-bindings-linux-x64-1.4.2-r.1.tgz", + "integrity": "sha512-ed5KiNIu1rqSva5rgo4PRVYSmBolAMVqGFWsYWLoRZ94ka2F/dHwJNkarCTmBFCEDGVZWzWzjRyWTQgYTvQxTg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@duckdb/node-bindings-win32-x64": { + "version": "1.4.2-r.1", + "resolved": "https://registry.npmjs.org/@duckdb/node-bindings-win32-x64/-/node-bindings-win32-x64-1.4.2-r.1.tgz", + "integrity": "sha512-kIIT8tuoW3mzr9EPcdSoKfv9CgOhTqRryHDI10Z0nuhc9UhqOWPUM/LnSUebfo1mdD9Drm7YrKCKYxNTr5dqBQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@ecies/ciphers": { "version": "0.2.6", "license": "MIT", @@ -12675,14 +12792,14 @@ } }, "node_modules/@mastra/client-js": { - "version": "1.13.5-alpha.5", - "resolved": "https://registry.npmjs.org/@mastra/client-js/-/client-js-1.13.5-alpha.5.tgz", - "integrity": "sha512-JBiuZmbndFAVzJznFPtgweSSTy2jzCcCeTDd+LuoLJpb0rFlK0MOcpjsITSf6k/5/iXBwiYqM0CzmdBDL4qCow==", + "version": "1.13.5-alpha.7", + "resolved": "https://registry.npmjs.org/@mastra/client-js/-/client-js-1.13.5-alpha.7.tgz", + "integrity": "sha512-ZCrgmM6xcfze4AXJK4QCCekGCwu6+0GtPnGmL+tW/fRcio1HdEM5/kr4D5O7qqwXhZ8Uw2LDItnVq+uSQTxyDg==", "license": "Apache-2.0", "dependencies": { "@ai-sdk/ui-utils": "^1.2.11", "@lukeed/uuid": "^2.0.1", - "@mastra/core": "1.26.0-alpha.5", + "@mastra/core": "1.26.0-alpha.7", "@mastra/schema-compat": "1.2.9-alpha.1", "json-schema": "^0.4.0" }, @@ -12693,24 +12810,6 @@ "zod": "^3.25.0 || ^4.0.0" } }, - "node_modules/@mastra/client-js/node_modules/@mastra/schema-compat": { - "version": "1.2.9-alpha.1", - "resolved": "https://registry.npmjs.org/@mastra/schema-compat/-/schema-compat-1.2.9-alpha.1.tgz", - "integrity": "sha512-Ul2TB34TaGlWSnt902sq4UcvcTDB0rOpHSEClGu7hZMp8DGjAKA+apsP/gEByZoJoZhgy5vSf0SnC4u09XGGPQ==", - "license": "Apache-2.0", - "dependencies": { - "json-schema-to-zod": "^2.7.0", - "zod-from-json-schema": "^0.5.2", - "zod-from-json-schema-v3": "npm:zod-from-json-schema@^0.0.5", - "zod-to-json-schema": "^3.25.1" - }, - "engines": { - "node": ">=22.13.0" - }, - "peerDependencies": { - "zod": "^3.25.0 || ^4.0.0" - } - }, "node_modules/@mastra/cloudflare": { "version": "1.3.2-alpha.0", "resolved": "https://registry.npmjs.org/@mastra/cloudflare/-/cloudflare-1.3.2-alpha.0.tgz", @@ -12757,9 +12856,9 @@ } }, "node_modules/@mastra/core": { - "version": "1.26.0-alpha.5", - "resolved": "https://registry.npmjs.org/@mastra/core/-/core-1.26.0-alpha.5.tgz", - "integrity": "sha512-cGwmzJr4NyZaUHC1vSofy2Snv7MOLRp5pycD4+MDnSmxPtCV9QcLyUxKv25rFClJsvKp6iwsEYyT4VmjDhYhlg==", + "version": "1.26.0-alpha.7", + "resolved": "https://registry.npmjs.org/@mastra/core/-/core-1.26.0-alpha.7.tgz", + "integrity": "sha512-8fAQYOp+iJ0/jOqd42NbVAodwfRX5ET3qM/LIlTIHKW3Wg8KoiqtMOTcUcLzyP6czcS8wirdDvmTnCm19e2tNw==", "license": "Apache-2.0", "dependencies": { "@a2a-js/sdk": "~0.2.5", @@ -12847,24 +12946,6 @@ "zod": "^3.23.8" } }, - "node_modules/@mastra/core/node_modules/@mastra/schema-compat": { - "version": "1.2.9-alpha.1", - "resolved": "https://registry.npmjs.org/@mastra/schema-compat/-/schema-compat-1.2.9-alpha.1.tgz", - "integrity": "sha512-Ul2TB34TaGlWSnt902sq4UcvcTDB0rOpHSEClGu7hZMp8DGjAKA+apsP/gEByZoJoZhgy5vSf0SnC4u09XGGPQ==", - "license": "Apache-2.0", - "dependencies": { - "json-schema-to-zod": "^2.7.0", - "zod-from-json-schema": "^0.5.2", - "zod-from-json-schema-v3": "npm:zod-from-json-schema@^0.0.5", - "zod-to-json-schema": "^3.25.1" - }, - "engines": { - "node": ">=22.13.0" - }, - "peerDependencies": { - "zod": "^3.25.0 || ^4.0.0" - } - }, "node_modules/@mastra/core/node_modules/@standard-community/standard-openapi": { "version": "0.2.9", "resolved": "https://registry.npmjs.org/@standard-community/standard-openapi/-/standard-openapi-0.2.9.tgz", @@ -13031,6 +13112,21 @@ "zod": "^3.25.0 || ^4.0.0" } }, + "node_modules/@mastra/duckdb": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@mastra/duckdb/-/duckdb-1.1.2.tgz", + "integrity": "sha512-CgkQBV3dVgRqtX6LTAwheg5hW5RkOHeypFbCq2l/p1MAP2WlFJ+k56/X7NDvSpuBGHXtpQg0MZdZ/P+lBEyQUA==", + "license": "Apache-2.0", + "dependencies": { + "@duckdb/node-api": "1.4.2-r.1" + }, + "engines": { + "node": ">=22.13.0" + }, + "peerDependencies": { + "@mastra/core": ">=1.0.0-0 <2.0.0-0" + } + }, "node_modules/@mastra/editor": { "version": "0.7.17-alpha.1", "resolved": "https://registry.npmjs.org/@mastra/editor/-/editor-0.7.17-alpha.1.tgz", @@ -13079,24 +13175,6 @@ "zod": "^3.25.0 || ^4.0.0" } }, - "node_modules/@mastra/editor/node_modules/@mastra/schema-compat": { - "version": "1.2.9-alpha.1", - "resolved": "https://registry.npmjs.org/@mastra/schema-compat/-/schema-compat-1.2.9-alpha.1.tgz", - "integrity": "sha512-Ul2TB34TaGlWSnt902sq4UcvcTDB0rOpHSEClGu7hZMp8DGjAKA+apsP/gEByZoJoZhgy5vSf0SnC4u09XGGPQ==", - "license": "Apache-2.0", - "dependencies": { - "json-schema-to-zod": "^2.7.0", - "zod-from-json-schema": "^0.5.2", - "zod-from-json-schema-v3": "npm:zod-from-json-schema@^0.0.5", - "zod-to-json-schema": "^3.25.1" - }, - "engines": { - "node": ">=22.13.0" - }, - "peerDependencies": { - "zod": "^3.25.0 || ^4.0.0" - } - }, "node_modules/@mastra/evals": { "version": "1.2.1", "license": "Apache-2.0", @@ -13344,11 +13422,12 @@ } }, "node_modules/@mastra/mcp": { - "version": "1.5.1-alpha.1", - "resolved": "https://registry.npmjs.org/@mastra/mcp/-/mcp-1.5.1-alpha.1.tgz", - "integrity": "sha512-gLc19ZZj/5vl0AocLc7pt+xU9PPs3lgXd1qJE18VrOBeraap5hqW/STPcRq44BuWPiefrTMkVaqgtOVW+EhUNw==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@mastra/mcp/-/mcp-1.5.0.tgz", + "integrity": "sha512-I+YtghjjkKdlTtqVc1TTChnRTZ0HiMKq6o5UCjZGuGdK2oHlkTYLYd2rRZI9tIcEIXjG2bQz9OzlQhAaDd+TJw==", "license": "Apache-2.0", "dependencies": { + "@apidevtools/json-schema-ref-parser": "^14.2.1", "@modelcontextprotocol/sdk": "^1.27.1", "exit-hook": "^5.1.0", "fast-deep-equal": "^3.1.3", @@ -13385,24 +13464,6 @@ "zod": "^3.25.0 || ^4.0.0" } }, - "node_modules/@mastra/memory/node_modules/@mastra/schema-compat": { - "version": "1.2.9-alpha.1", - "resolved": "https://registry.npmjs.org/@mastra/schema-compat/-/schema-compat-1.2.9-alpha.1.tgz", - "integrity": "sha512-Ul2TB34TaGlWSnt902sq4UcvcTDB0rOpHSEClGu7hZMp8DGjAKA+apsP/gEByZoJoZhgy5vSf0SnC4u09XGGPQ==", - "license": "Apache-2.0", - "dependencies": { - "json-schema-to-zod": "^2.7.0", - "zod-from-json-schema": "^0.5.2", - "zod-from-json-schema-v3": "npm:zod-from-json-schema@^0.0.5", - "zod-to-json-schema": "^3.25.1" - }, - "engines": { - "node": ">=22.13.0" - }, - "peerDependencies": { - "zod": "^3.25.0 || ^4.0.0" - } - }, "node_modules/@mastra/mongodb": { "version": "1.7.2-alpha.0", "resolved": "https://registry.npmjs.org/@mastra/mongodb/-/mongodb-1.7.2-alpha.0.tgz", @@ -13420,9 +13481,9 @@ } }, "node_modules/@mastra/observability": { - "version": "1.9.2-alpha.0", - "resolved": "https://registry.npmjs.org/@mastra/observability/-/observability-1.9.2-alpha.0.tgz", - "integrity": "sha512-nIJmu/NKZ21carzEditkZ2vkwHGZw6ARAifRblATIa19oMLVLVG1JqEGtRh+F7YkCF9aB1OQi+Bn90epijhjJw==", + "version": "1.10.0-alpha.2", + "resolved": "https://registry.npmjs.org/@mastra/observability/-/observability-1.10.0-alpha.2.tgz", + "integrity": "sha512-CZCbzet1eg1RLVw6HC1/SSSV6GMdH9Ld6Ro+TZJmpsbLbyz079FSKBsG9fz7iQKOZa4A750xA+gMMH+DA6cOig==", "license": "Apache-2.0", "engines": { "node": ">=22.13.0" @@ -13809,7 +13870,9 @@ } }, "node_modules/@mastra/pg": { - "version": "1.9.1", + "version": "1.9.2-alpha.0", + "resolved": "https://registry.npmjs.org/@mastra/pg/-/pg-1.9.2-alpha.0.tgz", + "integrity": "sha512-dORnY0bZkUsgSfyZIG0h87THf+nt7FTxMQehZn/ShTL97sYpy+sKuut72IUWHKuqtocASZhjLYDKFwQ+WKvIwg==", "license": "Apache-2.0", "dependencies": { "async-mutex": "^0.5.0", @@ -13824,10 +13887,12 @@ } }, "node_modules/@mastra/posthog": { - "version": "1.0.17", + "version": "1.0.18-alpha.0", + "resolved": "https://registry.npmjs.org/@mastra/posthog/-/posthog-1.0.18-alpha.0.tgz", + "integrity": "sha512-mdKtsXXXpRyRbI1c/opCCvx3+GwtoMiyuESfSeMrMfFiCF0QUMVd4oyt/xvuw9uKuUNRmnF4j3MLwDg9hpYUMg==", "license": "Apache-2.0", "dependencies": { - "@mastra/observability": "1.9.1", + "@mastra/observability": "1.9.2-alpha.0", "posthog-node": "^4.18.0" }, "engines": { @@ -13838,9 +13903,9 @@ } }, "node_modules/@mastra/posthog/node_modules/@mastra/observability": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@mastra/observability/-/observability-1.9.1.tgz", - "integrity": "sha512-Zx4Q3HfLftLz25EOF9Q6JtAr6z6UHFdfl0X6KlyAYh3jxzPNM4D31lDtmv62+GKsUcxwUPXC2XsfqtFwfSh6KQ==", + "version": "1.9.2-alpha.0", + "resolved": "https://registry.npmjs.org/@mastra/observability/-/observability-1.9.2-alpha.0.tgz", + "integrity": "sha512-nIJmu/NKZ21carzEditkZ2vkwHGZw6ARAifRblATIa19oMLVLVG1JqEGtRh+F7YkCF9aB1OQi+Bn90epijhjJw==", "license": "Apache-2.0", "engines": { "node": ">=22.13.0" @@ -13892,37 +13957,37 @@ } }, "node_modules/@mastra/react": { - "version": "0.2.26", + "version": "1.0.0-beta.25", + "resolved": "https://registry.npmjs.org/@mastra/react/-/react-1.0.0-beta.25.tgz", + "integrity": "sha512-hI6cSVL1U5ma1gNKi+2NaBJhXlYFJodc6sKtkvwyEgR4HkkHuQGjtBl/baqnHTdUtc4WJjHOdKF7Bn0/nZqKCQ==", "license": "Apache-2.0", "dependencies": { "@lukeed/uuid": "^2.0.1", - "@mastra/client-js": "1.13.4", - "@radix-ui/react-tooltip": "^1.2.8", + "@mastra/client-js": "1.0.0-beta.25", + "@radix-ui/react-tooltip": "^1.2.7", "hast-util-to-jsx-runtime": "^2.3.6", "lucide-react": "^0.522.0", "shiki": "^1.29.2", - "tailwind-merge": "^3.5.0" + "tailwind-merge": "^3.3.1" }, "engines": { "node": ">=22.13.0" }, "peerDependencies": { - "@mastra/core": ">=1.8.0-0 <2.0.0-0", "react": ">=19.0.0", "react-dom": ">=19.0.0", "zod": "^3.25.0 || ^4.0.0" } }, "node_modules/@mastra/react/node_modules/@mastra/client-js": { - "version": "1.13.4", - "resolved": "https://registry.npmjs.org/@mastra/client-js/-/client-js-1.13.4.tgz", - "integrity": "sha512-pGgmvC65pX8CSOBlXU9i97gtRb/wuS4KRusumNeRH8AH9CdRgh0XEN2h+8gR2VYKCYyTO9BE/h0ZN5lyhdPbPw==", + "version": "1.0.0-beta.25", + "resolved": "https://registry.npmjs.org/@mastra/client-js/-/client-js-1.0.0-beta.25.tgz", + "integrity": "sha512-+1gv138KY20IRuIKEteMECSr+ehKdBwQ0AL3FL1Euj09jh9R8TnH4MQngUJyxYbwMrvU4BqcgwfB0tKziO7yMA==", "license": "Apache-2.0", "dependencies": { - "@ai-sdk/ui-utils": "^1.2.11", "@lukeed/uuid": "^2.0.1", - "@mastra/core": "1.25.0", - "@mastra/schema-compat": "1.2.8", + "@mastra/core": "1.0.0-beta.25", + "@mastra/schema-compat": "1.0.0-beta.8", "json-schema": "^0.4.0" }, "engines": { @@ -13932,6 +13997,24 @@ "zod": "^3.25.0 || ^4.0.0" } }, + "node_modules/@mastra/react/node_modules/@mastra/schema-compat": { + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@mastra/schema-compat/-/schema-compat-1.0.0-beta.8.tgz", + "integrity": "sha512-gCIF8RYtjXHvQbZR1oWyfu8B6ydsEAyedYUH8062jEq1IpqmCpLbJprMhRkbSYMJUeOeDnosfit4Bn3Xum+fWw==", + "license": "Apache-2.0", + "dependencies": { + "json-schema-to-zod": "^2.7.0", + "zod-from-json-schema": "^0.5.0", + "zod-from-json-schema-v3": "npm:zod-from-json-schema@^0.0.5", + "zod-to-json-schema": "^3.24.6" + }, + "engines": { + "node": ">=22.13.0" + }, + "peerDependencies": { + "zod": "^3.25.0 || ^4.0.0" + } + }, "node_modules/@mastra/react/node_modules/lucide-react": { "version": "0.522.0", "license": "ISC", @@ -14042,7 +14125,9 @@ } }, "node_modules/@mastra/schema-compat": { - "version": "1.2.8", + "version": "1.2.9-alpha.1", + "resolved": "https://registry.npmjs.org/@mastra/schema-compat/-/schema-compat-1.2.9-alpha.1.tgz", + "integrity": "sha512-Ul2TB34TaGlWSnt902sq4UcvcTDB0rOpHSEClGu7hZMp8DGjAKA+apsP/gEByZoJoZhgy5vSf0SnC4u09XGGPQ==", "license": "Apache-2.0", "dependencies": { "json-schema-to-zod": "^2.7.0", @@ -14088,11 +14173,13 @@ } }, "node_modules/@mastra/upstash": { - "version": "1.0.4", + "version": "1.0.5-alpha.0", + "resolved": "https://registry.npmjs.org/@mastra/upstash/-/upstash-1.0.5-alpha.0.tgz", + "integrity": "sha512-monIYrWGoQjAY1cpofDNGxWP1J7yx6uIUtU3FBujSEv5No4oJ5SnmmaFp/4me6T9LMB9a8OjSrVvplSbmisFNg==", "license": "Apache-2.0", "dependencies": { - "@upstash/redis": "^1.36.3", - "@upstash/vector": "^1.2.2" + "@upstash/redis": "^1.37.0", + "@upstash/vector": "^1.2.3" }, "engines": { "node": ">=22.13.0" @@ -18660,6 +18747,78 @@ "version": "1.1.1", "license": "MIT" }, + "node_modules/@redis/bloom": { + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@redis/bloom/-/bloom-5.12.1.tgz", + "integrity": "sha512-PUUfv+ms7jgPSBVoo/DN4AkPHj4D5TZSd6SbJX7egzBplkYUcKmHRE8RKia7UtZ8bSQbLguLvxVO+asKtQfZWA==", + "license": "MIT", + "engines": { + "node": ">= 18.19.0" + }, + "peerDependencies": { + "@redis/client": "^5.12.1" + } + }, + "node_modules/@redis/client": { + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@redis/client/-/client-5.12.1.tgz", + "integrity": "sha512-7aPGWeqA3uFm43o19umzdl16CEjK/JQGtSXVPevplTaOU3VJA/rseBC1QvYUz9lLDIMBimc4SW/zrW4S89BaCA==", + "license": "MIT", + "dependencies": { + "cluster-key-slot": "1.1.2" + }, + "engines": { + "node": ">= 18.19.0" + }, + "peerDependencies": { + "@node-rs/xxhash": "^1.1.0", + "@opentelemetry/api": ">=1 <2" + }, + "peerDependenciesMeta": { + "@node-rs/xxhash": { + "optional": true + }, + "@opentelemetry/api": { + "optional": true + } + } + }, + "node_modules/@redis/json": { + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@redis/json/-/json-5.12.1.tgz", + "integrity": "sha512-eOze75esLve4vfqDel7aMX08CNaiLLQS2fV8mpRN9NxPe1rVR4vQyYiW/OgtGUysF6QOr9ANhfxABKNOJfXdKg==", + "license": "MIT", + "engines": { + "node": ">= 18.19.0" + }, + "peerDependencies": { + "@redis/client": "^5.12.1" + } + }, + "node_modules/@redis/search": { + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@redis/search/-/search-5.12.1.tgz", + "integrity": "sha512-ItlxbxC9cKI6IU1TLWoczwJCRb6TdmkEpWv05UrPawqaAnWGRu3rcIqsc5vN483T2fSociuyV1UkWIL5I4//2w==", + "license": "MIT", + "engines": { + "node": ">= 18.19.0" + }, + "peerDependencies": { + "@redis/client": "^5.12.1" + } + }, + "node_modules/@redis/time-series": { + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@redis/time-series/-/time-series-5.12.1.tgz", + "integrity": "sha512-c6JL6E3EcZJuNqKFz+KM+l9l5mpcQiKvTwgA3blt5glWJ8hjDk0yeHN3beE/MpqYIQ8UEX44ItQzgkE/gCBELQ==", + "license": "MIT", + "engines": { + "node": ">= 18.19.0" + }, + "peerDependencies": { + "@redis/client": "^5.12.1" + } + }, "node_modules/@reduxjs/toolkit": { "version": "2.11.2", "license": "MIT", @@ -21566,7 +21725,9 @@ } }, "node_modules/@tanstack/query-core": { - "version": "5.99.0", + "version": "5.99.2", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.99.2.tgz", + "integrity": "sha512-1HunU0bXVsR1ZJMZbcOPE6VtaBJxsW809RE9xPe4Gz7MlB0GWwQvuTPhMoEmQ/hIzFKJ/DWAuttIe7BOaWx0tA==", "license": "MIT", "funding": { "type": "github", @@ -21574,7 +21735,9 @@ } }, "node_modules/@tanstack/query-devtools": { - "version": "5.99.0", + "version": "5.99.2", + "resolved": "https://registry.npmjs.org/@tanstack/query-devtools/-/query-devtools-5.99.2.tgz", + "integrity": "sha512-TEF1d+RYO9l8oeCwgzmOHIgKwAzXQmw2s/ny2bW8qeg2OMkkLjALfVEivgCMR3OL/jVdMmeTPX56WrV+uvYJFg==", "license": "MIT", "funding": { "type": "github", @@ -21647,10 +21810,12 @@ } }, "node_modules/@tanstack/react-query": { - "version": "5.99.0", + "version": "5.99.2", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.99.2.tgz", + "integrity": "sha512-vM91UEe45QUS9ED6OklsVL15i8qKcRqNwpWzPTVWvRPRSEgDudDgHpvyTjcdlwHcrKNa80T+xXYcchT2noPnZA==", "license": "MIT", "dependencies": { - "@tanstack/query-core": "5.99.0" + "@tanstack/query-core": "5.99.2" }, "funding": { "type": "github", @@ -21661,17 +21826,19 @@ } }, "node_modules/@tanstack/react-query-devtools": { - "version": "5.99.0", + "version": "5.99.2", + "resolved": "https://registry.npmjs.org/@tanstack/react-query-devtools/-/react-query-devtools-5.99.2.tgz", + "integrity": "sha512-8txkK9A9XBNTB8RoxVgfp6W3qwBr25tNP10L4yu3KuyhAdEvccECfIRzesSwMVk/wpVVioAr+hbMtUkMMF+WVw==", "license": "MIT", "dependencies": { - "@tanstack/query-devtools": "5.99.0" + "@tanstack/query-devtools": "5.99.2" }, "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, "peerDependencies": { - "@tanstack/react-query": "^5.99.0", + "@tanstack/react-query": "^5.99.2", "react": "^18 || ^19" } }, @@ -27120,6 +27287,15 @@ "node": ">=6" } }, + "node_modules/cluster-key-slot": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz", + "integrity": "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/cmake-ts": { "version": "1.0.2", "license": "MIT", @@ -27500,9 +27676,9 @@ } }, "node_modules/convert-csv-to-json": { - "version": "4.36.0", - "resolved": "https://registry.npmjs.org/convert-csv-to-json/-/convert-csv-to-json-4.36.0.tgz", - "integrity": "sha512-E3J4tnEKi4v5ohuBlcCCsP9La7oMhycNm8hFOf1C9NwDZk4HSWCy8kt/jOR1SHWdeBti7b9+2erqQP5MCC6ptg==", + "version": "4.37.0", + "resolved": "https://registry.npmjs.org/convert-csv-to-json/-/convert-csv-to-json-4.37.0.tgz", + "integrity": "sha512-mIUQ8blqwn7SUtx/C5Vr1xdgLa7Outs9MRtOBJnQmJD4L6poNfNaDy4G2HAYL8e5794x4haydqau4iWALpQF+g==", "license": "MIT" }, "node_modules/convert-hrtime": { @@ -36287,9 +36463,9 @@ } }, "node_modules/marked": { - "version": "18.0.1", - "resolved": "https://registry.npmjs.org/marked/-/marked-18.0.1.tgz", - "integrity": "sha512-IILJE4Aap/KIGu4ZRCzQcYMxkhumblXnbqfQe+HAD4f982wrRAsJEGKGM653yAioS6g3Yq3yOhjrUebcrtOgRA==", + "version": "18.0.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-18.0.2.tgz", + "integrity": "sha512-NsmlUYBS/Zg57rgDWMYdnre6OTj4e+qq/JS2ot3KrYLSoHLw+sDu0Nm1ZGpRgYAq6c+b1ekaY5NzVchMCQnzcg==", "license": "MIT", "bin": { "marked": "bin/marked.js" @@ -36532,26 +36708,6 @@ "@mastra/core": ">=1.0.0-0 <2.0.0-0" } }, - "node_modules/mastracode/node_modules/@mastra/mcp": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@mastra/mcp/-/mcp-1.5.0.tgz", - "integrity": "sha512-I+YtghjjkKdlTtqVc1TTChnRTZ0HiMKq6o5UCjZGuGdK2oHlkTYLYd2rRZI9tIcEIXjG2bQz9OzlQhAaDd+TJw==", - "license": "Apache-2.0", - "dependencies": { - "@apidevtools/json-schema-ref-parser": "^14.2.1", - "@modelcontextprotocol/sdk": "^1.27.1", - "exit-hook": "^5.1.0", - "fast-deep-equal": "^3.1.3", - "uuid": "^13.0.0" - }, - "engines": { - "node": ">=22.13.0" - }, - "peerDependencies": { - "@mastra/core": ">=1.0.0-0 <2.0.0-0", - "zod": "^3.25.0 || ^4.0.0" - } - }, "node_modules/mastracode/node_modules/@mastra/memory": { "version": "1.15.1", "resolved": "https://registry.npmjs.org/@mastra/memory/-/memory-1.15.1.tgz", @@ -36575,6 +36731,41 @@ "zod": "^3.25.0 || ^4.0.0" } }, + "node_modules/mastracode/node_modules/@mastra/pg": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@mastra/pg/-/pg-1.9.1.tgz", + "integrity": "sha512-i2Vjx3KGhiFFMIjKSoDzXZuyDBsKgMvxNjGSPUVwQnasbkchdqbzC6bDolaiziRSL1gaByxyLK1V7CXD4T6bIQ==", + "license": "Apache-2.0", + "dependencies": { + "async-mutex": "^0.5.0", + "pg": "^8.20.0", + "xxhash-wasm": "^1.1.0" + }, + "engines": { + "node": ">=22.13.0" + }, + "peerDependencies": { + "@mastra/core": ">=1.4.0-0 <2.0.0-0" + } + }, + "node_modules/mastracode/node_modules/@mastra/schema-compat": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@mastra/schema-compat/-/schema-compat-1.2.8.tgz", + "integrity": "sha512-XoFCtk2+wEY3ciQsuAcMF4/VvyPEZyA5mepC+nVBw5y4099e/oBUCUB/lu6/Zi9mrm99peFNwk60+iWV/C4FHA==", + "license": "Apache-2.0", + "dependencies": { + "json-schema-to-zod": "^2.7.0", + "zod-from-json-schema": "^0.5.2", + "zod-from-json-schema-v3": "npm:zod-from-json-schema@^0.0.5", + "zod-to-json-schema": "^3.25.1" + }, + "engines": { + "node": ">=22.13.0" + }, + "peerDependencies": { + "zod": "^3.25.0 || ^4.0.0" + } + }, "node_modules/mastracode/node_modules/detect-libc": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", @@ -41841,6 +42032,22 @@ "node": ">=8" } }, + "node_modules/redis": { + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/redis/-/redis-5.12.1.tgz", + "integrity": "sha512-LDsoVvb/CpoV9EN3FXvgvSHNJWuCIzl9MiO3ppOevuGLpSGJhwfQjpEwfFJcQvNSddHADDdZaWx0HnmMxRXG7g==", + "license": "MIT", + "dependencies": { + "@redis/bloom": "5.12.1", + "@redis/client": "5.12.1", + "@redis/json": "5.12.1", + "@redis/search": "5.12.1", + "@redis/time-series": "5.12.1" + }, + "engines": { + "node": ">= 18.19.0" + } + }, "node_modules/redux": { "version": "5.0.1", "license": "MIT" diff --git a/package.json b/package.json index a42d98a..d2652bf 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,7 @@ "@chat-adapter/github": "^4.26.0", "@chat-adapter/slack": "^4.26.0", "@chat-adapter/state-memory": "^4.26.0", + "@chat-adapter/state-redis": "^4.26.0", "@composio/core": "^0.6.10", "@composio/mastra": "^0.6.10", "@dotenvx/dotenvx": "^1.61.1", @@ -78,13 +79,14 @@ "@mastra/ai-sdk": "^1.4.0", "@mastra/auth-better-auth": "^1.0.2", "@mastra/auth-supabase": "^1.0.0", - "@mastra/client-js": "^1.13.5-alpha.5", + "@mastra/client-js": "^1.13.5-alpha.7", "@mastra/cloudflare": "^1.3.2-alpha.0", "@mastra/cloudflare-d1": "^1.0.5-alpha.0", "@mastra/convex": "^1.0.8-alpha.0", - "@mastra/core": "^1.26.0-alpha.5", + "@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", "@mastra/evals": "^1.2.1", "@mastra/fastembed": "^1.0.1", @@ -92,20 +94,20 @@ "@mastra/lance": "^1.0.4", "@mastra/libsql": "^1.8.2-alpha.0", "@mastra/loggers": "^1.1.1", - "@mastra/mcp": "^1.5.1-alpha.1", + "@mastra/mcp": "^1.5.0", "@mastra/memory": "^1.16.0-alpha.2", "@mastra/mongodb": "^1.7.2-alpha.0", - "@mastra/observability": "^1.9.2-alpha.0", + "@mastra/observability": "^1.10.0-alpha.2", "@mastra/otel-bridge": "^1.0.16", - "@mastra/pg": "^1.9.1", - "@mastra/posthog": "^1.0.17", + "@mastra/pg": "^1.9.2-alpha.0", + "@mastra/posthog": "^1.0.18-alpha.0", "@mastra/qdrant": "^1.0.2", "@mastra/rag": "^2.2.0", - "@mastra/react": "^0.2.26", + "@mastra/react": "^1.0.0-beta.25", "@mastra/s3": "^0.3.0", - "@mastra/schema-compat": "^1.2.8", + "@mastra/schema-compat": "^1.2.9-alpha.1", "@mastra/stagehand": "^0.2.0", - "@mastra/upstash": "^1.0.4", + "@mastra/upstash": "^1.0.5-alpha.0", "@mastra/vectorize": "^1.0.2", "@mastra/voice-google": "^0.12.0", "@mastra/voice-openai": "^0.12.1", @@ -139,8 +141,8 @@ "@streamdown/math": "^1.0.2", "@streamdown/mermaid": "^1.0.2", "@tanstack/react-form-nextjs": "^1.29.0", - "@tanstack/react-query": "^5.99.0", - "@tanstack/react-query-devtools": "^5.99.0", + "@tanstack/react-query": "^5.99.2", + "@tanstack/react-query-devtools": "^5.99.2", "@tanstack/react-store": "^0.10.0", "@tanstack/react-table": "^8.21.3", "@tanstack/react-virtual": "^3.13.24", @@ -170,7 +172,7 @@ "clsx": "^2.1.1", "cmdk": "^1.1.1", "concurrently": "^9.2.1", - "convert-csv-to-json": "^4.36.0", + "convert-csv-to-json": "^4.37.0", "convex": "^1.35.1", "crawlee": "^4.0.0-beta.47", "critters": "^0.0.25", @@ -201,7 +203,7 @@ "leaflet.markercluster": "^1.5.3", "lenis": "^1.3.23", "lucide-react": "^1.8.0", - "marked": "^18.0.1", + "marked": "^18.0.2", "mastracode": "^0.14.0", "mathjs": "^15.2.0", "media-chrome": "^4.19.0", @@ -344,6 +346,6 @@ "typescript-eslint": "^8.58.2", "@typescript-eslint/parser": "^8.58.2", "@typescript-eslint/eslint-plugin": "^8.58.2", - "@mastra/core": "^1.26.0-alpha.5" + "@mastra/core": "^1.26.0-alpha.7" } -} +} \ No newline at end of file diff --git a/src/mastra/agents/researchAgent.ts b/src/mastra/agents/researchAgent.ts index 44e6b5f..5a6914d 100644 --- a/src/mastra/agents/researchAgent.ts +++ b/src/mastra/agents/researchAgent.ts @@ -57,6 +57,7 @@ import { createDiscordAdapter } from '@chat-adapter/discord' import { google } from '../config/google' import { TokenLimiter, + TokenLimiterProcessor, ToolSearchProcessor, //TokenLimiter } from '@mastra/core/processors' @@ -328,13 +329,13 @@ Role: ${role} | Lang: ${language} | Phase: ${researchPhase} - **GitHub channel delivery**: If the request arrives from a GitHub issue or PR comment thread, respond in concise GitHub-flavored Markdown with a direct answer, bullet findings, source links, and the clearest next action or blocker. `, providerOptions: { - google: { - responseModalities: ['TEXT'], - thinkingConfig: { - includeThoughts: true, - thinkingLevel: 'medium', - }, - } satisfies GoogleLanguageModelOptions, + // google: { + //responseModalities: ['TEXT'], + // thinkingConfig: { + // includeThoughts: true, + // thinkingLevel: 'medium', + // }, + // satisfies GoogleLanguageModelOptions, }, } }, @@ -358,7 +359,7 @@ Role: ${role} | Lang: ${language} | Phase: ${researchPhase} maxRetries: 5, options: { tracingPolicy: { - internal: InternalSpans.AGENT, + //internal: InternalSpans.MODEL, }, }, //voice: gvoice, @@ -367,10 +368,10 @@ Role: ${role} | Lang: ${language} | Phase: ${researchPhase} tools: researchAgentTools, search: { topK: 5 }, }), - //new TokenLimiter(64000), + new TokenLimiter(12000), ], outputProcessors: [ - // new TokenLimiterProcessor(128000), + new TokenLimiterProcessor(200000), // new BatchPartsProcessor({ // batchSize: 10, // maxWaitTime: 75, @@ -392,7 +393,7 @@ Role: ${role} | Lang: ${language} | Phase: ${researchPhase} //voice: new GoogleVoice(), // Add OpenAI voice provider with default configuration defaultOptions: { //autoResumeSuspendedTools: true, - includeRawChunks: true, + //includeRawChunks: true, modelSettings: { temperature: 0.2, //maxOutputTokens: 64000, @@ -402,19 +403,19 @@ Role: ${role} | Lang: ${language} | Phase: ${researchPhase} maxRetries: 5, }, providerOptions: { - google: { - responseModalities: ['TEXT', 'IMAGE'], - thinkingConfig: { - includeThoughts: true, - thinkingLevel: 'medium', - }, + //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, }, }, }) diff --git a/src/mastra/config/duckdb.ts b/src/mastra/config/duckdb.ts new file mode 100644 index 0000000..9d91f37 --- /dev/null +++ b/src/mastra/config/duckdb.ts @@ -0,0 +1,119 @@ +import { DuckDBVector, DuckDBStore } from "@mastra/duckdb"; +import { fastembed } from "@mastra/fastembed"; + +import { Memory } from '@mastra/memory' + +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 +}); + +export const duckDBMemory = new Memory({ + storage: duckStore, + vector: duckVector, + embedder: fastembed, + embedderOptions: { + telemetry: { + request: { + log: true, + logInputs: true, + logOutputs: true, + }, + }, + providerOptions: { + fastembed: { + model: "text-embedding-3-small", + dimensions: 1024, + }, + }, + }, + options: { + // Message management + observationalMemory: { + enabled: true, + scope: 'thread', // 'resource' | 'thread' + model: 'google/gemini-2.5-flash', + retrieval: { vector: true, scope: 'thread' }, + shareTokenBudget: false, // Don't share token budget between observation and reflection to preserve context + observation: { + instruction: 'You are an assistant that observes and remembers important information from the conversation. Pay attention to details, context, and any information that might be useful for future reference.', + messageTokens: 50_000, + bufferTokens: 5_000, + // Activate to retain 30% of threshold + bufferActivation: 0.85, + // Force synchronous observation at 1.5x threshold + blockAfter: 1.5, + modelSettings: { + temperature: 0.3, + maxOutputTokens: 64_000, + topK: 40, + topP: 0.95, + }, + }, + reflection: { + bufferActivation: 0.5, + // Force synchronous reflection at 1.2x threshold + blockAfter: 1.2, + instruction: 'Based on the observations, generate concise and informative reflections that capture important details, context, and insights from the conversation. These reflections should be useful for future reference and help provide context for the assistant.', + modelSettings: { + temperature: 0.3, + maxOutputTokens: 64_000, + topK: 40, + topP: 0.95, + }, + observationTokens: 40_000, + }, + }, + readOnly: false, + lastMessages: parseInt(process.env.MEMORY_LAST_MESSAGES ?? '500'), + generateTitle: true, + // Advanced semantic recall with HNSW index configuration + semanticRecall: { + topK: parseInt(process.env.SEMANTIC_TOP_K ?? '5'), + messageRange: { + before: parseInt(process.env.SEMANTIC_RANGE_BEFORE ?? '3'), + after: parseInt(process.env.SEMANTIC_RANGE_AFTER ?? '2'), + }, + scope: 'resource', // 'resource' | 'thread' + // HNSW index configuration to support high-dimensional embeddings (>2000 dimensions) + threshold: 0.75, // Similarity threshold for semantic recall + indexName: 'memory_messages_1024', // Index name for semantic recall + }, + workingMemory: { + enabled: true, + scope: 'resource', // 'resource' | 'thread' + version: 'vnext', + template: ` +# User Context +{{#if user.name}}Name: {{user.name}}{{/if}} +{{#if user.role}}Role: {{user.role}}{{/if}} +{{#if user.language}}Language: {{user.language}}{{/if}} +{{#if user.location}}Location: {{user.location}}{{/if}} +{{#if user.email}}Email: {{user.email}}{{/if}} +{{#if user.organization}}Organization: {{user.organization}}{{/if}} +{{#if user.preferences}}Preferences: {{user.preferences}}{{/if}} +{{#if user.history}}History: {{user.history}}{{/if}} +{{#if user.other}}Other: {{user.other}}{{/if}} + +# Conversation Context +{{#if conversation.topic}}Topic: {{conversation.topic}}{{/if}} +{{#if conversation.purpose}}Purpose: {{conversation.purpose}}{{/if}} + +# Additional Context +{{#each additionalContext}} +- {{this}} +{{/each}} + +## Important Information +{{#each importantInfo}} +- {{this}} +{{/each}} +`, + }, + }, +}); \ No newline at end of file diff --git a/src/mastra/index.ts b/src/mastra/index.ts index e2464ac..04bf97c 100644 --- a/src/mastra/index.ts +++ b/src/mastra/index.ts @@ -1,3 +1,4 @@ +import { ObservabilityDuckDBConfig } from './../../node_modules/@mastra/duckdb/dist/storage/domains/observability/index.d'; import { chatRoute, networkRoute, workflowRoute } from '@mastra/ai-sdk' import { Mastra } from '@mastra/core' import { getAuthenticatedUser } from '@mastra/server/auth' @@ -190,8 +191,13 @@ import { MastraEditor } from '@mastra/editor' import { ArcadeToolProvider } from '@mastra/editor/arcade' import { ComposioToolProvider } from '@mastra/editor/composio' //import { GoogleVoice } from '@mastra/voice-google' -//import { composioAgent } from './agents/compsio' +import { composioAgent } from './agents/compsio' +import { MastraCompositeStore, FilesystemStore } from '@mastra/core/storage' //import { PosthogExporter } from '@mastra/posthog' +//import { DuckDBStore } from '@mastra/duckdb' +import { duckStore } from './config/duckdb' + + export const mastra = new Mastra({ workspace: agentFsWorkspace, @@ -345,7 +351,7 @@ export const mastra = new Mastra({ }), }, //sandboxes:{[daytonaSandbox.id]: daytonaSandbox}, - //filesystems: { [s3FilesystemProvider.id]: s3FilesystemProvider }, + //filesystems: new FilesystemStore({ dir: '.mastra-storage' }), // Optional: configure storage limits, allowed file types, etc. // Optional: add a custom toolbar with specific tools or actions } @@ -366,7 +372,16 @@ export const mastra = new Mastra({ // google: new GoogleVoice(), }, // Example of agent-specific configuration using instructions - storage: libsqlstorage, + storage: new MastraCompositeStore({ + id: 'composite', + name: 'Composite Store', + default: libsqlstorage, + editor: new FilesystemStore({ dir: '.mastra-storage' }), + domains: { + //memory: new MemoryLibSQL({ url: 'file:./local.db' }), + observability: duckStore.observability, + } + }), vectors: { libsqlvector }, logger: log, observability: new Observability({ diff --git a/src/mastra/tools/composio-mcp.ts b/src/mastra/tools/composio-mcp.ts index 199d3c2..0c85d99 100644 --- a/src/mastra/tools/composio-mcp.ts +++ b/src/mastra/tools/composio-mcp.ts @@ -21,9 +21,9 @@ const composioMcp = new MCPClient({ composio: { url: new URL(`https://connect.composio.dev/mcp?apiKey=${composioKey}`), }, - //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: { // url: new URL(`https://mcp.composio.dev/gmail/${composioKey}`), //},