@mastra/react 0.1.0-beta.10 → 0.1.0-beta.11

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/dist/index.js CHANGED
@@ -47,7 +47,7 @@ const mapWorkflowStreamChunkToWatchResult = (prev, chunk) => {
47
47
  return {
48
48
  ...prev,
49
49
  status: chunk.payload.workflowStatus,
50
- ...finalStatus === "success" && lastStep?.status === "success" ? { result: lastStep?.output } : finalStatus === "failed" && lastStep?.status === "failed" ? { error: lastStep?.error } : {}
50
+ ...finalStatus === "success" && lastStep?.status === "success" ? { result: lastStep?.output } : finalStatus === "failed" && lastStep?.status === "failed" ? { error: lastStep?.error } : finalStatus === "tripwire" && chunk.payload.tripwire ? { tripwire: chunk.payload.tripwire } : {}
51
51
  };
52
52
  }
53
53
  const { stepCallId, stepName, ...newPayload } = chunk.payload ?? {};
@@ -135,12 +135,17 @@ const toUIMessage = ({ chunk, conversation, metadata }) => {
135
135
  parts: [
136
136
  {
137
137
  type: "text",
138
- text: chunk.payload.tripwireReason
138
+ text: chunk.payload.reason
139
139
  }
140
140
  ],
141
141
  metadata: {
142
142
  ...metadata,
143
- status: "warning"
143
+ status: "tripwire",
144
+ tripwire: {
145
+ retry: chunk.payload.retry,
146
+ tripwirePayload: chunk.payload.metadata,
147
+ processorId: chunk.payload.processorId
148
+ }
144
149
  }
145
150
  };
146
151
  return [...result, newMessage];