@mastra/mcp-docs-server 0.13.22-alpha.1 → 0.13.22-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +10 -0
- package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +9 -0
- package/.docs/organized/changelogs/%40mastra%2Fastra.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +13 -13
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fcloud.md +12 -12
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +48 -48
- package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +31 -31
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +28 -28
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +22 -22
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +23 -23
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +60 -60
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Flance.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Floggers.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +18 -18
- package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +21 -21
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +31 -31
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Frag.md +16 -16
- package/.docs/organized/changelogs/%40mastra%2Fs3vectors.md +11 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +9 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +9 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +10 -10
- package/.docs/organized/changelogs/create-mastra.md +7 -7
- package/.docs/organized/changelogs/mastra.md +49 -49
- package/.docs/organized/code-examples/weather-agent.md +11 -4
- package/.docs/raw/agents/overview.mdx +1 -1
- package/.docs/raw/auth/firebase.mdx +285 -0
- package/.docs/raw/auth/index.mdx +3 -3
- package/.docs/raw/deployment/overview.mdx +7 -1
- package/.docs/raw/frameworks/agentic-uis/cedar-os.mdx +108 -0
- package/.docs/raw/getting-started/installation.mdx +0 -1
- package/.docs/raw/memory/overview.mdx +1 -1
- package/.docs/raw/reference/agents/ChunkType.mdx +8 -8
- package/.docs/raw/reference/auth/firebase.mdx +128 -0
- package/.docs/raw/reference/cli/dev.mdx +7 -1
- package/.docs/raw/reference/client-js/agents.mdx +3 -3
- package/.docs/raw/reference/client-js/memory.mdx +1 -1
- package/.docs/raw/reference/client-js/tools.mdx +1 -1
- package/.docs/raw/reference/core/getWorkflow.mdx +0 -1
- package/.docs/raw/reference/core/getWorkflows.mdx +0 -1
- package/.docs/raw/reference/core/setTelemetry.mdx +2 -2
- package/.docs/raw/reference/storage/postgresql.mdx +191 -0
- package/.docs/raw/reference/workflows/workflow-methods/branch.mdx +2 -2
- package/.docs/raw/reference/workflows/workflow-methods/commit.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/create-run.mdx +3 -3
- package/.docs/raw/reference/workflows/workflow-methods/dountil.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/dowhile.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/foreach.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/map.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/parallel.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/sendEvent.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/sleep.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/sleepUntil.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/then.mdx +1 -1
- package/.docs/raw/reference/workflows/workflow-methods/waitForEvent.mdx +1 -1
- package/.docs/raw/server-db/local-dev-playground.mdx +31 -9
- package/.docs/raw/server-db/mastra-client.mdx +189 -73
- package/CHANGELOG.md +17 -0
- package/package.json +5 -5
- package/.docs/organized/changelogs/%40mastra%2Ffirecrawl.md +0 -302
- package/.docs/organized/changelogs/%40mastra%2Fgithub.md +0 -302
- package/.docs/organized/changelogs/%40mastra%2Fmem0.md +0 -302
- package/.docs/organized/changelogs/%40mastra%2Fragie.md +0 -302
- package/.docs/organized/code-examples/memory-with-mem0.md +0 -108
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/voice-playai
|
|
2
2
|
|
|
3
|
+
## 0.11.5-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Update peerdep of @mastra/core ([#7619](https://github.com/mastra-ai/mastra/pull/7619))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`a1bb887`](https://github.com/mastra-ai/mastra/commit/a1bb887e8bfae44230f487648da72e96ef824561), [`a0f5f1c`](https://github.com/mastra-ai/mastra/commit/a0f5f1ca39c3c5c6d26202e9fcab986b4fe14568), [`b356f5f`](https://github.com/mastra-ai/mastra/commit/b356f5f7566cb3edb755d91f00b72fc1420b2a37), [`f5ce05f`](https://github.com/mastra-ai/mastra/commit/f5ce05f831d42c69559bf4c0fdb46ccb920fc3a3), [`9f6f30f`](https://github.com/mastra-ai/mastra/commit/9f6f30f04ec6648bbca798ea8aad59317c40d8db), [`d706fad`](https://github.com/mastra-ai/mastra/commit/d706fad6e6e4b72357b18d229ba38e6c913c0e70), [`5c3768f`](https://github.com/mastra-ai/mastra/commit/5c3768fa959454232ad76715c381f4aac00c6881), [`8a3f5e4`](https://github.com/mastra-ai/mastra/commit/8a3f5e4212ec36b302957deb4bd47005ab598382)]:
|
|
10
|
+
- @mastra/core@0.17.0-alpha.3
|
|
11
|
+
|
|
3
12
|
## 0.11.4
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -290,13 +299,4 @@
|
|
|
290
299
|
- Updated dependencies [0e17048]
|
|
291
300
|
- @mastra/core@0.10.7
|
|
292
301
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
### Patch Changes
|
|
296
|
-
|
|
297
|
-
- 8e1b6e9: dependencies updates:
|
|
298
|
-
- Updated dependency [`zod@^3.25.67` ↗︎](https://www.npmjs.com/package/zod/v/3.25.67) (from `^3.25.57`, in `dependencies`)
|
|
299
|
-
- Updated dependencies [15e9d26]
|
|
300
|
-
- Updated dependencies [07d6d88]
|
|
301
|
-
|
|
302
|
-
... 1247 more lines hidden. See full changelog in package directory.
|
|
302
|
+
... 1256 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/voice-sarvam
|
|
2
2
|
|
|
3
|
+
## 0.11.5-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Update peerdep of @mastra/core ([#7619](https://github.com/mastra-ai/mastra/pull/7619))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`a1bb887`](https://github.com/mastra-ai/mastra/commit/a1bb887e8bfae44230f487648da72e96ef824561), [`a0f5f1c`](https://github.com/mastra-ai/mastra/commit/a0f5f1ca39c3c5c6d26202e9fcab986b4fe14568), [`b356f5f`](https://github.com/mastra-ai/mastra/commit/b356f5f7566cb3edb755d91f00b72fc1420b2a37), [`f5ce05f`](https://github.com/mastra-ai/mastra/commit/f5ce05f831d42c69559bf4c0fdb46ccb920fc3a3), [`9f6f30f`](https://github.com/mastra-ai/mastra/commit/9f6f30f04ec6648bbca798ea8aad59317c40d8db), [`d706fad`](https://github.com/mastra-ai/mastra/commit/d706fad6e6e4b72357b18d229ba38e6c913c0e70), [`5c3768f`](https://github.com/mastra-ai/mastra/commit/5c3768fa959454232ad76715c381f4aac00c6881), [`8a3f5e4`](https://github.com/mastra-ai/mastra/commit/8a3f5e4212ec36b302957deb4bd47005ab598382)]:
|
|
10
|
+
- @mastra/core@0.17.0-alpha.3
|
|
11
|
+
|
|
3
12
|
## 0.11.4
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -290,13 +299,4 @@
|
|
|
290
299
|
- Updated dependencies [0e17048]
|
|
291
300
|
- @mastra/core@0.10.7
|
|
292
301
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
### Patch Changes
|
|
296
|
-
|
|
297
|
-
- 8e1b6e9: dependencies updates:
|
|
298
|
-
- Updated dependency [`zod@^3.25.67` ↗︎](https://www.npmjs.com/package/zod/v/3.25.67) (from `^3.25.57`, in `dependencies`)
|
|
299
|
-
- Updated dependencies [15e9d26]
|
|
300
|
-
- Updated dependencies [07d6d88]
|
|
301
|
-
|
|
302
|
-
... 897 more lines hidden. See full changelog in package directory.
|
|
302
|
+
... 906 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/voice-speechify
|
|
2
2
|
|
|
3
|
+
## 0.11.5-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Update peerdep of @mastra/core ([#7619](https://github.com/mastra-ai/mastra/pull/7619))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`a1bb887`](https://github.com/mastra-ai/mastra/commit/a1bb887e8bfae44230f487648da72e96ef824561), [`a0f5f1c`](https://github.com/mastra-ai/mastra/commit/a0f5f1ca39c3c5c6d26202e9fcab986b4fe14568), [`b356f5f`](https://github.com/mastra-ai/mastra/commit/b356f5f7566cb3edb755d91f00b72fc1420b2a37), [`f5ce05f`](https://github.com/mastra-ai/mastra/commit/f5ce05f831d42c69559bf4c0fdb46ccb920fc3a3), [`9f6f30f`](https://github.com/mastra-ai/mastra/commit/9f6f30f04ec6648bbca798ea8aad59317c40d8db), [`d706fad`](https://github.com/mastra-ai/mastra/commit/d706fad6e6e4b72357b18d229ba38e6c913c0e70), [`5c3768f`](https://github.com/mastra-ai/mastra/commit/5c3768fa959454232ad76715c381f4aac00c6881), [`8a3f5e4`](https://github.com/mastra-ai/mastra/commit/8a3f5e4212ec36b302957deb4bd47005ab598382)]:
|
|
10
|
+
- @mastra/core@0.17.0-alpha.3
|
|
11
|
+
|
|
3
12
|
## 0.11.4
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -290,13 +299,4 @@
|
|
|
290
299
|
- Updated dependencies [0e17048]
|
|
291
300
|
- @mastra/core@0.10.7
|
|
292
301
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
### Patch Changes
|
|
296
|
-
|
|
297
|
-
- 8e1b6e9: dependencies updates:
|
|
298
|
-
- Updated dependency [`zod@^3.25.67` ↗︎](https://www.npmjs.com/package/zod/v/3.25.67) (from `^3.25.57`, in `dependencies`)
|
|
299
|
-
- Updated dependencies [15e9d26]
|
|
300
|
-
- Updated dependencies [07d6d88]
|
|
301
|
-
|
|
302
|
-
... 1251 more lines hidden. See full changelog in package directory.
|
|
302
|
+
... 1260 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# create-mastra
|
|
2
2
|
|
|
3
|
+
## 0.13.0-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Update peerdep of @mastra/core ([#7619](https://github.com/mastra-ai/mastra/pull/7619))
|
|
8
|
+
|
|
3
9
|
## 0.12.4-alpha.0
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -292,11 +298,5 @@
|
|
|
292
298
|
- f6c4d75: fix date picker on change
|
|
293
299
|
- 59f0dcd: Add light background color for step statuses
|
|
294
300
|
- 698518b: Allow external templates from github
|
|
295
|
-
- cf8d497: factorize tabs component between cloud and core
|
|
296
|
-
- 7827943: Handle streaming large data
|
|
297
|
-
- 808b493: wrap runtime context with tooltip provider for usage in cloud
|
|
298
|
-
- 09464dd: Share AgentMetadata component with cloud
|
|
299
|
-
- 80692d5: refactor: sharing only the UI and not data fetching for traces
|
|
300
|
-
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 1402 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
# mastra
|
|
2
2
|
|
|
3
|
+
## 0.13.0-alpha.1
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Improved workspace dependency resolution during development and builds. This makes the build process more reliable when working with monorepos and workspace packages, reducing potential bundling errors and improving development experience. ([#7619](https://github.com/mastra-ai/mastra/pull/7619))
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Improve the `mastra init` CLI. ([#7837](https://github.com/mastra-ai/mastra/pull/7837))
|
|
12
|
+
|
|
13
|
+
Previously, when you ran `mastra init` in a directory without a `package.json` file you'd receive no output. Now the CLI shows an error with next steps. Additionally, `mastra init` now also installs `zod` if not present already.
|
|
14
|
+
|
|
15
|
+
- Add support for running the Mastra dev server over HTTPS for local development. ([#7871](https://github.com/mastra-ai/mastra/pull/7871))
|
|
16
|
+
- Add `--https` flag for `mastra dev`. This automatically creates a local key and certificate for you.
|
|
17
|
+
- Alternatively, you can provide your own key and cert through `server.https`:
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
// src/mastra/index.ts
|
|
21
|
+
import { Mastra } from '@mastra/core/mastra';
|
|
22
|
+
import fs from 'node:fs';
|
|
23
|
+
|
|
24
|
+
export const mastra = new Mastra({
|
|
25
|
+
server: {
|
|
26
|
+
https: {
|
|
27
|
+
key: fs.readFileSync('path/to/key.pem'),
|
|
28
|
+
cert: fs.readFileSync('path/to/cert.pem'),
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
- avoid refetching on error when resolving a workflow in cloud ([#7842](https://github.com/mastra-ai/mastra/pull/7842))
|
|
35
|
+
|
|
36
|
+
- dependencies updates: ([#7810](https://github.com/mastra-ai/mastra/pull/7810))
|
|
37
|
+
- Updated dependency [`strip-json-comments@^5.0.3` ↗︎](https://www.npmjs.com/package/strip-json-comments/v/5.0.3) (from `^5.0.2`, in `dependencies`)
|
|
38
|
+
|
|
39
|
+
- fix markdown rendering in agent in agent text-delta ([#7851](https://github.com/mastra-ai/mastra/pull/7851))
|
|
40
|
+
|
|
41
|
+
- fix workflows runs fetching and displaying ([#7852](https://github.com/mastra-ai/mastra/pull/7852))
|
|
42
|
+
|
|
43
|
+
- fix empty state for scorers on agent page ([#7846](https://github.com/mastra-ai/mastra/pull/7846))
|
|
44
|
+
|
|
45
|
+
- Updated dependencies [[`b1c155b`](https://github.com/mastra-ai/mastra/commit/b1c155b57ce702674f207f1d4c6a4ebf94225f44), [`790f7d1`](https://github.com/mastra-ai/mastra/commit/790f7d17895d7a5f75b6b5d2d794c2e820b99d4c), [`3cd6538`](https://github.com/mastra-ai/mastra/commit/3cd6538811fc94f84a19dbd1064f46cb42e38c1d), [`a1bb887`](https://github.com/mastra-ai/mastra/commit/a1bb887e8bfae44230f487648da72e96ef824561), [`8a3f5e4`](https://github.com/mastra-ai/mastra/commit/8a3f5e4212ec36b302957deb4bd47005ab598382), [`7e82fbf`](https://github.com/mastra-ai/mastra/commit/7e82fbf3715175e274d2015eb59fb7f57dc9b09d), [`a0f5f1c`](https://github.com/mastra-ai/mastra/commit/a0f5f1ca39c3c5c6d26202e9fcab986b4fe14568), [`b356f5f`](https://github.com/mastra-ai/mastra/commit/b356f5f7566cb3edb755d91f00b72fc1420b2a37), [`f5ce05f`](https://github.com/mastra-ai/mastra/commit/f5ce05f831d42c69559bf4c0fdb46ccb920fc3a3), [`9f6f30f`](https://github.com/mastra-ai/mastra/commit/9f6f30f04ec6648bbca798ea8aad59317c40d8db), [`d706fad`](https://github.com/mastra-ai/mastra/commit/d706fad6e6e4b72357b18d229ba38e6c913c0e70), [`8a3f5e4`](https://github.com/mastra-ai/mastra/commit/8a3f5e4212ec36b302957deb4bd47005ab598382), [`5c3768f`](https://github.com/mastra-ai/mastra/commit/5c3768fa959454232ad76715c381f4aac00c6881), [`8a3f5e4`](https://github.com/mastra-ai/mastra/commit/8a3f5e4212ec36b302957deb4bd47005ab598382)]:
|
|
46
|
+
- @mastra/deployer@0.17.0-alpha.3
|
|
47
|
+
- @mastra/core@0.17.0-alpha.3
|
|
48
|
+
- @mastra/loggers@0.10.12-alpha.0
|
|
49
|
+
- @mastra/mcp@0.12.1-alpha.0
|
|
50
|
+
|
|
3
51
|
## 0.12.4-alpha.0
|
|
4
52
|
|
|
5
53
|
### Patch Changes
|
|
@@ -250,53 +298,5 @@
|
|
|
250
298
|
- Updated dependencies [0ce418a]
|
|
251
299
|
- Updated dependencies [3e0153a]
|
|
252
300
|
- Updated dependencies [af90672]
|
|
253
|
-
- Updated dependencies [8387952]
|
|
254
|
-
- Updated dependencies [7f3b8da]
|
|
255
|
-
- Updated dependencies [905352b]
|
|
256
|
-
- Updated dependencies [599d04c]
|
|
257
|
-
- Updated dependencies [a6e2254]
|
|
258
|
-
- Updated dependencies [56041d0]
|
|
259
|
-
- Updated dependencies [3412597]
|
|
260
|
-
- Updated dependencies [5eca5d2]
|
|
261
|
-
- Updated dependencies [8f22a2c]
|
|
262
|
-
- Updated dependencies [f2cda47]
|
|
263
|
-
- Updated dependencies [5de1555]
|
|
264
|
-
- Updated dependencies [cfd377a]
|
|
265
|
-
- Updated dependencies [1ed5a3e]
|
|
266
|
-
- Updated dependencies [03d0c39]
|
|
267
|
-
- @mastra/core@0.15.3
|
|
268
|
-
- @mastra/deployer@0.15.3
|
|
269
|
-
- @mastra/loggers@0.10.10
|
|
270
|
-
- @mastra/mcp@0.11.3
|
|
271
|
-
|
|
272
|
-
## 0.11.3-alpha.4
|
|
273
|
-
|
|
274
|
-
### Patch Changes
|
|
275
|
-
|
|
276
|
-
- [#7358](https://github.com/mastra-ai/mastra/pull/7358) [`2f55297`](https://github.com/mastra-ai/mastra/commit/2f552975f4eb602f24c9e811c18587a65f620d72) Thanks [@LekoArts](https://github.com/LekoArts)! - Fix issue when using `yarn dlx create-mastra`
|
|
277
|
-
|
|
278
|
-
- [#7357](https://github.com/mastra-ai/mastra/pull/7357) [`01264f1`](https://github.com/mastra-ai/mastra/commit/01264f1280db040d1bd1ac9b8d29cfcaac3d6cbc) Thanks [@TheIsrael1](https://github.com/TheIsrael1)! - Mastra dev- load env vars before watch
|
|
279
|
-
|
|
280
|
-
- Updated dependencies [[`c19bcf7`](https://github.com/mastra-ai/mastra/commit/c19bcf7b43542b02157b5e17303e519933a153ab), [`b42a961`](https://github.com/mastra-ai/mastra/commit/b42a961a5aefd19d6e938a7705fc0ecc90e8f756), [`45e4d39`](https://github.com/mastra-ai/mastra/commit/45e4d391a2a09fc70c48e4d60f505586ada1ba0e), [`3b8972b`](https://github.com/mastra-ai/mastra/commit/3b8972bab8161d9fd96f6a41f57181443636cd43), [`0302f50`](https://github.com/mastra-ai/mastra/commit/0302f50861a53c66ff28801fc371b37c5f97e41e), [`74db265`](https://github.com/mastra-ai/mastra/commit/74db265b96aa01a72ffd91dcae0bc3b346cca0f2), [`6cffb99`](https://github.com/mastra-ai/mastra/commit/6cffb99030dc46256e4c3c0e6730565a2825d7a4), [`7f3b8da`](https://github.com/mastra-ai/mastra/commit/7f3b8da6dd21c35d3672e44b4f5dd3502b8f8f92), [`905352b`](https://github.com/mastra-ai/mastra/commit/905352bcda134552400eb252bca1cb05a7975c14), [`f2cda47`](https://github.com/mastra-ai/mastra/commit/f2cda47ae911038c5d5489f54c36517d6f15bdcc), [`cfd377a`](https://github.com/mastra-ai/mastra/commit/cfd377a3a33a9c88b644f6540feed9cd9832db47), [`03d0c39`](https://github.com/mastra-ai/mastra/commit/03d0c3963a748294577dd232a53ee01e1e5bcc12)]:
|
|
281
|
-
- @mastra/core@0.15.3-alpha.6
|
|
282
|
-
- @mastra/mcp@0.11.3-alpha.3
|
|
283
|
-
- @mastra/deployer@0.15.3-alpha.6
|
|
284
|
-
|
|
285
|
-
## 0.11.3-alpha.3
|
|
286
|
-
|
|
287
|
-
### Patch Changes
|
|
288
|
-
|
|
289
|
-
- [#7343](https://github.com/mastra-ai/mastra/pull/7343) [`de3cbc6`](https://github.com/mastra-ai/mastra/commit/de3cbc61079211431bd30487982ea3653517278e) Thanks [@LekoArts](https://github.com/LekoArts)! - Update the `package.json` file to include additional fields like `repository`, `homepage` or `files`.
|
|
290
|
-
|
|
291
|
-
- Updated dependencies [[`2b64943`](https://github.com/mastra-ai/mastra/commit/2b64943a282c99988c2e5b6e1269bfaca60e6fe3), [`85ef90b`](https://github.com/mastra-ai/mastra/commit/85ef90bb2cd4ae4df855c7ac175f7d392c55c1bf), [`de3cbc6`](https://github.com/mastra-ai/mastra/commit/de3cbc61079211431bd30487982ea3653517278e)]:
|
|
292
|
-
- @mastra/deployer@0.15.3-alpha.5
|
|
293
|
-
- @mastra/core@0.15.3-alpha.5
|
|
294
|
-
- @mastra/loggers@0.10.10-alpha.0
|
|
295
|
-
- @mastra/mcp@0.11.3-alpha.2
|
|
296
|
-
|
|
297
|
-
## 0.11.3-alpha.2
|
|
298
|
-
|
|
299
|
-
### Patch Changes
|
|
300
|
-
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 5534 more lines hidden. See full changelog in package directory.
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
{
|
|
4
4
|
"name": "examples-weather-agent",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@ai-sdk/
|
|
6
|
+
"@ai-sdk/anthropic": "^2.0.9",
|
|
7
|
+
"@ai-sdk/openai": "^2.0.23",
|
|
7
8
|
"@mastra/core": "latest",
|
|
8
9
|
"@mastra/libsql": "latest",
|
|
9
10
|
"zod": "^3.25.76"
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
### mastra/agents/index.ts
|
|
15
16
|
```typescript
|
|
16
17
|
import { openai } from '@ai-sdk/openai';
|
|
18
|
+
import { anthropic } from '@ai-sdk/anthropic';
|
|
17
19
|
import { Agent } from '@mastra/core/agent';
|
|
18
20
|
// import { Memory } from '@mastra/memory';
|
|
19
21
|
import { LibSQLStore } from '@mastra/libsql';
|
|
@@ -42,7 +44,12 @@ Your primary function is to help users get weather details for specific location
|
|
|
42
44
|
- Keep responses concise but informative
|
|
43
45
|
|
|
44
46
|
Use the weatherTool to fetch current weather data.`,
|
|
45
|
-
model:
|
|
47
|
+
model: [
|
|
48
|
+
{ model: anthropic('claude-3-5-sonnet-20241022') },
|
|
49
|
+
{ model: openai('gpt-4o') },
|
|
50
|
+
{ model: openai('gpt-4o-mini') },
|
|
51
|
+
],
|
|
52
|
+
maxRetries: 3,
|
|
46
53
|
tools: { weatherTool },
|
|
47
54
|
// memory,
|
|
48
55
|
// voice,
|
|
@@ -64,7 +71,7 @@ export const weatherReporterAgent = new Agent({
|
|
|
64
71
|
import { Mastra } from '@mastra/core';
|
|
65
72
|
import { LibSQLStore } from '@mastra/libsql';
|
|
66
73
|
|
|
67
|
-
import { weatherAgent } from './agents';
|
|
74
|
+
import { weatherAgent, weatherReporterAgent } from './agents';
|
|
68
75
|
import { weatherWorkflow as legacyWeatherWorkflow } from './workflows';
|
|
69
76
|
import { weatherWorkflow, weatherWorkflow2 } from './workflows/new-workflow';
|
|
70
77
|
|
|
@@ -72,7 +79,7 @@ export const mastra = new Mastra({
|
|
|
72
79
|
storage: new LibSQLStore({
|
|
73
80
|
url: 'file:./mastra.db',
|
|
74
81
|
}),
|
|
75
|
-
agents: { weatherAgent },
|
|
82
|
+
agents: { weatherAgent, weatherReporterAgent },
|
|
76
83
|
legacy_workflows: { legacyWeatherWorkflow },
|
|
77
84
|
workflows: { weatherWorkflow, weatherWorkflow2 },
|
|
78
85
|
});
|
|
@@ -120,7 +120,7 @@ Use `.stream()` for real-time responses. Pass a single string for simple prompts
|
|
|
120
120
|
|
|
121
121
|
### Streaming text
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
Use `.stream()` with an array of message objects that include `role` and `content`:
|
|
124
124
|
|
|
125
125
|
```typescript showLineNumbers copy
|
|
126
126
|
const stream = await testAgent.stream([
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "MastraAuthFirebase Class"
|
|
3
|
+
description: "Documentation for the MastraAuthFirebase class, which authenticates Mastra applications using Firebase Authentication."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import { Tabs, Tab } from "@/components/tabs";
|
|
7
|
+
|
|
8
|
+
# MastraAuthFirebase Class
|
|
9
|
+
|
|
10
|
+
The `MastraAuthFirebase` class provides authentication for Mastra using Firebase Authentication. It verifies incoming requests using Firebase ID tokens and integrates with the Mastra server using the `experimental_auth` option.
|
|
11
|
+
|
|
12
|
+
## Prerequisites
|
|
13
|
+
|
|
14
|
+
This example uses Firebase Authentication. Make sure to:
|
|
15
|
+
|
|
16
|
+
1. Create a Firebase project in the [Firebase Console](https://console.firebase.google.com/)
|
|
17
|
+
2. Enable Authentication and configure your preferred sign-in methods (Google, Email/Password, etc.)
|
|
18
|
+
3. Generate a service account key from Project Settings > Service Accounts
|
|
19
|
+
4. Download the service account JSON file
|
|
20
|
+
|
|
21
|
+
```env filename=".env" copy
|
|
22
|
+
FIREBASE_SERVICE_ACCOUNT=/path/to/your/service-account-key.json
|
|
23
|
+
FIRESTORE_DATABASE_ID=(default)
|
|
24
|
+
# Alternative environment variable names:
|
|
25
|
+
# FIREBASE_DATABASE_ID=(default)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
> **Note:** Store your service account JSON file securely and never commit it to version control.
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
Before you can use the `MastraAuthFirebase` class you have to install the `@mastra/auth-firebase` package.
|
|
33
|
+
|
|
34
|
+
```bash copy
|
|
35
|
+
npm install @mastra/auth-firebase@latest
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Usage examples
|
|
39
|
+
|
|
40
|
+
### Basic usage with environment variables
|
|
41
|
+
|
|
42
|
+
If you set the required environment variables (`FIREBASE_SERVICE_ACCOUNT` and `FIRESTORE_DATABASE_ID`), you can initialize `MastraAuthFirebase` without any constructor arguments. The class will automatically read these environment variables as configuration:
|
|
43
|
+
|
|
44
|
+
```typescript {2,7} filename="src/mastra/index.ts" showLineNumbers copy
|
|
45
|
+
import { Mastra } from "@mastra/core/mastra";
|
|
46
|
+
import { MastraAuthFirebase } from '@mastra/auth-firebase';
|
|
47
|
+
|
|
48
|
+
// Automatically uses FIREBASE_SERVICE_ACCOUNT and FIRESTORE_DATABASE_ID env vars
|
|
49
|
+
export const mastra = new Mastra({
|
|
50
|
+
// ..
|
|
51
|
+
server: {
|
|
52
|
+
experimental_auth: new MastraAuthFirebase(),
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Custom configuration
|
|
58
|
+
|
|
59
|
+
```typescript {2,7-10} filename="src/mastra/index.ts" showLineNumbers copy
|
|
60
|
+
import { Mastra } from "@mastra/core/mastra";
|
|
61
|
+
import { MastraAuthFirebase } from '@mastra/auth-firebase';
|
|
62
|
+
|
|
63
|
+
export const mastra = new Mastra({
|
|
64
|
+
// ..
|
|
65
|
+
server: {
|
|
66
|
+
experimental_auth: new MastraAuthFirebase({
|
|
67
|
+
serviceAccount: '/path/to/service-account.json',
|
|
68
|
+
databaseId: 'your-database-id'
|
|
69
|
+
}),
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Configuration
|
|
75
|
+
|
|
76
|
+
The `MastraAuthFirebase` class can be configured through constructor options or environment variables.
|
|
77
|
+
|
|
78
|
+
### Environment Variables
|
|
79
|
+
|
|
80
|
+
- `FIREBASE_SERVICE_ACCOUNT`: Path to Firebase service account JSON file
|
|
81
|
+
- `FIRESTORE_DATABASE_ID` or `FIREBASE_DATABASE_ID`: Firestore database ID
|
|
82
|
+
|
|
83
|
+
> **Note:** When constructor options are not provided, the class automatically reads these environment variables. This means you can simply call `new MastraAuthFirebase()` without any arguments if your environment variables are properly configured.
|
|
84
|
+
|
|
85
|
+
### User Authorization
|
|
86
|
+
|
|
87
|
+
By default, `MastraAuthFirebase` uses Firestore to manage user access. It expects a collection named `user_access` with documents keyed by user UIDs. The presence of a document in this collection determines whether a user is authorized.
|
|
88
|
+
|
|
89
|
+
```typescript filename="firestore-structure.txt" copy
|
|
90
|
+
user_access/
|
|
91
|
+
{user_uid_1}/ // Document exists = user authorized
|
|
92
|
+
{user_uid_2}/ // Document exists = user authorized
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
To customize user authorization, provide a custom `authorizeUser` function:
|
|
96
|
+
|
|
97
|
+
```typescript filename="src/mastra/auth.ts" showLineNumbers copy
|
|
98
|
+
import { MastraAuthFirebase } from '@mastra/auth-firebase';
|
|
99
|
+
|
|
100
|
+
const firebaseAuth = new MastraAuthFirebase({
|
|
101
|
+
authorizeUser: async (user) => {
|
|
102
|
+
// Custom authorization logic
|
|
103
|
+
return user.email?.endsWith('@yourcompany.com') || false;
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
> See the [MastraAuthFirebase](/reference/auth/firebase.mdx) API reference for all available configuration options.
|
|
109
|
+
|
|
110
|
+
## Client-side setup
|
|
111
|
+
|
|
112
|
+
When using Firebase auth, you'll need to initialize Firebase on the client side, authenticate users, and retrieve their ID tokens to pass to your Mastra requests.
|
|
113
|
+
|
|
114
|
+
### Setting up Firebase on the client
|
|
115
|
+
|
|
116
|
+
First, initialize Firebase in your client application:
|
|
117
|
+
|
|
118
|
+
```typescript filename="lib/firebase.ts" showLineNumbers copy
|
|
119
|
+
import { initializeApp } from 'firebase/app';
|
|
120
|
+
import { getAuth, GoogleAuthProvider } from 'firebase/auth';
|
|
121
|
+
|
|
122
|
+
const firebaseConfig = {
|
|
123
|
+
apiKey: process.env.NEXT_PUBLIC_FIREBASE_API_KEY,
|
|
124
|
+
authDomain: process.env.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN,
|
|
125
|
+
projectId: process.env.NEXT_PUBLIC_FIREBASE_PROJECT_ID,
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
const app = initializeApp(firebaseConfig);
|
|
129
|
+
export const auth = getAuth(app);
|
|
130
|
+
export const googleProvider = new GoogleAuthProvider();
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Authenticating users and retrieving tokens
|
|
134
|
+
|
|
135
|
+
Use Firebase authentication to sign in users and retrieve their ID tokens:
|
|
136
|
+
|
|
137
|
+
```typescript filename="lib/auth.ts" showLineNumbers copy
|
|
138
|
+
import { signInWithPopup, signOut, User } from 'firebase/auth';
|
|
139
|
+
import { auth, googleProvider } from './firebase';
|
|
140
|
+
|
|
141
|
+
export const signInWithGoogle = async () => {
|
|
142
|
+
try {
|
|
143
|
+
const result = await signInWithPopup(auth, googleProvider);
|
|
144
|
+
return result.user;
|
|
145
|
+
} catch (error) {
|
|
146
|
+
console.error('Error signing in:', error);
|
|
147
|
+
throw error;
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export const getIdToken = async (user: User) => {
|
|
152
|
+
try {
|
|
153
|
+
const idToken = await user.getIdToken();
|
|
154
|
+
return idToken;
|
|
155
|
+
} catch (error) {
|
|
156
|
+
console.error('Error getting ID token:', error);
|
|
157
|
+
throw error;
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
export const signOutUser = async () => {
|
|
162
|
+
try {
|
|
163
|
+
await signOut(auth);
|
|
164
|
+
} catch (error) {
|
|
165
|
+
console.error('Error signing out:', error);
|
|
166
|
+
throw error;
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
> Refer to the [Firebase documentation](https://firebase.google.com/docs/auth) for other authentication methods like email/password, phone authentication, and more.
|
|
172
|
+
|
|
173
|
+
## Configuring `MastraClient`
|
|
174
|
+
|
|
175
|
+
When `experimental_auth` is enabled, all requests made with `MastraClient` must include a valid Firebase ID token in the `Authorization` header:
|
|
176
|
+
|
|
177
|
+
```typescript {6} filename="lib/mastra/mastra-client.ts" showLineNumbers copy
|
|
178
|
+
import { MastraClient } from "@mastra/client-js";
|
|
179
|
+
|
|
180
|
+
export const createMastraClient = (idToken: string) => {
|
|
181
|
+
return new MastraClient({
|
|
182
|
+
baseUrl: "https://<mastra-api-url>",
|
|
183
|
+
headers: {
|
|
184
|
+
Authorization: `Bearer ${idToken}`
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
};
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
> **Note:** The ID token must be prefixed with `Bearer` in the Authorization header.
|
|
191
|
+
|
|
192
|
+
> See [Mastra Client SDK](/docs/server-db/mastra-client.mdx) for more configuration options.
|
|
193
|
+
|
|
194
|
+
### Making authenticated requests
|
|
195
|
+
|
|
196
|
+
Once `MastraClient` is configured with the Firebase ID token, you can send authenticated requests:
|
|
197
|
+
|
|
198
|
+
<Tabs items={["React Component", "Node.js Server", "curl"]}>
|
|
199
|
+
<Tab>
|
|
200
|
+
```tsx filename="src/components/test-agent.tsx" showLineNumbers copy
|
|
201
|
+
"use client";
|
|
202
|
+
|
|
203
|
+
import { useAuthState } from 'react-firebase-hooks/auth';
|
|
204
|
+
import { MastraClient } from "@mastra/client-js";
|
|
205
|
+
import { auth } from '../lib/firebase';
|
|
206
|
+
import { getIdToken } from '../lib/auth';
|
|
207
|
+
|
|
208
|
+
export const TestAgent = () => {
|
|
209
|
+
const [user] = useAuthState(auth);
|
|
210
|
+
|
|
211
|
+
async function handleClick() {
|
|
212
|
+
if (!user) return;
|
|
213
|
+
|
|
214
|
+
const token = await getIdToken(user);
|
|
215
|
+
const client = createMastraClient(token);
|
|
216
|
+
|
|
217
|
+
const weatherAgent = client.getAgent("weatherAgent");
|
|
218
|
+
const response = await weatherAgent.generate({
|
|
219
|
+
messages: "What's the weather like in New York",
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
console.log({ response });
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
return (
|
|
226
|
+
<button onClick={handleClick} disabled={!user}>
|
|
227
|
+
Test Agent
|
|
228
|
+
</button>
|
|
229
|
+
);
|
|
230
|
+
};
|
|
231
|
+
```
|
|
232
|
+
</Tab>
|
|
233
|
+
<Tab>
|
|
234
|
+
```typescript filename="server.js" showLineNumbers copy
|
|
235
|
+
const express = require('express');
|
|
236
|
+
const admin = require('firebase-admin');
|
|
237
|
+
const { MastraClient } = require('@mastra/client-js');
|
|
238
|
+
|
|
239
|
+
// Initialize Firebase Admin
|
|
240
|
+
admin.initializeApp({
|
|
241
|
+
credential: admin.credential.cert({
|
|
242
|
+
// Your service account credentials
|
|
243
|
+
})
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
const app = express();
|
|
247
|
+
app.use(express.json());
|
|
248
|
+
|
|
249
|
+
app.post('/generate', async (req, res) => {
|
|
250
|
+
try {
|
|
251
|
+
const { idToken } = req.body;
|
|
252
|
+
|
|
253
|
+
// Verify the token
|
|
254
|
+
await admin.auth().verifyIdToken(idToken);
|
|
255
|
+
|
|
256
|
+
const mastra = new MastraClient({
|
|
257
|
+
baseUrl: "http://localhost:4111",
|
|
258
|
+
headers: {
|
|
259
|
+
Authorization: `Bearer ${idToken}`
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
const weatherAgent = mastra.getAgent("weatherAgent");
|
|
264
|
+
const response = await weatherAgent.generate({
|
|
265
|
+
messages: "What's the weather like in Nairobi"
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
res.json({ response: response.text });
|
|
269
|
+
} catch (error) {
|
|
270
|
+
res.status(401).json({ error: 'Unauthorized' });
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
```
|
|
274
|
+
</Tab>
|
|
275
|
+
<Tab>
|
|
276
|
+
```bash copy
|
|
277
|
+
curl -X POST http://localhost:4111/api/agents/weatherAgent/generate \
|
|
278
|
+
-H "Content-Type: application/json" \
|
|
279
|
+
-H "Authorization: Bearer <your-firebase-id-token>" \
|
|
280
|
+
-d '{
|
|
281
|
+
"messages": "Weather in London"
|
|
282
|
+
}'
|
|
283
|
+
```
|
|
284
|
+
</Tab>
|
|
285
|
+
</Tabs>
|
package/.docs/raw/auth/index.mdx
CHANGED
|
@@ -12,13 +12,13 @@ You can start with simple shared secret JWT authentication and switch to provide
|
|
|
12
12
|
## Available providers
|
|
13
13
|
|
|
14
14
|
- [JSON Web Token (JWT)](/docs/auth/jwt)
|
|
15
|
+
- [Clerk](/docs/auth/clerk)
|
|
16
|
+
- [Supabase](/docs/auth/supabase)
|
|
17
|
+
- [Firebase](/docs/auth/firebase)
|
|
15
18
|
|
|
16
19
|
### Coming soon
|
|
17
20
|
|
|
18
21
|
The following providers will be available soon:
|
|
19
22
|
|
|
20
|
-
- Supabase Auth
|
|
21
|
-
- Firebase Auth
|
|
22
23
|
- Auth0
|
|
23
|
-
- Clerk
|
|
24
24
|
- WorkOS
|
|
@@ -9,6 +9,13 @@ Mastra offers multiple deployment options to suit your application's needs, from
|
|
|
9
9
|
|
|
10
10
|
## Deployment Options
|
|
11
11
|
|
|
12
|
+
### Runtime support
|
|
13
|
+
|
|
14
|
+
- Node.js `v20.0` or higher
|
|
15
|
+
- Bun
|
|
16
|
+
- Deno
|
|
17
|
+
- [Cloudflare](../deployment/serverless-platforms/cloudflare-deployer.mdx)
|
|
18
|
+
|
|
12
19
|
### Mastra Cloud
|
|
13
20
|
|
|
14
21
|
Mastra Cloud is a deployment platform that connects to your GitHub repository, automatically deploys on code changes, and provides monitoring tools. It includes:
|
|
@@ -21,7 +28,6 @@ Mastra Cloud is a deployment platform that connects to your GitHub repository, a
|
|
|
21
28
|
|
|
22
29
|
[View Mastra Cloud documentation →](../mastra-cloud/overview.mdx)
|
|
23
30
|
|
|
24
|
-
|
|
25
31
|
### With a Web Framework
|
|
26
32
|
|
|
27
33
|
Mastra can be integrated with a variety of web frameworks. For example, see one of the following for a detailed guide.
|