@mastra/mssql 0.2.1-alpha.0 → 0.2.1-alpha.1

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/mssql@0.2.1-alpha.0 build /home/runner/work/mastra/mastra/stores/mssql
2
+ > @mastra/mssql@0.2.1-alpha.1 build /home/runner/work/mastra/mastra/stores/mssql
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 10417ms
9
+ TSC ⚡️ Build success in 10318ms
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/mssql/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/mssql/dist/_tsup-dts-rollup.d.cts
16
- DTS ⚡️ Build success in 12492ms
16
+ DTS ⚡️ Build success in 10899ms
17
17
  CLI Cleaning output folder
18
18
  ESM Build start
19
19
  CJS Build start
20
- ESM dist/index.js 61.79 KB
21
- ESM ⚡️ Build success in 1450ms
22
- CJS dist/index.cjs 62.90 KB
23
- CJS ⚡️ Build success in 1973ms
20
+ CJS dist/index.cjs 65.07 KB
21
+ CJS ⚡️ Build success in 1401ms
22
+ ESM dist/index.js 63.86 KB
23
+ ESM ⚡️ Build success in 1402ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # Changelog for mastra-mssql
2
2
 
3
+ ## 0.2.1-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 7ba91fa: Throw mastra errors methods not implemented yet
8
+ - Updated dependencies [f248d53]
9
+ - Updated dependencies [2affc57]
10
+ - Updated dependencies [66e13e3]
11
+ - Updated dependencies [edd9482]
12
+ - Updated dependencies [18344d7]
13
+ - Updated dependencies [9d372c2]
14
+ - Updated dependencies [40c2525]
15
+ - Updated dependencies [e473f27]
16
+ - Updated dependencies [032cb66]
17
+ - Updated dependencies [703ac71]
18
+ - Updated dependencies [a723d69]
19
+ - Updated dependencies [5889a31]
20
+ - Updated dependencies [65e3395]
21
+ - Updated dependencies [4933192]
22
+ - Updated dependencies [d1c77a4]
23
+ - Updated dependencies [bea9dd1]
24
+ - Updated dependencies [dcd4802]
25
+ - Updated dependencies [7ba91fa]
26
+ - @mastra/core@0.11.0-alpha.2
27
+
3
28
  ## 0.2.1-alpha.0
4
29
 
5
30
  ### Patch Changes
@@ -5,9 +5,11 @@ import type { MastraMessageV2 } from '@mastra/core/agent';
5
5
  import { MastraStorage } from '@mastra/core/storage';
6
6
  import type { PaginationArgs } from '@mastra/core/storage';
7
7
  import type { PaginationInfo } from '@mastra/core/storage';
8
+ import type { ScoreRowData } from '@mastra/core/scores';
8
9
  import sql from 'mssql';
9
10
  import type { StorageColumn } from '@mastra/core/storage';
10
11
  import type { StorageGetMessagesArg } from '@mastra/core/storage';
12
+ import type { StoragePagination } from '@mastra/core/storage';
11
13
  import type { StorageResourceType } from '@mastra/core/storage';
12
14
  import type { StorageThreadType } from '@mastra/core/memory';
13
15
  import type { TABLE_NAMES } from '@mastra/core/storage';
