@mastra/mssql 0.3.0-alpha.0 → 0.3.0

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,4 +1,4 @@
1
1
 
2
- > @mastra/mssql@0.3.0-alpha.0 build /home/runner/work/mastra/mastra/stores/mssql
2
+ > @mastra/mssql@0.3.0-alpha.1 build /home/runner/work/mastra/mastra/stores/mssql
3
3
  > tsup --silent --config tsup.config.ts
4
4
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,58 @@
1
1
  # @mastra/mssql
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 8c5a2b0: feat(mssql): implement comprehensive scoring system, enhance storage operations & format storage into domains
8
+ - Add full CRUD operations for scoring system (getScoreById, saveScore, getScoresByScorerId, etc.)
9
+ - Implement message deletion functionality with thread timestamp updates
10
+ - Enhance thread management with sorting options and improved pagination
11
+ - Add batch trace insertion for improved performance
12
+ - Implement proper storage domain initialization with all operation bindings
13
+ - Enhance message parsing and formatting with better v1/v2 support
14
+ - Improve table operations with better foreign key handling
15
+ - Add float data type support in schema creation
16
+ - Enhance timestamp handling with proper SQL DateTime2 usage
17
+ - Update core dependency to latest version
18
+ - Format storage into domains and separate these into different files
19
+
20
+ BREAKING CHANGE: deleteMessages support is now enabled (was previously false)
21
+
22
+ ### Patch Changes
23
+
24
+ - 2871020: update safelyParseJSON to check for value of param when handling parse
25
+ - 4a406ec: fixes TypeScript declaration file imports to ensure proper ESM compatibility
26
+ - Updated dependencies [cb36de0]
27
+ - Updated dependencies [d0496e6]
28
+ - Updated dependencies [a82b851]
29
+ - Updated dependencies [ea0c5f2]
30
+ - Updated dependencies [41a0a0e]
31
+ - Updated dependencies [2871020]
32
+ - Updated dependencies [94f4812]
33
+ - Updated dependencies [e202b82]
34
+ - Updated dependencies [e00f6a0]
35
+ - Updated dependencies [4a406ec]
36
+ - Updated dependencies [b0e43c1]
37
+ - Updated dependencies [5d377e5]
38
+ - Updated dependencies [1fb812e]
39
+ - Updated dependencies [35c5798]
40
+ - @mastra/core@0.13.0
41
+
42
+ ## 0.3.0-alpha.1
43
+
44
+ ### Patch Changes
45
+
46
+ - 2871020: update safelyParseJSON to check for value of param when handling parse
47
+ - 4a406ec: fixes TypeScript declaration file imports to ensure proper ESM compatibility
48
+ - Updated dependencies [cb36de0]
49
+ - Updated dependencies [a82b851]
50
+ - Updated dependencies [41a0a0e]
51
+ - Updated dependencies [2871020]
52
+ - Updated dependencies [4a406ec]
53
+ - Updated dependencies [5d377e5]
54
+ - @mastra/core@0.13.0-alpha.2
55
+
3
56
  ## 0.3.0-alpha.0
4
57
 
5
58
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -1387,28 +1387,17 @@ function parseJSON(jsonString) {
1387
1387
  }
1388
1388
  }
1389
1389
  function transformScoreRow(row) {
1390
- let input = void 0;
1391
- let output = void 0;
1392
- let preprocessStepResult = void 0;
1393
- let analyzeStepResult = void 0;
1394
- if (row.input) {
1395
- input = parseJSON(row.input);
1396
- }
1397
- if (row.output) {
1398
- output = parseJSON(row.output);
1399
- }
1400
- if (row.preprocessStepResult) {
1401
- preprocessStepResult = parseJSON(row.preprocessStepResult);
1402
- }
1403
- if (row.analyzeStepResult) {
1404
- analyzeStepResult = parseJSON(row.analyzeStepResult);
1405
- }
1406
1390
  return {
1407
1391
  ...row,
1408
- input,
1409
- output,
1410
- preprocessStepResult,
1411
- analyzeStepResult,
1392
+ input: parseJSON(row.input),
1393
+ scorer: parseJSON(row.scorer),
1394
+ preprocessStepResult: parseJSON(row.preprocessStepResult),
1395
+ analyzeStepResult: parseJSON(row.analyzeStepResult),
1396
+ metadata: parseJSON(row.metadata),
1397
+ output: parseJSON(row.output),
1398
+ additionalContext: parseJSON(row.additionalContext),
1399
+ runtimeContext: parseJSON(row.runtimeContext),
1400
+ entity: parseJSON(row.entity),
1412
1401
  createdAt: row.createdAt,
1413
1402
  updatedAt: row.updatedAt
1414
1403
  };
@@ -1453,16 +1442,32 @@ var ScoresMSSQL = class extends storage.ScoresStorage {
1453
1442
  async saveScore(score) {
1454
1443
  try {
1455
1444
  const scoreId = crypto.randomUUID();
1456
- const { input, output, preprocessStepResult, analyzeStepResult, ...rest } = score;
1445
+ const {
1446
+ scorer,
1447
+ preprocessStepResult,
1448
+ analyzeStepResult,
1449
+ metadata,
1450
+ input,
1451
+ output,
1452
+ additionalContext,
1453
+ runtimeContext,
1454
+ entity,
1455
+ ...rest
1456
+ } = score;
1457
1457
  await this.operations.insert({
1458
1458
  tableName: storage.TABLE_SCORERS,
1459
1459
  record: {
1460
1460
  id: scoreId,
1461
1461
  ...rest,
1462
- input: JSON.stringify(input),
1463
- output: JSON.stringify(output),
1462
+ input: JSON.stringify(input) || "",
1463
+ output: JSON.stringify(output) || "",
1464
1464
  preprocessStepResult: preprocessStepResult ? JSON.stringify(preprocessStepResult) : null,
1465
1465
  analyzeStepResult: analyzeStepResult ? JSON.stringify(analyzeStepResult) : null,
1466
+ metadata: metadata ? JSON.stringify(metadata) : null,
1467
+ additionalContext: additionalContext ? JSON.stringify(additionalContext) : null,
1468
+ runtimeContext: runtimeContext ? JSON.stringify(runtimeContext) : null,
1469
+ entity: entity ? JSON.stringify(entity) : null,
1470
+ scorer: scorer ? JSON.stringify(scorer) : null,
1466
1471
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
1467
1472
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
1468
1473
  }