@mastra/lance 0.0.0-remove-unused-import-20250909212718 → 0.0.0-remove-ai-peer-dep-from-evals-20260105220639

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.
Files changed (34) hide show
  1. package/CHANGELOG.md +1285 -3
  2. package/README.md +61 -4
  3. package/dist/docs/README.md +33 -0
  4. package/dist/docs/SKILL.md +34 -0
  5. package/dist/docs/SOURCE_MAP.json +6 -0
  6. package/dist/docs/rag/01-vector-databases.md +638 -0
  7. package/dist/docs/storage/01-reference.md +113 -0
  8. package/dist/docs/vectors/01-reference.md +149 -0
  9. package/dist/index.cjs +1466 -1586
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.js +1465 -1588
  12. package/dist/index.js.map +1 -1
  13. package/dist/storage/{domains/operations → db}/index.d.ts +21 -2
  14. package/dist/storage/db/index.d.ts.map +1 -0
  15. package/dist/storage/db/utils.d.ts.map +1 -0
  16. package/dist/storage/domains/memory/index.d.ts +21 -46
  17. package/dist/storage/domains/memory/index.d.ts.map +1 -1
  18. package/dist/storage/domains/scores/index.d.ts +27 -22
  19. package/dist/storage/domains/scores/index.d.ts.map +1 -1
  20. package/dist/storage/domains/workflows/index.d.ts +20 -24
  21. package/dist/storage/domains/workflows/index.d.ts.map +1 -1
  22. package/dist/storage/index.d.ts +101 -234
  23. package/dist/storage/index.d.ts.map +1 -1
  24. package/dist/vector/filter.d.ts +5 -5
  25. package/dist/vector/index.d.ts +6 -3
  26. package/dist/vector/index.d.ts.map +1 -1
  27. package/package.json +18 -13
  28. package/dist/storage/domains/legacy-evals/index.d.ts +0 -25
  29. package/dist/storage/domains/legacy-evals/index.d.ts.map +0 -1
  30. package/dist/storage/domains/operations/index.d.ts.map +0 -1
  31. package/dist/storage/domains/traces/index.d.ts +0 -34
  32. package/dist/storage/domains/traces/index.d.ts.map +0 -1
  33. package/dist/storage/domains/utils.d.ts.map +0 -1
  34. /package/dist/storage/{domains → db}/utils.d.ts +0 -0
@@ -1,262 +1,129 @@
1
- import type { ConnectionOptions } from '@lancedb/lancedb';
2
- import type { MastraMessageContentV2 } from '@mastra/core/agent';
3
- import type { MastraMessageV1, MastraMessageV2, StorageThreadType, TraceType } from '@mastra/core/memory';
4
- import type { ScoreRowData, ScoringSource } from '@mastra/core/scores';
1
+ import type { Connection, ConnectionOptions } from '@lancedb/lancedb';
5
2
  import { MastraStorage } from '@mastra/core/storage';
