@mastra/core 0.2.0-alpha.92 → 0.2.0-alpha.93

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.
@@ -1,662 +1,7 @@
1
- import { MastraVector } from '../../chunk-UCOTMN3J.js';
2
- import { BaseFilterTranslator } from '../../chunk-4LJFWC2Q.js';
1
+ export { DefaultVectorDB, DefaultVectorDB as LibSQLVector } from '../../chunk-F7ILHRX5.js';
2
+ import '../../chunk-HH5JIATB.js';
3
+ import '../../chunk-BOS3IA23.js';
4
+ import '../../chunk-4LJFWC2Q.js';
3
5
  import '../../chunk-G4MCO7XF.js';
4
6
  import '../../chunk-ICMEXHKD.js';
5
- import '../../chunk-BOS3IA23.js';
6
- import { __name, __publicField } from '../../chunk-AJJZUHB4.js';
7
- import { createClient } from '@libsql/client';
8
-
9
- // src/vector/libsql/filter.ts
10
- var _LibSQLFilterTranslator = class _LibSQLFilterTranslator extends BaseFilterTranslator {
11
- getSupportedOperators() {
12
- return {
13
- ...BaseFilterTranslator.DEFAULT_OPERATORS,
14
- regex: [],
15
- custom: [
16
- "$contains",
17
- "$size"
18
- ]
19
- };
20
- }
21
- translate(filter) {
22
- if (this.isEmpty(filter)) {
23
- return filter;
24
- }
25
- this.validateFilter(filter);
26
- return this.translateNode(filter);
27
- }
28
- translateNode(node, currentPath = "") {
29
- if (this.isRegex(node)) {
30
- throw new Error("Direct regex pattern format is not supported in LibSQL");
31
- }
32
- const withPath = /* @__PURE__ */ __name((result2) => currentPath ? {
33
- [currentPath]: result2
34
- } : result2, "withPath");
35
- if (this.isPrimitive(node)) {
36
- return withPath({
37
- $eq: this.normalizeComparisonValue(node)
38
- });
39
- }
40
- if (Array.isArray(node)) {
41
- return withPath({
42
- $in: this.normalizeArrayValues(node)
43
- });
44
- }
45
- const entries = Object.entries(node);
46
- const result = {};
47
- for (const [key, value] of entries) {
48
- const newPath = currentPath ? `${currentPath}.${key}` : key;
49
- if (this.isLogicalOperator(key)) {
50
- result[key] = Array.isArray(value) ? value.map((filter) => this.translateNode(filter)) : this.translateNode(value);
51
- } else if (this.isOperator(key)) {
52
- if (this.isArrayOperator(key) && !Array.isArray(value) && key !== "$elemMatch") {
53
- result[key] = [
54
- value
55
- ];
56
- } else if (this.isBasicOperator(key) && Array.isArray(value)) {
57
- result[key] = JSON.stringify(value);
58
- } else {
59
- result[key] = value;
60
- }
61
- } else if (typeof value === "object" && value !== null) {
62
- const hasOperators = Object.keys(value).some((k) => this.isOperator(k));
63
- if (hasOperators) {
64
- result[newPath] = this.translateNode(value);
65
- } else {
66
- Object.assign(result, this.translateNode(value, newPath));
67
- }
68
- } else {
69
- result[newPath] = this.translateNode(value);
70
- }
71
- }
72
- return result;
73
- }
74
- };
75
- __name(_LibSQLFilterTranslator, "LibSQLFilterTranslator");
76
- var LibSQLFilterTranslator = _LibSQLFilterTranslator;
77
-
78
- // src/vector/libsql/sql-builder.ts
79
- var createBasicOperator = /* @__PURE__ */ __name((symbol) => {
80
- return (key) => ({
81
- sql: `CASE
82
- WHEN ? IS NULL THEN json_extract(metadata, '$."${handleKey(key)}"') IS ${symbol === "=" ? "" : "NOT"} NULL
83
- ELSE json_extract(metadata, '$."${handleKey(key)}"') ${symbol} ?
84
- END`,
85
- needsValue: true,
86
- transformValue: /* @__PURE__ */ __name((value) => {
87
- return [
88
- value,
89
- value
90
- ];
91
- }, "transformValue")
92
- });
93
- }, "createBasicOperator");
94
- var createNumericOperator = /* @__PURE__ */ __name((symbol) => {
95
- return (key) => ({
96
- sql: `CAST(json_extract(metadata, '$."${handleKey(key)}"') AS NUMERIC) ${symbol} ?`,
97
- needsValue: true
98
- });
99
- }, "createNumericOperator");
100
- var validateJsonArray = /* @__PURE__ */ __name((key) => `json_valid(json_extract(metadata, '$."${handleKey(key)}"'))
101
- AND json_type(json_extract(metadata, '$."${handleKey(key)}"')) = 'array'`, "validateJsonArray");
102
- var FILTER_OPERATORS = {
103
- $eq: createBasicOperator("="),
104
- $ne: createBasicOperator("!="),
105
- $gt: createNumericOperator(">"),
106
- $gte: createNumericOperator(">="),
107
- $lt: createNumericOperator("<"),
108
- $lte: createNumericOperator("<="),
109
- // Array Operators
110
- $in: /* @__PURE__ */ __name((key, value) => ({
111
- sql: `json_extract(metadata, '$."${handleKey(key)}"') IN (${value.map(() => "?").join(",")})`,
112
- needsValue: true
113
- }), "$in"),
114
- $nin: /* @__PURE__ */ __name((key, value) => ({
115
- sql: `json_extract(metadata, '$."${handleKey(key)}"') NOT IN (${value.map(() => "?").join(",")})`,
116
- needsValue: true
117
- }), "$nin"),
118
- $all: /* @__PURE__ */ __name((key) => ({
119
- sql: `json_extract(metadata, '$."${handleKey(key)}"') = ?`,
120
- needsValue: true,
121
- transformValue: /* @__PURE__ */ __name((value) => {
122
- const arrayValue = Array.isArray(value) ? value : [
123
- value
124
- ];
125
- if (arrayValue.length === 0) {
126
- return {
127
- sql: "1 = 0",
128
- values: []
129
- };
130
- }
131
- return {
132
- sql: `(
133
- CASE
134
- WHEN ${validateJsonArray(key)} THEN
135
- NOT EXISTS (
136
- SELECT value
137
- FROM json_each(?)
138
- WHERE value NOT IN (
139
- SELECT value
140
- FROM json_each(json_extract(metadata, '$."${handleKey(key)}"'))
141
- )
142
- )
143
- ELSE FALSE
144
- END
145
- )`,
146
- values: [
147
- JSON.stringify(arrayValue)
148
- ]
149
- };
150
- }, "transformValue")
151
- }), "$all"),
152
- $elemMatch: /* @__PURE__ */ __name((key) => ({
153
- sql: `json_extract(metadata, '$."${handleKey(key)}"') = ?`,
154
- needsValue: true,
155
- transformValue: /* @__PURE__ */ __name((value) => {
156
- if (typeof value !== "object" || Array.isArray(value)) {
157
- throw new Error("$elemMatch requires an object with conditions");
158
- }
159
- const conditions = Object.entries(value).map(([field, fieldValue]) => {
160
- if (field.startsWith("$")) {
161
- const { sql, values } = buildCondition("elem.value", {
162
- [field]: fieldValue
163
- });
164
- const pattern = /json_extract\(metadata, '\$\."[^"]*"(\."[^"]*")*'\)/g;
165
- const elemSql = sql.replace(pattern, "elem.value");
166
- return {
167
- sql: elemSql,
168
- values
169
- };
170
- } else if (typeof fieldValue === "object" && !Array.isArray(fieldValue)) {
171
- const { sql, values } = buildCondition(field, fieldValue);
172
- const pattern = /json_extract\(metadata, '\$\."[^"]*"(\."[^"]*")*'\)/g;
173
- const elemSql = sql.replace(pattern, `json_extract(elem.value, '$."${field}"')`);
174
- return {
175
- sql: elemSql,
176
- values
177
- };
178
- } else {
179
- return {
180
- sql: `json_extract(elem.value, '$."${field}"') = ?`,
181
- values: [
182
- fieldValue
183
- ]
184
- };
185
- }
186
- });
187
- return {
188
- sql: `(
189
- CASE
190
- WHEN ${validateJsonArray(key)} THEN
191
- EXISTS (
192
- SELECT 1
193
- FROM json_each(json_extract(metadata, '$."${handleKey(key)}"')) as elem
194
- WHERE ${conditions.map((c) => c.sql).join(" AND ")}
195
- )
196
- ELSE FALSE
197
- END
198
- )`,
199
- values: conditions.flatMap((c) => c.values)
200
- };
201
- }, "transformValue")
202
- }), "$elemMatch"),
203
- // Element Operators
204
- $exists: /* @__PURE__ */ __name((key) => ({
205
- sql: `json_extract(metadata, '$."${handleKey(key)}"') IS NOT NULL`,
206
- needsValue: false
207
- }), "$exists"),
208
- // Logical Operators
209
- $and: /* @__PURE__ */ __name((key) => ({
210
- sql: `(${key})`,
211
- needsValue: false
212
- }), "$and"),
213
- $or: /* @__PURE__ */ __name((key) => ({
214
- sql: `(${key})`,
215
- needsValue: false
216
- }), "$or"),
217
- $not: /* @__PURE__ */ __name((key) => ({
218
- sql: `NOT (${key})`,
219
- needsValue: false
220
- }), "$not"),
221
- $nor: /* @__PURE__ */ __name((key) => ({
222
- sql: `NOT (${key})`,
223
- needsValue: false
224
- }), "$nor"),
225
- $size: /* @__PURE__ */ __name((key, paramIndex) => ({
226
- sql: `(
227
- CASE
228
- WHEN json_type(json_extract(metadata, '$."${handleKey(key)}"')) = 'array' THEN
229
- json_array_length(json_extract(metadata, '$."${handleKey(key)}"')) = $${paramIndex}
230
- ELSE FALSE
231
- END
232
- )`,
233
- needsValue: true
234
- }), "$size"),
235
- // /**
236
- // * Regex Operators
237
- // * Supports case insensitive and multiline
238
- // */
239
- // $regex: (key: string): FilterOperator => ({
240
- // sql: `json_extract(metadata, '$."${handleKey(key)}"') = ?`,
241
- // needsValue: true,
242
- // transformValue: (value: any) => {
243
- // const pattern = typeof value === 'object' ? value.$regex : value;
244
- // const options = typeof value === 'object' ? value.$options || '' : '';
245
- // let sql = `json_extract(metadata, '$."${handleKey(key)}"')`;
246
- // // Handle multiline
247
- // // if (options.includes('m')) {
248
- // // sql = `REPLACE(${sql}, CHAR(10), '\n')`;
249
- // // }
250
- // // let finalPattern = pattern;
251
- // // if (options) {
252
- // // finalPattern = `(\\?${options})${pattern}`;
253
- // // }
254
- // // // Handle case insensitivity
255
- // // if (options.includes('i')) {
256
- // // sql = `LOWER(${sql}) REGEXP LOWER(?)`;
257
- // // } else {
258
- // // sql = `${sql} REGEXP ?`;
259
- // // }
260
- // if (options.includes('m')) {
261
- // sql = `EXISTS (
262
- // SELECT 1
263
- // FROM json_each(
264
- // json_array(
265
- // ${sql},
266
- // REPLACE(${sql}, CHAR(10), CHAR(13))
267
- // )
268
- // ) as lines
269
- // WHERE lines.value REGEXP ?
270
- // )`;
271
- // } else {
272
- // sql = `${sql} REGEXP ?`;
273
- // }
274
- // // Handle case insensitivity
275
- // if (options.includes('i')) {
276
- // sql = sql.replace('REGEXP ?', 'REGEXP LOWER(?)');
277
- // sql = sql.replace('value REGEXP', 'LOWER(value) REGEXP');
278
- // }
279
- // // Handle extended - allows whitespace and comments in pattern
280
- // if (options.includes('x')) {
281
- // // Remove whitespace and comments from pattern
282
- // const cleanPattern = pattern.replace(/\s+|#.*$/gm, '');
283
- // return {
284
- // sql,
285
- // values: [cleanPattern],
286
- // };
287
- // }
288
- // return {
289
- // sql,
290
- // values: [pattern],
291
- // };
292
- // },
293
- // }),
294
- $contains: /* @__PURE__ */ __name((key) => ({
295
- sql: `json_extract(metadata, '$."${handleKey(key)}"') = ?`,
296
- needsValue: true,
297
- transformValue: /* @__PURE__ */ __name((value) => {
298
- if (Array.isArray(value)) {
299
- return {
300
- sql: `(
301
- SELECT ${validateJsonArray(key)}
302
- AND EXISTS (
303
- SELECT 1
304
- FROM json_each(json_extract(metadata, '$."${handleKey(key)}"')) as m
305
- WHERE m.value IN (SELECT value FROM json_each(?))
306
- )
307
- )`,
308
- values: [
309
- JSON.stringify(value)
310
- ]
311
- };
312
- }
313
- if (value && typeof value === "object") {
314
- let traverse2 = function(obj, path = []) {
315
- for (const [k, v] of Object.entries(obj)) {
316
- const currentPath = [
317
- ...path,
318
- k
319
- ];
320
- if (v && typeof v === "object" && !Array.isArray(v)) {
321
- traverse2(v, currentPath);
322
- } else {
323
- paths.push(currentPath.join("."));
324
- values.push(v);
325
- }
326
- }
327
- };
328
- __name(traverse2, "traverse");
329
- const paths = [];
330
- const values = [];
331
- traverse2(value);
332
- return {
333
- sql: `(${paths.map((path) => `json_extract(metadata, '$."${handleKey(key)}"."${path}"') = ?`).join(" AND ")})`,
334
- values
335
- };
336
- }
337
- return value;
338
- }, "transformValue")
339
- }), "$contains")
340
- };
341
- var handleKey = /* @__PURE__ */ __name((key) => {
342
- return key.replace(/\./g, '"."');
343
- }, "handleKey");
344
- function buildFilterQuery(filter) {
345
- if (!filter) {
346
- return {
347
- sql: "",
348
- values: []
349
- };
350
- }
351
- const values = [];
352
- const conditions = Object.entries(filter).map(([key, value]) => {
353
- const condition = buildCondition(key, value);
354
- values.push(...condition.values);
355
- return condition.sql;
356
- }).join(" AND ");
357
- return {
358
- sql: conditions ? `WHERE ${conditions}` : "",
359
- values
360
- };
361
- }
362
- __name(buildFilterQuery, "buildFilterQuery");
363
- function buildCondition(key, value, parentPath) {
364
- if ([
365
- "$and",
366
- "$or",
367
- "$not",
368
- "$nor"
369
- ].includes(key)) {
370
- return handleLogicalOperator(key, value);
371
- }
372
- if (!value || typeof value !== "object") {
373
- return {
374
- sql: `json_extract(metadata, '$."${key.replace(/\./g, '"."')}"') = ?`,
375
- values: [
376
- value
377
- ]
378
- };
379
- }
380
- return handleOperator(key, value);
381
- }
382
- __name(buildCondition, "buildCondition");
383
- function handleLogicalOperator(key, value, parentPath) {
384
- if (!value || value.length === 0) {
385
- switch (key) {
386
- case "$and":
387
- case "$nor":
388
- return {
389
- sql: "true",
390
- values: []
391
- };
392
- case "$or":
393
- return {
394
- sql: "false",
395
- values: []
396
- };
397
- case "$not":
398
- throw new Error("$not operator cannot be empty");
399
- default:
400
- return {
401
- sql: "true",
402
- values: []
403
- };
404
- }
405
- }
406
- if (key === "$not") {
407
- const entries = Object.entries(value);
408
- const conditions2 = entries.map(([fieldKey, fieldValue]) => buildCondition(fieldKey, fieldValue));
409
- return {
410
- sql: `NOT (${conditions2.map((c) => c.sql).join(" AND ")})`,
411
- values: conditions2.flatMap((c) => c.values)
412
- };
413
- }
414
- const values = [];
415
- const joinOperator = key === "$or" || key === "$nor" ? "OR" : "AND";
416
- const conditions = Array.isArray(value) ? value.map((f) => {
417
- const entries = Object.entries(f);
418
- return entries.map(([k, v]) => buildCondition(k, v));
419
- }) : [
420
- buildCondition(key, value)
421
- ];
422
- const joined = conditions.flat().map((c) => {
423
- values.push(...c.values);
424
- return c.sql;
425
- }).join(` ${joinOperator} `);
426
- return {
427
- sql: key === "$nor" ? `NOT (${joined})` : `(${joined})`,
428
- values
429
- };
430
- }
431
- __name(handleLogicalOperator, "handleLogicalOperator");
432
- function handleOperator(key, value) {
433
- if (typeof value === "object" && !Array.isArray(value)) {
434
- const entries = Object.entries(value);
435
- const results = entries.map(([operator2, operatorValue2]) => operator2 === "$not" ? {
436
- sql: `NOT (${Object.entries(operatorValue2).map(([op, val]) => processOperator(key, op, val).sql).join(" AND ")})`,
437
- values: Object.entries(operatorValue2).flatMap(([op, val]) => processOperator(key, op, val).values)
438
- } : processOperator(key, operator2, operatorValue2));
439
- return {
440
- sql: `(${results.map((r) => r.sql).join(" AND ")})`,
441
- values: results.flatMap((r) => r.values)
442
- };
443
- }
444
- const [[operator, operatorValue] = []] = Object.entries(value);
445
- return processOperator(key, operator, operatorValue);
446
- }
447
- __name(handleOperator, "handleOperator");
448
- var processOperator = /* @__PURE__ */ __name((key, operator, operatorValue) => {
449
- if (!operator.startsWith("$") || !FILTER_OPERATORS[operator]) {
450
- throw new Error(`Invalid operator: ${operator}`);
451
- }
452
- const operatorFn = FILTER_OPERATORS[operator];
453
- const operatorResult = operatorFn(key, operatorValue);
454
- if (!operatorResult.needsValue) {
455
- return {
456
- sql: operatorResult.sql,
457
- values: []
458
- };
459
- }
460
- const transformed = operatorResult.transformValue ? operatorResult.transformValue(operatorValue) : operatorValue;
461
- if (transformed && typeof transformed === "object" && "sql" in transformed) {
462
- return transformed;
463
- }
464
- return {
465
- sql: operatorResult.sql,
466
- values: Array.isArray(transformed) ? transformed : [
467
- transformed
468
- ]
469
- };
470
- }, "processOperator");
471
-
472
- // src/vector/libsql/index.ts
473
- var _LibSQLVector = class _LibSQLVector extends MastraVector {
474
- constructor({ connectionUrl, authToken, syncUrl, syncInterval }) {
475
- super();
476
- __publicField(this, "turso");
477
- this.turso = createClient({
478
- url: connectionUrl,
479
- syncUrl,
480
- authToken,
481
- syncInterval
482
- });
483
- }
484
- transformFilter(filter) {
485
- const libsqlFilter = new LibSQLFilterTranslator();
486
- const translatedFilter = libsqlFilter.translate(filter ?? {});
487
- return translatedFilter;
488
- }
489
- async query(indexName, queryVector, topK = 10, filter, includeVector = false, minScore = 0) {
490
- try {
491
- const vectorStr = `[${queryVector.join(",")}]`;
492
- const translatedFilter = this.transformFilter(filter);
493
- const { sql: filterQuery, values: filterValues } = buildFilterQuery(translatedFilter);
494
- filterValues.push(minScore);
495
- const query = `
496
- WITH vector_scores AS (
497
- SELECT
498
- vector_id as id,
499
- (1-vector_distance_cos(embedding, '${vectorStr}')) as score,
500
- metadata
501
- ${includeVector ? ", vector_extract(embedding) as embedding" : ""}
502
- FROM ${indexName}
503
- ${filterQuery}
504
- )
505
- SELECT *
506
- FROM vector_scores
507
- WHERE score > ?
508
- ORDER BY score DESC
509
- LIMIT ${topK}`;
510
- const result = await this.turso.execute({
511
- sql: query,
512
- args: filterValues
513
- });
514
- return result.rows.map(({ id, score, metadata, embedding }) => ({
515
- id,
516
- score,
517
- metadata: JSON.parse(metadata ?? "{}"),
518
- ...includeVector && embedding && {
519
- vector: JSON.parse(embedding)
520
- }
521
- }));
522
- } finally {
523
- }
524
- }
525
- async upsert(indexName, vectors, metadata, ids) {
526
- const tx = await this.turso.transaction("write");
527
- try {
528
- const vectorIds = ids || vectors.map(() => crypto.randomUUID());
529
- for (let i = 0; i < vectors.length; i++) {
530
- const query = `
531
- INSERT INTO ${indexName} (vector_id, embedding, metadata)
532
- VALUES (?, vector32(?), ?)
533
- ON CONFLICT(vector_id) DO UPDATE SET
534
- embedding = vector32(?),
535
- metadata = ?
536
- `;
537
- await tx.execute({
538
- sql: query,
539
- // @ts-ignore
540
- args: [
541
- vectorIds[i],
542
- JSON.stringify(vectors[i]),
543
- JSON.stringify(metadata?.[i] || {}),
544
- JSON.stringify(vectors[i]),
545
- JSON.stringify(metadata?.[i] || {})
546
- ]
547
- });
548
- }
549
- await tx.commit();
550
- return vectorIds;
551
- } catch (error) {
552
- await tx.rollback();
553
- throw error;
554
- }
555
- }
556
- async createIndex(indexName, dimension, _metric = "cosine") {
557
- try {
558
- if (!indexName.match(/^[a-zA-Z_][a-zA-Z0-9_]*$/)) {
559
- throw new Error("Invalid index name format");
560
- }
561
- if (!Number.isInteger(dimension) || dimension <= 0) {
562
- throw new Error("Dimension must be a positive integer");
563
- }
564
- await this.turso.execute({
565
- sql: `
566
- CREATE TABLE IF NOT EXISTS ${indexName} (
567
- id SERIAL PRIMARY KEY,
568
- vector_id TEXT UNIQUE NOT NULL,
569
- embedding F32_BLOB(${dimension}),
570
- metadata TEXT DEFAULT '{}'
571
- );
572
- `,
573
- args: []
574
- });
575
- await this.turso.execute({
576
- sql: `
577
- CREATE INDEX IF NOT EXISTS ${indexName}_vector_idx
578
- ON ${indexName} (libsql_vector_idx(embedding))
579
- `,
580
- args: []
581
- });
582
- } catch (error) {
583
- console.error("Failed to create vector table:", error);
584
- throw error;
585
- } finally {
586
- }
587
- }
588
- async deleteIndex(indexName) {
589
- try {
590
- await this.turso.execute({
591
- sql: `DROP TABLE IF EXISTS ${indexName}`,
592
- args: []
593
- });
594
- } catch (error) {
595
- console.error("Failed to delete vector table:", error);
596
- throw new Error(`Failed to delete vector table: ${error.message}`);
597
- } finally {
598
- }
599
- }
600
- async listIndexes() {
601
- try {
602
- const vectorTablesQuery = `
603
- SELECT name FROM sqlite_master
604
- WHERE type='table'
605
- AND sql LIKE '%F32_BLOB%';
606
- `;
607
- const result = await this.turso.execute({
608
- sql: vectorTablesQuery,
609
- args: []
610
- });
611
- return result.rows.map((row) => row.name);
612
- } catch (error) {
613
- throw new Error(`Failed to list vector tables: ${error.message}`);
614
- }
615
- }
616
- async describeIndex(indexName) {
617
- try {
618
- const tableInfoQuery = `
619
- SELECT sql
620
- FROM sqlite_master
621
- WHERE type='table'
622
- AND name = ?;
623
- `;
624
- const tableInfo = await this.turso.execute({
625
- sql: tableInfoQuery,
626
- args: [
627
- indexName
628
- ]
629
- });
630
- if (!tableInfo.rows[0]?.sql) {
631
- throw new Error(`Table ${indexName} not found`);
632
- }
633
- const dimension = parseInt(tableInfo.rows[0].sql.match(/F32_BLOB\((\d+)\)/)?.[1] || "0");
634
- const countQuery = `
635
- SELECT COUNT(*) as count
636
- FROM ${indexName};
637
- `;
638
- const countResult = await this.turso.execute({
639
- sql: countQuery,
640
- args: []
641
- });
642
- const metric = "cosine";
643
- return {
644
- dimension,
645
- count: countResult?.rows?.[0]?.count ?? 0,
646
- metric
647
- };
648
- } catch (e) {
649
- throw new Error(`Failed to describe vector table: ${e.message}`);
650
- }
651
- }
652
- async truncateIndex(indexName) {
653
- await this.turso.execute({
654
- sql: `DELETE FROM ${indexName}`,
655
- args: []
656
- });
657
- }
658
- };
659
- __name(_LibSQLVector, "LibSQLVector");
660
- var LibSQLVector = _LibSQLVector;
661
-
662
- export { LibSQLVector };
7
+ import '../../chunk-AJJZUHB4.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/core",
3
- "version": "0.2.0-alpha.92",
3
+ "version": "0.2.0-alpha.93",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/core.esm.js",
@@ -1,5 +1,5 @@
1
- import { MastraBase } from './chunk-G4MCO7XF.js';
2
1
  import { embed, embedMany } from './chunk-BOS3IA23.js';
2
+ import { MastraBase } from './chunk-G4MCO7XF.js';
3
3
  import { __name } from './chunk-AJJZUHB4.js';
4
4
 
5
5
  // src/vector/index.ts
@@ -1,8 +1,8 @@
1
- import { executeHook, AvailableHooks } from './chunk-HBTQNIAX.js';
2
1
  import { LLM } from './chunk-RI3ECMVF.js';
3
2
  import { InstrumentClass } from './chunk-6ZVFVYLE.js';
4
3
  import { MastraBase } from './chunk-G4MCO7XF.js';
5
4
  import { RegisteredLogger, LogLevel } from './chunk-ICMEXHKD.js';
5
+ import { executeHook, AvailableHooks } from './chunk-HBTQNIAX.js';
6
6
  import { __name, __publicField, __privateAdd, __privateSet, __privateGet } from './chunk-AJJZUHB4.js';
7
7
  import { randomUUID } from 'crypto';
8
8
  import { z } from 'zod';