@mastra/lance 0.1.3-alpha.0 → 0.1.3-alpha.2

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,23 +1,23 @@
1
1
 
2
- > @mastra/lance@0.1.3-alpha.0 build /home/runner/work/mastra/mastra/stores/lance
2
+ > @mastra/lance@0.1.3-alpha.2 build /home/runner/work/mastra/mastra/stores/lance
3
3
  > tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting
4
4
 
5
5
  CLI Building entry: src/index.ts
6
6
  CLI Using tsconfig: tsconfig.json
7
7
  CLI tsup v8.5.0
8
8
  TSC Build start
9
- TSC ⚡️ Build success in 10460ms
9
+ TSC ⚡️ Build success in 10342ms
10
10
  DTS Build start
11
11
  CLI Target: es2022
12
12
  Analysis will use the bundled TypeScript version 5.8.3
13
13
  Writing package typings: /home/runner/work/mastra/mastra/stores/lance/dist/_tsup-dts-rollup.d.ts
14
14
  Analysis will use the bundled TypeScript version 5.8.3
15
15
  Writing package typings: /home/runner/work/mastra/mastra/stores/lance/dist/_tsup-dts-rollup.d.cts
16
- DTS ⚡️ Build success in 12006ms
16
+ DTS ⚡️ Build success in 13286ms
17
17
  CLI Cleaning output folder
18
18
  ESM Build start
19
19
  CJS Build start
20
- ESM dist/index.js 53.13 KB
21
- ESM ⚡️ Build success in 1424ms
22
- CJS dist/index.cjs 53.42 KB
23
- CJS ⚡️ Build success in 1424ms
20
+ CJS dist/index.cjs 72.48 KB
21
+ CJS ⚡️ Build success in 1677ms
22
+ ESM dist/index.js 70.94 KB
23
+ ESM ⚡️ Build success in 1693ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @mastra/lance
2
2
 
3
+ ## 0.1.3-alpha.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 0fb9d64: [MASTRA-4018] Update saveMessages in storage adapters to upsert messages
8
+ - 144eb0b: [MASTRA-3669] Metadata Filter Types
9
+ - Updated dependencies [15e9d26]
10
+ - Updated dependencies [07d6d88]
11
+ - Updated dependencies [5d74aab]
12
+ - Updated dependencies [144eb0b]
13
+ - @mastra/core@0.10.7-alpha.2
14
+
15
+ ## 0.1.3-alpha.1
16
+
17
+ ### Patch Changes
18
+
19
+ - 2097952: [MASTRA-4021] Fix PG getMessages and update messageLimit for all storage adapters
20
+ - 0e17048: Throw mastra errors in storage packages
21
+ - Updated dependencies [d1baedb]
22
+ - Updated dependencies [4d21bf2]
23
+ - Updated dependencies [2097952]
24
+ - Updated dependencies [4fb0cc2]
25
+ - Updated dependencies [d2a7a31]
26
+ - Updated dependencies [0e17048]
27
+ - @mastra/core@0.10.7-alpha.1
28
+
3
29
  ## 0.1.3-alpha.0
4
30
 
5
31
  ### Patch Changes
@@ -1,6 +1,7 @@
1
1
  import { ArrayOperator } from '@mastra/core/vector/filter';
2
2
  import { BaseFilterTranslator } from '@mastra/core/vector/filter';
3
3
  import { BasicOperator } from '@mastra/core/vector/filter';
4
+ import type { BlacklistedRootOperators } from '@mastra/core/vector/filter';
4
5
  import type { ConnectionOptions } from '@lancedb/lancedb';
5
6
  import type { CreateIndexParams } from '@mastra/core';
6
7
  import type { CreateTableOptions } from '@lancedb/lancedb';
@@ -10,12 +11,14 @@ import type { DescribeIndexParams } from '@mastra/core';
10
11
  import type { EvalRow } from '@mastra/core/storage';
