@mastra/server 1.3.0-alpha.1 → 1.3.0

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +90 -0
  2. package/dist/{chunk-WJJ2N3MD.js → chunk-34ZUTBG5.js} +3 -3
  3. package/dist/{chunk-WJJ2N3MD.js.map → chunk-34ZUTBG5.js.map} +1 -1
  4. package/dist/{chunk-2K5PJTWZ.cjs → chunk-3D3V6DJZ.cjs} +3 -3
  5. package/dist/{chunk-2K5PJTWZ.cjs.map → chunk-3D3V6DJZ.cjs.map} +1 -1
  6. package/dist/{chunk-RU45I2GV.cjs → chunk-5FY6WQ5F.cjs} +15 -2
  7. package/dist/chunk-5FY6WQ5F.cjs.map +1 -0
  8. package/dist/{chunk-MATB6BUA.js → chunk-5VYQDYZU.js} +7 -2
  9. package/dist/chunk-5VYQDYZU.js.map +1 -0
  10. package/dist/{chunk-DLPBVTOP.cjs → chunk-GCS4JT32.cjs} +63 -2
  11. package/dist/chunk-GCS4JT32.cjs.map +1 -0
  12. package/dist/{chunk-JNCPFMNB.js → chunk-LHKI5QFK.js} +63 -3
  13. package/dist/chunk-LHKI5QFK.js.map +1 -0
  14. package/dist/{chunk-UIPDSQ3A.cjs → chunk-VJ4X4UWG.cjs} +7 -2
  15. package/dist/chunk-VJ4X4UWG.cjs.map +1 -0
  16. package/dist/{chunk-Y26I6S6T.js → chunk-Y5DXJFUL.js} +15 -2
  17. package/dist/chunk-Y5DXJFUL.js.map +1 -0
  18. package/dist/docs/SKILL.md +1 -1
  19. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  20. package/dist/{observational-memory-TVHT3HP4-XQTGILWN.cjs → observational-memory-LI6QFTRE-OJTY4B6Y.cjs} +69 -4
  21. package/dist/observational-memory-LI6QFTRE-OJTY4B6Y.cjs.map +1 -0
  22. package/dist/{observational-memory-TVHT3HP4-ZVXAPDTZ.js → observational-memory-LI6QFTRE-QRWTE6CR.js} +69 -4
  23. package/dist/observational-memory-LI6QFTRE-QRWTE6CR.js.map +1 -0
  24. package/dist/server/handlers/agent-builder.cjs +16 -16
  25. package/dist/server/handlers/agent-builder.js +1 -1
  26. package/dist/server/handlers/memory.cjs +30 -26
  27. package/dist/server/handlers/memory.d.ts +27 -0
  28. package/dist/server/handlers/memory.d.ts.map +1 -1
  29. package/dist/server/handlers/memory.js +1 -1
  30. package/dist/server/handlers/scores.cjs +7 -7
  31. package/dist/server/handlers/scores.d.ts.map +1 -1
  32. package/dist/server/handlers/scores.js +1 -1
  33. package/dist/server/handlers/stored-scorers.cjs +6 -6
  34. package/dist/server/handlers/stored-scorers.d.ts.map +1 -1
  35. package/dist/server/handlers/stored-scorers.js +1 -1
  36. package/dist/server/handlers.cjs +6 -6
  37. package/dist/server/handlers.js +3 -3
  38. package/dist/server/schemas/memory.d.ts +126 -0
  39. package/dist/server/schemas/memory.d.ts.map +1 -1
  40. package/dist/server/server-adapter/index.cjs +55 -54
  41. package/dist/server/server-adapter/index.cjs.map +1 -1
  42. package/dist/server/server-adapter/index.js +5 -4
  43. package/dist/server/server-adapter/index.js.map +1 -1
  44. package/dist/server/server-adapter/routes/memory.d.ts.map +1 -1
  45. package/package.json +6 -6
  46. package/dist/chunk-DLPBVTOP.cjs.map +0 -1
  47. package/dist/chunk-JNCPFMNB.js.map +0 -1
  48. package/dist/chunk-MATB6BUA.js.map +0 -1
  49. package/dist/chunk-RU45I2GV.cjs.map +0 -1
  50. package/dist/chunk-UIPDSQ3A.cjs.map +0 -1
  51. package/dist/chunk-Y26I6S6T.js.map +0 -1
  52. package/dist/observational-memory-TVHT3HP4-XQTGILWN.cjs.map +0 -1
  53. package/dist/observational-memory-TVHT3HP4-ZVXAPDTZ.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,95 @@
1
1
  # @mastra/server
2
2
 
