@mastra/server 0.16.0-alpha.0 → 0.16.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 +11 -0
- package/dist/{chunk-SYTNLFZL.cjs → chunk-I77CGJTZ.cjs} +41 -19
- package/dist/chunk-I77CGJTZ.cjs.map +1 -0
- package/dist/{chunk-WOWRGMZ7.js → chunk-SADDGXIU.js} +41 -19
- package/dist/{chunk-SYTNLFZL.cjs.map → chunk-SADDGXIU.js.map} +1 -1
- package/dist/server/handlers/agent-builder.cjs +16 -16
- package/dist/server/handlers/agent-builder.js +1 -1
- package/dist/server/handlers.cjs +2 -2
- package/dist/server/handlers.js +1 -1
- package/package.json +5 -5
- package/dist/chunk-WOWRGMZ7.js.map +0 -1
|
@@ -8578,23 +8578,45 @@ var Memory = class extends MastraMemory {
|
|
|
8578
8578
|
})
|
|
8579
8579
|
);
|
|
8580
8580
|
}
|
|
8581
|
-
|
|
8582
|
-
|
|
8583
|
-
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
|
|
8587
|
-
|
|
8588
|
-
|
|
8589
|
-
|
|
8590
|
-
|
|
8591
|
-
|
|
8592
|
-
|
|
8593
|
-
|
|
8594
|
-
|
|
8595
|
-
|
|
8596
|
-
|
|
8597
|
-
|
|
8581
|
+
let rawMessages;
|
|
8582
|
+
if (selectBy?.pagination) {
|
|
8583
|
+
const paginatedResult = await this.storage.getMessagesPaginated({
|
|
8584
|
+
threadId,
|
|
8585
|
+
resourceId,
|
|
8586
|
+
format: "v2",
|
|
8587
|
+
selectBy: {
|
|
8588
|
+
...selectBy,
|
|
8589
|
+
...vectorResults?.length ? {
|
|
8590
|
+
include: vectorResults.map((r) => ({
|
|
8591
|
+
id: r.metadata?.message_id,
|
|
8592
|
+
threadId: r.metadata?.thread_id,
|
|
8593
|
+
withNextMessages: typeof vectorConfig.messageRange === "number" ? vectorConfig.messageRange : vectorConfig.messageRange.after,
|
|
8594
|
+
withPreviousMessages: typeof vectorConfig.messageRange === "number" ? vectorConfig.messageRange : vectorConfig.messageRange.before
|
|
8595
|
+
}))
|
|
8596
|
+
} : {}
|
|
8597
|
+
},
|
|
8598
|
+
threadConfig: config
|
|
8599
|
+
});
|
|
8600
|
+
rawMessages = paginatedResult.messages;
|
|
8601
|
+
} else {
|
|
8602
|
+
rawMessages = await this.storage.getMessages({
|
|
8603
|
+
threadId,
|
|
8604
|
+
resourceId,
|
|
8605
|
+
format: "v2",
|
|
8606
|
+
selectBy: {
|
|
8607
|
+
...selectBy,
|
|
8608
|
+
...vectorResults?.length ? {
|
|
8609
|
+
include: vectorResults.map((r) => ({
|
|
8610
|
+
id: r.metadata?.message_id,
|
|
8611
|
+
threadId: r.metadata?.thread_id,
|
|
8612
|
+
withNextMessages: typeof vectorConfig.messageRange === "number" ? vectorConfig.messageRange : vectorConfig.messageRange.after,
|
|
8613
|
+
withPreviousMessages: typeof vectorConfig.messageRange === "number" ? vectorConfig.messageRange : vectorConfig.messageRange.before
|
|
8614
|
+
}))
|
|
8615
|
+
} : {}
|
|
8616
|
+
},
|
|
8617
|
+
threadConfig: config
|
|
8618
|
+
});
|
|
8619
|
+
}
|
|
8598
8620
|
const list = new MessageList({ threadId, resourceId }).add(rawMessages, "memory");
|
|
8599
8621
|
return {
|
|
8600
8622
|
get messages() {
|
|
@@ -15644,5 +15666,5 @@ var sendAgentBuilderActionRunEventHandler = createAgentBuilderWorkflowHandler(
|
|
|
15644
15666
|
);
|
|
15645
15667
|
|
|
15646
15668
|
export { agent_builder_exports, cancelAgentBuilderActionRunHandler, createAgentBuilderActionRunHandler, getAgentBuilderActionByIdHandler, getAgentBuilderActionRunByIdHandler, getAgentBuilderActionRunExecutionResultHandler, getAgentBuilderActionRunsHandler, getAgentBuilderActionsHandler, resumeAgentBuilderActionHandler, resumeAsyncAgentBuilderActionHandler, sendAgentBuilderActionRunEventHandler, startAgentBuilderActionRunHandler, startAsyncAgentBuilderActionHandler, streamAgentBuilderActionHandler, streamVNextAgentBuilderActionHandler, watchAgentBuilderActionHandler };
|
|
15647
|
-
//# sourceMappingURL=chunk-
|
|
15648
|
-
//# sourceMappingURL=chunk-
|
|
15669
|
+
//# sourceMappingURL=chunk-SADDGXIU.js.map
|
|
15670
|
+
//# sourceMappingURL=chunk-SADDGXIU.js.map
|