@mastra/client-js 1.41.0-alpha.13 → 1.41.0-alpha.14
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 +24 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/reference-ai-sdk-to-ai-sdk-messages.md +1 -1
- package/dist/docs/references/reference-ai-sdk-to-ai-sdk-stream.md +1 -1
- package/dist/index.cjs +8 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/resources/agent-controller.d.ts +15 -62
- package/dist/resources/agent-controller.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -5715,9 +5715,11 @@ function hydrateThread(thread) {
|
|
|
5715
5715
|
updatedAt: toDate(thread.updatedAt)
|
|
5716
5716
|
};
|
|
5717
5717
|
}
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5718
|
+
function isKnownParsedEvent(event) {
|
|
5719
|
+
return KNOWN_AGENT_CONTROLLER_EVENT_TYPES.has(event.type);
|
|
5720
|
+
}
|
|
5721
|
+
/** The stream carries every timestamp as an ISO string; give consumers back the `Date`s {@link Hydrated} promises. */
|
|
5722
|
+
function hydrateKnownEvent(event) {
|
|
5721
5723
|
switch (event.type) {
|
|
5722
5724
|
case "message_start":
|
|
5723
5725
|
case "message_update":
|
|
@@ -5732,6 +5734,9 @@ function hydrateEventTimestamps(event) {
|
|
|
5732
5734
|
default: return event;
|
|
5733
5735
|
}
|
|
5734
5736
|
}
|
|
5737
|
+
function hydrateEventTimestamps(event) {
|
|
5738
|
+
return isKnownParsedEvent(event) ? hydrateKnownEvent(event) : event;
|
|
5739
|
+
}
|
|
5735
5740
|
/**
|
|
5736
5741
|
* A session bound to a `resourceId` within one agent controller. Sessions are
|
|
5737
5742
|
* get-or-create on the server, so re-creating the same resourceId (and scope)
|