@mastra/server 1.56.0 → 1.57.0-alpha.1
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/CHANGELOG.md +32 -0
- package/dist/_types/@internal_voice/dist/_types/@internal_core/dist/request-context/index.d.ts +16 -6
- package/dist/_types/@mastra_schema-compat/dist/provider-compats/anthropic.d.ts +1 -0
- package/dist/{dist-Epz-mpJn.js → dist-DRyzA92e.js} +10 -3
- package/dist/dist-DRyzA92e.js.map +1 -0
- package/dist/{dist-CpDWlJbf.cjs → dist-DhFw0bEW.cjs} +10 -3
- package/dist/dist-DhFw0bEW.cjs.map +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-agents-a2a.md +1 -1
- package/dist/route-builder-CIk5k35M.js.map +1 -1
- package/dist/route-builder-CgLVYL1c.cjs.map +1 -1
- package/dist/server/handlers/agent-builder.cjs +1 -1
- package/dist/server/handlers/agent-builder.js +1 -1
- package/dist/server/handlers/error.cjs +9 -0
- package/dist/server/handlers/error.cjs.map +1 -1
- package/dist/server/handlers/error.d.ts.map +1 -1
- package/dist/server/handlers/error.js +9 -0
- package/dist/server/handlers/error.js.map +1 -1
- package/dist/server/handlers/workflows.cjs +14 -0
- package/dist/server/handlers/workflows.cjs.map +1 -1
- package/dist/server/handlers/workflows.d.ts.map +1 -1
- package/dist/server/handlers/workflows.js +14 -0
- package/dist/server/handlers/workflows.js.map +1 -1
- package/dist/server/server-adapter/index.cjs +16 -0
- package/dist/server/server-adapter/index.cjs.map +1 -1
- package/dist/server/server-adapter/index.d.ts +2 -0
- package/dist/server/server-adapter/index.d.ts.map +1 -1
- package/dist/server/server-adapter/index.js +17 -1
- package/dist/server/server-adapter/index.js.map +1 -1
- package/package.json +7 -7
- package/dist/dist-CpDWlJbf.cjs.map +0 -1
- package/dist/dist-Epz-mpJn.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @mastra/server
|
|
2
2
|
|
|
3
|
+
## 1.57.0-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fixed invalid workflow input responses to return HTTP 400 instead of HTTP 500 while preserving schema validation details. ([#20722](https://github.com/mastra-ai/mastra/pull/20722))
|
|
8
|
+
|
|
9
|
+
- Fixed `POST /workflows/:workflowId/stream` restarting a workflow run that had already finished, which could overwrite its stored result. Streaming a finished run now returns `409` instead. Read a finished run's result through `POST /workflows/:workflowId/observe`. ([#20184](https://github.com/mastra-ai/mastra/pull/20184))
|
|
10
|
+
|
|
11
|
+
- Fixed thread-scoped Observational Memory requests without a thread ID to return a clear bad request error instead of an internal server error. ([#20721](https://github.com/mastra-ai/mastra/pull/20721))
|
|
12
|
+
|
|
13
|
+
- Added a clear server warning when a webhook is sent to an agent without a matching channel adapter. No adapter setup is needed for the warning: ([#20489](https://github.com/mastra-ai/mastra/pull/20489))
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
curl -X POST http://localhost:4111/api/agents/support/channels/slack/webhook
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The server keeps the 404 response and logs:
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
Received a Slack webhook, but this agent doesn't have a Slack adapter. Add one to the agent's channels.adapters configuration and restart the server.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [[`89200ba`](https://github.com/mastra-ai/mastra/commit/89200bafa05444bb7949b363ce7b743e29867561), [`c950138`](https://github.com/mastra-ai/mastra/commit/c950138e72e4f317a40187e3800588731ab790ce), [`063c8b2`](https://github.com/mastra-ai/mastra/commit/063c8b2eb14e4e5ca021779bc33e8c3c031c8604), [`f4e964c`](https://github.com/mastra-ai/mastra/commit/f4e964cad57057301d6bed5c55bcdd730175b941), [`1f7bbd7`](https://github.com/mastra-ai/mastra/commit/1f7bbd7785a8d230aad02454ecabeb4a0b2cc96f), [`e47ff36`](https://github.com/mastra-ai/mastra/commit/e47ff36945720f4ee4caa09f6e83514d7d188608), [`fb9a6ac`](https://github.com/mastra-ai/mastra/commit/fb9a6ac11c9560518742ece60b49d6b062845fd3), [`aa2cec8`](https://github.com/mastra-ai/mastra/commit/aa2cec8501f634d51c2f3ebfb3dd3aa7af8d2ca2), [`2adf8eb`](https://github.com/mastra-ai/mastra/commit/2adf8eb4a70ed2b6cff2dd39281496ea0e025fac), [`8264611`](https://github.com/mastra-ai/mastra/commit/8264611510e421b818bc7395dc2ae4d9c2d518b2), [`44fc98b`](https://github.com/mastra-ai/mastra/commit/44fc98b9d1242aa87a3ab44bdce9e9f12c44d8c9), [`0f2ef41`](https://github.com/mastra-ai/mastra/commit/0f2ef4118da022e4f30dac4e9856cc3a8c97671c)]:
|
|
26
|
+
- @mastra/core@1.57.0-alpha.1
|
|
27
|
+
|
|
28
|
+
## 1.56.1-alpha.0
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- Updated dependencies [[`c8002da`](https://github.com/mastra-ai/mastra/commit/c8002da7775c468e2965b6ff5f82045450fa8cb9)]:
|
|
33
|
+
- @mastra/core@1.56.1-alpha.0
|
|
34
|
+
|
|
3
35
|
## 1.56.0
|
|
4
36
|
|
|
5
37
|
### Minor Changes
|
package/dist/_types/@internal_voice/dist/_types/@internal_core/dist/request-context/index.d.ts
CHANGED
|
@@ -133,13 +133,23 @@ declare class RequestContext<Values extends Record<string, any> | unknown = unkn
|
|
|
133
133
|
*/
|
|
134
134
|
private isSerializable;
|
|
135
135
|
/**
|
|
136
|
-
* Custom span serialization
|
|
137
|
-
*
|
|
136
|
+
* Custom span serialization. Exposes the registry *entries* (never the
|
|
137
|
+
* instance's own private fields) so `deepClean` in `@mastra/observability`
|
|
138
|
+
* doesn't walk the runtime-enumerable `registry` Map — which would
|
|
139
|
+
* serialize its raw entries (including bearer tokens) into exported spans.
|
|
138
140
|
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
141
|
+
* Per stored value:
|
|
142
|
+
* - The framework-managed auth token is redacted by key.
|
|
143
|
+
* - Primitives are returned as-is.
|
|
144
|
+
* - Plain objects and arrays are returned by reference so the downstream
|
|
145
|
+
* `deepClean` walks and bounds them — this keeps nested request-context
|
|
146
|
+
* data visible in traces instead of collapsing it to `[object]`.
|
|
147
|
+
* - Every other type (class instances, functions, Map/Set, Date, etc.) is
|
|
148
|
+
* collapsed to `[${typeof value}]` rather than walked, so a class's
|
|
149
|
+
* internals never reach the trace serializer.
|
|
150
|
+
*
|
|
151
|
+
* The plain objects/arrays passed through here MUST still be bounded by a
|
|
152
|
+
* downstream `deepClean` before export.
|
|
143
153
|
*/
|
|
144
154
|
serializeForSpan(): Record<string, unknown>;
|
|
145
155
|
/**
|
|
@@ -10,6 +10,7 @@ export declare class AnthropicSchemaCompatLayer extends SchemaCompatLayer {
|
|
|
10
10
|
#private;
|
|
11
11
|
constructor(model: ModelInformation);
|
|
12
12
|
getSchemaTarget(): Targets | undefined;
|
|
13
|
+
processToJSONSchema(schema: PublicSchema<any>, io?: 'input' | 'output'): JSONSchema7;
|
|
13
14
|
shouldApply(): boolean;
|
|
14
15
|
processZodType(value: ZodType): ZodType;
|
|
15
16
|
processToAISDKSchema(zodSchema: ZodTypeV3 | ZodTypeV4): import("../_types/@internal_ai-sdk-v4/dist/index.d.ts").Schema<any>;
|
|
@@ -10,6 +10,7 @@ import { ZodFirstPartyTypeKind } from "zod/v3";
|
|
|
10
10
|
import { z as z$2 } from "zod";
|
|
11
11
|
import { MastraMemory, getThreadOMMetadata, parseMemoryRequestContext, setThreadOMMetadata } from "@mastra/core/memory";
|
|
12
12
|
import { Agent, MessageList, isSupportedLanguageModel, tryGenerateWithJsonFallback, tryStreamWithJsonFallback } from "@mastra/core/agent";
|
|
13
|
+
import { ErrorCategory, ErrorDomain, MastraError } from "@mastra/core/error";
|
|
13
14
|
import { ModelRouterLanguageModel, modelSupportsAttachments, resolveModelConfig } from "@mastra/core/llm";
|
|
14
15
|
import { inspect, promisify } from "util";
|
|
15
16
|
import { createHash, randomBytes, randomUUID } from "crypto";
|
|
@@ -5958,7 +5959,7 @@ function splitLines(text) {
|
|
|
5958
5959
|
return result;
|
|
5959
5960
|
}
|
|
5960
5961
|
//#endregion
|
|
5961
|
-
//#region ../memory/dist/src-
|
|
5962
|
+
//#region ../memory/dist/src-DvQWV6nH.js
|
|
5962
5963
|
var __defProp$4 = Object.defineProperty;
|
|
5963
5964
|
var __exportAll = (all, no_symbols) => {
|
|
5964
5965
|
let target = {};
|
|
@@ -30343,7 +30344,13 @@ var ObservationalMemory = class ObservationalMemory {
|
|
|
30343
30344
|
threadId: serialized.memoryInfo.threadId,
|
|
30344
30345
|
resourceId: serialized.memoryInfo.resourceId
|
|
30345
30346
|
};
|
|
30346
|
-
if (this.scope === "thread") throw new
|
|
30347
|
+
if (this.scope === "thread") throw new MastraError({
|
|
30348
|
+
id: "OBSERVATIONAL_MEMORY_THREAD_ID_REQUIRED",
|
|
30349
|
+
domain: ErrorDomain.MASTRA_MEMORY,
|
|
30350
|
+
category: ErrorCategory.USER,
|
|
30351
|
+
details: { status: 400 },
|
|
30352
|
+
text: "ObservationalMemory (scope: 'thread') requires a threadId, but none was found in RequestContext or MessageList. Ensure the agent is configured with Memory and a valid threadId is provided."
|
|
30353
|
+
});
|
|
30347
30354
|
return null;
|
|
30348
30355
|
}
|
|
30349
30356
|
/**
|
|
@@ -44485,4 +44492,4 @@ const agentBuilderWorkflows = {
|
|
|
44485
44492
|
//#endregion
|
|
44486
44493
|
export { agentBuilderWorkflows };
|
|
44487
44494
|
|
|
44488
|
-
//# sourceMappingURL=dist-
|
|
44495
|
+
//# sourceMappingURL=dist-DRyzA92e.js.map
|