0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00
mastra/templates
shreyas-mastra 9b456bbd04
chore(deps): template updates for the MongoDB Bedrock pins and @hono/node-server 2.1.6 (#30218)
Refs SEC-246
Refs SEC-260

## What

The MongoDB Bedrock template was holding a few Vanta findings in place
with stale pins. This updates the template to current published @mastra
packages and drops those pins.

| Finding | Where | Change |
|---|---|---|
| Aikido High AIKIDO-2026-10981 / 10990 on `@ai-sdk/provider-utils`
3.0.28 | template override + `@ai-sdk/amazon-bedrock` 3.0.105 / `ai`
5.0.210 | Removed the `@mastra/core` override that pinned 3.0.28. Bumped
`@ai-sdk/amazon-bedrock` 3.0.105 → 3.0.146 and `ai` to ^5.0.289.
Lockfile now has provider-utils 3.0.46. |
| Aikido Low AIKIDO-2026-526145 on `@ai-sdk/provider-utils` 5.0.1 | same
override | Override removed. `@mastra/core` 1.82.0 already depends on
5.0.72. |
| Aikido Medium/Low on `ai` 5.0.210 | direct dep | `ai` ^5.0.0 (locked
5.0.210) → ^5.0.289 |

Also bumped `@mastra/core` ^1.50.1 → ^1.82.0, plus the matching editor,
loggers, memory, mongodb, observability, rag and `mastra` CLI versions.
The existing amazon-bedrock patch (tool-use `input` optional) was
refreshed for 3.0.146.

No new overrides. The remaining template overrides (compression,
image-size, `@hono/node-server`, chat, glob, minimatch) are unchanged.

## Also in this PR

`@hono/node-server` 2.1.5 → 2.1.6 in
`templates/template-security-incident-triage` and
`templates/template-kyc-customer-onboarding` (direct dependency,
GHSA-jpvv-r467-5p4w). These templates have no checked-in lockfile. No
override changes.

## Verification

In `templates/template-mongodb-bedrock-agent`:

- `npm install`
- `patch-package` applies the refreshed 3.0.146 patch
- `tsc --noEmit` passes
- `vitest run`: 8 passed, 6 skipped

## Not fixed

- provider-utils 3.x Highs (AIKIDO-2026-10981 / 10990): there is no 3.x
patch. Aikido still reports 3.0.46 as vulnerable. A real fix needs
`@ai-sdk/amazon-bedrock` 4.x and `ai` 6.x (majors).
- `ai` 5.x Mediums AIKIDO-2026-11000 / 10269: fixed only in `ai` 6.0.170
/ 6.0.84.
- nanoid 3.3.20 and yargs 17.7.3 in this template: latest in their
lines; a fix would be a major.
- Other repo-wide items (zod 3.25.76, provider-utils 2.2.8 / ai 4.3.19,
undici 6.29.1 via `@qdrant/js-client-rest`, extract-zip, deepmerge,
picomatch 4.0.7, etc.) are unchanged and listed in the Vanta report.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

ELI5: The MongoDB Bedrock template gets newer library versions. It also
drops old version pins that are no longer needed.

## Summary

This PR updates the dependencies of the
`templates/template-mongodb-bedrock-agent` template. It removes the
`@mastra/core` provider-utils overrides and refreshes the Amazon Bedrock
patch. The changeset also records an `@hono/node-server` bump in two
other templates.

## Changes

- `templates/template-mongodb-bedrock-agent/package.json` (+10/-15):
  - `@ai-sdk/amazon-bedrock`: `3.0.105` → `3.0.146`.
  - `ai`: `^5.0.0` → `^5.0.289`.
  - `@mastra/core`: `^1.50.1` → `^1.82.0`.
- Other Mastra packages move to newer ranges: `@mastra/editor`,
`@mastra/loggers`, `@mastra/memory`, `@mastra/mongodb`,
`@mastra/observability`, `@mastra/rag`.
  - devDependency `mastra`: `^1.15.0` → `^1.38.0`.
- Removes the `@mastra/core` `overrides` block. It pinned
`@ai-sdk/provider-utils-v5` to `3.0.28`, `-v6` to `4.0.33`, and `-v7` to
`5.0.1`.
- The `compression`, `image-size`, and `@modelcontextprotocol/sdk`
overrides are unchanged.
-
`templates/template-mongodb-bedrock-agent/patches/@ai-sdk+amazon-bedrock+3.0.146.patch`
(+8/-8): Refreshed for version 3.0.146. `BedrockToolUseSchema` in the
CommonJS and ESM builds now accepts tool-use objects without an `input`
field. When `input` is present, it remains an unknown value.
- `.changeset/vanta-2026-11-12-bedrock-template.md` (+6/-0): Adds a
changeset with empty frontmatter, so it declares no package bump. The
body describes the template dependency updates and the
`@hono/node-server` bump from `2.1.5` to `2.1.6` in the
security-incident-triage and kyc-customer-onboarding templates. It
states that no published package changes are included.
- `templates/template-kyc-customer-onboarding/package.json` and
`templates/template-security-incident-triage/package.json` (+1/-1 each):
`@hono/node-server` `2.1.5` → `2.1.6`.

## Public API

No exported or public declarations change.

## Verification

The PR description reports these results. They are not re-run here:
- `npm install` completed.
- `patch-package` applied the refreshed patch.
- `tsc --noEmit` passed.
- `vitest run` reported 8 passing and 6 skipped tests.

## Known gaps

The PR description says these findings remain open: provider-utils 3.x
high-severity findings (AIKIDO-2026-10981 / 10990), `ai` 5.x findings
(AIKIDO-2026-11000 / 10269), and the template's `nanoid` and `yargs`
findings. Other repository-wide findings are unchanged.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
History 2026-11-12 16:16:58 -08:00
..
template-accounts-payable-invoice-processing feat(templates): add accounts payable invoice processing (#28532) 2026-10-27 22:49:27 +00:00
template-agent-builder docs: declare node types in tsconfig examples (#27974) 2026-10-21 11:51:24 +02:00
template-agent-harness chore(templates): make template-agent-harness AGENTS.md concise and warn about outdated training data (#29834) 2026-11-09 16:29:40 -07:00
template-browser-agent feat(templates): read the model from AGENT_MODEL in Browser Agent (#29748) 2026-11-09 18:02:27 +00:00
template-browsing-agent docs(templates): surface browsing-agent demo video and remove stray README header images (#23983) 2026-09-15 13:20:37 +02:00
template-chat-with-pdf docs(templates): surface browsing-agent demo video and remove stray README header images (#23983) 2026-09-15 13:20:37 +02:00
template-chat-with-youtube chore: migrate workspace to pnpm v11 (#17038) 2026-05-28 09:45:07 -07:00
template-claw-assistant feat(templates): read the model from AGENT_MODEL in Claw Assistant (#29747) 2026-11-09 18:02:00 +00:00
template-company-knowledge feat(templates): use Mastra Connect in the company knowledge template (#29745) 2026-11-09 18:02:19 +00:00
template-competitor-monitor-jev security: Vanta remediation pass 2026-10-14/15/19 (zod 4.6.7, @ai-sdk/provider-utils, @copilotkit template) (#27023) 2026-10-19 11:32:32 -07:00
template-connect-agent feat(templates): read the model from AGENT_MODEL in Personal Agent (#29749) 2026-11-09 18:02:10 +00:00
template-csv-to-questions draft: Add MastraPlatformExporter and MastraStorageExporter, deprecate CloudExporter and DefaultExporter (#16223) 2026-05-11 15:51:43 +02:00
template-customer-feedback-summarization chore: migrate workspace to pnpm v11 (#17038) 2026-05-28 09:45:07 -07:00
template-customer-refund-agent chore(deps): Vanta 2026-11-12 — raise undici to 8.12.4 / 7.30.2 (#30205) 2026-11-12 07:20:12 -08:00
template-deep-search docs(templates): surface browsing-agent demo video and remove stray README header images (#23983) 2026-09-15 13:20:37 +02:00
template-docs-chatbot docs(templates): update template READMEs (#25469) 2026-09-29 23:14:55 -07:00
template-docs-expert feat(templates): read the model from AGENT_MODEL in Docs Expert (#29746) 2026-11-09 18:01:54 +00:00
template-factory chore(templates): tighten Factory template .env.example comments (#28749) 2026-11-10 21:24:55 -08:00
template-factory-self-hosted chore(templates): tighten Factory template .env.example comments (#28749) 2026-11-10 21:24:55 -08:00
template-flash-cards-from-pdf draft: Add MastraPlatformExporter and MastraStorageExporter, deprecate CloudExporter and DefaultExporter (#16223) 2026-05-11 15:51:43 +02:00
template-genui-data-explorer chore(deps): Vanta 2026-11-11 fixes (effect, fast-xml-parser, react-router-dom, @whatwg-node/fetch) (#30061) 2026-11-11 08:19:18 -08:00
template-github-review-agent docs(templates): update template READMEs (#25469) 2026-09-29 23:14:55 -07:00
template-google-sheets fix: bump vulnerable dependencies to patched releases (#24027) 2026-09-15 13:58:48 -07:00
template-insurance-policy-checking chore(deps): update build tools (major) (#29026) 2026-11-03 20:18:21 +01:00
template-kyc-customer-onboarding chore(deps): template updates for the MongoDB Bedrock pins and @hono/node-server 2.1.6 (#30218) 2026-11-12 16:16:58 -08:00
template-lead-qualification feat(templates): add lead qualification template (#27839) 2026-10-21 09:44:58 +01:00
template-meeting-notes chore: unify built-in Gateway naming (#18691) 2026-07-13 17:26:20 +02:00
template-mongodb-bedrock-agent chore(deps): template updates for the MongoDB Bedrock pins and @hono/node-server 2.1.6 (#30218) 2026-11-12 16:16:58 -08:00
template-organization-intelligence chore(deps): Vanta 2026-11-11 fixes (effect, fast-xml-parser, react-router-dom, @whatwg-node/fetch) (#30061) 2026-11-11 08:19:18 -08:00
template-personal-assistant feat(templates): Add personal assistant template (#29886) 2026-11-11 08:23:18 -08:00
template-security-incident-triage chore(deps): template updates for the MongoDB Bedrock pins and @hono/node-server 2.1.6 (#30218) 2026-11-12 16:16:58 -08:00
template-starter-agent feat(templates): read AGENT_INSTRUCTIONS and AGENT_MODEL in starter agent (#27282) 2026-10-16 10:48:12 -04:00
template-text-to-sql chore(repo): Use tsx catalog dep (#17605) 2026-06-05 13:44:28 +02:00
template-vendor-risk-questionnaire chore(deps): Vanta 2026-11-11 fixes (effect, fast-xml-parser, react-router-dom, @whatwg-node/fetch) (#30061) 2026-11-11 08:19:18 -08:00
weather-agent docs: fix onboarding quickstart, pnpm version, and template metadata (#23754) 2026-09-15 09:40:58 +02:00
.gitignore update pdf-to-audio-template (#7512) 2025-09-10 11:34:50 +01:00
README.md feat(templates): add template-starter-agent (#25451) 2026-09-30 10:01:12 -07:00

Mastra templates

This directory contains standalone Mastra project templates.

New Gateway-first templates

  • template-docs-expert: Answers documentation questions with Gateway web search, citations, memory, and structured responses.
  • template-browser-agent: Uses AgentBrowser to browse, inspect, and interact with web pages.
  • template-meeting-notes: Turns Zoom transcripts or uploaded transcripts into structured notes with decisions and action items.
  • template-company-knowledge: Indexes Linear and Notion content into pgvector and answers internal knowledge questions.
  • template-claw-assistant: Operates a workspace with filesystem, sandbox, browser, and web-search tools.
  • template-connect-agent: Turns Mastra platform integration connections into live agent tools with @mastra/connect, plus a cross-integration activity-digest workflow.
  • template-starter-agent: Starter Agent — durable agent harness with @mastra/connect tools and channels, a platform-backed workspace, Studio agent/workflow editing via @mastra/editor, Postgres storage, and Redis-backed resumable streams.

How to add a new template

To add a new template to the templates/ directory, follow these steps:

1. Create a new template folder

  • Inside the templates/ directory, create a new folder named after your template (e.g., my-new-template/).

2. Required files

Your template folder must include the following files:

a. package.json

  • Use OpenAI as the LLM provider in your code/config.
  • All @mastra/* dependencies should be set to "latest" in the dependencies section.
  • mastra devDependency should be set to "latest" in the devDependencies section.
  • The description field should clearly describe what the template does.

b. .env.example

  • List all required environment variables, such as API keys and configuration values.

c. README.md

Follow this template for your README.md:

# Title

Introductory paragraph describing what this template does.

## Why we built this

Explain the motivation behind creating this template and the problem it solves. And which features of Mastra it demonstrates.

## Demo

This demo runs in Mastra Studio, but you can connect this workflow to your React, Next.js, or Vue app using the [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) or agentic UI libraries like [AI SDK UI](https://mastra.ai/guides/build-your-ui/ai-sdk-ui), [CopilotKit](https://mastra.ai/guides/build-your-ui/copilotkit), or [Assistant UI](https://mastra.ai/guides/build-your-ui/assistant-ui).

## Prerequisites

- [OpenAI API key](https://platform.openai.com/api-keys): Used by default, but you can swap in any model

## Quickstart 🚀

1. **Clone the template**
   - Run `npx create-mastra@latest --template TEMPLATE_NAME` to scaffold the project locally.
2. **Add your API keys**
   - Copy `.env.example` to `.env` and fill in your keys.
3. **Start the dev server**
   - Run `npm run dev` and open [localhost:4111](http://localhost:4111) to try it out.

## Making it yours

Explain how they can use it and how they can customize it for their needs.

## About Mastra templates

[Mastra templates](https://mastra.ai/templates) are ready-to-use projects that show off what you can build — clone one, poke around, and make it yours. They live in the [Mastra monorepo](https://github.com/mastra-ai/mastra) and are automatically synced to standalone repositories for easier cloning.

Want to contribute? See [CONTRIBUTING.md](./CONTRIBUTING.md).

d. CONTRIBUTING.md

Create a CONTRIBUTING.md file:

# Contributing

This repository is auto-generated from the [Mastra monorepo](https://github.com/mastra-ai/mastra). Pull requests opened here will be ignored.

To contribute:

1. Fork the [Mastra monorepo](https://github.com/mastra-ai/mastra)
2. Find this template in `templates/TEMPLATE_NAME`
3. Make your changes
4. Open a pull request against the monorepo

A bot syncs accepted changes to this repository.