@mastra/lance 0.0.0-rag-chunk-extract-llm-option-20250926183645 → 0.0.0-roamin-openaivoice-speak-options-passing-20250926163614

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/index.js CHANGED
@@ -3,7 +3,6 @@ import { MastraError, ErrorCategory, ErrorDomain } from '@mastra/core/error';
3
3
  import { MastraStorage, StoreOperations, LegacyEvalsStorage, TABLE_EVALS, MemoryStorage, TABLE_THREADS, TABLE_MESSAGES, resolveMessageLimit, TABLE_RESOURCES, ScoresStorage, TABLE_SCORERS, TracesStorage, TABLE_TRACES, WorkflowsStorage, TABLE_WORKFLOW_SNAPSHOT, ensureDate } from '@mastra/core/storage';
4
4
  import { MessageList } from '@mastra/core/agent';
5
5
  import { Utf8, Float64, Binary, Float32, Int32, Field, Schema } from 'apache-arrow';
6
- import { saveScorePayloadSchema } from '@mastra/core/scores';
7
6
  import { MastraVector } from '@mastra/core/vector';
8
7
  import { BaseFilterTranslator } from '@mastra/core/vector/filter';
9
8
 
@@ -1397,27 +1396,13 @@ var StoreScoresLance = class extends ScoresStorage {
1397
1396
  this.client = client;
1398
1397
  }
1399
1398
  async saveScore(score) {
1400
- let validatedScore;
1401
- try {
1402
- validatedScore = saveScorePayloadSchema.parse(score);
1403
- } catch (error) {
1404
- throw new MastraError(
1405
- {
1406
- id: "LANCE_STORAGE_SAVE_SCORE_FAILED",
1407
- text: "Failed to save score in LanceStorage",
1408
- domain: ErrorDomain.STORAGE,
1409
- category: ErrorCategory.THIRD_PARTY
1410
- },
1411
- error
1412
- );
1413
- }
1414
1399
  try {
1415
1400
  const id = crypto.randomUUID();
1416
1401
  const table = await this.client.openTable(TABLE_SCORERS);
1417
1402
  const schema = await getTableSchema({ tableName: TABLE_SCORERS, client: this.client });
1418
1403
  const allowedFields = new Set(schema.fields.map((f) => f.name));
1419
1404
  const filteredScore = {};
1420
- Object.keys(validatedScore).forEach((key) => {
1405
+ Object.keys(score).forEach((key) => {
1421
1406
  if (allowedFields.has(key)) {
1422
1407
  filteredScore[key] = score[key];
1423
1408
  }
@@ -1593,44 +1578,6 @@ var StoreScoresLance = class extends ScoresStorage {
1593
1578
  );
1594
1579
  }
1595
1580
  }
1596
- async getScoresBySpan({
1597
- traceId,
1598
- spanId,
1599
- pagination
1600
- }) {
1601
- try {
1602
- const table = await this.client.openTable(TABLE_SCORERS);
1603
- const { page = 0, perPage = 10 } = pagination || {};
1604
- const offset = page * perPage;
1605
- const query = table.query().where(`\`traceId\` = '${traceId}' AND \`spanId\` = '${spanId}'`).limit(perPage);
1606
- if (offset > 0) query.offset(offset);
1607
- const records = await query.toArray();
1608
- const schema = await getTableSchema({ tableName: TABLE_SCORERS, client: this.client });
1609
- const scores = processResultWithTypeConversion(records, schema);
1610
- const allRecords = await table.query().where(`\`traceId\` = '${traceId}' AND \`spanId\` = '${spanId}'`).toArray();
1611
- const total = allRecords.length;
1612
- return {
1613
- pagination: {
1614
- page,
1615
- perPage,
1616
- total,
1617
- hasMore: offset + scores.length < total
1618
- },
1619
- scores
1620
- };
1621
- } catch (error) {
1622
- throw new MastraError(
1623
- {
1624
- id: "LANCE_STORAGE_GET_SCORES_BY_SPAN_FAILED",
1625
- text: "Failed to get scores by traceId and spanId in LanceStorage",
1626
- domain: ErrorDomain.STORAGE,
1627
- category: ErrorCategory.THIRD_PARTY,
1628
- details: { error: error?.message }
1629
- },
1630
- error
1631
- );
1632
- }
1633
- }
1634
1581
  };
1635
1582
  var StoreTracesLance = class extends TracesStorage {
1636
1583
  client;
@@ -2123,8 +2070,7 @@ var LanceStorage = class _LanceStorage extends MastraStorage {
2123
2070
  resourceWorkingMemory: true,
2124
2071
  hasColumn: true,
2125
2072
  createTable: true,
2126
- deleteMessages: false,
2127
- getScoresBySpan: true
2073
+ deleteMessages: false
2128
2074
  };
2129
2075
  }
2130
2076
  async getResourceById({ resourceId }) {
@@ -2294,13 +2240,6 @@ var LanceStorage = class _LanceStorage extends MastraStorage {
2294
2240
  }) {
2295
2241
  return this.stores.scores.getScoresByEntityId({ entityId, entityType, pagination });
2296
2242
  }
2297
- async getScoresBySpan({
2298
- traceId,
2299
- spanId,
2300
- pagination
2301
- }) {
2302
- return this.stores.scores.getScoresBySpan({ traceId, spanId, pagination });
2303
- }
2304
2243
  };
2305
2244
  var LanceFilterTranslator = class extends BaseFilterTranslator {
2306
2245
  translate(filter) {