@mastra/libsql 1.30.0-alpha.2 → 1.30.0-alpha.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.30.0-alpha.2"
6
+ version: "1.30.0-alpha.3"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.30.0-alpha.2",
2
+ "version": "1.30.0-alpha.3",
3
3
  "package": "@mastra/libsql",
4
4
  "exports": {
5
5
  "AgentsLibSQL": {
@@ -30,12 +30,12 @@
30
30
  "DefaultStorage": {
31
31
  "types": "dist/storage/index.d.ts",
32
32
  "implementation": "dist/index.js",
33
- "line": 17344
33
+ "line": 17363
34
34
  },
35
35
  "LibSQLStore": {
36
36
  "types": "dist/storage/index.d.ts",
37
37
  "implementation": "dist/index.js",
38
- "line": 17344
38
+ "line": 17363
39
39
  },
40
40
  "ExperimentsLibSQL": {
41
41
  "types": "dist/storage/domains/experiments/index.d.ts",
@@ -60,12 +60,12 @@
60
60
  "LIBSQL_PROMPT": {
61
61
  "types": "dist/vector/prompt.d.ts",
62
62
  "implementation": "dist/index.js",
63
- "line": 17543
63
+ "line": 17562
64
64
  },
65
65
  "LibSQLFactoryStorage": {
66
66
  "types": "dist/storage/factory-storage.d.ts",
67
67
  "implementation": "dist/index.js",
68
- "line": 17196
68
+ "line": 17215
69
69
  },
70
70
  "LibSQLVector": {
71
71
  "types": "dist/vector/index.d.ts",
@@ -105,47 +105,47 @@
105
105
  "SchedulesLibSQL": {
106
106
  "types": "dist/storage/domains/schedules/index.d.ts",
107
107
  "implementation": "dist/index.js",
108
- "line": 13011
108
+ "line": 13013
109
109
  },
110
110
  "ScorerDefinitionsLibSQL": {
111
111
  "types": "dist/storage/domains/scorer-definitions/index.d.ts",
112
112
  "implementation": "dist/index.js",
113
- "line": 13309
113
+ "line": 13330
114
114
  },
115
115
  "ScoresLibSQL": {
116
116
  "types": "dist/storage/domains/scores/index.d.ts",
117
117
  "implementation": "dist/index.js",
118
- "line": 13747
118
+ "line": 13768
119
119
  },
120
120
  "SkillsLibSQL": {
121
121
  "types": "dist/storage/domains/skills/index.d.ts",
122
122
  "implementation": "dist/index.js",
123
- "line": 14089
123
+ "line": 14110
124
124
  },
125
125
  "ThreadStateLibSQL": {
126
126
  "types": "dist/storage/domains/thread-state/index.d.ts",
127
127
  "implementation": "dist/index.js",
128
- "line": 14645
128
+ "line": 14666
129
129
  },
130
130
  "ToolProviderConnectionsLibSQL": {
131
131
  "types": "dist/storage/domains/tool-provider-connections/index.d.ts",
132
132
  "implementation": "dist/index.js",
133
- "line": 14788
133
+ "line": 14809
134
134
  },
135
135
  "WorkflowDefinitionsLibSQL": {
136
136
  "types": "dist/storage/domains/workflow-definitions/index.d.ts",
137
137
  "implementation": "dist/index.js",
138
- "line": 15023
138
+ "line": 15044
139
139
  },
140
140
  "WorkflowsLibSQL": {
141
141
  "types": "dist/storage/domains/workflows/index.d.ts",
142
142
  "implementation": "dist/index.js",
143
- "line": 15381
143
+ "line": 15402
144
144
  },
145
145
  "WorkspacesLibSQL": {
146
146
  "types": "dist/storage/domains/workspaces/index.d.ts",
147
147
  "implementation": "dist/index.js",
148
- "line": 16433
148
+ "line": 16452
149
149
  }
150
150
  },
151
151
  "modules": {}
package/dist/index.cjs CHANGED
@@ -12991,6 +12991,8 @@ function rowToSchedule(row) {
12991
12991
  if (metadata !== void 0) schedule.metadata = metadata;
12992
12992
  if (row.owner_type != null) schedule.ownerType = String(row.owner_type);
12993
12993
  if (row.owner_id != null) schedule.ownerId = String(row.owner_id);
12994
+ if (row.run_at != null) schedule.runAt = toNumber(row.run_at);
12995
+ if (row.end_at != null) schedule.endAt = toNumber(row.end_at);
12994
12996
  return schedule;
12995
12997
  }
12996
12998
  function rowToTrigger(row) {
@@ -13039,6 +13041,15 @@ var SchedulesLibSQL = class SchedulesLibSQL extends _mastra_core_storage.Schedul
13039
13041
  tableName: _mastra_core_storage.TABLE_SCHEDULES,
13040
13042
  schema: _mastra_core_storage.TABLE_SCHEMAS[_mastra_core_storage.TABLE_SCHEDULES]
13041
13043
  });
13044
+ for (const column of ["run_at", "end_at"]) try {
13045
+ await this.#db.alterTable({
13046
+ tableName: _mastra_core_storage.TABLE_SCHEDULES,
13047
+ schema: _mastra_core_storage.TABLE_SCHEMAS[_mastra_core_storage.TABLE_SCHEDULES],
13048
+ ifNotExists: [column]
13049
+ });
13050
+ } catch (error) {
13051
+ if (!await this.#db.hasColumn(_mastra_core_storage.TABLE_SCHEDULES, column)) throw error;
13052
+ }
13042
13053
  await this.#db.createTable({
13043
13054
  tableName: _mastra_core_storage.TABLE_SCHEDULE_TRIGGERS,
13044
13055
  schema: _mastra_core_storage.TABLE_SCHEMAS[_mastra_core_storage.TABLE_SCHEDULE_TRIGGERS]
@@ -13132,7 +13143,9 @@ var SchedulesLibSQL = class SchedulesLibSQL extends _mastra_core_storage.Schedul
13132
13143
  updated_at: schedule.updatedAt,
13133
13144
  metadata: schedule.metadata ?? null,
13134
13145
  owner_type: schedule.ownerType ?? null,
13135
- owner_id: schedule.ownerId ?? null
13146
+ owner_id: schedule.ownerId ?? null,
13147
+ run_at: schedule.runAt ?? null,
13148
+ end_at: schedule.endAt ?? null
13136
13149
  }