6
- import type { TABLE_NAMES, PaginationInfo, StorageGetMessagesArg, StorageColumn, EvalRow, WorkflowRuns, StoragePagination, StorageDomains, StorageGetTracesPaginatedArg, StorageResourceType } from '@mastra/core/storage';
7
- import type { Trace } from '@mastra/core/telemetry';
8
- import type { StepResult, WorkflowRunState } from '@mastra/core/workflows';
3
+ import type { StorageDomains } from '@mastra/core/storage';
4
+ import { StoreMemoryLance } from './domains/memory/index.js';
5
+ import { StoreScoresLance } from './domains/scores/index.js';
6
+ import { StoreWorkflowsLance } from './domains/workflows/index.js';
7
+ export { StoreMemoryLance, StoreScoresLance, StoreWorkflowsLance };
8
+ export type { LanceDomainConfig } from './db/index.js';
9
+ export interface LanceStorageOptions {
10
+ /**
11
+ * When true, automatic initialization (table creation/migrations) is disabled.
12
+ * This is useful for CI/CD pipelines where you want to:
13
+ * 1. Run migrations explicitly during deployment (not at runtime)
14
+ * 2. Use different credentials for schema changes vs runtime operations
15
+ *
16
+ * When disableInit is true:
17
+ * - The storage will not automatically create/alter tables on first use
18
+ * - You must call `storage.init()` explicitly in your CI/CD scripts
19
+ *
20
+ * @example
21
+ * // In CI/CD script:
22
+ * const storage = await LanceStorage.create('id', 'name', '/path/to/db', undefined, { disableInit: false });
23
+ * await storage.init(); // Explicitly run migrations
24
+ *
25
+ * // In runtime application:
26
+ * const storage = await LanceStorage.create('id', 'name', '/path/to/db', undefined, { disableInit: true });
27
+ * // No auto-init, tables must already exist
28
+ */
29
+ disableInit?: boolean;
30
+ }
31
+ export interface LanceStorageClientOptions extends LanceStorageOptions {
32
+ /**
33
+ * Pre-configured LanceDB connection.
34
+ * Use this when you need to configure the connection before initialization.
35
+ *
36
+ * @example
37
+ * ```typescript
38
+ * import { connect } from '@lancedb/lancedb';
39
+ *
40
+ * const client = await connect('/path/to/db', {
41
+ * // Custom connection options
42
+ * });
43
+ *
44
+ * const store = await LanceStorage.fromClient('my-id', 'MyStorage', client);
45
+ * ```
46
+ */
47
+ client: Connection;
48
+ }
49
+ /**
50
+ * LanceDB storage adapter for Mastra.
51
+ *
52
+ * Access domain-specific storage via `getStore()`:
53
+ *
54
+ * @example
55
+ * ```typescript
56
+ * const storage = await LanceStorage.create('my-id', 'MyStorage', '/path/to/db');
57
+ *
58
+ * // Access memory domain
59
+ * const memory = await storage.getStore('memory');
60
+ * await memory?.saveThread({ thread });
61
+ *
62
+ * // Access workflows domain
63
+ * const workflows = await storage.getStore('workflows');
64
+ * await workflows?.persistWorkflowSnapshot({ workflowName, runId, snapshot });
65
+ * ```
66
+ */
9
67
  export declare class LanceStorage extends MastraStorage {
10
68
  stores: StorageDomains;
11
69
  private lanceClient;
12
70
  /**
13
71
  * Creates a new instance of LanceStorage
72
+ * @param id The unique identifier for this storage instance
73
+ * @param name The name for this storage instance
14
74
  * @param uri The URI to connect to LanceDB
15
- * @param options connection options
75
+ * @param connectionOptions connection options for LanceDB
76
+ * @param storageOptions storage options including disableInit
16
77
  *
17
78
  * Usage:
18
79
  *
19
80
  * Connect to a local database
20
81
  * ```ts
21
- * const store = await LanceStorage.create('/path/to/db');
82
+ * const store = await LanceStorage.create('my-storage-id', 'MyStorage', '/path/to/db');
22
83
  * ```
23
84
  *
24
85
  * Connect to a LanceDB cloud database
25
86
  * ```ts
26
- * const store = await LanceStorage.create('db://host:port');
87
+ * const store = await LanceStorage.create('my-storage-id', 'MyStorage', 'db://host:port');
27
88
  * ```
28
89
  *
29
90
  * Connect to a cloud database
30
91
  * ```ts
31
- * const store = await LanceStorage.create('s3://bucket/db', { storageOptions: { timeout: '60s' } });
92
+ * const store = await LanceStorage.create('my-storage-id', 'MyStorage', 's3://bucket/db', { storageOptions: { timeout: '60s' } });
93
+ * ```
94
+ *
95
+ * Disable auto-init for runtime (after CI/CD has run migrations)
96
+ * ```ts
97
+ * const store = await LanceStorage.create('my-storage-id', 'MyStorage', '/path/to/db', undefined, { disableInit: true });
32
98
  * ```
33
99
  */
34
- static create(name: string, uri: string, options?: ConnectionOptions): Promise<LanceStorage>;
35
- /**
36
- * @internal
37
- * Private constructor to enforce using the create factory method
38
- */
39
- private constructor();
40
- createTable({ tableName, schema, }: {
41
- tableName: TABLE_NAMES;
42
- schema: Record<string, StorageColumn>;
43
- }): Promise<void>;
44
- dropTable({ tableName }: {
45
- tableName: TABLE_NAMES;
46
- }): Promise<void>;
47
- alterTable({ tableName, schema, ifNotExists, }: {
48
- tableName: TABLE_NAMES;
49
- schema: Record<string, StorageColumn>;
50
- ifNotExists: string[];
51
- }): Promise<void>;
52
- clearTable({ tableName }: {
53
- tableName: TABLE_NAMES;
54
- }): Promise<void>;
55
- insert({ tableName, record }: {
56
- tableName: TABLE_NAMES;
57
- record: Record<string, any>;
58
- }): Promise<void>;
59
- batchInsert({ tableName, records }: {
60
- tableName: TABLE_NAMES;
61
- records: Record<string, any>[];
62
- }): Promise<void>;
63
- load({ tableName, keys }: {
64
- tableName: TABLE_NAMES;
65
- keys: Record<string, any>;
66
- }): Promise<any>;
67
- getThreadById({ threadId }: {
68
- threadId: string;
69
- }): Promise<StorageThreadType | null>;
70
- getThreadsByResourceId({ resourceId }: {
71
- resourceId: string;
72
- }): Promise<StorageThreadType[]>;
100
+ static create(id: string, name: string, uri: string, connectionOptions?: ConnectionOptions, storageOptions?: LanceStorageOptions): Promise<LanceStorage>;
73
101
  /**
74
- * Saves a thread to the database. This function doesn't overwrite existing threads.
75
- * @param thread - The thread to save
76
- * @returns The saved thread
102
+ * Creates a new instance of LanceStorage from a pre-configured LanceDB connection.
103
+ * Use this when you need to configure the connection before initialization.
104
+ *
105
+ * @param id The unique identifier for this storage instance
106
+ * @param name The name for this storage instance
107
+ * @param client Pre-configured LanceDB connection
108
+ * @param options Storage options including disableInit
109
+ *
110
+ * @example
111
+ * ```typescript
112
+ * import { connect } from '@lancedb/lancedb';
113
+ *
114
+ * const client = await connect('/path/to/db', {
115
+ * // Custom connection options
116
+ * });
117
+ *
118
+ * const store = LanceStorage.fromClient('my-id', 'MyStorage', client);
119
+ * ```
77
120
  */
78
- saveThread({ thread }: {
79
- thread: StorageThreadType;
80
- }): Promise<StorageThreadType>;
81
- updateThread({ id, title, metadata, }: {
82
- id: string;
83
- title: string;
84
- metadata: Record<string, unknown>;
85
- }): Promise<StorageThreadType>;
86
- deleteThread({ threadId }: {
87
- threadId: string;
88
- }): Promise<void>;
89
- get supports(): {
90
- selectByIncludeResourceScope: boolean;
91
- resourceWorkingMemory: boolean;
92
- hasColumn: boolean;
93
- createTable: boolean;
94
- deleteMessages: boolean;
95
- };
96
- getResourceById({ resourceId }: {
97
- resourceId: string;
98
- }): Promise<StorageResourceType | null>;
99
- saveResource({ resource }: {
100
- resource: StorageResourceType;
101
- }): Promise<StorageResourceType>;
102
- updateResource({ resourceId, workingMemory, metadata, }: {
103
- resourceId: string;
104
- workingMemory?: string;
105
- metadata?: Record<string, unknown>;
106
- }): Promise<StorageResourceType>;
121
+ static fromClient(id: string, name: string, client: Connection, options?: LanceStorageOptions): LanceStorage;
107
122
  /**
108
- * Processes messages to include context messages based on withPreviousMessages and withNextMessages
109
- * @param records - The sorted array of records to process
110
- * @param include - The array of include specifications with context parameters
111
- * @returns The processed array with context messages included
123
+ * @internal
124
+ * Private constructor to enforce using the create factory method.
125
+ * Note: stores is initialized in create() after the lanceClient is connected.
112
126
  */
113
- private processMessagesWithContext;
114
- getMessages(args: StorageGetMessagesArg & {
115
- format?: 'v1';
116
- }): Promise<MastraMessageV1[]>;
117
- getMessages(args: StorageGetMessagesArg & {
118
- format: 'v2';
119
- }): Promise<MastraMessageV2[]>;
120
- getMessagesById({ messageIds, format }: {
121
- messageIds: string[];
122
- format: 'v1';
123
- }): Promise<MastraMessageV1[]>;
124
- getMessagesById({ messageIds, format }: {
125
- messageIds: string[];
126
- format?: 'v2';
127
- }): Promise<MastraMessageV2[]>;
128
- saveMessages(args: {
129
- messages: MastraMessageV1[];
130
- format?: undefined | 'v1';
131
- }): Promise<MastraMessageV1[]>;
132
- saveMessages(args: {
133
- messages: MastraMessageV2[];
134
- format: 'v2';
135
- }): Promise<MastraMessageV2[]>;
136
- getThreadsByResourceIdPaginated(args: {
137
- resourceId: string;
138
- page: number;
139
- perPage: number;
140
- }): Promise<PaginationInfo & {
141
- threads: StorageThreadType[];
142
- }>;
143
- getMessagesPaginated(args: StorageGetMessagesArg & {
144
- format?: 'v1' | 'v2';
145
- }): Promise<PaginationInfo & {
146
- messages: MastraMessageV1[] | MastraMessageV2[];
147
- }>;
148
- updateMessages(_args: {
149
- messages: Partial<Omit<MastraMessageV2, 'createdAt'>> & {
150
- id: string;
151
- content?: {
152
- metadata?: MastraMessageContentV2['metadata'];
153
- content?: MastraMessageContentV2['content'];
154
- };
155
- }[];
156
- }): Promise<MastraMessageV2[]>;
157
- getTraceById(args: {
158
- traceId: string;
159
- }): Promise<TraceType>;
160
- getTraces(args: {
161
- name?: string;
162
- scope?: string;
163
- page: number;
164
- perPage: number;
165
- attributes?: Record<string, string>;
166
- }): Promise<Trace[]>;
167
- getTracesPaginated(args: StorageGetTracesPaginatedArg): Promise<PaginationInfo & {
168
- traces: Trace[];
169
- }>;
170
- getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
171
- getEvals(options: {
172
- agentName?: string;
173
- type?: 'test' | 'live';
174
- page?: number;
175
- perPage?: number;
176
- fromDate?: Date;
177
- toDate?: Date;
178
- dateRange?: {
179
- start?: Date;
180
- end?: Date;
181
- };
182
- }): Promise<PaginationInfo & {
183
- evals: EvalRow[];
184
- }>;
185
- getWorkflowRuns(args?: {
186
- namespace?: string;
187
- workflowName?: string;
188
- fromDate?: Date;
189
- toDate?: Date;
190
- limit?: number;
191
- offset?: number;
192
- }): Promise<WorkflowRuns>;
193
- getWorkflowRunById(args: {
194
- runId: string;
195
- workflowName?: string;
196
- }): Promise<{
197
- workflowName: string;
198
- runId: string;
199
- snapshot: any;
200
- createdAt: Date;
201
- updatedAt: Date;
202
- } | null>;
203
- updateWorkflowResults({ workflowName, runId, stepId, result, runtimeContext, }: {
204
- workflowName: string;
205
- runId: string;
206
- stepId: string;
207
- result: StepResult<any, any, any, any>;
208
- runtimeContext: Record<string, any>;
209
- }): Promise<Record<string, StepResult<any, any, any, any>>>;
210
- updateWorkflowState({ workflowName, runId, opts, }: {
211
- workflowName: string;
212
- runId: string;
213
- opts: {
214
- status: string;
215
- result?: StepResult<any, any, any, any>;
216
- error?: string;
217
- suspendedPaths?: Record<string, number[]>;
218
- waitingPaths?: Record<string, number[]>;
219
- };
220
- }): Promise<WorkflowRunState | undefined>;
221
- persistWorkflowSnapshot({ workflowName, runId, snapshot, }: {
222
- workflowName: string;
223
- runId: string;
224
- snapshot: WorkflowRunState;
225
- }): Promise<void>;
226
- loadWorkflowSnapshot({ workflowName, runId, }: {
227
- workflowName: string;
228
- runId: string;
229
- }): Promise<WorkflowRunState | null>;
230
- getScoreById({ id: _id }: {
231
- id: string;
232
- }): Promise<ScoreRowData | null>;
233
- getScoresByScorerId({ scorerId, source, entityId, entityType, pagination, }: {
234
- scorerId: string;
235
- pagination: StoragePagination;
236
- source?: ScoringSource;
237
- entityId?: string;
238
- entityType?: string;
239
- }): Promise<{
240
- pagination: PaginationInfo;
241
- scores: ScoreRowData[];
242
- }>;
243
- saveScore(_score: ScoreRowData): Promise<{
244
- score: ScoreRowData;
245
- }>;
246
- getScoresByRunId({ runId, pagination, }: {
247
- runId: string;
248
- pagination: StoragePagination;
249
- }): Promise<{
250
- pagination: PaginationInfo;
251
- scores: ScoreRowData[];
252
- }>;
253
- getScoresByEntityId({ entityId, entityType, pagination, }: {
254
- pagination: StoragePagination;
255
- entityId: string;
256
- entityType: string;
257
- }): Promise<{
258
- pagination: PaginationInfo;
259
- scores: ScoreRowData[];
260
- }>;
127
+ private constructor();
261
128
  }
