@mastra/lance 1.5.1 → 1.5.2-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/index.cjs +9 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -18
- package/dist/index.js.map +1 -1
- package/dist/vector/index.d.ts.map +1 -1
- package/package.json +10 -9
package/dist/docs/SKILL.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -8,7 +8,7 @@ let _mastra_core_agent = require("@mastra/core/agent");
|
|
|
8
8
|
let _mastra_core_evals = require("@mastra/core/evals");
|
|
9
9
|
let _mastra_core_vector = require("@mastra/core/vector");
|
|
10
10
|
let _mastra_core_vector_filter = require("@mastra/core/vector/filter");
|
|
11
|
-
|
|
11
|
+
// src/storage/db/utils.ts
|
|
12
12
|
function getPrimaryKeys(tableName) {
|
|
13
13
|
let primaryId = ["id"];
|
|
14
14
|
if (tableName === _mastra_core_storage.TABLE_WORKFLOW_SNAPSHOT) primaryId = ["workflow_name", "run_id"];
|
|
@@ -81,8 +81,7 @@ async function getTableSchema({ tableName, client }) {
|
|
|
81
81
|
}, error);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
|
|
85
|
-
//#region src/storage/db/index.ts
|
|
84
|
+
// src/storage/db/index.ts
|
|
86
85
|
/**
|
|
87
86
|
* Resolves LanceDomainConfig to a LanceDB Connection.
|
|
88
87
|
*/
|
|
@@ -439,8 +438,7 @@ var LanceDB = class extends _mastra_core_base.MastraBase {
|
|
|
439
438
|
}
|
|
440
439
|
}
|
|
441
440
|
};
|
|
442
|
-
|
|
443
|
-
//#region src/storage/domains/background-tasks/index.ts
|
|
441
|
+
// src/storage/domains/background-tasks/index.ts
|
|
444
442
|
function serializeJson(v) {
|
|
445
443
|
if (typeof v === "object" && v != null) return JSON.stringify(v);
|
|
446
444
|
return v ?? void 0;
|
|
@@ -643,8 +641,7 @@ var StoreBackgroundTasksLance = class extends _mastra_core_storage.BackgroundTas
|
|
|
643
641
|
return total;
|
|
644
642
|
}
|
|
645
643
|
};
|
|
646
|
-
|
|
647
|
-
//#region src/storage/domains/memory/index.ts
|
|
644
|
+
// src/storage/domains/memory/index.ts
|
|
648
645
|
var StoreMemoryLance = class extends _mastra_core_storage.MemoryStorage {
|
|
649
646
|
client;
|
|
650
647
|
#db;
|
|
@@ -1374,8 +1371,7 @@ var StoreMemoryLance = class extends _mastra_core_storage.MemoryStorage {
|
|
|
1374
1371
|
throw new Error("Unexpected end of retry loop");
|
|
1375
1372
|
}
|
|
1376
1373
|
};
|
|
1377
|
-
|
|
1378
|
-
//#region src/storage/domains/scores/index.ts
|
|
1374
|
+
// src/storage/domains/scores/index.ts
|
|
1379
1375
|
/** Escapes a value for safe inclusion in a single-quoted Lance SQL string literal. */
|
|
1380
1376
|
function lanceStringLiteral(value) {
|
|
1381
1377
|
return `'${value.replaceAll("'", "''")}'`;
|
|
@@ -1645,8 +1641,7 @@ var StoreScoresLance = class extends _mastra_core_storage.ScoresStorage {
|
|
|
1645
1641
|
}
|
|
1646
1642
|
}
|
|
1647
1643
|
};
|
|
1648
|
-
|
|
1649
|
-
//#region src/storage/domains/workflows/index.ts
|
|
1644
|
+
// src/storage/domains/workflows/index.ts
|
|
1650
1645
|
/**
|
|
1651
1646
|
* Escapes single quotes in SQL string values to prevent SQL injection.
|
|
1652
1647
|
*/
|
|
@@ -1841,8 +1836,7 @@ var StoreWorkflowsLance = class extends _mastra_core_storage.WorkflowsStorage {
|
|
|
1841
1836
|
}
|
|
1842
1837
|
}
|
|
1843
1838
|
};
|
|
1844
|
-
|
|
1845
|
-
//#region src/storage/index.ts
|
|
1839
|
+
// src/storage/index.ts
|
|
1846
1840
|
/**
|
|
1847
1841
|
* LanceDB storage adapter for Mastra.
|
|
1848
1842
|
*
|
|
@@ -1963,8 +1957,7 @@ var LanceStorage = class LanceStorage extends _mastra_core_storage.MastraComposi
|
|
|
1963
1957
|
this.stores = {};
|
|
1964
1958
|
}
|
|
1965
1959
|
};
|
|
1966
|
-
|
|
1967
|
-
//#region src/vector/filter.ts
|
|
1960
|
+
// src/vector/filter.ts
|
|
1968
1961
|
var LanceFilterTranslator = class extends _mastra_core_vector_filter.BaseFilterTranslator {
|
|
1969
1962
|
translate(filter) {
|
|
1970
1963
|
if (!filter || Object.keys(filter).length === 0) return "";
|
|
@@ -2191,8 +2184,7 @@ var LanceFilterTranslator = class extends _mastra_core_vector_filter.BaseFilterT
|
|
|
2191
2184
|
};
|
|
2192
2185
|
}
|
|
2193
2186
|
};
|
|
2194
|
-
|
|
2195
|
-
//#region src/vector/index.ts
|
|
2187
|
+
// src/vector/index.ts
|
|
2196
2188
|
const LANCE_INDEX_FINGERPRINT_KEY = "mastra.index.fingerprint";
|
|
2197
2189
|
const LANCE_INDEX_UUID_KEY = "mastra.index.uuid";
|
|
2198
2190
|
var LanceVectorStore = class LanceVectorStore extends _mastra_core_vector.MastraVector {
|
|
@@ -3181,7 +3173,6 @@ var LanceVectorStore = class LanceVectorStore extends _mastra_core_vector.Mastra
|
|
|
3181
3173
|
}
|
|
3182
3174
|
}
|
|
3183
3175
|
};
|
|
3184
|
-
//#endregion
|
|
3185
3176
|
exports.LanceStorage = LanceStorage;
|
|
3186
3177
|
exports.LanceVectorStore = LanceVectorStore;
|
|
3187
3178
|
exports.StoreBackgroundTasksLance = StoreBackgroundTasksLance;
|