11
12
  import type { IndexStats } from '@mastra/core';
12
13
  import { LogicalOperator } from '@mastra/core/vector/filter';
14
+ import type { LogicalOperatorValueMap } from '@mastra/core/vector/filter';
13
15
  import type { MastraMessageContentV2 } from '@mastra/core/agent';
14
16
  import type { MastraMessageV1 } from '@mastra/core/memory';
15
17
  import type { MastraMessageV2 } from '@mastra/core/memory';
16
18
  import { MastraStorage } from '@mastra/core/storage';
17
19
  import { MastraVector } from '@mastra/core/vector';
18
20
  import { NumericOperator } from '@mastra/core/vector/filter';
21
+ import type { OperatorValueMap } from '@mastra/core/vector/filter';
19
22
  import type { PaginationInfo } from '@mastra/core/storage';
20
23
  import type { QueryResult } from '@mastra/core';
21
24
  import type { QueryVectorParams } from '@mastra/core';
@@ -53,13 +56,15 @@ declare interface IVFConfig {
53
56
  lists?: number;
54
57
  }
55
58
 
59
+ declare type LanceBlacklisted = BlacklistedRootOperators | '$like' | '$notLike' | '$contains';
60
+
56
61
  declare interface LanceCreateIndexParams extends CreateIndexParams {
57
62
  indexConfig?: LanceIndexConfig;
58
63
  tableName?: string;
59
64
  }
60
65
 