262
129
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAc,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC1G,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,OAAO,EACP,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,4BAA4B,EAC5B,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAQ3E,qBAAa,YAAa,SAAQ,aAAa;IAC7C,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,CAAC,WAAW,CAAc;IACjC;;;;;;;;;;;;;;;;;;;;;OAqBG;WACiB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC;IA4BzG;;;OAGG;IACH,OAAO;IAcD,WAAW,CAAC,EAChB,SAAS,EACT,MAAM,GACP,EAAE;QACD,SAAS,EAAE,WAAW,CAAC;QACvB,MAAM,EAAE,MAAM,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vB;AAED,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IACpE;;;;;;;;;;;;;;OAcG;IACH,MAAM,EAAE,UAAU,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,YAAa,SAAQ,aAAa;IAC7C,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,CAAC,WAAW,CAAc;IACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;WACiB,MAAM,CACxB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,iBAAiB,CAAC,EAAE,iBAAiB,EACrC,cAAc,CAAC,EAAE,mBAAmB,GACnC,OAAO,CAAC,YAAY,CAAC;IAwBxB;;;;;;;;;;;;;;;;;;;OAmBG;WACW,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,YAAY;IAWnH;;;;OAIG;IACH,OAAO;CAKR"}
@@ -29,12 +29,12 @@ export declare class LanceFilterTranslator extends BaseFilterTranslator<LanceVec
29
29
  */
