@mastra/lance 0.0.0-error-handler-fix-20251020202607 → 0.0.0-execa-dynamic-import-20260304221256
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/CHANGELOG.md +1570 -3
- package/LICENSE.md +15 -0
- package/README.md +61 -4
- package/dist/docs/SKILL.md +27 -0
- package/dist/docs/assets/SOURCE_MAP.json +6 -0
- package/dist/docs/references/docs-rag-vector-databases.md +645 -0
- package/dist/docs/references/reference-storage-lance.md +131 -0
- package/dist/docs/references/reference-vectors-lance.md +220 -0
- package/dist/index.cjs +1719 -1786
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1717 -1787
- package/dist/index.js.map +1 -1
- package/dist/storage/{domains/operations → db}/index.d.ts +21 -2
- package/dist/storage/db/index.d.ts.map +1 -0
- package/dist/storage/db/utils.d.ts.map +1 -0
- package/dist/storage/domains/memory/index.d.ts +21 -46
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/dist/storage/domains/scores/index.d.ts +24 -27
- package/dist/storage/domains/scores/index.d.ts.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +21 -24
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +103 -246
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/vector/filter.d.ts +5 -5
- package/dist/vector/index.d.ts +29 -11
- package/dist/vector/index.d.ts.map +1 -1
- package/package.json +17 -13
- package/dist/storage/domains/legacy-evals/index.d.ts +0 -25
- package/dist/storage/domains/legacy-evals/index.d.ts.map +0 -1
- package/dist/storage/domains/operations/index.d.ts.map +0 -1
- package/dist/storage/domains/traces/index.d.ts +0 -34
- package/dist/storage/domains/traces/index.d.ts.map +0 -1
- package/dist/storage/domains/utils.d.ts.map +0 -1
- /package/dist/storage/{domains → db}/utils.d.ts +0 -0
package/LICENSE.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
Portions of this software are licensed as follows:
|
|
2
|
+
|
|
3
|
+
- All content that resides under any directory named "ee/" within this
|
|
4
|
+
repository, including but not limited to:
|
|
5
|
+
- `packages/core/src/auth/ee/`
|
|
6
|
+
- `packages/server/src/server/auth/ee/`
|
|
7
|
+
is licensed under the license defined in `ee/LICENSE`.
|
|
8
|
+
|
|
9
|
+
- All third-party components incorporated into the Mastra Software are
|
|
10
|
+
licensed under the original license provided by the owner of the
|
|
11
|
+
applicable component.
|
|
12
|
+
|
|
13
|
+
- Content outside of the above-mentioned directories or restrictions is
|
|
14
|
+
available under the "Apache License 2.0" as defined below.
|
|
15
|
+
|
|
1
16
|
# Apache License 2.0
|
|
2
17
|
|
|
3
18
|
Copyright (c) 2025 Kepler Software, Inc.
|
package/README.md
CHANGED
|
@@ -114,7 +114,7 @@ const message = await storage.load({
|
|
|
114
114
|
});
|
|
115
115
|
|
|
116
116
|
// Load messages from a thread
|
|
117
|
-
const messages = await storage.
|
|
117
|
+
const messages = await storage.listMessages({
|
|
118
118
|
threadId: '123e4567-e89b-12d3-a456-426614174001',
|
|
119
119
|
});
|
|
120
120
|
```
|
|
@@ -175,10 +175,12 @@ const messages: MessageType[] = [
|
|
|
175
175
|
// Save messages
|
|
176
176
|
await storage.saveMessages({ messages });
|
|
177
177
|
|
|
178
|
-
// Retrieve messages with context
|
|
179
|
-
const retrievedMessages = await storage.
|
|
178
|
+
// Retrieve messages with pagination and context
|
|
179
|
+
const retrievedMessages = await storage.listMessages({
|
|
180
180
|
threadId: '123e4567-e89b-12d3-a456-426614174010',
|
|
181
|
-
|
|
181
|
+
perPage: 10,
|
|
182
|
+
page: 0,
|
|
183
|
+
include: [
|
|
182
184
|
{
|
|
183
185
|
id: 'msg-001',
|
|
184
186
|
withPreviousMessages: 5, // Include up to 5 messages before this one
|
|
@@ -261,3 +263,58 @@ await storage.clearTable({ tableName: TABLE_MESSAGES });
|
|
|
261
263
|
// Get table schema
|
|
262
264
|
const schema = await storage.getTableSchema(TABLE_MESSAGES);
|
|
263
265
|
```
|
|
266
|
+
|
|
267
|
+
## Storage Methods
|
|
268
|
+
|
|
269
|
+
### Thread Operations
|
|
270
|
+
|
|
271
|
+
- `saveThread({ thread })`: Create or update a thread
|
|
272
|
+
- `getThreadById({ threadId })`: Get a thread by ID
|
|
273
|
+
- `listThreadsByResourceId({ resourceId, offset, limit, orderBy? })`: List paginated threads for a resource
|
|
274
|
+
- `updateThread({ id, title, metadata })`: Update thread title and/or metadata
|
|
275
|
+
- `deleteThread({ threadId })`: Delete a thread and its messages
|
|
276
|
+
|
|
277
|
+
### Message Operations
|
|
278
|
+
|
|
279
|
+
- `saveMessages({ messages })`: Save multiple messages in a transaction
|
|
280
|
+
- `listMessages({ threadId, resourceId?, perPage?, page?, orderBy?, filter?, include? })`: Get messages for a thread with pagination and optional context inclusion
|
|
281
|
+
- `listMessagesById({ messageIds })`: Get specific messages by their IDs
|
|
282
|
+
- `updateMessages({ messages })`: Update existing messages
|
|
283
|
+
|
|
284
|
+
### Resource Operations
|
|
285
|
+
|
|
286
|
+
- `getResourceById({ resourceId })`: Get a resource by ID
|
|
287
|
+
- `saveResource({ resource })`: Create or save a resource
|
|
288
|
+
- `updateResource({ resourceId, workingMemory })`: Update resource working memory
|
|
289
|
+
|
|
290
|
+
### Workflow Operations
|
|
291
|
+
|
|
292
|
+
- `persistWorkflowSnapshot({ workflowName, runId, snapshot })`: Save workflow state
|
|
293
|
+
- `loadWorkflowSnapshot({ workflowName, runId })`: Load workflow state
|
|
294
|
+
- `listWorkflowRuns({ workflowName?, pagination? })`: List workflow runs with pagination
|
|
295
|
+
- `getWorkflowRunById({ runId, workflowName? })`: Get a specific workflow run
|
|
296
|
+
- `updateWorkflowState({ workflowName, runId, state })`: Update workflow state
|
|
297
|
+
- `updateWorkflowResults({ workflowName, runId, results })`: Update workflow results
|
|
298
|
+
|
|
299
|
+
### Evaluation/Scoring Operations
|
|
300
|
+
|
|
301
|
+
- `getScoreById({ id })`: Get a score by ID
|
|
302
|
+
- `saveScore(score)`: Save an evaluation score
|
|
303
|
+
- `listScoresByScorerId({ scorerId, pagination })`: List scores by scorer with pagination
|
|
304
|
+
- `listScoresByRunId({ runId, pagination })`: List scores by run with pagination
|
|
305
|
+
- `listScoresByEntityId({ entityId, entityType, pagination })`: List scores by entity with pagination
|
|
306
|
+
- `listScoresBySpan({ traceId, spanId, pagination })`: List scores by span with pagination
|
|
307
|
+
|
|
308
|
+
### Low-Level Operations
|
|
309
|
+
|
|
310
|
+
- `createTable({ tableName, schema })`: Create a new table with schema
|
|
311
|
+
- `dropTable({ tableName })`: Drop a table
|
|
312
|
+
- `clearTable({ tableName })`: Clear all records from a table
|
|
313
|
+
- `insert({ tableName, record })`: Insert a single record
|
|
314
|
+
- `batchInsert({ tableName, records })`: Insert multiple records
|
|
315
|
+
- `load({ tableName, keys })`: Load a record by keys
|
|
316
|
+
|
|
317
|
+
### Operations Not Currently Supported
|
|
318
|
+
|
|
319
|
+
- `deleteMessages(messageIds)`: Message deletion is not currently supported
|
|
320
|
+
- AI Observability (traces/spans): Not currently supported
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mastra-lance
|
|
3
|
+
description: Documentation for @mastra/lance. Use when working with @mastra/lance APIs, configuration, or implementation.
|
|
4
|
+
metadata:
|
|
5
|
+
package: "@mastra/lance"
|
|
6
|
+
version: "0.0.0-execa-dynamic-import-20260304221256"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
Use this skill whenever you are working with @mastra/lance to obtain the domain-specific knowledge.
|
|
12
|
+
|
|
13
|
+
## How to use
|
|
14
|
+
|
|
15
|
+
Read the individual reference documents for detailed explanations and code examples.
|
|
16
|
+
|
|
17
|
+
### Docs
|
|
18
|
+
|
|
19
|
+
- [Storing Embeddings in A Vector Database](references/docs-rag-vector-databases.md) - Guide on vector storage options in Mastra, including embedded and dedicated vector databases for similarity search.
|
|
20
|
+
|
|
21
|
+
### Reference
|
|
22
|
+
|
|
23
|
+
- [Reference: LanceDB Storage](references/reference-storage-lance.md) - Documentation for the LanceDB storage implementation in Mastra.
|
|
24
|
+
- [Reference: Lance Vector Store](references/reference-vectors-lance.md) - Documentation for the LanceVectorStore class in Mastra, which provides vector search using LanceDB, an embedded vector database based on the Lance columnar format.
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
Read [assets/SOURCE_MAP.json](assets/SOURCE_MAP.json) for source code references.
|