13137
13150
  });
13138
13151
  return schedule;
@@ -13224,6 +13237,14 @@ var SchedulesLibSQL = class SchedulesLibSQL extends _mastra_core_storage.Schedul
13224
13237
  setClauses.push("owner_id = ?");
13225
13238
  params.push(patch.ownerId ?? null);
13226
13239
  }
13240
+ if ("runAt" in patch) {
13241
+ setClauses.push("run_at = ?");
13242
+ params.push(patch.runAt ?? null);
13243
+ }
13244
+ if ("endAt" in patch) {
13245
+ setClauses.push("end_at = ?");
13246
+ params.push(patch.endAt ?? null);
13247
+ }
13227
13248
  setClauses.push("updated_at = ?");
13228
13249
  params.push(Date.now());
13229
13250
  params.push(id);
@@ -16042,8 +16063,6 @@ var WorkflowsLibSQL = class WorkflowsLibSQL extends _mastra_core_storage.Workflo
16042
16063
  }
16043
16064
  async setupPragmaSettings() {
16044
16065
  try {
16045
- await this.#client.execute("PRAGMA busy_timeout = 10000;");
16046
- this.logger.debug("LibSQL Workflows: PRAGMA busy_timeout=10000 set.");
16047
16066
  try {
16048
16067
  await this.#client.execute("PRAGMA journal_mode = WAL;");
16049
16068
  this.logger.debug("LibSQL Workflows: PRAGMA journal_mode=WAL set.");