30
30
  protected getSupportedOperators(): {
31
31
  custom: string[];
32
- logical: import("@mastra/core/vector/filter").LogicalOperator[];
33
- basic: import("@mastra/core/vector/filter").BasicOperator[];
34
- numeric: import("@mastra/core/vector/filter").NumericOperator[];
35
- array: import("@mastra/core/vector/filter").ArrayOperator[];
32
+ logical: import("@mastra/core/vector").LogicalOperator[];
33
+ basic: import("@mastra/core/vector").BasicOperator[];
34
+ numeric: import("@mastra/core/vector").NumericOperator[];
35
+ array: import("@mastra/core/vector").ArrayOperator[];
36
36
  element: "$exists"[];
37
- regex: import("@mastra/core/vector/filter").RegexOperator[];
37
+ regex: import("@mastra/core/vector").RegexOperator[];
38
38
  };
39
39
  }
40
40
  export {};
@@ -1,5 +1,5 @@
1
1
  import type { ConnectionOptions, CreateTableOptions, Table, TableLike } from '@lancedb/lancedb';
2
- import type { CreateIndexParams, DeleteIndexParams, DeleteVectorParams, DescribeIndexParams, IndexStats, QueryResult, QueryVectorParams, UpdateVectorParams, UpsertVectorParams } from '@mastra/core/vector';
2
+ import type { CreateIndexParams, DeleteIndexParams, DeleteVectorParams, DescribeIndexParams, IndexStats, QueryResult, QueryVectorParams, UpdateVectorParams, UpsertVectorParams, DeleteVectorsParams } from '@mastra/core/vector';
3
3
  import { MastraVector } from '@mastra/core/vector';