3
+ ## 1.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - **Added stored scorer CRUD API and updated editor namespace calls** ([#12846](https://github.com/mastra-ai/mastra/pull/12846))
8
+ - Added server routes for stored scorer definitions: create, read, update, delete, list, and list resolved
9
+ - Added `StoredScorer` resource to the client SDK with full CRUD support
10
+ - Updated all server handlers to use the new editor namespace pattern (`editor.agent.getById`, `editor.agent.list`, `editor.prompt.preview`) and generic storage domain methods (`store.create`, `store.getById`, `store.delete`)
11
+
12
+ - Supporting work to allow for cloning agents via the client SDK ([#12796](https://github.com/mastra-ai/mastra/pull/12796))
13
+
14
+ - Update peer dependencies to match core package version bump (1.1.0) ([#12508](https://github.com/mastra-ai/mastra/pull/12508))
15
+
16
+ - Add tool description overrides for stored agents: ([#12794](https://github.com/mastra-ai/mastra/pull/12794))
17
+ - Changed stored agent `tools` field from `string[]` to `Record<string, { description?: string }>` to allow per-tool description overrides
18
+ - When a stored agent specifies a custom `description` for a tool, the override is applied at resolution time
19
+ - Updated server API schemas, client SDK types, and editor resolution logic accordingly
20
+
21
+ ### Patch Changes
22
+
23
+ - Fixed observational memory progress bars resetting to zero after agent responses finish. ([#12934](https://github.com/mastra-ai/mastra/pull/12934))
24
+
25
+ - Fixed issues with stored agents ([#12790](https://github.com/mastra-ai/mastra/pull/12790))
26
+
27
+ - Added `requestContextSchema` and conditional field validation to stored agent API schemas. The stored agent create, update, and version endpoints now accept conditional variants for dynamically-configurable fields (`tools`, `model`, `workflows`, `agents`, `memory`, `scorers`, `inputProcessors`, `outputProcessors`, `defaultOptions`). ([#12896](https://github.com/mastra-ai/mastra/pull/12896))
28
+
29
+ - Fix stored agents functionality: ([#12704](https://github.com/mastra-ai/mastra/pull/12704))
30
+ - Fixed auto-versioning bug where `activeVersionId` wasn't being updated when creating new versions
31
+ - Added `GET /vectors` endpoint to list available vector stores
32
+ - Added `GET /embedders` endpoint to list available embedding models
33
+ - Added validation for memory configuration when semantic recall is enabled
34
+ - Fixed version comparison in `handleAutoVersioning` to use the active version instead of latest
35
+ - Added proper cache clearing after agent updates
36
+
37
+ - Added `POST /stored/agents/preview-instructions` endpoint for resolving instruction blocks against a request context. This enables UI previews of how agent instructions will render with specific variables and rule conditions. Updated Zod schemas to support the new `AgentInstructionBlock` union type (`text, prompt_block_ref, inline prompt_block`) in agent version and stored agent responses. ([#12776](https://github.com/mastra-ai/mastra/pull/12776))
38
+
39
+ - Improved workspace lookup performance while keeping backwards compatibility. ([#12607](https://github.com/mastra-ai/mastra/pull/12607))
40
+
41
+ The workspace handlers now use Mastra's workspace registry (`getWorkspaceById()`) for faster lookup when available, and fall back to iterating through agents for older `@mastra/core` versions.
42
+
43
+ This change is backwards compatible - newer @mastra/server works with both older and newer @mastra/core versions.
44
+
45
+ - Route server errors through Mastra logger instead of console.error ([#12888](https://github.com/mastra-ai/mastra/pull/12888))
46
+
47
+ Server adapter errors (handler errors, parsing errors, auth errors) now use the configured Mastra logger instead of console.error. This ensures errors are properly
48
+ formatted as structured logs and sent to configured transports like HttpTransport.
49
+
50
+ - Fixed Swagger UI not including the API prefix (e.g., `/api`) in request URLs. The OpenAPI spec now includes a servers field with the configured prefix, so Swagger UI correctly generates URLs like `http://localhost:4111/api/agents` instead of `http://localhost:4111/agents`. ([#12847](https://github.com/mastra-ai/mastra/pull/12847))
51
+
52
+ - Fixed sort direction parameters being silently ignored in Thread Messages API when using bracket notation query params (e.g., `orderBy[field]=createdAt&orderBy[direction]=DESC`). The `normalizeQueryParams` function now reconstructs nested objects from bracket-notation keys, so both JSON format and bracket notation work correctly for `orderBy`, `filter`, `metadata`, and other complex query parameters. (Fixes #12816) ([#12832](https://github.com/mastra-ai/mastra/pull/12832))
53
+
54
+ - Supporting work to enable workflow step metadata ([#12508](https://github.com/mastra-ai/mastra/pull/12508))
55
+
56
+ - Made description and instructions required fields in the scorer edit form ([#12897](https://github.com/mastra-ai/mastra/pull/12897))
57
+
58
+ - Added mount metadata to the workspace file listing response. File entries now include provider, icon, display name, and description for mounted filesystems. ([#12851](https://github.com/mastra-ai/mastra/pull/12851))
59
+
60
+ - Added source repository info to workspace skill listings so clients can distinguish identically named skills installed from different repos. ([#12678](https://github.com/mastra-ai/mastra/pull/12678))
61
+
62
+ - Improved error messages when skill installation fails, now showing the actual error instead of a generic message. ([#12605](https://github.com/mastra-ai/mastra/pull/12605))
63
+
64
+ - **Breaking:** Removed `cloneAgent()` from the `Agent` class. Agent cloning is now handled by the editor package via `editor.agent.clone()`. ([#12904](https://github.com/mastra-ai/mastra/pull/12904))
65
+
66
+ If you were calling `agent.cloneAgent()` directly, use the editor's agent namespace instead:
67
+
68
+ ```ts
69
+ // Before
70
+ const result = await agent.cloneAgent({ newId: 'my-clone' });
71
+
72
+ // After
73
+ const editor = mastra.getEditor();
74
+ const result = await editor.agent.clone(agent, { newId: 'my-clone' });
75
+ ```
76
+
77
+ **Why:** The `Agent` class should not be responsible for storage serialization. The editor package already handles converting between runtime agents and stored configurations, so cloning belongs there.
78
+
79
+ **Added** `getConfiguredProcessorIds()` to the `Agent` class, which returns raw input/output processor IDs for the agent's configuration.
80
+
81
+ - Updated dependencies [[`717ffab`](https://github.com/mastra-ai/mastra/commit/717ffab42cfd58ff723b5c19ada4939997773004), [`b31c922`](https://github.com/mastra-ai/mastra/commit/b31c922215b513791d98feaea1b98784aa00803a), [`e4b6dab`](https://github.com/mastra-ai/mastra/commit/e4b6dab171c5960e340b3ea3ea6da8d64d2b8672), [`5719fa8`](https://github.com/mastra-ai/mastra/commit/5719fa8880e86e8affe698ec4b3807c7e0e0a06f), [`83cda45`](https://github.com/mastra-ai/mastra/commit/83cda4523e588558466892bff8f80f631a36945a), [`11804ad`](https://github.com/mastra-ai/mastra/commit/11804adf1d6be46ebe216be40a43b39bb8b397d7), [`aa95f95`](https://github.com/mastra-ai/mastra/commit/aa95f958b186ae5c9f4219c88e268f5565c277a2), [`90f7894`](https://github.com/mastra-ai/mastra/commit/90f7894568dc9481f40a4d29672234fae23090bb), [`f5501ae`](https://github.com/mastra-ai/mastra/commit/f5501aedb0a11106c7db7e480d6eaf3971b7bda8), [`44573af`](https://github.com/mastra-ai/mastra/commit/44573afad0a4bc86f627d6cbc0207961cdcb3bc3), [`00e3861`](https://github.com/mastra-ai/mastra/commit/00e3861863fbfee78faeb1ebbdc7c0223aae13ff), [`8109aee`](https://github.com/mastra-ai/mastra/commit/8109aeeab758e16cd4255a6c36f044b70eefc6a6), [`7bfbc52`](https://github.com/mastra-ai/mastra/commit/7bfbc52a8604feb0fff2c0a082c13c0c2a3df1a2), [`1445994`](https://github.com/mastra-ai/mastra/commit/1445994aee19c9334a6a101cf7bd80ca7ed4d186), [`61f44a2`](https://github.com/mastra-ai/mastra/commit/61f44a26861c89e364f367ff40825bdb7f19df55), [`37145d2`](https://github.com/mastra-ai/mastra/commit/37145d25f99dc31f1a9105576e5452609843ce32), [`fdad759`](https://github.com/mastra-ai/mastra/commit/fdad75939ff008b27625f5ec0ce9c6915d99d9ec), [`e4569c5`](https://github.com/mastra-ai/mastra/commit/e4569c589e00c4061a686c9eb85afe1b7050b0a8), [`7309a85`](https://github.com/mastra-ai/mastra/commit/7309a85427281a8be23f4fb80ca52e18eaffd596), [`99424f6`](https://github.com/mastra-ai/mastra/commit/99424f6862ffb679c4ec6765501486034754a4c2), [`44eb452`](https://github.com/mastra-ai/mastra/commit/44eb4529b10603c279688318bebf3048543a1d61), [`6c40593`](https://github.com/mastra-ai/mastra/commit/6c40593d6d2b1b68b0c45d1a3a4c6ac5ecac3937), [`8c1135d`](https://github.com/mastra-ai/mastra/commit/8c1135dfb91b057283eae7ee11f9ec28753cc64f), [`dd39e54`](https://github.com/mastra-ai/mastra/commit/dd39e54ea34532c995b33bee6e0e808bf41a7341), [`b6fad9a`](https://github.com/mastra-ai/mastra/commit/b6fad9a602182b1cc0df47cd8c55004fa829ad61), [`4129c07`](https://github.com/mastra-ai/mastra/commit/4129c073349b5a66643fd8136ebfe9d7097cf793), [`5b930ab`](https://github.com/mastra-ai/mastra/commit/5b930aba1834d9898e8460a49d15106f31ac7c8d), [`4be93d0`](https://github.com/mastra-ai/mastra/commit/4be93d09d68e20aaf0ea3f210749422719618b5f), [`047635c`](https://github.com/mastra-ai/mastra/commit/047635ccd7861d726c62d135560c0022a5490aec), [`8c90ff4`](https://github.com/mastra-ai/mastra/commit/8c90ff4d3414e7f2a2d216ea91274644f7b29133), [`ed232d1`](https://github.com/mastra-ai/mastra/commit/ed232d1583f403925dc5ae45f7bee948cf2a182b), [`3891795`](https://github.com/mastra-ai/mastra/commit/38917953518eb4154a984ee36e6ededdcfe80f72), [`4f955b2`](https://github.com/mastra-ai/mastra/commit/4f955b20c7f66ed282ee1fd8709696fa64c4f19d), [`55a4c90`](https://github.com/mastra-ai/mastra/commit/55a4c9044ac7454349b9f6aeba0bbab5ee65d10f)]:
82
+ - @mastra/core@1.3.0
83
+
84
+ ## 1.3.0-alpha.2
85
+
86
+ ### Patch Changes
87
+
88
+ - Fixed observational memory progress bars resetting to zero after agent responses finish. The messages and observations sidebar bars now retain their values on stream completion, cancellation, and page reload. Also added a buffer-status endpoint so buffering badges resolve with accurate token counts instead of spinning forever when buffering outlives the stream. ([#12934](https://github.com/mastra-ai/mastra/pull/12934))
89
+
90
+ - Updated dependencies [[`b31c922`](https://github.com/mastra-ai/mastra/commit/b31c922215b513791d98feaea1b98784aa00803a)]:
91
+ - @mastra/core@1.3.0-alpha.2
92
+
3
93
  ## 1.3.0-alpha.1
4
94
 
5
95
  ### Minor Changes
@@ -29011,7 +29011,7 @@ Notes:
29011
29011
  "Observational memory async buffering is enabled by default but the installed version of @mastra/core does not support it. Either upgrade @mastra/core, @mastra/memory, and your storage adapter (@mastra/libsql, @mastra/pg, or @mastra/mongodb) to the latest version, or explicitly disable async buffering by setting `observation: { bufferTokens: false }` in your observationalMemory config."
29012
29012
  );
29013
29013
  }
29014
- const { ObservationalMemory } = await import('./observational-memory-TVHT3HP4-ZVXAPDTZ.js');
29014
+ const { ObservationalMemory } = await import('./observational-memory-LI6QFTRE-QRWTE6CR.js');
29015
29015
  return new ObservationalMemory({
29016
29016
  storage: memoryStore,
29017
29017
  scope: omConfig.scope,
@@ -39912,5 +39912,5 @@ var OBSERVE_STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE = createRoute({
39912
39912
  });
39913
39913
 
39914
39914
  export { CANCEL_AGENT_BUILDER_ACTION_RUN_ROUTE, CREATE_AGENT_BUILDER_ACTION_RUN_ROUTE, GET_AGENT_BUILDER_ACTION_BY_ID_ROUTE, GET_AGENT_BUILDER_ACTION_RUN_BY_ID_ROUTE, LIST_AGENT_BUILDER_ACTIONS_ROUTE, LIST_AGENT_BUILDER_ACTION_RUNS_ROUTE, OBSERVE_STREAM_AGENT_BUILDER_ACTION_ROUTE, OBSERVE_STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE, RESUME_AGENT_BUILDER_ACTION_ROUTE, RESUME_ASYNC_AGENT_BUILDER_ACTION_ROUTE, RESUME_STREAM_AGENT_BUILDER_ACTION_ROUTE, START_AGENT_BUILDER_ACTION_RUN_ROUTE, START_ASYNC_AGENT_BUILDER_ACTION_ROUTE, STREAM_AGENT_BUILDER_ACTION_ROUTE, STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE, agent_builder_exports };
39915
- //# sourceMappingURL=chunk-WJJ2N3MD.js.map
39916
- //# sourceMappingURL=chunk-WJJ2N3MD.js.map
39915
+ //# sourceMappingURL=chunk-34ZUTBG5.js.map
39916
+ //# sourceMappingURL=chunk-34ZUTBG5.js.map