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