@mastra/mssql 0.0.0-netlify-no-bundle-20251127120354 → 0.0.0-partial-response-backport-20251204204441

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