@mastra/mcp-docs-server 0.13.17-alpha.4 → 0.13.17-alpha.6
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 +20 -0
- package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +9 -0
- package/.docs/organized/changelogs/%40mastra%2Fastra.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fauth.md +6 -0
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +10 -10
- 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 +21 -21
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +39 -39
- package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +21 -0
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +15 -15
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +12 -12
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +24 -24
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Ffastembed.md +6 -0
- package/.docs/organized/changelogs/%40mastra%2Ffirecrawl.md +20 -20
- package/.docs/organized/changelogs/%40mastra%2Fgithub.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Flance.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Floggers.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +23 -23
- package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +23 -23
- package/.docs/organized/changelogs/%40mastra%2Fmem0.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +21 -21
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +10 -5
- package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +24 -24
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +13 -13
- package/.docs/organized/changelogs/%40mastra%2Frag.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fragie.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +12 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +20 -20
- package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +10 -10
- 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 +10 -10
- 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 +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +11 -11
- package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +10 -10
- package/.docs/organized/changelogs/create-mastra.md +13 -13
- package/.docs/organized/changelogs/mastra.md +26 -26
- package/.docs/organized/code-examples/assistant-ui.md +1 -1
- package/.docs/organized/code-examples/bird-checker-with-nextjs-and-eval.md +2 -2
- package/.docs/organized/code-examples/heads-up-game.md +32 -56
- package/.docs/raw/getting-started/installation.mdx +2 -7
- package/.docs/raw/getting-started/templates.mdx +2 -7
- package/.docs/raw/memory/working-memory.mdx +17 -17
- package/.docs/raw/observability/ai-tracing.mdx +438 -0
- package/.docs/raw/reference/scorers/noise-sensitivity.mdx +87 -20
- package/.docs/raw/reference/tools/mcp-server.mdx +26 -27
- package/.docs/raw/tools-mcp/mcp-overview.mdx +6 -5
- package/.docs/raw/workflows/suspend-and-resume.mdx +64 -7
- package/CHANGELOG.md +1823 -0
- package/dist/logger.d.ts +5 -1
- package/dist/logger.d.ts.map +1 -1
- package/dist/stdio.js +47 -4
- package/dist/tools/blog.d.ts.map +1 -1
- package/package.json +16 -6
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/voice-openai
|
|
2
2
|
|
|
3
|
+
## 0.11.3-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#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`.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`85ef90b`](https://github.com/mastra-ai/mastra/commit/85ef90bb2cd4ae4df855c7ac175f7d392c55c1bf), [`de3cbc6`](https://github.com/mastra-ai/mastra/commit/de3cbc61079211431bd30487982ea3653517278e)]:
|
|
10
|
+
- @mastra/core@0.15.3-alpha.5
|
|
11
|
+
|
|
3
12
|
## 0.11.2
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -289,14 +298,5 @@
|
|
|
289
298
|
- 63f6b7d: dependencies updates:
|
|
290
299
|
- Updated dependency [`zod@^3.25.57` ↗︎](https://www.npmjs.com/package/zod/v/3.25.57) (from `^3.25.56`, in `dependencies`)
|
|
291
300
|
- Updated dependencies [63f6b7d]
|
|
292
|
-
- Updated dependencies [36f1c36]
|
|
293
|
-
- Updated dependencies [10d352e]
|
|
294
|
-
- Updated dependencies [53d3c37]
|
|
295
|
-
- @mastra/core@0.10.6-alpha.0
|
|
296
|
-
|
|
297
|
-
## 0.10.2
|
|
298
|
-
|
|
299
|
-
### Patch Changes
|
|
300
|
-
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 1224 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/voice-playai
|
|
2
2
|
|
|
3
|
+
## 0.11.3-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#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`.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`85ef90b`](https://github.com/mastra-ai/mastra/commit/85ef90bb2cd4ae4df855c7ac175f7d392c55c1bf), [`de3cbc6`](https://github.com/mastra-ai/mastra/commit/de3cbc61079211431bd30487982ea3653517278e)]:
|
|
10
|
+
- @mastra/core@0.15.3-alpha.5
|
|
11
|
+
|
|
3
12
|
## 0.11.2
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -289,14 +298,5 @@
|
|
|
289
298
|
- f0d559f: Fix peerdeps for alpha channel
|
|
290
299
|
- Updated dependencies [ee77e78]
|
|
291
300
|
- Updated dependencies [592a2db]
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
- Updated dependencies [1e8bb40]
|
|
295
|
-
- Updated dependencies [1b5fc55]
|
|
296
|
-
- Updated dependencies [195c428]
|
|
297
|
-
- Updated dependencies [f73e11b]
|
|
298
|
-
- Updated dependencies [37643b8]
|
|
299
|
-
- Updated dependencies [99fd6cf]
|
|
300
|
-
- Updated dependencies [c5bf1ce]
|
|
301
|
-
|
|
302
|
-
... 1155 more lines hidden. See full changelog in package directory.
|
|
301
|
+
|
|
302
|
+
... 1164 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/voice-sarvam
|
|
2
2
|
|
|
3
|
+
## 0.11.3-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#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`.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`85ef90b`](https://github.com/mastra-ai/mastra/commit/85ef90bb2cd4ae4df855c7ac175f7d392c55c1bf), [`de3cbc6`](https://github.com/mastra-ai/mastra/commit/de3cbc61079211431bd30487982ea3653517278e)]:
|
|
10
|
+
- @mastra/core@0.15.3-alpha.5
|
|
11
|
+
|
|
3
12
|
## 0.11.2
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -289,14 +298,5 @@
|
|
|
289
298
|
- f0d559f: Fix peerdeps for alpha channel
|
|
290
299
|
- Updated dependencies [ee77e78]
|
|
291
300
|
- Updated dependencies [592a2db]
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
- Updated dependencies [1e8bb40]
|
|
295
|
-
- Updated dependencies [1b5fc55]
|
|
296
|
-
- Updated dependencies [195c428]
|
|
297
|
-
- Updated dependencies [f73e11b]
|
|
298
|
-
- Updated dependencies [37643b8]
|
|
299
|
-
- Updated dependencies [99fd6cf]
|
|
300
|
-
- Updated dependencies [c5bf1ce]
|
|
301
|
-
|
|
302
|
-
... 805 more lines hidden. See full changelog in package directory.
|
|
301
|
+
|
|
302
|
+
... 814 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/voice-speechify
|
|
2
2
|
|
|
3
|
+
## 0.11.3-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#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`.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`85ef90b`](https://github.com/mastra-ai/mastra/commit/85ef90bb2cd4ae4df855c7ac175f7d392c55c1bf), [`de3cbc6`](https://github.com/mastra-ai/mastra/commit/de3cbc61079211431bd30487982ea3653517278e)]:
|
|
10
|
+
- @mastra/core@0.15.3-alpha.5
|
|
11
|
+
|
|
3
12
|
## 0.11.2
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -289,14 +298,5 @@
|
|
|
289
298
|
### Patch Changes
|
|
290
299
|
|
|
291
300
|
- 658c295: dependencies updates:
|
|
292
|
-
- Updated dependency [`@speechify/api-sdk@^2.5.4` ↗︎](https://www.npmjs.com/package/@speechify/api-sdk/v/2.5.4) (from `^2.4.1`, in `dependencies`)
|
|
293
|
-
- Updated dependencies [d1ed912]
|
|
294
|
-
- Updated dependencies [f1f1f1b]
|
|
295
|
-
- Updated dependencies [f9816ae]
|
|
296
|
-
- Updated dependencies [82090c1]
|
|
297
|
-
- Updated dependencies [1b443fd]
|
|
298
|
-
- Updated dependencies [ce97900]
|
|
299
|
-
- Updated dependencies [14a2566]
|
|
300
|
-
- @mastra/core@0.10.4-alpha.0
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 1168 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# create-mastra
|
|
2
2
|
|
|
3
|
+
## 0.11.3-alpha.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#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
|
|
8
|
+
|
|
9
|
+
## 0.11.3-alpha.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#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`.
|
|
14
|
+
|
|
3
15
|
## 0.11.3-alpha.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -286,17 +298,5 @@
|
|
|
286
298
|
- a7a836a: Highlight send event button
|
|
287
299
|
- 18ca936: Update rollup config for create-mastra
|
|
288
300
|
|
|
289
|
-
## 0.10.10-alpha.3
|
|
290
|
-
|
|
291
|
-
### Patch Changes
|
|
292
|
-
|
|
293
|
-
- f457d86: reset localstorage when resetting model settings
|
|
294
|
-
- 8722d53: Fix multi modal remaining steps
|
|
295
|
-
|
|
296
|
-
## 0.10.10-alpha.2
|
|
297
|
-
|
|
298
|
-
### Patch Changes
|
|
299
|
-
|
|
300
|
-
- 4219597: add JSON input close to form input
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 1296 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# mastra
|
|
2
2
|
|
|
3
|
+
## 0.11.3-alpha.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#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`
|
|
8
|
+
|
|
9
|
+
- [#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
|
|
10
|
+
|
|
11
|
+
- 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)]:
|
|
12
|
+
- @mastra/core@0.15.3-alpha.6
|
|
13
|
+
- @mastra/mcp@0.11.3-alpha.3
|
|
14
|
+
- @mastra/deployer@0.15.3-alpha.6
|
|
15
|
+
|
|
16
|
+
## 0.11.3-alpha.3
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- [#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`.
|
|
21
|
+
|
|
22
|
+
- 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)]:
|
|
23
|
+
- @mastra/deployer@0.15.3-alpha.5
|
|
24
|
+
- @mastra/core@0.15.3-alpha.5
|
|
25
|
+
- @mastra/loggers@0.10.10-alpha.0
|
|
26
|
+
- @mastra/mcp@0.11.3-alpha.2
|
|
27
|
+
|
|
3
28
|
## 0.11.3-alpha.2
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
|
@@ -273,30 +298,5 @@
|
|
|
273
298
|
### Patch Changes
|
|
274
299
|
|
|
275
300
|
- 36928f0: Use right icon for anthropic in model switcher
|
|
276
|
-
- Updated dependencies [227c7e6]
|
|
277
|
-
- Updated dependencies [fd3a3eb]
|
|
278
|
-
- Updated dependencies [04dcd66]
|
|
279
|
-
- Updated dependencies [a8f129d]
|
|
280
|
-
- @mastra/core@0.14.0-alpha.3
|
|
281
|
-
- @mastra/deployer@0.14.0-alpha.3
|
|
282
|
-
|
|
283
|
-
## 0.10.22-alpha.1
|
|
284
|
-
|
|
285
|
-
### Patch Changes
|
|
286
|
-
|
|
287
|
-
- 8f8409a: Inject analytics instance into create cmd
|
|
288
|
-
- 6313063: Implement model switcher in playground
|
|
289
|
-
- Updated dependencies [895d3b2]
|
|
290
|
-
- Updated dependencies [bca2ba3]
|
|
291
|
-
- Updated dependencies [6faaee5]
|
|
292
|
-
- Updated dependencies [4232b14]
|
|
293
|
-
- Updated dependencies [6313063]
|
|
294
|
-
- Updated dependencies [a89de7e]
|
|
295
|
-
- Updated dependencies [cf4f357]
|
|
296
|
-
- Updated dependencies [a722c0b]
|
|
297
|
-
- Updated dependencies [3b5fec7]
|
|
298
|
-
- Updated dependencies [6dfc4a6]
|
|
299
|
-
- @mastra/mcp@0.10.12-alpha.0
|
|
300
|
-
- @mastra/deployer@0.14.0-alpha.1
|
|
301
301
|
|
|
302
|
-
...
|
|
302
|
+
... 5217 more lines hidden. See full changelog in package directory.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"name": "examples-assistant-ui",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@ai-sdk/openai": "latest",
|
|
7
|
-
"@assistant-ui/react": "0.10.
|
|
7
|
+
"@assistant-ui/react": "0.10.45",
|
|
8
8
|
"@assistant-ui/react-markdown": "^0.10.9",
|
|
9
9
|
"@assistant-ui/react-ui": "^0.1.8",
|
|
10
10
|
"@mastra/client-js": "latest",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "^20.17.57",
|
|
24
|
-
"@types/react": "^
|
|
25
|
-
"@types/react-dom": "^
|
|
24
|
+
"@types/react": "^19.1.12",
|
|
25
|
+
"@types/react-dom": "^19.1.9",
|
|
26
26
|
"eslint": "^9.30.1",
|
|
27
27
|
"eslint-config-next": "15.3.5",
|
|
28
28
|
"postcss": "^8.5.3",
|
|
@@ -126,16 +126,10 @@ export const mastra = new Mastra({
|
|
|
126
126
|
```typescript
|
|
127
127
|
import { createWorkflow, createStep } from '@mastra/core/workflows';
|
|
128
128
|
import { z } from 'zod';
|
|
129
|
-
import { Pool } from 'pg';
|
|
130
|
-
|
|
131
|
-
// PostgreSQL client
|
|
132
|
-
const pool = new Pool({
|
|
133
|
-
connectionString: process.env.DATABASE_URL!,
|
|
134
|
-
});
|
|
135
129
|
|
|
136
130
|
const startStep = createStep({
|
|
137
131
|
id: 'start-step',
|
|
138
|
-
description:
|
|
132
|
+
description: 'Get the name of a famous person',
|
|
139
133
|
inputSchema: z.object({
|
|
140
134
|
start: z.boolean(),
|
|
141
135
|
}),
|
|
@@ -169,7 +163,7 @@ const gameStep = createStep({
|
|
|
169
163
|
userMessage: z.string(),
|
|
170
164
|
}),
|
|
171
165
|
suspendSchema: z.object({
|
|
172
|
-
|
|
166
|
+
suspendResponse: z.string(),
|
|
173
167
|
}),
|
|
174
168
|
outputSchema: z.object({
|
|
175
169
|
famousPerson: z.string(),
|
|
@@ -181,52 +175,36 @@ const gameStep = createStep({
|
|
|
181
175
|
let { famousPerson, guessCount } = inputData;
|
|
182
176
|
const { userMessage } = resumeData ?? {};
|
|
183
177
|
|
|
178
|
+
// Return suspend with message to inform the user
|
|
184
179
|
if (!userMessage) {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
await suspend({
|
|
189
|
-
agentResponse: message,
|
|
180
|
+
return await suspend({
|
|
181
|
+
suspendResponse: "I'm thinking of a famous person. Ask me yes/no questions to figure out who it is!",
|
|
190
182
|
});
|
|
191
|
-
|
|
192
|
-
return { famousPerson, gameWon: false, agentResponse: message, guessCount };
|
|
193
|
-
} else {
|
|
194
|
-
// Check if the user's message is a guess by using the guess verifier agent
|
|
195
|
-
const guessVerifier = mastra.getAgent('guessVerifierAgent');
|
|
196
|
-
const verificationResponse = await guessVerifier.generate(
|
|
197
|
-
[
|
|
198
|
-
{
|
|
199
|
-
role: 'user',
|
|
200
|
-
content: `Actual famous person: ${famousPerson}
|
|
201
|
-
User's guess: "${userMessage}"
|
|
202
|
-
Is this correct?`,
|
|
203
|
-
},
|
|
204
|
-
],
|
|
205
|
-
{
|
|
206
|
-
output: z.object({
|
|
207
|
-
isCorrect: z.boolean(),
|
|
208
|
-
}),
|
|
209
|
-
},
|
|
210
|
-
);
|
|
211
|
-
|
|
212
|
-
const gameWon = verificationResponse.object.isCorrect;
|
|
213
|
-
|
|
214
|
-
// Let the agent handle the user's message (question or guess)
|
|
215
|
-
const agent = mastra.getAgent('gameAgent');
|
|
216
|
-
const response = await agent.generate(`
|
|
217
|
-
The famous person is: ${famousPerson}
|
|
218
|
-
The user asked: "${userMessage}"
|
|
219
|
-
Is this a correct guess: ${gameWon}
|
|
220
|
-
Please respond appropriately.
|
|
221
|
-
`);
|
|
222
|
-
|
|
223
|
-
const agentResponse = response.text;
|
|
224
|
-
|
|
225
|
-
// Increment the guess count
|
|
226
|
-
guessCount++;
|
|
227
|
-
|
|
228
|
-
return { famousPerson, gameWon, agentResponse, guessCount };
|
|
229
183
|
}
|
|
184
|
+
|
|
185
|
+
// Let the agent handle the user's message (question or guess)
|
|
186
|
+
const agent = mastra.getAgent('gameAgent');
|
|
187
|
+
const response = await agent.generate(
|
|
188
|
+
`
|
|
189
|
+
The famous person is: ${famousPerson}
|
|
190
|
+
The user said: "${userMessage}"
|
|
191
|
+
Please respond appropriately. If this is a guess, tell me if it's correct.
|
|
192
|
+
`,
|
|
193
|
+
{
|
|
194
|
+
output: z.object({
|
|
195
|
+
response: z.string(),
|
|
196
|
+
gameWon: z.boolean(),
|
|
197
|
+
}),
|
|
198
|
+
},
|
|
199
|
+
);
|
|
200
|
+
|
|
201
|
+
// Values from structured output object
|
|
202
|
+
const { response: agentResponse, gameWon } = response.object;
|
|
203
|
+
|
|
204
|
+
// Increment the guess count
|
|
205
|
+
guessCount++;
|
|
206
|
+
|
|
207
|
+
return { famousPerson, gameWon, agentResponse, guessCount };
|
|
230
208
|
},
|
|
231
209
|
});
|
|
232
210
|
|
|
@@ -247,11 +225,9 @@ const winStep = createStep({
|
|
|
247
225
|
execute: async ({ inputData }) => {
|
|
248
226
|
const { famousPerson, gameWon, guessCount } = inputData;
|
|
249
227
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
guessCount,
|
|
254
|
-
]);
|
|
228
|
+
console.log('famousPerson: ', famousPerson);
|
|
229
|
+
console.log('gameWon: ', gameWon);
|
|
230
|
+
console.log('guessCount: ', guessCount);
|
|
255
231
|
|
|
256
232
|
return { famousPerson, gameWon, guessCount };
|
|
257
233
|
},
|
|
@@ -39,7 +39,7 @@ This helps users choose their preferred package manager while following the same
|
|
|
39
39
|
All commands achieve the same result - creating a new Mastra project with the interactive setup.
|
|
40
40
|
*/}
|
|
41
41
|
|
|
42
|
-
<Tabs items={["
|
|
42
|
+
<Tabs items={["npm", "yarn", "pnpm", "bun"]}>
|
|
43
43
|
<Tab>
|
|
44
44
|
```bash copy
|
|
45
45
|
npx create-mastra@latest
|
|
@@ -47,12 +47,7 @@ All commands achieve the same result - creating a new Mastra project with the in
|
|
|
47
47
|
</Tab>
|
|
48
48
|
<Tab>
|
|
49
49
|
```bash copy
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
</Tab>
|
|
53
|
-
<Tab>
|
|
54
|
-
```bash copy
|
|
55
|
-
yarn create mastra@latest
|
|
50
|
+
yarn dlx create-mastra@latest
|
|
56
51
|
```
|
|
57
52
|
</Tab>
|
|
58
53
|
<Tab>
|
|
@@ -14,7 +14,7 @@ Templates are pre-built Mastra projects that demonstrate specific use cases and
|
|
|
14
14
|
|
|
15
15
|
Install a template using the `create-mastra` command:
|
|
16
16
|
|
|
17
|
-
<Tabs items={["
|
|
17
|
+
<Tabs items={["npm", "yarn", "pnpm", "bun"]}>
|
|
18
18
|
<Tab>
|
|
19
19
|
```bash copy
|
|
20
20
|
npx create-mastra@latest --template template-name
|
|
@@ -22,12 +22,7 @@ Install a template using the `create-mastra` command:
|
|
|
22
22
|
</Tab>
|
|
23
23
|
<Tab>
|
|
24
24
|
```bash copy
|
|
25
|
-
|
|
26
|
-
```
|
|
27
|
-
</Tab>
|
|
28
|
-
<Tab>
|
|
29
|
-
```bash copy
|
|
30
|
-
yarn create mastra@latest --template template-name
|
|
25
|
+
yarn dlx create-mastra@latest --template template-name
|
|
31
26
|
```
|
|
32
27
|
</Tab>
|
|
33
28
|
<Tab>
|
|
@@ -61,9 +61,9 @@ const memory = new Memory({
|
|
|
61
61
|
enabled: true,
|
|
62
62
|
scope: 'thread', // Default - memory is isolated per thread
|
|
63
63
|
template: `# User Profile
|
|
64
|
-
- **Name**:
|
|
65
|
-
- **Interests**:
|
|
66
|
-
- **Current Goal**:
|
|
64
|
+
- **Name**:
|
|
65
|
+
- **Interests**:
|
|
66
|
+
- **Current Goal**:
|
|
67
67
|
`,
|
|
68
68
|
},
|
|
69
69
|
},
|
|
@@ -87,11 +87,11 @@ const memory = new Memory({
|
|
|
87
87
|
enabled: true,
|
|
88
88
|
scope: 'resource', // Memory persists across all user threads
|
|
89
89
|
template: `# User Profile
|
|
90
|
-
- **Name**:
|
|
91
|
-
- **Location**:
|
|
92
|
-
- **Interests**:
|
|
93
|
-
- **Preferences**:
|
|
94
|
-
- **Long-term Goals**:
|
|
90
|
+
- **Name**:
|
|
91
|
+
- **Location**:
|
|
92
|
+
- **Interests**:
|
|
93
|
+
- **Preferences**:
|
|
94
|
+
- **Long-term Goals**:
|
|
95
95
|
`,
|
|
96
96
|
},
|
|
97
97
|
},
|
|
@@ -137,23 +137,23 @@ const memory = new Memory({
|
|
|
137
137
|
enabled: true,
|
|
138
138
|
template: `
|
|
139
139
|
# User Profile
|
|
140
|
-
|
|
140
|
+
|
|
141
141
|
## Personal Info
|
|
142
|
-
|
|
142
|
+
|
|
143
143
|
- Name:
|
|
144
144
|
- Location:
|
|
145
145
|
- Timezone:
|
|
146
|
-
|
|
146
|
+
|
|
147
147
|
## Preferences
|
|
148
|
-
|
|
148
|
+
|
|
149
149
|
- Communication Style: [e.g., Formal, Casual]
|
|
150
150
|
- Project Goal:
|
|
151
151
|
- Key Deadlines:
|
|
152
152
|
- [Deadline 1]: [Date]
|
|
153
153
|
- [Deadline 2]: [Date]
|
|
154
|
-
|
|
154
|
+
|
|
155
155
|
## Session State
|
|
156
|
-
|
|
156
|
+
|
|
157
157
|
- Last Task Discussed:
|
|
158
158
|
- Open Questions:
|
|
159
159
|
- [Question 1]
|
|
@@ -367,7 +367,7 @@ await memory.updateWorkingMemory({
|
|
|
367
367
|
|
|
368
368
|
## Examples
|
|
369
369
|
|
|
370
|
-
- [
|
|
371
|
-
- [
|
|
372
|
-
- [
|
|
370
|
+
- [Basic working memory](/examples/memory/working-memory-basic)
|
|
371
|
+
- [Working memory with template](/examples/memory/working-memory-template)
|
|
372
|
+
- [Working memory with schema](/examples/memory/working-memory-schema)
|
|
373
373
|
- [Per-resource working memory](https://github.com/mastra-ai/mastra/tree/main/examples/memory-per-resource-example) - Complete example showing resource-scoped memory persistence
|