@mastra/libsql 1.23.3-alpha.0 → 1.23.4-alpha.0
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/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-memory-overview.md +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +1 -1
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/docs/SKILL.md
CHANGED
|
@@ -212,7 +212,7 @@ To go beyond this default isolation, you can share memory between agents by pass
|
|
|
212
212
|
|
|
213
213
|
When you call agents directly (outside the delegation flow), memory sharing is controlled by two identifiers: `resourceId` and `threadId`. Agents that use the same values read and write to the same data. This is useful when agents collaborate on a shared context, for example, a researcher that saves notes and a writer that reads them.
|
|
214
214
|
|
|
215
|
-
**Resource-scoped sharing** is the most common pattern. [Working memory](https://mastra.ai/docs/memory/working-memory) and [semantic recall](https://mastra.ai/docs/memory/semantic-recall) default to `scope: 'resource'`. If two agents share a `resourceId`, they share
|
|
215
|
+
**Resource-scoped sharing** is the most common pattern. [Working memory](https://mastra.ai/docs/memory/working-memory) and [semantic recall](https://mastra.ai/docs/memory/semantic-recall) default to `scope: 'resource'`. If two agents share a `resourceId`, they share working memory and embeddings, even across different threads:
|
|
216
216
|
|
|
217
217
|
```typescript
|
|
218
218
|
// Both agents share the same resource-scoped memory
|
|
@@ -225,7 +225,7 @@ await writer.generate('Write a summary from the research notes.', {
|
|
|
225
225
|
})
|
|
226
226
|
```
|
|
227
227
|
|
|
228
|
-
Because both calls use `resource: 'project-42'`, the writer can access the researcher's
|
|
228
|
+
Because both calls use `resource: 'project-42'`, the writer can access the researcher's working memory. Semantic embeddings are also shared through the resource. Each agent still has its own thread, so message histories stay separate.
|
|
229
229
|
|
|
230
230
|
**Thread-scoped sharing** gives tighter coupling. [Observational Memory](https://mastra.ai/docs/memory/observational-memory) uses `scope: 'thread'` by default. If two agents use the same `resource` and `thread`, they share the full message history. Each agent sees every message the other has written. This is useful when agents need to build on each other's exact outputs.
|
|
231
231
|
|
package/dist/index.cjs
CHANGED
|
@@ -13528,7 +13528,7 @@ var WorkflowsLibSQL = class WorkflowsLibSQL extends _mastra_core_storage.Workflo
|
|
|
13528
13528
|
}
|
|
13529
13529
|
}, "deleteWorkflowRunById");
|
|
13530
13530
|
}
|
|
13531
|
-
async listWorkflowRuns({ workflowName, fromDate, toDate, page, perPage, resourceId, threadId, status } = {}) {
|
|
13531
|
+
async listWorkflowRuns({ workflowName, fromDate, toDate, page, perPage, resourceId, threadId, status, summary } = {}) {
|
|
13532
13532
|
try {
|
|
13533
13533
|
const conditions = [];
|
|
13534
13534
|
const args = [];
|
|
@@ -13569,7 +13569,7 @@ var WorkflowsLibSQL = class WorkflowsLibSQL extends _mastra_core_storage.Workflo
|
|
|
13569
13569
|
const normalizedPerPage = usePagination ? (0, _mastra_core_storage.normalizePerPage)(perPage, Number.MAX_SAFE_INTEGER) : 0;
|
|
13570
13570
|
const offset = usePagination ? page * normalizedPerPage : 0;
|
|
13571
13571
|
const runs = ((await this.#client.execute({
|
|
13572
|
-
sql: `SELECT workflow_name, run_id, resourceId, json(snapshot) as snapshot, createdAt, updatedAt FROM ${_mastra_core_storage.TABLE_WORKFLOW_SNAPSHOT} ${whereClause} ORDER BY createdAt DESC${usePagination ? ` LIMIT ? OFFSET ?` : ""}`,
|
|
13572
|
+
sql: `SELECT workflow_name, run_id, resourceId, ${summary ? `json_object('status', json_extract(snapshot, '$.status'), 'timestamp', json_extract(snapshot, '$.timestamp'))` : "json(snapshot)"} as snapshot, createdAt, updatedAt FROM ${_mastra_core_storage.TABLE_WORKFLOW_SNAPSHOT} ${whereClause} ORDER BY createdAt DESC${usePagination ? ` LIMIT ? OFFSET ?` : ""}`,
|
|
13573
13573
|
args: usePagination ? [
|
|
13574
13574
|
...args,
|
|
13575
13575
|
normalizedPerPage,
|