@mastra/mssql 0.0.0-new-scorer-api-20250801075530 → 0.0.0-playground-studio-cloud-20251031080052
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/CHANGELOG.md +447 -4
- package/README.md +315 -36
- package/dist/index.cjs +2692 -1056
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2693 -1057
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/legacy-evals/index.d.ts +20 -0
- package/dist/storage/domains/legacy-evals/index.d.ts.map +1 -0
- package/dist/storage/domains/memory/index.d.ts +98 -0
- package/dist/storage/domains/memory/index.d.ts.map +1 -0
- package/dist/storage/domains/observability/index.d.ts +44 -0
- package/dist/storage/domains/observability/index.d.ts.map +1 -0
- package/dist/storage/domains/operations/index.d.ts +114 -0
- package/dist/storage/domains/operations/index.d.ts.map +1 -0
- package/dist/storage/domains/scores/index.d.ts +55 -0
- package/dist/storage/domains/scores/index.d.ts.map +1 -0
- package/dist/storage/domains/utils.d.ts +25 -0
- package/dist/storage/domains/utils.d.ts.map +1 -0
- package/dist/storage/domains/workflows/index.d.ts +56 -0
- package/dist/storage/domains/workflows/index.d.ts.map +1 -0
- package/dist/storage/index.d.ts +135 -82
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +24 -10
- package/docker-compose.yaml +0 -14
- package/eslint.config.js +0 -6
- package/src/index.ts +0 -2
- package/src/storage/index.test.ts +0 -2228
- package/src/storage/index.ts +0 -2136
- package/tsconfig.build.json +0 -9
- package/tsconfig.json +0 -5
- package/tsup.config.ts +0 -22
- package/vitest.config.ts +0 -12
package/dist/storage/index.d.ts
CHANGED
|
@@ -3,10 +3,10 @@ export type MastraMessageV2WithTypedContent = Omit<MastraMessageV2, 'content'> &
|
|
|
3
3
|
content: MastraMessageContentV2;
|
|
4
4
|
};
|
|
5
5
|
import type { MastraMessageV1, StorageThreadType } from '@mastra/core/memory';
|
|
6
|
-
import type { ScoreRowData } from '@mastra/core/scores';
|
|
6
|
+
import type { ScoreRowData, ScoringSource } from '@mastra/core/scores';
|
|
7
7
|
import { MastraStorage } from '@mastra/core/storage';
|
|
8
|
-
import type { EvalRow, PaginationInfo, StorageColumn, StorageGetMessagesArg, StorageResourceType, TABLE_NAMES, WorkflowRun, WorkflowRuns, PaginationArgs, StoragePagination } from '@mastra/core/storage';
|
|
9
|
-
import type { WorkflowRunState } from '@mastra/core/workflows';
|
|
8
|
+
import type { EvalRow, PaginationInfo, StorageColumn, StorageGetMessagesArg, StorageResourceType, TABLE_NAMES, WorkflowRun, WorkflowRuns, PaginationArgs, StoragePagination, ThreadSortOptions, StorageDomains, AISpanRecord, AITraceRecord, AITracesPaginatedArg, UpdateAISpanRecord, CreateIndexOptions, IndexInfo, StorageIndexStats } from '@mastra/core/storage';
|
|
9
|
+
import type { StepResult, WorkflowRunState } from '@mastra/core/workflows';
|
|
10
10
|
import sql from 'mssql';
|
|
11
11
|
export type MSSQLConfigType = {
|
|
12
12
|
schemaName?: string;
|
|
@@ -24,9 +24,8 @@ export type MSSQLConfig = MSSQLConfigType;
|
|
|
24
24
|
export declare class MSSQLStore extends MastraStorage {
|
|
25
25
|
pool: sql.ConnectionPool;
|
|
26
26
|
private schema?;
|
|
27
|
-
private setupSchemaPromise;
|
|
28
|
-
private schemaSetupComplete;
|
|
29
27
|
private isConnected;
|
|
28
|
+
stores: StorageDomains;
|
|
30
29
|
constructor(config: MSSQLConfigType);
|
|
31
30
|
init(): Promise<void>;
|
|
32
31
|
private _performInitializationAndStore;
|
|
@@ -36,42 +35,22 @@ export declare class MSSQLStore extends MastraStorage {
|
|
|
36
35
|
hasColumn: boolean;
|
|
37
36
|
createTable: boolean;
|
|
38
37
|
deleteMessages: boolean;
|
|
38
|
+
getScoresBySpan: boolean;
|
|
39
|
+
aiTracing: boolean;
|
|
40
|
+
indexManagement: boolean;
|
|
39
41
|
};
|
|
40
|
-
private getTableName;
|
|
41
|
-
private getSchemaName;
|
|
42
|
-
private transformEvalRow;
|
|
43
42
|
/** @deprecated use getEvals instead */
|
|
44
43
|
getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}): Promise<void>;
|
|
49
|
-
/** @deprecated use getTracesPaginated instead*/
|
|
50
|
-
getTraces(args: {
|
|
51
|
-
name?: string;
|
|
52
|
-
scope?: string;
|
|
53
|
-
attributes?: Record<string, string>;
|
|
54
|
-
filters?: Record<string, any>;
|
|
55
|
-
page: number;
|
|
56
|
-
perPage?: number;
|
|
57
|
-
fromDate?: Date;
|
|
58
|
-
toDate?: Date;
|
|
59
|
-
}): Promise<any[]>;
|
|
60
|
-
getTracesPaginated(args: {
|
|
61
|
-
name?: string;
|
|
62
|
-
scope?: string;
|
|
63
|
-
attributes?: Record<string, string>;
|
|
64
|
-
filters?: Record<string, any>;
|
|
44
|
+
getEvals(options?: {
|
|
45
|
+
agentName?: string;
|
|
46
|
+
type?: 'test' | 'live';
|
|
65
47
|
} & PaginationArgs): Promise<PaginationInfo & {
|
|
66
|
-
|
|
48
|
+
evals: EvalRow[];
|
|
67
49
|
}>;
|
|
68
|
-
private setupSchema;
|
|
69
|
-
protected getSqlType(type: StorageColumn['type'], isPrimaryKey?: boolean): string;
|
|
70
50
|
createTable({ tableName, schema, }: {
|
|
71
51
|
tableName: TABLE_NAMES;
|
|
72
52
|
schema: Record<string, StorageColumn>;
|
|
73
53
|
}): Promise<void>;
|
|
74
|
-
protected getDefaultValue(type: StorageColumn['type']): string;
|
|
75
54
|
alterTable({ tableName, schema, ifNotExists, }: {
|
|
76
55
|
tableName: TABLE_NAMES;
|
|
77
56
|
schema: Record<string, StorageColumn>;
|
|
@@ -80,34 +59,43 @@ export declare class MSSQLStore extends MastraStorage {
|
|
|
80
59
|
clearTable({ tableName }: {
|
|
81
60
|
tableName: TABLE_NAMES;
|
|
82
61
|
}): Promise<void>;
|
|
62
|
+
dropTable({ tableName }: {
|
|
63
|
+
tableName: TABLE_NAMES;
|
|
64
|
+
}): Promise<void>;
|
|
83
65
|
insert({ tableName, record }: {
|
|
84
66
|
tableName: TABLE_NAMES;
|
|
85
67
|
record: Record<string, any>;
|
|
86
68
|
}): Promise<void>;
|
|
69
|
+
batchInsert({ tableName, records }: {
|
|
70
|
+
tableName: TABLE_NAMES;
|
|
71
|
+
records: Record<string, any>[];
|
|
72
|
+
}): Promise<void>;
|
|
87
73
|
load<R>({ tableName, keys }: {
|
|
88
74
|
tableName: TABLE_NAMES;
|
|
89
75
|
keys: Record<string, string>;
|
|
90
76
|
}): Promise<R | null>;
|
|
77
|
+
/**
|
|
78
|
+
* Memory
|
|
79
|
+
*/
|
|
91
80
|
getThreadById({ threadId }: {
|
|
92
81
|
threadId: string;
|
|
93
82
|
}): Promise<StorageThreadType | null>;
|
|
83
|
+
/**
|
|
84
|
+
* @deprecated use getThreadsByResourceIdPaginated instead
|
|
85
|
+
*/
|
|
86
|
+
getThreadsByResourceId(args: {
|
|
87
|
+
resourceId: string;
|
|
88
|
+
} & ThreadSortOptions): Promise<StorageThreadType[]>;
|
|
94
89
|
getThreadsByResourceIdPaginated(args: {
|
|
95
90
|
resourceId: string;
|
|
96
|
-
|
|
91
|
+
page: number;
|
|
92
|
+
perPage: number;
|
|
93
|
+
} & ThreadSortOptions): Promise<PaginationInfo & {
|
|
97
94
|
threads: StorageThreadType[];
|
|
98
95
|
}>;
|
|
99
96
|
saveThread({ thread }: {
|
|
100
97
|
thread: StorageThreadType;
|
|
101
98
|
}): Promise<StorageThreadType>;
|
|
102
|
-
/**
|
|
103
|
-
* @deprecated use getThreadsByResourceIdPaginated instead
|
|
104
|
-
*/
|
|
105
|
-
getThreadsByResourceId(args: {
|
|
106
|
-
resourceId: string;
|
|
107
|
-
}): Promise<StorageThreadType[]>;
|
|
108
|
-
/**
|
|
109
|
-
* Updates a thread's title and metadata, merging with existing metadata. Returns the updated thread.
|
|
110
|
-
*/
|
|
111
99
|
updateThread({ id, title, metadata, }: {
|
|
112
100
|
id: string;
|
|
113
101
|
title: string;
|
|
@@ -116,7 +104,6 @@ export declare class MSSQLStore extends MastraStorage {
|
|
|
116
104
|
deleteThread({ threadId }: {
|
|
117
105
|
threadId: string;
|
|
118
106
|
}): Promise<void>;
|
|
119
|
-
private _getIncludedMessages;
|
|
120
107
|
/**
|
|
121
108
|
* @deprecated use getMessagesPaginated instead
|
|
122
109
|
*/
|
|
@@ -126,12 +113,19 @@ export declare class MSSQLStore extends MastraStorage {
|
|
|
126
113
|
getMessages(args: StorageGetMessagesArg & {
|
|
127
114
|
format: 'v2';
|
|
128
115
|
}): Promise<MastraMessageV2[]>;
|
|
116
|
+
getMessagesById({ messageIds, format }: {
|
|
117
|
+
messageIds: string[];
|
|
118
|
+
format: 'v1';
|
|
119
|
+
}): Promise<MastraMessageV1[]>;
|
|
120
|
+
getMessagesById({ messageIds, format }: {
|
|
121
|
+
messageIds: string[];
|
|
122
|
+
format?: 'v2';
|
|
123
|
+
}): Promise<MastraMessageV2[]>;
|
|
129
124
|
getMessagesPaginated(args: StorageGetMessagesArg & {
|
|
130
125
|
format?: 'v1' | 'v2';
|
|
131
126
|
}): Promise<PaginationInfo & {
|
|
132
127
|
messages: MastraMessageV1[] | MastraMessageV2[];
|
|
133
128
|
}>;
|
|
134
|
-
private _parseAndFormatMessages;
|
|
135
129
|
saveMessages(args: {
|
|
136
130
|
messages: MastraMessageV1[];
|
|
137
131
|
format?: undefined | 'v1';
|
|
@@ -140,17 +134,58 @@ export declare class MSSQLStore extends MastraStorage {
|
|
|
140
134
|
messages: MastraMessageV2[];
|
|
141
135
|
format: 'v2';
|
|
142
136
|
}): Promise<MastraMessageV2[]>;
|
|
143
|
-
|
|
137
|
+
updateMessages({ messages, }: {
|
|
138
|
+
messages: (Partial<Omit<MastraMessageV2, 'createdAt'>> & {
|
|
139
|
+
id: string;
|
|
140
|
+
content?: {
|
|
141
|
+
metadata?: MastraMessageContentV2['metadata'];
|
|
142
|
+
content?: MastraMessageContentV2['content'];
|
|
143
|
+
};
|
|
144
|
+
})[];
|
|
145
|
+
}): Promise<MastraMessageV2[]>;
|
|
146
|
+
deleteMessages(messageIds: string[]): Promise<void>;
|
|
147
|
+
getResourceById({ resourceId }: {
|
|
148
|
+
resourceId: string;
|
|
149
|
+
}): Promise<StorageResourceType | null>;
|
|
150
|
+
saveResource({ resource }: {
|
|
151
|
+
resource: StorageResourceType;
|
|
152
|
+
}): Promise<StorageResourceType>;
|
|
153
|
+
updateResource({ resourceId, workingMemory, metadata, }: {
|
|
154
|
+
resourceId: string;
|
|
155
|
+
workingMemory?: string;
|
|
156
|
+
metadata?: Record<string, unknown>;
|
|
157
|
+
}): Promise<StorageResourceType>;
|
|
158
|
+
/**
|
|
159
|
+
* Workflows
|
|
160
|
+
*/
|
|
161
|
+
updateWorkflowResults({ workflowName, runId, stepId, result, runtimeContext, }: {
|
|
162
|
+
workflowName: string;
|
|
163
|
+
runId: string;
|
|
164
|
+
stepId: string;
|
|
165
|
+
result: StepResult<any, any, any, any>;
|
|
166
|
+
runtimeContext: Record<string, any>;
|
|
167
|
+
}): Promise<Record<string, StepResult<any, any, any, any>>>;
|
|
168
|
+
updateWorkflowState({ workflowName, runId, opts, }: {
|
|
144
169
|
workflowName: string;
|
|
145
170
|
runId: string;
|
|
171
|
+
opts: {
|
|
172
|
+
status: string;
|
|
173
|
+
result?: StepResult<any, any, any, any>;
|
|
174
|
+
error?: string;
|
|
175
|
+
suspendedPaths?: Record<string, number[]>;
|
|
176
|
+
waitingPaths?: Record<string, number[]>;
|
|
177
|
+
};
|
|
178
|
+
}): Promise<WorkflowRunState | undefined>;
|
|
179
|
+
persistWorkflowSnapshot({ workflowName, runId, resourceId, snapshot, }: {
|
|
180
|
+
workflowName: string;
|
|
181
|
+
runId: string;
|
|
182
|
+
resourceId?: string;
|
|
146
183
|
snapshot: WorkflowRunState;
|
|
147
184
|
}): Promise<void>;
|
|
148
185
|
loadWorkflowSnapshot({ workflowName, runId, }: {
|
|
149
186
|
workflowName: string;
|
|
150
187
|
runId: string;
|
|
151
188
|
}): Promise<WorkflowRunState | null>;
|
|
152
|
-
private hasColumn;
|
|
153
|
-
private parseWorkflowRun;
|
|
154
189
|
getWorkflowRuns({ workflowName, fromDate, toDate, limit, offset, resourceId, }?: {
|
|
155
190
|
workflowName?: string;
|
|
156
191
|
fromDate?: Date;
|
|
@@ -163,56 +198,69 @@ export declare class MSSQLStore extends MastraStorage {
|
|
|
163
198
|
runId: string;
|
|
164
199
|
workflowName?: string;
|
|
165
200
|
}): Promise<WorkflowRun | null>;
|
|
166
|
-
updateMessages({ messages, }: {
|
|
167
|
-
messages: (Partial<Omit<MastraMessageV2, 'createdAt'>> & {
|
|
168
|
-
id: string;
|
|
169
|
-
content?: {
|
|
170
|
-
metadata?: MastraMessageContentV2['metadata'];
|
|
171
|
-
content?: MastraMessageContentV2['content'];
|
|
172
|
-
};
|
|
173
|
-
})[];
|
|
174
|
-
}): Promise<MastraMessageV2[]>;
|
|
175
201
|
close(): Promise<void>;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
202
|
+
/**
|
|
203
|
+
* Index Management
|
|
204
|
+
*/
|
|
205
|
+
createIndex(options: CreateIndexOptions): Promise<void>;
|
|
206
|
+
listIndexes(tableName?: string): Promise<IndexInfo[]>;
|
|
207
|
+
describeIndex(indexName: string): Promise<StorageIndexStats>;
|
|
208
|
+
dropIndex(indexName: string): Promise<void>;
|
|
209
|
+
/**
|
|
210
|
+
* AI Tracing / Observability
|
|
211
|
+
*/
|
|
212
|
+
private getObservabilityStore;
|
|
213
|
+
createAISpan(span: AISpanRecord): Promise<void>;
|
|
214
|
+
updateAISpan({ spanId, traceId, updates, }: {
|
|
215
|
+
spanId: string;
|
|
216
|
+
traceId: string;
|
|
217
|
+
updates: Partial<UpdateAISpanRecord>;
|
|
218
|
+
}): Promise<void>;
|
|
219
|
+
getAITrace(traceId: string): Promise<AITraceRecord | null>;
|
|
220
|
+
getAITracesPaginated(args: AITracesPaginatedArg): Promise<{
|
|
221
|
+
pagination: PaginationInfo;
|
|
222
|
+
spans: AISpanRecord[];
|
|
181
223
|
}>;
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}): Promise<
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
224
|
+
batchCreateAISpans(args: {
|
|
225
|
+
records: AISpanRecord[];
|
|
226
|
+
}): Promise<void>;
|
|
227
|
+
batchUpdateAISpans(args: {
|
|
228
|
+
records: {
|
|
229
|
+
traceId: string;
|
|
230
|
+
spanId: string;
|
|
231
|
+
updates: Partial<UpdateAISpanRecord>;
|
|
232
|
+
}[];
|
|
233
|
+
}): Promise<void>;
|
|
234
|
+
batchDeleteAITraces(args: {
|
|
235
|
+
traceIds: string[];
|
|
236
|
+
}): Promise<void>;
|
|
237
|
+
/**
|
|
238
|
+
* Scorers
|
|
239
|
+
*/
|
|
240
|
+
getScoreById({ id: _id }: {
|
|
194
241
|
id: string;
|
|
195
242
|
}): Promise<ScoreRowData | null>;
|
|
196
|
-
|
|
197
|
-
score: ScoreRowData;
|
|
198
|
-
}>;
|
|
199
|
-
getScoresByScorerId({ scorerId, pagination: _pagination, entityId, entityType, }: {
|
|
243
|
+
getScoresByScorerId({ scorerId: _scorerId, pagination: _pagination, entityId: _entityId, entityType: _entityType, source: _source, }: {
|
|
200
244
|
scorerId: string;
|
|
201
245
|
pagination: StoragePagination;
|
|
202
246
|
entityId?: string;
|
|
203
247
|
entityType?: string;
|
|
248
|
+
source?: ScoringSource;
|
|
204
249
|
}): Promise<{
|
|
205
250
|
pagination: PaginationInfo;
|
|
206
251
|
scores: ScoreRowData[];
|
|
207
252
|
}>;
|
|
208
|
-
|
|
253
|
+
saveScore(_score: ScoreRowData): Promise<{
|
|
254
|
+
score: ScoreRowData;
|
|
255
|
+
}>;
|
|
256
|
+
getScoresByRunId({ runId: _runId, pagination: _pagination, }: {
|
|
209
257
|
runId: string;
|
|
210
258
|
pagination: StoragePagination;
|
|
211
259
|
}): Promise<{
|
|
212
260
|
pagination: PaginationInfo;
|
|
213
261
|
scores: ScoreRowData[];
|
|
214
262
|
}>;
|
|
215
|
-
getScoresByEntityId({ entityId, entityType, pagination: _pagination, }: {
|
|
263
|
+
getScoresByEntityId({ entityId: _entityId, entityType: _entityType, pagination: _pagination, }: {
|
|
216
264
|
pagination: StoragePagination;
|
|
217
265
|
entityId: string;
|
|
218
266
|
entityType: string;
|
|
@@ -220,8 +268,13 @@ export declare class MSSQLStore extends MastraStorage {
|
|
|
220
268
|
pagination: PaginationInfo;
|
|
221
269
|
scores: ScoreRowData[];
|
|
222
270
|
}>;
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
271
|
+
getScoresBySpan({ traceId, spanId, pagination: _pagination, }: {
|
|
272
|
+
traceId: string;
|
|
273
|
+
spanId: string;
|
|
274
|
+
pagination: StoragePagination;
|
|
275
|
+
}): Promise<{
|
|
276
|
+
pagination: PaginationInfo;
|
|
277
|
+
scores: ScoreRowData[];
|
|
278
|
+
}>;
|
|
226
279
|
}
|
|
227
280
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAClF,MAAM,MAAM,+BAA+B,GAAG,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,GAAG;IAAE,OAAO,EAAE,sBAAsB,CAAA;CAAE,CAAC;AAErH,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,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AAM,EACb,UAAU,EAAE,WAAW,GACxB,EAAE;QACD,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,iBAAiB,CAAC;KAC/B,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,MAAM,EAAE,YAAY,EAAE,CAAA;KAAE,CAAC;IAI7D,mBAAmB,CAAC,EACxB,QAAQ,EAAE,SAAS,EACnB,UAAU,EAAE,WAAW,EACvB,UAAU,EAAE,WAAW,GACxB,EAAE;QACD,UAAU,EAAE,iBAAiB,CAAC;QAC9B,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,MAAM,EAAE,YAAY,EAAE,CAAA;KAAE,CAAC;IAQ7D,eAAe,CAAC,EACpB,OAAO,EACP,MAAM,EACN,UAAU,EAAE,WAAW,GACxB,EAAE;QACD,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,iBAAiB,CAAC;KAC/B,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,MAAM,EAAE,YAAY,EAAE,CAAA;KAAE,CAAC;CAGpE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mssql",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-playground-studio-cloud-20251031080052",
|
|
4
4
|
"description": "MSSQL provider for Mastra - db storage capabilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,30 +12,44 @@
|
|
|
12
12
|
"default": "./dist/index.js"
|
|
13
13
|
},
|
|
14
14
|
"require": {
|
|
15
|
-
"types": "./dist/index.d.
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
16
|
"default": "./dist/index.cjs"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"./package.json": "./package.json"
|
|
20
20
|
},
|
|
21
|
-
"license": "
|
|
21
|
+
"license": "Apache-2.0",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"mssql": "^
|
|
23
|
+
"mssql": "^11.0.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@microsoft/api-extractor": "^7.52.8",
|
|
27
|
-
"@types/mssql": "^9.1.
|
|
27
|
+
"@types/mssql": "^9.1.8",
|
|
28
28
|
"@types/node": "^20.19.0",
|
|
29
|
-
"eslint": "^9.
|
|
29
|
+
"eslint": "^9.37.0",
|
|
30
30
|
"tsup": "^8.5.0",
|
|
31
31
|
"typescript": "^5.8.3",
|
|
32
32
|
"vitest": "^3.2.4",
|
|
33
|
-
"@internal/lint": "0.0.0-
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
33
|
+
"@internal/lint": "0.0.0-playground-studio-cloud-20251031080052",
|
|
34
|
+
"@internal/storage-test-utils": "0.0.49",
|
|
35
|
+
"@mastra/core": "0.0.0-playground-studio-cloud-20251031080052",
|
|
36
|
+
"@internal/types-builder": "0.0.0-playground-studio-cloud-20251031080052"
|
|
36
37
|
},
|
|
37
38
|
"peerDependencies": {
|
|
38
|
-
"@mastra/core": "0.0.0-
|
|
39
|
+
"@mastra/core": "0.0.0-playground-studio-cloud-20251031080052"
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"dist",
|
|
43
|
+
"CHANGELOG.md"
|
|
44
|
+
],
|
|
45
|
+
"homepage": "https://mastra.ai",
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "git+https://github.com/mastra-ai/mastra.git",
|
|
49
|
+
"directory": "stores/mssql"
|
|
50
|
+
},
|
|
51
|
+
"bugs": {
|
|
52
|
+
"url": "https://github.com/mastra-ai/mastra/issues"
|
|
39
53
|
},
|
|
40
54
|
"scripts": {
|
|
41
55
|
"build": "tsup --silent --config tsup.config.ts",
|
package/docker-compose.yaml
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
services:
|
|
2
|
-
mssql:
|
|
3
|
-
image: mcr.microsoft.com/mssql/server:2025-latest
|
|
4
|
-
environment:
|
|
5
|
-
- ACCEPT_EULA=Y
|
|
6
|
-
- SA_PASSWORD=Your_password123
|
|
7
|
-
ports:
|
|
8
|
-
- '1433:1433'
|
|
9
|
-
healthcheck:
|
|
10
|
-
test: ['CMD-SHELL', 'echo > /dev/tcp/localhost/1433']
|
|
11
|
-
interval: 10s
|
|
12
|
-
timeout: 5s
|
|
13
|
-
retries: 10
|
|
14
|
-
start_period: 20s
|
package/eslint.config.js
DELETED
package/src/index.ts
DELETED