@mastra/deployer 0.1.0-alpha.41 → 0.1.0-alpha.42

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,13 @@
1
1
  # @mastra/deployer
2
2
 
3
+ ## 0.1.0-alpha.42
4
+
5
+ ### Patch Changes
6
+
7
+ - 42a2e69: Fix playground error parsing
8
+ - Updated dependencies [5285356]
9
+ - @mastra/core@0.2.0-alpha.93
10
+
3
11
  ## 0.1.0-alpha.41
4
12
 
5
13
  ### Patch Changes
@@ -2903,18 +2903,14 @@ async function streamGenerateHandler(c2) {
2903
2903
  throw new HTTPException(400, { message: "Messages should be an array" });
2904
2904
  }
2905
2905
  const streamResult = await agent.stream(messages, { threadId, resourceId: resourceid, output });
2906
- const streamResponse = output ? streamResult.toTextStreamResponse() : streamResult.toDataStream({
2906
+ const streamResponse = output ? streamResult.toTextStreamResponse() : streamResult.toDataStreamResponse({
2907
+ sendUsage: true,
2908
+ sendReasoning: true,
2907
2909
  getErrorMessage: (error) => {
2908
2910
  return `An error occurred while processing your request. ${error}`;
2909
2911
  }
2910
2912
  });
2911
- return new Response(streamResponse, {
2912
- headers: {
2913
- "Content-Type": "text/event-stream",
2914
- "content-encoding": "identity",
2915
- "transfer-encoding": "chunked"
2916
- }
2917
- });
2913
+ return streamResponse;
2918
2914
  } catch (error) {
2919
2915
  return handleError(error, "Error streaming from agent");
2920
2916
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/deployer",
3
- "version": "0.1.0-alpha.41",
3
+ "version": "0.1.0-alpha.42",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -51,7 +51,7 @@
51
51
  "rollup-plugin-esbuild": "^6.1.1",
52
52
  "rollup-plugin-node-externals": "^8.0.0",
53
53
  "zod": "^3.24.1",
54
- "@mastra/core": "^0.2.0-alpha.92"
54
+ "@mastra/core": "^0.2.0-alpha.93"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@hono/node-server": "^1.13.7",
@@ -154,19 +154,15 @@ export async function streamGenerateHandler(c: Context): Promise<Response | unde
154
154
 
155
155
  const streamResponse = output
156
156
  ? streamResult.toTextStreamResponse()
157
- : streamResult.toDataStream({
157
+ : streamResult.toDataStreamResponse({
158
+ sendUsage: true,
159
+ sendReasoning: true,
158
160
  getErrorMessage: (error: any) => {
159
161
  return `An error occurred while processing your request. ${error}`;
160
162
  },
161
163
  });
162
164
 
163
- return new Response(streamResponse, {
164
- headers: {
165
- 'Content-Type': 'text/event-stream',
166
- 'content-encoding': 'identity',
167
- 'transfer-encoding': 'chunked',
168
- },
169
- });
165
+ return streamResponse;
170
166
  } catch (error) {
171
167
  return handleError(error, 'Error streaming from agent');
172
168
  }