@mastra/libsql 1.26.1-alpha.0 → 1.26.1-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/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-deployment-workers.md +1 -1
- package/dist/docs/references/docs-memory-multi-user-threads.md +1 -1
- package/dist/docs/references/reference-storage-composite.md +34 -0
- package/dist/docs/references/reference-vectors-libsql.md +1 -1
- package/dist/index.cjs +5 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -19
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/factory-storage.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/docs/SKILL.md
CHANGED
|
@@ -146,7 +146,7 @@ Workers are internal infrastructure. They're not exposed to end users and don't
|
|
|
146
146
|
In a split deployment:
|
|
147
147
|
|
|
148
148
|
- **The API server is the only public-facing process**: It serves all client HTTP requests. These requests include REST endpoints and agent interactions, plus workflow triggers and custom routes.
|
|
149
|
-
- **Workers
|
|
149
|
+
- **Workers don't serve client traffic**: They pull events from the distributed PubSub backend and read/write to the shared storage database. Each worker process also listens on `PORT` (default `4111`) for internal health checks. `/health` reports readiness and `/config` returns the worker configuration to authorized callers. Keep this port on the private network.
|
|
150
150
|
- **The orchestration worker calls the API internally**: It sends step execution requests to the API over the container network using `MASTRA_STEP_EXECUTION_URL`. This is internal service-to-service communication, not a public endpoint.
|
|
151
151
|
|
|
152
152
|
All three worker types (orchestration, scheduler, background task) sit behind the API on a private network. They share access to the PubSub backend and storage database but never receive traffic directly from clients. HTTP routes for worker-related features run on the API server rather than the worker process. One example is creating a token for a voice integration.
|
|
@@ -158,7 +158,7 @@ const memory = new Memory({
|
|
|
158
158
|
})
|
|
159
159
|
```
|
|
160
160
|
|
|
161
|
-
OM requires a storage adapter that supports it: `@mastra/libsql`, `@mastra/pg`, `@mastra/mongodb`, or `@mastra/oracledb`.
|
|
161
|
+
OM requires a storage adapter that supports it: `@mastra/libsql`, `@mastra/pg`, `@mastra/mongodb`, `@mastra/mysql`, `@mastra/convex`, or `@mastra/oracledb`.
|
|
162
162
|
|
|
163
163
|
> **Note:** If you switch the Observer to a less capable model and see facts attributed to a generic `User` instead of individual participants, use [`observation.instruction`](https://mastra.ai/reference/memory/observational-memory) to explain how to interpret the `<turn>` tag.
|
|
164
164
|
|
|
@@ -210,6 +210,40 @@ export const mastra = new Mastra({
|
|
|
210
210
|
|
|
211
211
|
**domains.experiments** (`ExperimentsStorage`): Storage for experiment runs and per-item experiment results.
|
|
212
212
|
|
|
213
|
+
**domains.workflowDefinitions** (`WorkflowDefinitionsStorage`): Storage for persisted workflow definitions.
|
|
214
|
+
|
|
215
|
+
**domains.promptBlocks** (`PromptBlocksStorage`): Storage for stored prompt blocks and their versions.
|
|
216
|
+
|
|
217
|
+
**domains.scorerDefinitions** (`ScorerDefinitionsStorage`): Storage for stored scorer definitions and their versions.
|
|
218
|
+
|
|
219
|
+
**domains.mcpClients** (`MCPClientsStorage`): Storage for stored MCP client configurations and their versions.
|
|
220
|
+
|
|
221
|
+
**domains.mcpServers** (`MCPServersStorage`): Storage for stored MCP server configurations and their versions.
|
|
222
|
+
|
|
223
|
+
**domains.workspaces** (`WorkspacesStorage`): Storage for stored workspace configurations and their versions.
|
|
224
|
+
|
|
225
|
+
**domains.skills** (`SkillsStorage`): Storage for stored skill definitions and their versions.
|
|
226
|
+
|
|
227
|
+
**domains.favorites** (`FavoritesStorage`): Storage for user favorites on stored entities.
|
|
228
|
+
|
|
229
|
+
**domains.blobs** (`BlobStore`): Content-addressable storage for file contents used by skill versioning.
|
|
230
|
+
|
|
231
|
+
**domains.backgroundTasks** (`BackgroundTasksStorage`): Storage for background task state.
|
|
232
|
+
|
|
233
|
+
**domains.schedules** (`SchedulesStorage`): Storage for schedules that the scheduler fires.
|
|
234
|
+
|
|
235
|
+
**domains.channels** (`ChannelsStorage`): Storage for channel installations and configuration.
|
|
236
|
+
|
|
237
|
+
**domains.harness** (`HarnessStorage`): Storage for harness sessions.
|
|
238
|
+
|
|
239
|
+
**domains.toolProviderConnections** (`ToolProviderConnectionsStorage`): Storage for authorized tool provider connections.
|
|
240
|
+
|
|
241
|
+
**domains.notifications** (`NotificationsStorage`): Storage for notifications and their delivery state.
|
|
242
|
+
|
|
243
|
+
**domains.threadState** (`ThreadStateStorage`): Storage for per-thread agent state, such as task lists and goals.
|
|
244
|
+
|
|
245
|
+
**domains.knowledge** (`KnowledgeStorage`): Storage for knowledge nodes and records. Experimental.
|
|
246
|
+
|
|
213
247
|
## Initialization
|
|
214
248
|
|
|
215
249
|
`MastraCompositeStore` initializes each configured domain independently. When passed to the Mastra class, `init()` is called automatically:
|
|
@@ -121,7 +121,7 @@ Searches for similar vectors with optional metadata filtering.
|
|
|
121
121
|
|
|
122
122
|
**includeVector** (`boolean`): Whether to include vector data in results (Default: `false`)
|
|
123
123
|
|
|
124
|
-
**minScore** (`number`): Minimum similarity score threshold (Default: `
|
|
124
|
+
**minScore** (`number`): Minimum similarity score threshold (cosine similarity ranges from -1 to 1) (Default: `-1`)
|
|
125
125
|
|
|
126
126
|
### `describeIndex()`
|
|
127
127
|
|
package/dist/index.cjs
CHANGED
|
@@ -15426,25 +15426,12 @@ var WorkflowsLibSQL = class WorkflowsLibSQL extends _mastra_core_storage.Workflo
|
|
|
15426
15426
|
sql: `SELECT json(snapshot) as snapshot FROM ${_mastra_core_storage.TABLE_WORKFLOW_SNAPSHOT} WHERE workflow_name = ? AND run_id = ?`,
|
|
15427
15427
|
args: [workflowName, runId]
|
|
15428
15428
|
});
|
|
15429
|
-
|
|
15430
|
-
|
|
15431
|
-
|
|
15432
|
-
activePaths: [],
|
|
15433
|
-
timestamp: Date.now(),
|
|
15434
|
-
suspendedPaths: {},
|
|
15435
|
-
activeStepsPath: {},
|
|
15436
|
-
resumeLabels: {},
|
|
15437
|
-
serializedStepGraph: [],
|
|
15438
|
-
status: "pending",
|
|
15439
|
-
value: {},
|
|
15440
|
-
waitingPaths: {},
|
|
15441
|
-
runId,
|
|
15442
|
-
requestContext: {}
|
|
15443
|
-
};
|
|
15444
|
-
else {
|
|
15445
|
-
const existingSnapshot = existingSnapshotResult.rows[0].snapshot;
|
|
15446
|
-
snapshot = typeof existingSnapshot === "string" ? JSON.parse(existingSnapshot) : existingSnapshot;
|
|
15429
|
+
if (!existingSnapshotResult.rows?.[0]) {
|
|
15430
|
+
await tx.rollback();
|
|
15431
|
+
return {};
|
|
15447
15432
|
}
|
|
15433
|
+
const existingSnapshot = existingSnapshotResult.rows[0].snapshot;
|
|
15434
|
+
const snapshot = typeof existingSnapshot === "string" ? JSON.parse(existingSnapshot) : existingSnapshot;
|
|
15448
15435
|
(0, _mastra_core_storage.mergeWorkflowStepResult)({
|
|
15449
15436
|
snapshot,
|
|
15450
15437
|
stepId,
|
|
@@ -16480,7 +16467,6 @@ var LibSQLFactoryStorage = class extends _mastra_core_storage.FactoryStorage {
|
|
|
16480
16467
|
}
|
|
16481
16468
|
async withTransaction(fn) {
|
|
16482
16469
|
return withClientWriteLock(this.#client, async () => {
|
|
16483
|
-
if (this.#config.url.includes(":memory:")) return fn(new LibSQLFactoryStorageOps(this.#client, this.#schemas, runWithoutWriteLock));
|
|
16484
16470
|
const transaction = await this.#client.transaction("write");
|
|
16485
16471
|
try {
|
|
16486
16472
|
const result = await fn(new LibSQLFactoryStorageOps(transaction, this.#schemas, runWithoutWriteLock));
|