@mastra/mssql 0.0.0-fix-message-list-merge-20250718043058 → 0.0.0-fix-tool-call-history-20250730195323

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.
@@ -4,6 +4,7 @@ export type MastraMessageV2WithTypedContent = Omit<MastraMessageV2, 'content'> &
4
4
  import { ErrorCategory, ErrorDomain, MastraError } from '@mastra/core/error';
5
5
  import type { MetricResult } from '@mastra/core/eval';
6
6
  import type { MastraMessageV1, StorageThreadType } from '@mastra/core/memory';
7
+ import type { ScoreRowData } from '@mastra/core/scores';
7
8
  import {
8
9
  MastraStorage,
9
10
  TABLE_MESSAGES,
@@ -23,6 +24,7 @@ import type {
23
24
  WorkflowRun,
24
25
  WorkflowRuns,
25
26
  PaginationArgs,
27
+ StoragePagination,
26
28
  } from '@mastra/core/storage';
27
29
  import { parseSqlIdentifier, parseFieldKey } from '@mastra/core/utils';
28
30
  import type { WorkflowRunState } from '@mastra/core/workflows';
@@ -129,10 +131,16 @@ export class MSSQLStore extends MastraStorage {
129
131
  public get supports(): {
130
132
  selectByIncludeResourceScope: boolean;
131
133
  resourceWorkingMemory: boolean;
134
+ hasColumn: boolean;
135
+ createTable: boolean;
136
+ deleteMessages: boolean;
132
137
  } {
133
138
  return {
134
139
  selectByIncludeResourceScope: true,
135
140
  resourceWorkingMemory: true,
141
+ hasColumn: true,
142
+ createTable: true,
143
+ deleteMessages: false,
136
144
  };
137
145
  }
138
146
 
@@ -2041,4 +2049,88 @@ export class MSSQLStore extends MastraStorage {
2041
2049
  throw mastraError;
2042
2050
  }
2043
2051
  }
2052
+
2053
+ async getScoreById({ id }: { id: string }): Promise<ScoreRowData | null> {
2054
+ throw new MastraError({
2055
+ id: 'STORAGE_MONGODB_STORE_GET_SCORE_BY_ID_FAILED',
2056
+ domain: ErrorDomain.STORAGE,
2057
+ category: ErrorCategory.THIRD_PARTY,
2058
+ details: { id },
2059
+ text: 'getScoreById is not implemented yet in MongoDBStore',
2060
+ });
2061
+ }
2062
+
2063
+ async saveScore(_score: Omit<ScoreRowData, 'id' | 'createdAt' | 'updatedAt'>): Promise<{ score: ScoreRowData }> {
2064
+ throw new MastraError({
2065
+ id: 'STORAGE_MONGODB_STORE_SAVE_SCORE_FAILED',
2066
+ domain: ErrorDomain.STORAGE,
2067
+ category: ErrorCategory.THIRD_PARTY,
2068
+ details: {},
2069
+ text: 'saveScore is not implemented yet in MongoDBStore',
2070
+ });
2071
+ }
2072
+
2073
+ async getScoresByScorerId({
2074
+ scorerId,
2075
+ pagination: _pagination,
2076
+ entityId,
2077
+ entityType,
2078
+ }: {
2079
+ scorerId: string;
2080
+ pagination: StoragePagination;
2081
+ entityId?: string;
2082
+ entityType?: string;
2083
+ }): Promise<{ pagination: PaginationInfo; scores: ScoreRowData[] }> {
2084
+ throw new MastraError({
2085
+ id: 'STORAGE_MONGODB_STORE_GET_SCORES_BY_SCORER_ID_FAILED',
2086
+ domain: ErrorDomain.STORAGE,
2087
+ category: ErrorCategory.THIRD_PARTY,
2088
+ details: { scorerId, entityId: entityId || '', entityType: entityType || '' },
2089
+ text: 'getScoresByScorerId is not implemented yet in MongoDBStore',
2090
+ });
2091
+ }
2092
+
2093
+ async getScoresByRunId({
2094
+ runId,
2095
+ pagination: _pagination,
2096
+ }: {
2097
+ runId: string;
2098
+ pagination: StoragePagination;
2099
+ }): Promise<{ pagination: PaginationInfo; scores: ScoreRowData[] }> {
2100
+ throw new MastraError({
2101
+ id: 'STORAGE_MONGODB_STORE_GET_SCORES_BY_RUN_ID_FAILED',
2102
+ domain: ErrorDomain.STORAGE,
2103
+ category: ErrorCategory.THIRD_PARTY,
2104
+ details: { runId },
2105
+ text: 'getScoresByRunId is not implemented yet in MongoDBStore',
2106
+ });
2107
+ }
2108
+
2109
+ async getScoresByEntityId({
2110
+ entityId,
2111
+ entityType,
2112
+ pagination: _pagination,
2113
+ }: {
2114
+ pagination: StoragePagination;
2115
+ entityId: string;
2116
+ entityType: string;
2117
+ }): Promise<{ pagination: PaginationInfo; scores: ScoreRowData[] }> {
2118
+ throw new MastraError({
2119
+ id: 'STORAGE_MONGODB_STORE_GET_SCORES_BY_ENTITY_ID_FAILED',
2120
+ domain: ErrorDomain.STORAGE,
2121
+ category: ErrorCategory.THIRD_PARTY,
2122
+ details: { entityId, entityType },
2123
+ text: 'getScoresByEntityId is not implemented yet in MongoDBStore',
2124
+ });
2125
+ }
2126
+
2127
+ async dropTable({ tableName }: { tableName: TABLE_NAMES }): Promise<void> {
2128
+ throw new MastraError({
2129
+ id: 'STORAGE_MONGODB_STORE_DROP_TABLE_FAILED',
2130
+ domain: ErrorDomain.STORAGE,
2131
+ category: ErrorCategory.THIRD_PARTY,
2132
+ details: { tableName },
2133
+ text: 'dropTable is not implemented yet in MongoDBStore',
2134
+ });
2135
+ }
2044
2136
  }