4
4
  import type { LanceVectorFilter } from './filter.js';
5
5
  import type { IndexConfig } from './types.js';
@@ -43,7 +43,9 @@ export declare class LanceVectorStore extends MastraVector<LanceVectorFilter> {
43
43
  * const store = await LanceVectorStore.create('s3://bucket/db', { storageOptions: { timeout: '60s' } });
44
44
  * ```
45
45
  */
46
- static create(uri: string, options?: ConnectionOptions): Promise<LanceVectorStore>;
46
+ static create(uri: string, options?: ConnectionOptions & {
47
+ id: string;
48
+ }): Promise<LanceVectorStore>;
47
49
  /**
48
50
  * @internal
49
51
  * Private constructor to enforce using the create factory method
@@ -73,13 +75,14 @@ export declare class LanceVectorStore extends MastraVector<LanceVectorFilter> {
73
75
  */
74
76
  deleteAllTables(): Promise<void>;
75
77
  deleteTable(tableName: string): Promise<void>;
76
- updateVector({ indexName, id, update }: UpdateVectorParams): Promise<void>;
78
+ updateVector(params: UpdateVectorParams<LanceVectorFilter>): Promise<void>;
77
79
  deleteVector({ indexName, id }: DeleteVectorParams): Promise<void>;
78
80
  /**
79
81
  * Converts a flattened object with keys using underscore notation back to a nested object.
80
82
  * Example: { name: 'test', details_text: 'test' } → { name: 'test', details: { text: 'test' } }
81
83
  */
82
84
  private unflattenObject;
85
+ deleteVectors({ indexName, filter, ids }: DeleteVectorsParams<LanceVectorFilter>): Promise<void>;
83
86
  }
84
87
  export {};
85
88
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vector/index.ts"],"names":[],"mappings":"AACA,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C,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA2B7C,YAAY,CAAC,MAAM,EAAE,kBAAkB,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAsL1E,YAAY,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAuExE;;;OAGG;IACH,OAAO,CAAC,eAAe;IAiCjB,aAAa,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,mBAAmB,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CA6HvG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/lance",
3
- "version": "0.0.0-remove-unused-import-20250909212718",
3
+ "version": "0.0.0-remove-ai-peer-dep-from-evals-20260105220639",
4
4
  "description": "Lance provider for Mastra - includes both vector and db storage capabilities",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -19,23 +19,24 @@
19
19
  "./package.json": "./package.json"
20
20
  },
21
21
  "dependencies": {
22
- "@lancedb/lancedb": "^0.21.2",
22
+ "@lancedb/lancedb": "^0.22.3",
23
23
  "apache-arrow": "^18.1.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@microsoft/api-extractor": "^7.52.8",
27
- "@types/node": "^20.19.0",
28
- "eslint": "^9.30.1",
26
+ "@types/node": "22.13.17",
27
+ "@vitest/coverage-v8": "4.0.12",
28
+ "@vitest/ui": "4.0.12",
29
+ "eslint": "^9.37.0",
29
30
  "tsup": "^8.5.0",
30
- "typescript": "^5.8.3",
31
- "vitest": "^3.2.4",
32
- "@internal/storage-test-utils": "0.0.32",
33
- "@internal/types-builder": "0.0.0-remove-unused-import-20250909212718",
34
- "@internal/lint": "0.0.0-remove-unused-import-20250909212718",
35
- "@mastra/core": "0.0.0-remove-unused-import-20250909212718"
31
+ "typescript": "^5.9.3",
32
+ "vitest": "4.0.16",
33
+ "@internal/lint": "0.0.0-remove-ai-peer-dep-from-evals-20260105220639",
34
+ "@internal/storage-test-utils": "0.0.49",
35
+ "@internal/types-builder": "0.0.0-remove-ai-peer-dep-from-evals-20260105220639",
36
+ "@mastra/core": "0.0.0-remove-ai-peer-dep-from-evals-20260105220639"
36
37
  },
37
38
  "peerDependencies": {
38
- "@mastra/core": "0.0.0-remove-unused-import-20250909212718"
39
+ "@mastra/core": "0.0.0-remove-ai-peer-dep-from-evals-20260105220639"
39
40
  },
40
41
  "files": [
41
42
  "dist",
@@ -50,8 +51,12 @@
50
51
  "bugs": {
51
52
  "url": "https://github.com/mastra-ai/mastra/issues"
52
53
  },
54
+ "engines": {
55
+ "node": ">=22.13.0"
56
+ },
53
57
  "scripts": {
54
- "build": "tsup --silent --config tsup.config.ts",
58
+ "build:lib": "tsup --silent --config tsup.config.ts",
59
+ "build:docs": "pnpx tsx ../../scripts/generate-package-docs.ts stores/lance",
55
60
  "build:watch": "tsup --watch --silent --config tsup.config.ts",
56
61
  "test": "vitest run",
57
62
  "test:watch": "vitest watch",
@@ -1,25 +0,0 @@
1
- import type { Connection } from '@lancedb/lancedb';
2
- import { LegacyEvalsStorage } from '@mastra/core/storage';
3
- import type { EvalRow, PaginationInfo } from '@mastra/core/storage';
4
- export declare class StoreLegacyEvalsLance extends LegacyEvalsStorage {
5
- private client;
6
- constructor({ client }: {
7
- client: Connection;
8
- });
9
- getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
10
- getEvals(options: {
11
- agentName?: string;
12
- type?: 'test' | 'live';
13
- page?: number;
14
- perPage?: number;
15
- fromDate?: Date;
16
- toDate?: Date;
17
- dateRange?: {
18
- start?: Date;
19
- end?: Date;
20
- };
21
- }): Promise<PaginationInfo & {
22
- evals: EvalRow[];
23
- }>;
24
- }
25
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/legacy-evals/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAe,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEpE,qBAAa,qBAAsB,SAAQ,kBAAkB;IAC3D,OAAO,CAAC,MAAM,CAAa;gBACf,EAAE,MAAM,EAAE,EAAE;QAAE,MAAM,EAAE,UAAU,CAAA;KAAE;IAKxC,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IA4ClF,QAAQ,CAAC,OAAO,EAAE;QACtB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACvB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,IAAI,CAAC;QAChB,MAAM,CAAC,EAAE,IAAI,CAAC;QACd,SAAS,CAAC,EAAE;YAAE,KAAK,CAAC,EAAE,IAAI,CAAC;YAAC,GAAG,CAAC,EAAE,IAAI,CAAA;SAAE,CAAC;KAC1C,GAAG,OAAO,CAAC,cAAc,GAAG;QAAE,KAAK,EAAE,OAAO,EAAE,CAAA;KAAE,CAAC;CA2FnD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/operations/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAKvE,qBAAa,oBAAq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,MAAM,EAAE,GAAG,CAAC,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAiEzG,IAAI,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE;QAAE,SAAS,EAAE,WAAW,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,GAAG,OAAO,CAAC,GAAG,CAAC;CA8ErG"}
@@ -1,34 +0,0 @@
1
- import type { Connection } from '@lancedb/lancedb';
2
- import type { TraceType } from '@mastra/core/memory';
3
- import { TracesStorage } from '@mastra/core/storage';
4
- import type { PaginationInfo, StorageGetTracesPaginatedArg } from '@mastra/core/storage';
5
- import type { Trace } from '@mastra/core/telemetry';
6
- import type { StoreOperationsLance } from '../operations/index.js';
7
- export declare class StoreTracesLance extends TracesStorage {
8
- private client;
9
- private operations;
10
- constructor({ client, operations }: {
11
- client: Connection;
12
- operations: StoreOperationsLance;
13
- });
14
- saveTrace({ trace }: {
15
- trace: TraceType;
16
- }): Promise<TraceType>;
17
- getTraceById({ traceId }: {
18
- traceId: string;
19
- }): Promise<TraceType>;
20
- getTraces({ name, scope, page, perPage, attributes, }: {
21
- name?: string;
22
- scope?: string;
23
- page: number;
24
- perPage: number;
25
- attributes?: Record<string, string>;
26
- }): Promise<Trace[]>;
27
- getTracesPaginated(args: StorageGetTracesPaginatedArg): Promise<PaginationInfo & {
28
- traces: Trace[];
29
- }>;
30
- batchTraceInsert({ records }: {
31
- records: Record<string, any>[];
32
- }): Promise<void>;
33
- }
34
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/traces/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAgB,aAAa,EAAE,MAAM,sB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