@mastra/libsql 1.30.0-alpha.1 → 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.
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +29 -29
- package/dist/index.cjs +24 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +24 -4
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/schedules/index.d.ts.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/vector/index.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/docs/SKILL.md
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.30.0-alpha.
|
|
2
|
+
"version": "1.30.0-alpha.3",
|
|
3
3
|
"package": "@mastra/libsql",
|
|
4
4
|
"exports": {
|
|
5
5
|
"AgentsLibSQL": {
|
|
6
6
|
"types": "dist/storage/domains/agents/index.d.ts",
|
|
7
7
|
"implementation": "dist/index.js",
|
|
8
|
-
"line":
|
|
8
|
+
"line": 2602
|
|
9
9
|
},
|
|
10
10
|
"BackgroundTasksLibSQL": {
|
|
11
11
|
"types": "dist/storage/domains/background-tasks/index.d.ts",
|
|
12
12
|
"implementation": "dist/index.js",
|
|
13
|
-
"line":
|
|
13
|
+
"line": 3436
|
|
14
14
|
},
|
|
15
15
|
"BlobsLibSQL": {
|
|
16
16
|
"types": "dist/storage/domains/blobs/index.d.ts",
|
|
17
17
|
"implementation": "dist/index.js",
|
|
18
|
-
"line":
|
|
18
|
+
"line": 3738
|
|
19
19
|
},
|
|
20
20
|
"ChannelsLibSQL": {
|
|
21
21
|
"types": "dist/storage/domains/channels/index.d.ts",
|
|
22
22
|
"implementation": "dist/index.js",
|
|
23
|
-
"line":
|
|
23
|
+
"line": 3836
|
|
24
24
|
},
|
|
25
25
|
"DatasetsLibSQL": {
|
|
26
26
|
"types": "dist/storage/domains/datasets/index.d.ts",
|
|
27
27
|
"implementation": "dist/index.js",
|
|
28
|
-
"line":
|
|
28
|
+
"line": 4033
|
|
29
29
|
},
|
|
30
30
|
"DefaultStorage": {
|
|
31
31
|
"types": "dist/storage/index.d.ts",
|
|
32
32
|
"implementation": "dist/index.js",
|
|
33
|
-
"line":
|
|
33
|
+
"line": 17363
|
|
34
34
|
},
|
|
35
35
|
"LibSQLStore": {
|
|
36
36
|
"types": "dist/storage/index.d.ts",
|
|
37
37
|
"implementation": "dist/index.js",
|
|
38
|
-
"line":
|
|
38
|
+
"line": 17363
|
|
39
39
|
},
|
|
40
40
|
"ExperimentsLibSQL": {
|
|
41
41
|
"types": "dist/storage/domains/experiments/index.d.ts",
|
|
42
42
|
"implementation": "dist/index.js",
|
|
43
|
-
"line":
|
|
43
|
+
"line": 5295
|
|
44
44
|
},
|
|
45
45
|
"FavoritesLibSQL": {
|
|
46
46
|
"types": "dist/storage/domains/favorites/index.d.ts",
|
|
47
47
|
"implementation": "dist/index.js",
|
|
48
|
-
"line":
|
|
48
|
+
"line": 6154
|
|
49
49
|
},
|
|
50
50
|
"HarnessLibSQL": {
|
|
51
51
|
"types": "dist/storage/domains/harness/index.d.ts",
|
|
52
52
|
"implementation": "dist/index.js",
|
|
53
|
-
"line":
|
|
53
|
+
"line": 6482
|
|
54
54
|
},
|
|
55
55
|
"KnowledgeLibSQL": {
|
|
56
56
|
"types": "dist/storage/domains/knowledge/index.d.ts",
|
|
57
57
|
"implementation": "dist/index.js",
|
|
58
|
-
"line":
|
|
58
|
+
"line": 8143
|
|
59
59
|
},
|
|
60
60
|
"LIBSQL_PROMPT": {
|
|
61
61
|
"types": "dist/vector/prompt.d.ts",
|
|
62
62
|
"implementation": "dist/index.js",
|
|
63
|
-
"line":
|
|
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":
|
|
68
|
+
"line": 17215
|
|
69
69
|
},
|
|
70
70
|
"LibSQLVector": {
|
|
71
71
|
"types": "dist/vector/index.d.ts",
|
|
@@ -75,77 +75,77 @@
|
|
|
75
75
|
"MCPClientsLibSQL": {
|
|
76
76
|
"types": "dist/storage/domains/mcp-clients/index.d.ts",
|
|
77
77
|
"implementation": "dist/index.js",
|
|
78
|
-
"line":
|
|
78
|
+
"line": 8338
|
|
79
79
|
},
|
|
80
80
|
"MCPServersLibSQL": {
|
|
81
81
|
"types": "dist/storage/domains/mcp-servers/index.d.ts",
|
|
82
82
|
"implementation": "dist/index.js",
|
|
83
|
-
"line":
|
|
83
|
+
"line": 8761
|
|
84
84
|
},
|
|
85
85
|
"MemoryLibSQL": {
|
|
86
86
|
"types": "dist/storage/domains/memory/index.d.ts",
|
|
87
87
|
"implementation": "dist/index.js",
|
|
88
|
-
"line":
|
|
88
|
+
"line": 9317
|
|
89
89
|
},
|
|
90
90
|
"NotificationsLibSQL": {
|
|
91
91
|
"types": "dist/storage/domains/notifications/index.d.ts",
|
|
92
92
|
"implementation": "dist/index.js",
|
|
93
|
-
"line":
|
|
93
|
+
"line": 11702
|
|
94
94
|
},
|
|
95
95
|
"ObservabilityLibSQL": {
|
|
96
96
|
"types": "dist/storage/domains/observability/index.d.ts",
|
|
97
97
|
"implementation": "dist/index.js",
|
|
98
|
-
"line":
|
|
98
|
+
"line": 12009
|
|
99
99
|
},
|
|
100
100
|
"PromptBlocksLibSQL": {
|
|
101
101
|
"types": "dist/storage/domains/prompt-blocks/index.d.ts",
|
|
102
102
|
"implementation": "dist/index.js",
|
|
103
|
-
"line":
|
|
103
|
+
"line": 12535
|
|
104
104
|
},
|
|
105
105
|
"SchedulesLibSQL": {
|
|
106
106
|
"types": "dist/storage/domains/schedules/index.d.ts",
|
|
107
107
|
"implementation": "dist/index.js",
|
|
108
|
-
"line":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
148
|
+
"line": 16452
|
|
149
149
|
}
|
|
150
150
|
},
|
|
151
151
|
"modules": {}
|
package/dist/index.cjs
CHANGED
|
@@ -1448,8 +1448,9 @@ var LibSQLVector = class extends _mastra_core_vector.MastraVector {
|
|
|
1448
1448
|
}
|
|
1449
1449
|
}
|
|
1450
1450
|
async _doTruncateIndex({ indexName }) {
|
|
1451
|
+
const parsedIndexName = (0, _mastra_core_utils.parseSqlIdentifier)(indexName, "index name");
|
|
1451
1452
|
await this.turso.execute({
|
|
1452
|
-
sql: `DELETE FROM ${
|
|
1453
|
+
sql: `DELETE FROM ${parsedIndexName} WHERE rowid IS NOT NULL`,
|
|
1453
1454
|
args: []
|
|
1454
1455
|
});
|
|
1455
1456
|
}
|
|
@@ -12990,6 +12991,8 @@ function rowToSchedule(row) {
|
|
|
12990
12991
|
if (metadata !== void 0) schedule.metadata = metadata;
|
|
12991
12992
|
if (row.owner_type != null) schedule.ownerType = String(row.owner_type);
|
|
12992
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);
|
|
12993
12996
|
return schedule;
|
|
12994
12997
|
}
|
|
12995
12998
|
function rowToTrigger(row) {
|
|
@@ -13038,6 +13041,15 @@ var SchedulesLibSQL = class SchedulesLibSQL extends _mastra_core_storage.Schedul
|
|
|
13038
13041
|
tableName: _mastra_core_storage.TABLE_SCHEDULES,
|
|
13039
13042
|
schema: _mastra_core_storage.TABLE_SCHEMAS[_mastra_core_storage.TABLE_SCHEDULES]
|
|
13040
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
|
+
}
|
|
13041
13053
|
await this.#db.createTable({
|
|
13042
13054
|
tableName: _mastra_core_storage.TABLE_SCHEDULE_TRIGGERS,
|
|
13043
13055
|
schema: _mastra_core_storage.TABLE_SCHEMAS[_mastra_core_storage.TABLE_SCHEDULE_TRIGGERS]
|
|
@@ -13131,7 +13143,9 @@ var SchedulesLibSQL = class SchedulesLibSQL extends _mastra_core_storage.Schedul
|
|
|
13131
13143
|
updated_at: schedule.updatedAt,
|
|
13132
13144
|
metadata: schedule.metadata ?? null,
|
|
13133
13145
|
owner_type: schedule.ownerType ?? null,
|
|
13134
|
-
owner_id: schedule.ownerId ?? null
|
|
13146
|
+
owner_id: schedule.ownerId ?? null,
|
|
13147
|
+
run_at: schedule.runAt ?? null,
|
|
13148
|
+
end_at: schedule.endAt ?? null
|
|
13135
13149
|
}
|
|
13136
13150
|
});
|
|
13137
13151
|
return schedule;
|
|
@@ -13223,6 +13237,14 @@ var SchedulesLibSQL = class SchedulesLibSQL extends _mastra_core_storage.Schedul
|
|
|
13223
13237
|
setClauses.push("owner_id = ?");
|
|
13224
13238
|
params.push(patch.ownerId ?? null);
|
|
13225
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
|
+
}
|
|
13226
13248
|
setClauses.push("updated_at = ?");
|
|
13227
13249
|
params.push(Date.now());
|
|
13228
13250
|
params.push(id);
|
|
@@ -16041,8 +16063,6 @@ var WorkflowsLibSQL = class WorkflowsLibSQL extends _mastra_core_storage.Workflo
|
|
|
16041
16063
|
}
|
|
16042
16064
|
async setupPragmaSettings() {
|
|
16043
16065
|
try {
|
|
16044
|
-
await this.#client.execute("PRAGMA busy_timeout = 10000;");
|
|
16045
|
-
this.logger.debug("LibSQL Workflows: PRAGMA busy_timeout=10000 set.");
|
|
16046
16066
|
try {
|
|
16047
16067
|
await this.#client.execute("PRAGMA journal_mode = WAL;");
|
|
16048
16068
|
this.logger.debug("LibSQL Workflows: PRAGMA journal_mode=WAL set.");
|