@mastra/mssql 0.0.0-fix-backport-setserver-20251201151948 → 0.0.0-fix-request-context-as-query-key-20251209093005

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/README.md CHANGED
@@ -27,6 +27,7 @@ MSSQLStore supports multiple connection methods:
27
27
  import { MSSQLStore } from '@mastra/mssql';
28
28
 
29
29
  const store = new MSSQLStore({
30
+ id: 'mssql-storage',
30
31
  connectionString:
31
32
  'Server=localhost,1433;Database=mastra;User Id=sa;Password=yourPassword;Encrypt=true;TrustServerCertificate=true',
32
33
  });
@@ -36,6 +37,7 @@ const store = new MSSQLStore({
36
37
 
37
38
  ```typescript
38
39
  const store = new MSSQLStore({
40
+ id: 'mssql-storage',
39
41
  server: 'localhost',
40
42
  port: 1433,
41
43
  database: 'mastra',
@@ -49,6 +51,7 @@ const store = new MSSQLStore({
49
51
 
50
52
  ```typescript
51
53
  const store = new MSSQLStore({
54
+ id: 'mssql-storage',
52
55
  connectionString:
53
56
  'Server=localhost,1433;Database=mastra;User Id=sa;Password=yourPassword;Encrypt=true;TrustServerCertificate=true',
54
57
  schemaName: 'custom_schema', // Use custom schema (default: dbo)
@@ -98,11 +101,15 @@ await store.saveMessages({
98
101
 
99
102
  // Query threads and messages
100
103
  const savedThread = await store.getThreadById({ threadId: 'thread-123' });
101
- const messages = await store.getMessages({ threadId: 'thread-123' });
104
+ const messages = await store.listMessages({ threadId: 'thread-123' });
102
105
  ```
103
106
 
104
107
  ## Configuration
105
108
 
109
+ ### Identifier
110
+
111
+ - `id`: Unique identifier for this store instance (required)
112
+
106
113
  ### Connection Methods
107
114
 
108
115
  MSSQLStore supports multiple connection methods:
@@ -111,6 +118,7 @@ MSSQLStore supports multiple connection methods:
111
118
 
112
119
  ```typescript
113
120
  {
121
+ id: 'mssql-storage',
114
122
  connectionString: 'Server=localhost,1433;Database=mastra;User Id=sa;Password=yourPassword;Encrypt=true;TrustServerCertificate=true';
115
123
  }
116
124
  ```
@@ -118,6 +126,7 @@ MSSQLStore supports multiple connection methods:
118
126
  2. **Server/Port/Database**
119
127
  ```typescript
120
128
  {
129
+ id: 'mssql-storage',
121
130
  server: 'localhost',
122
131
  port: 1433,
123
132
  database: 'mastra',
@@ -161,7 +170,7 @@ MSSQLStore supports multiple connection methods:
161
170
  - Rich metadata support
162
171
  - Update working memory and metadata independently
163
172
 
164
- - **AI Tracing & Observability**
173
+ - **Tracing & Observability**
165
174
  - Trace AI agent execution with spans
166
175
  - Query traces with pagination and filtering
167
176
  - Batch operations for high-volume tracing
@@ -209,14 +218,13 @@ MSSQLStore supports multiple connection methods:
209
218
  - `getThreadById({ threadId })`: Get a thread by ID
210
219
  - `updateThread({ id, title, metadata })`: Update thread title and metadata
211
220
  - `deleteThread({ threadId })`: Delete a thread and its messages
212
- - `getThreadsByResourceIdPaginated({ resourceId, page, perPage, orderBy?, sortDirection? })`: Get paginated threads for a resource
221
+ - `listThreadsByResourceId({ resourceId, offset, limit, orderBy? })`: List paginated threads for a resource
213
222
 
214
223
  ### Messages
215
224
 
216
- - `saveMessages({ messages, format? })`: Save multiple messages with atomic transaction (supports v1 and v2 formats)
217
- - `getMessages({ threadId, format? })`: Get all messages for a thread
218
- - `getMessagesById({ messageIds, format? })`: Get messages by their IDs
219
- - `getMessagesPaginated({ threadId, format?, page?, perPage? })`: Get paginated messages for a thread
225
+ - `saveMessages({ messages })`: Save multiple messages with atomic transaction
226
+ - `listMessagesById({ messageIds })`: Get messages by their IDs
227
+ - `listMessages({ threadId, resourceId?, page?, perPage?, orderBy?, filter? })`: Get paginated messages for a thread with filtering and sorting
220
228
  - `updateMessages({ messages })`: Update existing messages with atomic transaction
221
229
  - `deleteMessages(messageIds)`: Delete specific messages with atomic transaction
222
230
 
@@ -226,15 +234,15 @@ MSSQLStore supports multiple connection methods:
226
234
  - `getResourceById({ resourceId })`: Get a resource by ID
227
235
  - `updateResource({ resourceId, workingMemory?, metadata? })`: Update resource working memory and metadata
228
236
 
229
- ### AI Tracing & Observability
237
+ ### Tracing & Observability
230
238
 
231
- - `createAISpan(span)`: Create an AI trace span
232
- - `updateAISpan({ spanId, traceId, updates })`: Update an existing span
233
- - `getAITrace(traceId)`: Get complete trace with all spans
234
- - `getAITracesPaginated({ filters?, pagination? })`: Query traces with pagination and filters
235
- - `batchCreateAISpans({ records })`: Batch create multiple spans
236
- - `batchUpdateAISpans({ records })`: Batch update multiple spans
237
- - `batchDeleteAITraces({ traceIds })`: Batch delete traces
239
+ - `createSpan(span)`: Create a trace span
240
+ - `updateSpan({ spanId, traceId, updates })`: Update an existing span
241
+ - `getTrace(traceId)`: Get complete trace with all spans
242
+ - `getTracesPaginated({ filters?, pagination? })`: Query traces with pagination and filters
243
+ - `batchCreateSpans({ records })`: Batch create multiple spans
244
+ - `batchUpdateSpans({ records })`: Batch update multiple spans
245
+ - `batchDeleteTraces({ traceIds })`: Batch delete traces
238
246
 
239
247
  ### Index Management
240
248
 
@@ -249,17 +257,17 @@ MSSQLStore supports multiple connection methods:
249
257
  - `loadWorkflowSnapshot({ workflowName, runId })`: Load workflow execution state
250
258
  - `updateWorkflowResults({ workflowName, runId, stepId, result, runtimeContext })`: Update step results (transaction + row locking)
251
259
  - `updateWorkflowState({ workflowName, runId, opts })`: Update workflow run status (transaction + row locking)
252
- - `getWorkflowRuns({ workflowName?, fromDate?, toDate?, limit?, offset?, resourceId? })`: Query workflow runs
260
+ - `listWorkflowRuns({ workflowName?, fromDate?, toDate?, limit?, offset?, resourceId? })`: Query workflow runs
253
261
  - `getWorkflowRunById({ runId, workflowName? })`: Get specific workflow run
254
262
 
255
263
  ### Scores & Evaluation
256
264
 
257
265
  - `saveScore(score)`: Save evaluation score
258
266
  - `getScoreById({ id })`: Get score by ID
259
- - `getScoresByScorerId({ scorerId, pagination, entityId?, entityType?, source? })`: Get scores by scorer
260
- - `getScoresByRunId({ runId, pagination })`: Get scores for a run
261
- - `getScoresByEntityId({ entityId, entityType, pagination })`: Get scores for an entity
262
- - `getScoresBySpan({ traceId, spanId, pagination })`: Get scores for a trace span
267
+ - `listScoresByScorerId({ scorerId, pagination, entityId?, entityType?, source? })`: Get scores by scorer
268
+ - `listScoresByRunId({ runId, pagination })`: Get scores for a run
269
+ - `listScoresByEntityId({ entityId, entityType, pagination })`: Get scores for an entity
270
+ - `listScoresBySpan({ traceId, spanId, pagination })`: Get scores for a trace span
263
271
 
264
272
  ### Traces (Legacy)
265
273