@mastra/libsql 1.22.3-alpha.3 → 1.22.3

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.
@@ -3,7 +3,7 @@ name: mastra-libsql
3
3
  description: Documentation for @mastra/libsql. Use when working with @mastra/libsql APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/libsql"
6
- version: "1.22.3-alpha.3"
6
+ version: "1.22.3"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.22.3-alpha.3",
2
+ "version": "1.22.3",
3
3
  "package": "@mastra/libsql",
4
4
  "exports": {},
5
5
  "modules": {}
@@ -39,6 +39,12 @@ Polls storage for due cron schedules and publishes `workflow.start` events. It's
39
39
 
40
40
  The scheduler reads declarative `schedule` fields from your workflow definitions automatically. See [Scheduled workflows](https://mastra.ai/docs/workflows/scheduled-workflows) for how to declare schedules.
41
41
 
42
+ The scheduler only polls storage once a schedule exists. At boot, a process with no declared schedules runs a single `listSchedules()` check. If that check finds no rows, the poll loop never starts, so idle deployments issue no recurring scheduler queries and can scale to zero.
43
+
44
+ When a schedule is created at runtime, Mastra publishes a wake event on the PubSub backend. Any process running the default worker set starts its scheduler in response, which is how a standalone worker discovers schedules created by the API process. This requires both processes to share the same PubSub backend.
45
+
46
+ To poll from startup regardless of whether schedules exist (for example, when your processes don't share a PubSub backend), set `scheduler: { enabled: true }` on the worker or run it with `MASTRA_WORKERS=scheduler`.
47
+
42
48
  **Don't run more than one scheduler instance.** Multiple schedulers polling the same storage would fire duplicate events for the same schedule.
43
49
 
44
50
  ### Background task worker
@@ -125,7 +125,7 @@ Visit the [Configuration reference](https://mastra.ai/reference/configuration) f
125
125
 
126
126
  **backgroundTasks.defaultRetries** (`RetryConfig`): Default retry configuration.
127
127
 
128
- **scheduler** (`object`): Configure the scheduler worker for cron-driven workflow triggers. Auto-enables when any workflow declares a schedule. See Scheduled workflows.
128
+ **scheduler** (`object`): Configure the scheduler worker for cron-driven workflow triggers. Auto-enables when any workflow declares a schedule, when schedule rows already exist in storage, or when a schedule is created at runtime. Apps that never schedule anything run one listSchedules() check at boot and never poll after that. See Scheduled workflows.
129
129
 
130
130
  **scheduler.enabled** (`boolean`): Explicitly enable or disable the scheduler.
131
131
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/libsql",
3
- "version": "1.22.3-alpha.3",
3
+ "version": "1.22.3",
4
4
  "description": "Libsql provider for Mastra - includes both vector and db storage capabilities",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -31,10 +31,10 @@
31
31
  "tsx": "^4.23.1",
32
32
  "typescript": "^7.0.2",
33
33
  "vitest": "4.1.10",
34
- "@internal/lint": "0.0.129",
35
- "@internal/types-builder": "0.0.104",
36
- "@internal/storage-test-utils": "0.0.125",
37
- "@mastra/core": "1.64.0-alpha.7"
34
+ "@internal/storage-test-utils": "0.0.126",
35
+ "@internal/lint": "0.0.130",
36
+ "@mastra/core": "1.64.0",
37
+ "@internal/types-builder": "0.0.105"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@mastra/core": ">=1.63.1-0 <2.0.0-0"