@mastra/nestjs 0.2.0 → 0.2.1-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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # @mastra/nestjs
2
2
 
3
+ ## 0.2.1-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`7794d71`](https://github.com/mastra-ai/mastra/commit/7794d71872c68733a30e028dfb7b1705daf6c5d2)]:
8
+ - @mastra/core@1.46.0-alpha.1
9
+ - @mastra/server@1.46.0-alpha.1
10
+
11
+ ## 0.2.1-alpha.0
12
+
13
+ ### Patch Changes
14
+
15
+ - Fixed workflow and agent HTTP streams silently dying when a stream chunk contained values that cannot be serialized to JSON (such as BigInt produced by zod coercions in structuredOutput schemas). In Studio this made workflow step nodes appear stuck in the "running" state even though the run completed successfully on the server. ([#17843](https://github.com/mastra-ai/mastra/pull/17843))
16
+
17
+ Unserializable values are now safely converted (BigInt to string, circular references to "[Circular]"). If a chunk still cannot be serialized at all, it is skipped with an error log that includes the route path and reason, instead of killing the stream and dropping all remaining chunks. Fixes [#17821](https://github.com/mastra-ai/mastra/issues/17821)
18
+
19
+ - Updated dependencies [[`5bd72d2`](https://github.com/mastra-ai/mastra/commit/5bd72d255f45b5ea8ab342643bd463814a980a24), [`1cc9ee1`](https://github.com/mastra-ai/mastra/commit/1cc9ee1ba51db53020a735626d33017a60b4b5b3), [`417baae`](https://github.com/mastra-ai/mastra/commit/417baae40b995db5819c845036947f0c27dc1c00), [`74955f9`](https://github.com/mastra-ai/mastra/commit/74955f9120cde8b1d8ce4399232b4033236be858), [`30ebaf0`](https://github.com/mastra-ai/mastra/commit/30ebaf07bed5f4d30f2f257836c15d1bf7e40aae), [`5704634`](https://github.com/mastra-ai/mastra/commit/5704634b22133167dea337a942a34f57aaa3fa14), [`417baae`](https://github.com/mastra-ai/mastra/commit/417baae40b995db5819c845036947f0c27dc1c00), [`74955f9`](https://github.com/mastra-ai/mastra/commit/74955f9120cde8b1d8ce4399232b4033236be858), [`74955f9`](https://github.com/mastra-ai/mastra/commit/74955f9120cde8b1d8ce4399232b4033236be858), [`c0eda2b`](https://github.com/mastra-ai/mastra/commit/c0eda2bcd91a228427314b12c91d8b147f3a739f), [`c0eda2b`](https://github.com/mastra-ai/mastra/commit/c0eda2bcd91a228427314b12c91d8b147f3a739f), [`b13925b`](https://github.com/mastra-ai/mastra/commit/b13925bfa91aa8700f56fa54a9ce707ee7e4ba62), [`bf94ec6`](https://github.com/mastra-ai/mastra/commit/bf94ec68192d9f16e46ef7e5ac36370aeeddf35d), [`a29f371`](https://github.com/mastra-ai/mastra/commit/a29f371aef629ac8562661524a497127e93b5131), [`74955f9`](https://github.com/mastra-ai/mastra/commit/74955f9120cde8b1d8ce4399232b4033236be858), [`073f910`](https://github.com/mastra-ai/mastra/commit/073f910481e7d94b95ba3830f96531774ae95d33), [`ebbe1d3`](https://github.com/mastra-ai/mastra/commit/ebbe1d31a965a3adb0e728758f326b8122b4b55f), [`1f97ce5`](https://github.com/mastra-ai/mastra/commit/1f97ce5695463bebb4eaacf501da6fb403e20885), [`74955f9`](https://github.com/mastra-ai/mastra/commit/74955f9120cde8b1d8ce4399232b4033236be858), [`64f58c0`](https://github.com/mastra-ai/mastra/commit/64f58c04e78b40137497d47f781e897e416f22a5), [`74955f9`](https://github.com/mastra-ai/mastra/commit/74955f9120cde8b1d8ce4399232b4033236be858), [`ebbe1d3`](https://github.com/mastra-ai/mastra/commit/ebbe1d31a965a3adb0e728758f326b8122b4b55f), [`37ab9d3`](https://github.com/mastra-ai/mastra/commit/37ab9d3482cea21388008e522a5c781763832588), [`417baae`](https://github.com/mastra-ai/mastra/commit/417baae40b995db5819c845036947f0c27dc1c00), [`8e25a78`](https://github.com/mastra-ai/mastra/commit/8e25a78e0597575f0b0729bae8c5e190c84869b5), [`417baae`](https://github.com/mastra-ai/mastra/commit/417baae40b995db5819c845036947f0c27dc1c00), [`a5b22d3`](https://github.com/mastra-ai/mastra/commit/a5b22d314d62a68d801886a8d3d0eb6c089473db), [`def2671`](https://github.com/mastra-ai/mastra/commit/def267176e72ebbb28823f7d2c35da3dbf637564), [`ea55a1d`](https://github.com/mastra-ai/mastra/commit/ea55a1d67e656129b74d661a0e06fa274f503aa3), [`417baae`](https://github.com/mastra-ai/mastra/commit/417baae40b995db5819c845036947f0c27dc1c00), [`74955f9`](https://github.com/mastra-ai/mastra/commit/74955f9120cde8b1d8ce4399232b4033236be858), [`74955f9`](https://github.com/mastra-ai/mastra/commit/74955f9120cde8b1d8ce4399232b4033236be858)]:
20
+ - @mastra/core@1.46.0-alpha.0
21
+ - @mastra/server@1.46.0-alpha.0
22
+
3
23
  ## 0.2.0
4
24
 
5
25
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -13005,12 +13005,17 @@ exports.StreamingInterceptor = class _StreamingInterceptor {
13005
13005
  continue;
13006
13006
  }
13007
13007
  const outputValue = shouldRedact ? serverAdapter.redactStreamChunk(value) : value;
13008
+ const serialized = serverAdapter.serializeStreamChunk(outputValue);
13009
+ if (!serialized.ok) {
13010
+ this.logger.error(`Failed to serialize stream chunk, skipping (path: ${response.req?.path}, type: ${outputValue?.type}, error: ${serialized.error.message})`);
13011
+ continue;
13012
+ }
13008
13013
  if (streamFormat === "sse") {
13009
- response.write(`data: ${JSON.stringify(outputValue)}
13014
+ response.write(`data: ${serialized.json}
13010
13015
 
13011
13016
  `);
13012
13017
  } else {
13013
- response.write(JSON.stringify(outputValue) + "");
13018
+ response.write(serialized.json + "");
13014
13019
  }
13015
13020
  }
13016
13021
  }