@mastra/client-js 1.52.0 → 1.53.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/dist/index.js CHANGED
@@ -7089,13 +7089,16 @@ var MastraClient = class extends BaseResource {
7089
7089
  * @param threadId - ID of the thread.
7090
7090
  * @param workingMemory - The new working memory content.
7091
7091
  * @param resourceId - Optional ID of the resource.
7092
+ * @param mode - `replace` (default) or `merge` to atomically deep-merge a partial JSON object
7093
+ * into resource-scoped schema working memory (requires storage support, e.g. PostgreSQL).
7092
7094
  */
7093
- updateWorkingMemory({ agentId, threadId, workingMemory, resourceId, requestContext }) {
7095
+ updateWorkingMemory({ agentId, threadId, workingMemory, resourceId, mode, requestContext }) {
7094
7096
  return this.request(`/memory/threads/${threadId}/working-memory?agentId=${agentId}${requestContextQueryString(requestContext, "&")}`, {
7095
7097
  method: "POST",
7096
7098
  body: {
7097
7099
  workingMemory,
7098
- resourceId
7100
+ resourceId,
7101
+ ...mode ? { mode } : {}
7099
7102
  }
7100
7103
  });
7101
7104
  }