@@ -52,6 +54,8 @@ declare class MSSQLStore extends MastraStorage {
52
54
  get supports(): {
53
55
  selectByIncludeResourceScope: boolean;
54
56
  resourceWorkingMemory: boolean;
57
+ hasColumn: boolean;
58
+ createTable: boolean;
55
59
  };
56
60
  private getTableName;
57
61
  private getSchemaName;
@@ -206,6 +210,39 @@ declare class MSSQLStore extends MastraStorage {
206
210
  getResourceById({ resourceId }: {
207
211
  resourceId: string;
208
212
  }): Promise<StorageResourceType | null>;
213
+ getScoreById({ id }: {
214
+ id: string;
215
+ }): Promise<ScoreRowData | null>;
216
+ saveScore(_score: Omit<ScoreRowData, 'id' | 'createdAt' | 'updatedAt'>): Promise<{
217
+ score: ScoreRowData;
218
+ }>;
219
+ getScoresByScorerId({ scorerId, pagination: _pagination, entityId, entityType, }: {
220
+ scorerId: string;
221
+ pagination: StoragePagination;
222
+ entityId?: string;
223
+ entityType?: string;
224
+ }): Promise<{
225
+ pagination: PaginationInfo;
226
+ scores: ScoreRowData[];
227
+ }>;
228
+ getScoresByRunId({ runId, pagination: _pagination, }: {
229
+ runId: string;
230
+ pagination: StoragePagination;
231
+ }): Promise<{
232
+ pagination: PaginationInfo;
233
+ scores: ScoreRowData[];
234
+ }>;
235
+ getScoresByEntityId({ entityId, entityType, pagination: _pagination, }: {
236
+ pagination: StoragePagination;
237
+ entityId: string;
238
+ entityType: string;
239
+ }): Promise<{
240
+ pagination: PaginationInfo;
241
+ scores: ScoreRowData[];
242
+ }>;
243
+ dropTable({ tableName }: {
244
+ tableName: TABLE_NAMES;
245
+ }): Promise<void>;
209
246
  }
210
247
  export { MSSQLStore }
211
248
  export { MSSQLStore as MSSQLStore_alias_1 }
@@ -5,9 +5,11 @@ import type { MastraMessageV2 } from '@mastra/core/agent';
5
5
  import { MastraStorage } from '@mastra/core/storage';
6
6
  import type { PaginationArgs } from '@mastra/core/storage';
7
7
  import type { PaginationInfo } from '@mastra/core/storage';
8
+ import type { ScoreRowData } from '@mastra/core/scores';
8
9
  import sql from 'mssql';
9
10
  import type { StorageColumn } from '@mastra/core/storage';
10
11
  import type { StorageGetMessagesArg } from '@mastra/core/storage';
12
+ import type { StoragePagination } from '@mastra/core/storage';
11
13
  import type { StorageResourceType } from '@mastra/core/storage';
12
14
  import type { StorageThreadType } from '@mastra/core/memory';
13
15
  import type { TABLE_NAMES } from '@mastra/core/storage';
@@ -52,6 +54,8 @@ declare class MSSQLStore extends MastraStorage {
52
54
  get supports(): {
53
55
  selectByIncludeResourceScope: boolean;
54
56
  resourceWorkingMemory: boolean;
57
+ hasColumn: boolean;
58
+ createTable: boolean;
55
59
  };
56
60
  private getTableName;
57
61
  private getSchemaName;
@@ -206,6 +210,39 @@ declare class MSSQLStore extends MastraStorage {
206
210
  getResourceById({ resourceId }: {
207
211
  resourceId: string;
208
212
  }): Promise<StorageResourceType | null>;
213
+ getScoreById({ id }: {
214
+ id: string;
215
+ }): Promise<ScoreRowData | null>;
216
+ saveScore(_score: Omit<ScoreRowData, 'id' | 'createdAt' | 'updatedAt'>): Promise<{
217
+ score: ScoreRowData;
218
+ }>;
219
+ getScoresByScorerId({ scorerId, pagination: _pagination, entityId, entityType, }: {
220
+ scorerId: string;
221
+ pagination: StoragePagination;
222
+ entityId?: string;
223
+ entityType?: string;
224
+ }): Promise<{
225
+ pagination: PaginationInfo;
226
+ scores: ScoreRowData[];
227
+ }>;
228
+ getScoresByRunId({ runId, pagination: _pagination, }: {
229
+ runId: string;
230
+ pagination: StoragePagination;
231
+ }): Promise<{
232
+ pagination: PaginationInfo;
233
+ scores: ScoreRowData[];
234
+ }>;
235
+ getScoresByEntityId({ entityId, entityType, pagination: _pagination, }: {
236
+ pagination: StoragePagination;
237
+ entityId: string;
238
+ entityType: string;
239
+ }): Promise<{
240
+ pagination: PaginationInfo;
241
+ scores: ScoreRowData[];
242
+ }>;
243
+ dropTable({ tableName }: {
244
+ tableName: TABLE_NAMES;
245
+ }): Promise<void>;
209
246
  }
210
247
  export { MSSQLStore }
211
248
  export { MSSQLStore as MSSQLStore_alias_1 }
package/dist/index.cjs CHANGED
@@ -82,7 +82,9 @@ var MSSQLStore = class extends storage.MastraStorage {
82
82
  get supports() {
83
83
  return {
84
84
  selectByIncludeResourceScope: true,
85
- resourceWorkingMemory: true
85
+ resourceWorkingMemory: true,
86
+ hasColumn: true,
87
+ createTable: true
86
88
  };
87
89
  }
88
90
  getTableName(indexName) {
@@ -1747,6 +1749,72 @@ ${columns}
1747
1749
  throw mastraError;
1748
1750
  }
1749
1751
  }
1752
+ async getScoreById({ id }) {
1753
+ throw new error.MastraError({
1754
+ id: "STORAGE_MONGODB_STORE_GET_SCORE_BY_ID_FAILED",
1755
+ domain: error.ErrorDomain.STORAGE,
1756
+ category: error.ErrorCategory.THIRD_PARTY,
1757
+ details: { id },
1758
+ text: "getScoreById is not implemented yet in MongoDBStore"
1759
+ });
1760
+ }
1761
+ async saveScore(_score) {
1762
+ throw new error.MastraError({
1763
+ id: "STORAGE_MONGODB_STORE_SAVE_SCORE_FAILED",
1764
+ domain: error.ErrorDomain.STORAGE,
1765
+ category: error.ErrorCategory.THIRD_PARTY,
1766
+ details: {},
1767
+ text: "saveScore is not implemented yet in MongoDBStore"
1768
+ });
1769
+ }
1770
+ async getScoresByScorerId({
1771
+ scorerId,
1772
+ pagination: _pagination,
1773
+ entityId,
1774
+ entityType
1775
+ }) {
1776
+ throw new error.MastraError({
1777
+ id: "STORAGE_MONGODB_STORE_GET_SCORES_BY_SCORER_ID_FAILED",
1778
+ domain: error.ErrorDomain.STORAGE,
1779
+ category: error.ErrorCategory.THIRD_PARTY,
1780
+ details: { scorerId, entityId: entityId || "", entityType: entityType || "" },
1781
+ text: "getScoresByScorerId is not implemented yet in MongoDBStore"
1782
+ });
1783
+ }
1784
+ async getScoresByRunId({
1785
+ runId,
1786
+ pagination: _pagination
1787
+ }) {
1788
+ throw new error.MastraError({
1789
+ id: "STORAGE_MONGODB_STORE_GET_SCORES_BY_RUN_ID_FAILED",
1790
+ domain: error.ErrorDomain.STORAGE,
1791
+ category: error.ErrorCategory.THIRD_PARTY,
1792
+ details: { runId },
1793
+ text: "getScoresByRunId is not implemented yet in MongoDBStore"
1794
+ });
1795
+ }
1796
+ async getScoresByEntityId({
1797
+ entityId,
1798
+ entityType,
1799
+ pagination: _pagination
1800
+ }) {
1801
+ throw new error.MastraError({
1802
+ id: "STORAGE_MONGODB_STORE_GET_SCORES_BY_ENTITY_ID_FAILED",
1803
+ domain: error.ErrorDomain.STORAGE,
1804
+ category: error.ErrorCategory.THIRD_PARTY,
1805
+ details: { entityId, entityType },
1806
+ text: "getScoresByEntityId is not implemented yet in MongoDBStore"
1807
+ });
1808
+ }
1809
+ async dropTable({ tableName }) {
1810
+ throw new error.MastraError({
1811
+ id: "STORAGE_MONGODB_STORE_DROP_TABLE_FAILED",
1812
+ domain: error.ErrorDomain.STORAGE,
1813
+ category: error.ErrorCategory.THIRD_PARTY,
1814
+ details: { tableName },
1815
+ text: "dropTable is not implemented yet in MongoDBStore"
1816
+ });
1817
+ }
1750
1818
  };
1751
1819
 
1752
1820
  exports.MSSQLStore = MSSQLStore;
package/dist/index.js CHANGED
@@ -76,7 +76,9 @@ var MSSQLStore = class extends MastraStorage {
76
76
  get supports() {
77
77
  return {
78
78
  selectByIncludeResourceScope: true,
79
- resourceWorkingMemory: true
79
+ resourceWorkingMemory: true,
80
+ hasColumn: true,
81
+ createTable: true
80
82
  };
81
83
  }
82
84
  getTableName(indexName) {
@@ -1741,6 +1743,72 @@ ${columns}
1741
1743
  throw mastraError;
1742
1744
  }
1743
1745
  }
1746
+ async getScoreById({ id }) {
1747
+ throw new MastraError({
1748
+ id: "STORAGE_MONGODB_STORE_GET_SCORE_BY_ID_FAILED",
1749
+ domain: ErrorDomain.STORAGE,
1750
+ category: ErrorCategory.THIRD_PARTY,
1751
+ details: { id },
1752
+ text: "getScoreById is not implemented yet in MongoDBStore"
1753
+ });
1754
+ }
1755
+ async saveScore(_score) {
1756
+ throw new MastraError({
1757
+ id: "STORAGE_MONGODB_STORE_SAVE_SCORE_FAILED",
1758
+ domain: ErrorDomain.STORAGE,
1759
+ category: ErrorCategory.THIRD_PARTY,
1760
+ details: {},
1761
+ text: "saveScore is not implemented yet in MongoDBStore"
1762
+ });
1763
+ }
1764
+ async getScoresByScorerId({
1765
+ scorerId,
1766
+ pagination: _pagination,
1767
+ entityId,
1768
+ entityType
1769
+ }) {
1770
+ throw new MastraError({
1771
+ id: "STORAGE_MONGODB_STORE_GET_SCORES_BY_SCORER_ID_FAILED",
1772
+ domain: ErrorDomain.STORAGE,
1773
+ category: ErrorCategory.THIRD_PARTY,
1774
+ details: { scorerId, entityId: entityId || "", entityType: entityType || "" },
1775
+ text: "getScoresByScorerId is not implemented yet in MongoDBStore"
1776
+ });
1777
+ }
1778
+ async getScoresByRunId({
1779
+ runId,
1780
+ pagination: _pagination
1781
+ }) {
1782
+ throw new MastraError({
1783
+ id: "STORAGE_MONGODB_STORE_GET_SCORES_BY_RUN_ID_FAILED",
1784
+ domain: ErrorDomain.STORAGE,
1785
+ category: ErrorCategory.THIRD_PARTY,
1786
+ details: { runId },
1787
+ text: "getScoresByRunId is not implemented yet in MongoDBStore"
1788
+ });
1789
+ }
1790
+ async getScoresByEntityId({
1791
+ entityId,
1792
+ entityType,
1793
+ pagination: _pagination
1794
+ }) {
1795
+ throw new MastraError({
1796
+ id: "STORAGE_MONGODB_STORE_GET_SCORES_BY_ENTITY_ID_FAILED",
1797
+ domain: ErrorDomain.STORAGE,
1798
+ category: ErrorCategory.THIRD_PARTY,
1799
+ details: { entityId, entityType },
1800
+ text: "getScoresByEntityId is not implemented yet in MongoDBStore"
1801
+ });
1802
+ }
1803
+ async dropTable({ tableName }) {
1804
+ throw new MastraError({
1805
+ id: "STORAGE_MONGODB_STORE_DROP_TABLE_FAILED",
1806
+ domain: ErrorDomain.STORAGE,
1807
+ category: ErrorCategory.THIRD_PARTY,
1808
+ details: { tableName },
1809
+ text: "dropTable is not implemented yet in MongoDBStore"
1810
+ });
1811
+ }
1744
1812
  };
1745
1813
 
1746
1814
  export { MSSQLStore };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mssql",
3
- "version": "0.2.1-alpha.0",
3
+ "version": "0.2.1-alpha.1",
4
4
  "description": "MSSQL provider for Mastra - db storage capabilities",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -30,9 +30,9 @@
30
30
  "tsup": "^8.5.0",
31
31
  "typescript": "^5.8.3",
32
32
  "vitest": "^3.2.4",
33
- "@internal/lint": "0.0.20",
34
- "@mastra/core": "0.11.0-alpha.0",
35
- "@internal/storage-test-utils": "0.0.16"
33
+ "@mastra/core": "0.11.0-alpha.2",
34
+ "@internal/storage-test-utils": "0.0.16",
35
+ "@internal/lint": "0.0.20"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@mastra/core": ">=0.10.7-0 <0.11.0-0"