61
- export declare class LanceFilterTranslator extends BaseFilterTranslator {
62
- translate(filter: VectorFilter): string;
66
+ export declare class LanceFilterTranslator extends BaseFilterTranslator<LanceVectorFilter, string> {
67
+ translate(filter: LanceVectorFilter): string;
63
68
  private processFilter;
64
69
  private processLogicalOperator;
65
70
  private processNestedObject;
@@ -94,7 +99,13 @@ declare interface LanceIndexConfig extends IndexConfig {
94
99
  numSubVectors?: number;
95
100
  }
96
101
 
97
- declare interface LanceQueryVectorParams extends QueryVectorParams {
102
+ declare type LanceOperatorValueMap = OperatorValueMap & {
103
+ $like: string;
104
+ $notLike: string;
105
+ $contains: string;
106
+ };
107
+
108
+ declare interface LanceQueryVectorParams extends QueryVectorParams<LanceVectorFilter> {
98
109
  tableName: string;
99
110
  columns?: string[];
100
111
  includeAllColumns?: boolean;
@@ -125,6 +136,7 @@ declare class LanceStorage extends MastraStorage {
125
136
  * ```
126
137
  */
127
138
  static create(name: string, uri: string, options?: ConnectionOptions): Promise<LanceStorage>;
139
+ private getPrimaryKeys;
128
140
  /**
129
141
  * @internal
130
142
  * Private constructor to enforce using the create factory method
@@ -327,7 +339,9 @@ declare interface LanceUpsertVectorParams extends UpsertVectorParams {
327
339
  tableName: string;
328
340
  }
329
341
 
330
- declare class LanceVectorStore extends MastraVector {
342
+ export declare type LanceVectorFilter = VectorFilter<keyof LanceOperatorValueMap, LanceOperatorValueMap, LogicalOperatorValueMap, LanceBlacklisted>;
343
+
344
+ declare class LanceVectorStore extends MastraVector<LanceVectorFilter> {
331
345
  private lanceClient;
332
346
  /**
333
347
  * Creates a new instance of LanceVectorStore
@@ -1,6 +1,7 @@
1
1
  import { ArrayOperator } from '@mastra/core/vector/filter';
2
2
  import { BaseFilterTranslator } from '@mastra/core/vector/filter';
3
3
  import { BasicOperator } from '@mastra/core/vector/filter';
4
+ import type { BlacklistedRootOperators } from '@mastra/core/vector/filter';
4
5
  import type { ConnectionOptions } from '@lancedb/lancedb';
5
6
  import type { CreateIndexParams } from '@mastra/core';
6
7
  import type { CreateTableOptions } from '@lancedb/lancedb';
@@ -10,12 +11,14 @@ import type { DescribeIndexParams } from '@mastra/core';
10
11
  import type { EvalRow } from '@mastra/core/storage';
11
12
  import type { IndexStats } from '@mastra/core';
12
13
  import { LogicalOperator } from '@mastra/core/vector/filter';
14
+ import type { LogicalOperatorValueMap } from '@mastra/core/vector/filter';
13
15
  import type { MastraMessageContentV2 } from '@mastra/core/agent';
14
16
  import type { MastraMessageV1 } from '@mastra/core/memory';
15
17
  import type { MastraMessageV2 } from '@mastra/core/memory';
16
18
  import { MastraStorage } from '@mastra/core/storage';
17
19
  import { MastraVector } from '@mastra/core/vector';
18
20
  import { NumericOperator } from '@mastra/core/vector/filter';
21
+ import type { OperatorValueMap } from '@mastra/core/vector/filter';
19
22
  import type { PaginationInfo } from '@mastra/core/storage';
20
23
  import type { QueryResult } from '@mastra/core';
21
24
  import type { QueryVectorParams } from '@mastra/core';
@@ -53,13 +56,15 @@ declare interface IVFConfig {
53
56
  lists?: number;
54
57
  }
55
58
 
59
+ declare type LanceBlacklisted = BlacklistedRootOperators | '$like' | '$notLike' | '$contains';
60
+
56
61
  declare interface LanceCreateIndexParams extends CreateIndexParams {
57
62
  indexConfig?: LanceIndexConfig;
58
63
  tableName?: string;
59
64
  }
60
65
 
61
- export declare class LanceFilterTranslator extends BaseFilterTranslator {
62
- translate(filter: VectorFilter): string;
66
+ export declare class LanceFilterTranslator extends BaseFilterTranslator<LanceVectorFilter, string> {
67
+ translate(filter: LanceVectorFilter): string;
63
68
  private processFilter;
64
69
  private processLogicalOperator;
65
70
  private processNestedObject;
@@ -94,7 +99,13 @@ declare interface LanceIndexConfig extends IndexConfig {
94
99
  numSubVectors?: number;
95
100
  }
96
101
 
97
- declare interface LanceQueryVectorParams extends QueryVectorParams {
102
+ declare type LanceOperatorValueMap = OperatorValueMap & {
103
+ $like: string;
104
+ $notLike: string;
105
+ $contains: string;
106
+ };
107
+
108
+ declare interface LanceQueryVectorParams extends QueryVectorParams<LanceVectorFilter> {
98
109
  tableName: string;
99
110
  columns?: string[];
100
111
  includeAllColumns?: boolean;
@@ -125,6 +136,7 @@ declare class LanceStorage extends MastraStorage {
125
136
  * ```
126
137
  */
127
138
  static create(name: string, uri: string, options?: ConnectionOptions): Promise<LanceStorage>;
139
+ private getPrimaryKeys;
128
140
  /**
129
141
  * @internal
130
142
  * Private constructor to enforce using the create factory method
@@ -327,7 +339,9 @@ declare interface LanceUpsertVectorParams extends UpsertVectorParams {
327
339
  tableName: string;
328
340
  }
329
341
 
330
- declare class LanceVectorStore extends MastraVector {
342
+ export declare type LanceVectorFilter = VectorFilter<keyof LanceOperatorValueMap, LanceOperatorValueMap, LogicalOperatorValueMap, LanceBlacklisted>;
343
+
344
+ declare class LanceVectorStore extends MastraVector<LanceVectorFilter> {
331
345
  private lanceClient;
332
346
  /**
333
347
  * Creates a new instance of LanceVectorStore