@voltagent/libsql 2.1.0 → 2.1.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/edge.d.mts +1 -1
- package/dist/edge.d.ts +1 -1
- package/dist/edge.js +17 -0
- package/dist/edge.js.map +1 -1
- package/dist/edge.mjs +17 -0
- package/dist/edge.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -0
- package/dist/index.mjs.map +1 -1
- package/dist/{vector-core-J7BkPuy8.d.mts → vector-core-CMBjkmEw.d.mts} +2 -9
- package/dist/{vector-core-J7BkPuy8.d.ts → vector-core-CMBjkmEw.d.ts} +2 -9
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Logger } from '@voltagent/logger';
|
|
2
|
-
import { L as LibSQLMemoryCore, a as LibSQLMemoryCoreOptions, b as LibSQLObservabilityCore, c as LibSQLObservabilityCoreOptions, d as LibSQLVectorCore, e as LibSQLVectorCoreOptions } from './vector-core-
|
|
2
|
+
import { L as LibSQLMemoryCore, a as LibSQLMemoryCoreOptions, b as LibSQLObservabilityCore, c as LibSQLObservabilityCoreOptions, d as LibSQLVectorCore, e as LibSQLVectorCoreOptions } from './vector-core-CMBjkmEw.mjs';
|
|
3
3
|
import '@libsql/client';
|
|
4
4
|
import '@voltagent/core';
|
|
5
5
|
import 'ai';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Logger } from '@voltagent/logger';
|
|
2
|
-
import { L as LibSQLMemoryCore, a as LibSQLMemoryCoreOptions, b as LibSQLObservabilityCore, c as LibSQLObservabilityCoreOptions, d as LibSQLVectorCore, e as LibSQLVectorCoreOptions } from './vector-core-
|
|
2
|
+
import { L as LibSQLMemoryCore, a as LibSQLMemoryCoreOptions, b as LibSQLObservabilityCore, c as LibSQLObservabilityCoreOptions, d as LibSQLVectorCore, e as LibSQLVectorCoreOptions } from './vector-core-CMBjkmEw.js';
|
|
3
3
|
import '@libsql/client';
|
|
4
4
|
import '@voltagent/core';
|
|
5
5
|
import 'ai';
|
package/dist/index.js
CHANGED
|
@@ -948,6 +948,23 @@ var LibSQLMemoryCore = class {
|
|
|
948
948
|
conditions.push("created_at <= ?");
|
|
949
949
|
args.push(query.to.toISOString());
|
|
950
950
|
}
|
|
951
|
+
if (query.userId) {
|
|
952
|
+
conditions.push("user_id = ?");
|
|
953
|
+
args.push(query.userId);
|
|
954
|
+
}
|
|
955
|
+
if (query.metadata && Object.keys(query.metadata).length > 0) {
|
|
956
|
+
for (const [key, value] of Object.entries(query.metadata)) {
|
|
957
|
+
const escapedKey = key.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
958
|
+
const metadataPath = `$."${escapedKey}"`;
|
|
959
|
+
if (value === null) {
|
|
960
|
+
conditions.push("json_type(metadata, ?) = 'null'");
|
|
961
|
+
args.push(metadataPath);
|
|
962
|
+
continue;
|
|
963
|
+
}
|
|
964
|
+
conditions.push("json_extract(metadata, ?) = json(?)");
|
|
965
|
+
args.push(metadataPath, (0, import_internal.safeStringify)(value));
|
|
966
|
+
}
|
|
967
|
+
}
|
|
951
968
|
let sql = `SELECT * FROM ${workflowStatesTable}`;
|
|
952
969
|
if (conditions.length > 0) {
|
|
953
970
|
sql += ` WHERE ${conditions.join(" AND ")}`;
|