@mastra/mssql 0.0.0-iterate-traces-ui-again-20250912091900 → 0.0.0-jail-fs-20260105160110

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.
Files changed (35) hide show
  1. package/CHANGELOG.md +1419 -3
  2. package/README.md +324 -37
  3. package/dist/docs/README.md +31 -0
  4. package/dist/docs/SKILL.md +32 -0
  5. package/dist/docs/SOURCE_MAP.json +6 -0
  6. package/dist/docs/storage/01-reference.md +141 -0
  7. package/dist/index.cjs +2500 -1146
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.d.ts +1 -0
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +2497 -1147
  12. package/dist/index.js.map +1 -1
  13. package/dist/storage/db/index.d.ts +172 -0
  14. package/dist/storage/db/index.d.ts.map +1 -0
  15. package/dist/storage/db/utils.d.ts +21 -0
  16. package/dist/storage/db/utils.d.ts.map +1 -0
  17. package/dist/storage/domains/memory/index.d.ts +38 -52
  18. package/dist/storage/domains/memory/index.d.ts.map +1 -1
  19. package/dist/storage/domains/observability/index.d.ts +46 -0
  20. package/dist/storage/domains/observability/index.d.ts.map +1 -0
  21. package/dist/storage/domains/scores/index.d.ts +38 -25
  22. package/dist/storage/domains/scores/index.d.ts.map +1 -1
  23. package/dist/storage/domains/utils.d.ts +19 -0
  24. package/dist/storage/domains/utils.d.ts.map +1 -1
  25. package/dist/storage/domains/workflows/index.d.ts +39 -28
  26. package/dist/storage/domains/workflows/index.d.ts.map +1 -1
  27. package/dist/storage/index.d.ts +115 -213
  28. package/dist/storage/index.d.ts.map +1 -1
  29. package/package.json +15 -10
  30. package/dist/storage/domains/legacy-evals/index.d.ts +0 -20
  31. package/dist/storage/domains/legacy-evals/index.d.ts.map +0 -1
  32. package/dist/storage/domains/operations/index.d.ts +0 -51
  33. package/dist/storage/domains/operations/index.d.ts.map +0 -1
  34. package/dist/storage/domains/traces/index.d.ts +0 -37
  35. package/dist/storage/domains/traces/index.d.ts.map +0 -1
@@ -1,17 +1,98 @@
1
- import type { MastraMessageContentV2, MastraMessageV2 } from '@mastra/core/agent';
2
- export type MastraMessageV2WithTypedContent = Omit<MastraMessageV2, 'content'> & {
3
- content: MastraMessageContentV2;
4
- };
5
- import type { MastraMessageV1, StorageThreadType } from '@mastra/core/memory';
6
- import type { ScoreRowData } from '@mastra/core/scores';
7
1
  import { MastraStorage } from '@mastra/core/storage';
8
- import type { EvalRow, PaginationInfo, StorageColumn, StorageGetMessagesArg, StorageResourceType, TABLE_NAMES, WorkflowRun, WorkflowRuns, PaginationArgs, StoragePagination, ThreadSortOptions, StorageDomains, StorageGetTracesArg, StorageGetTracesPaginatedArg } from '@mastra/core/storage';
9
- import type { Trace } from '@mastra/core/telemetry';
10
- import type { StepResult, WorkflowRunState } from '@mastra/core/workflows';
2
+ import type { StorageDomains, CreateIndexOptions } from '@mastra/core/storage';
11
3
  import sql from 'mssql';
4
+ import { MemoryMSSQL } from './domains/memory/index.js';
5
+ import { ObservabilityMSSQL } from './domains/observability/index.js';
6
+ import { ScoresMSSQL } from './domains/scores/index.js';
7
+ import { WorkflowsMSSQL } from './domains/workflows/index.js';
8
+ export { MemoryMSSQL, ObservabilityMSSQL, ScoresMSSQL, WorkflowsMSSQL };
9
+ export type { MssqlDomainConfig } from './db/index.js';
10
+ /**
11
+ * MSSQL configuration type.
12
+ *
13
+ * Accepts either:
14
+ * - A pre-configured connection pool: `{ id, pool, schemaName? }`
15
+ * - Connection string: `{ id, connectionString, ... }`
16
+ * - Server/port config: `{ id, server, port, database, user, password, ... }`
17
+ */
12
18
  export type MSSQLConfigType = {
19
+ id: string;
13
20
  schemaName?: string;
21
+ /**
22
+ * When true, automatic initialization (table creation/migrations) is disabled.
23
+ * This is useful for CI/CD pipelines where you want to:
24
+ * 1. Run migrations explicitly during deployment (not at runtime)
25
+ * 2. Use different credentials for schema changes vs runtime operations
26
+ *
27
+ * When disableInit is true:
28
+ * - The storage will not automatically create/alter tables on first use
29
+ * - You must call `storage.init()` explicitly in your CI/CD scripts
30
+ *
31
+ * @example
32
+ * // In CI/CD script:
33
+ * const storage = new MSSQLStore({ ...config, disableInit: false });
34
+ * await storage.init(); // Explicitly run migrations
35
+ *
36
+ * // In runtime application:
37
+ * const storage = new MSSQLStore({ ...config, disableInit: true });
38
+ * // No auto-init, tables must already exist
39
+ */
40
+ disableInit?: boolean;
41
+ /**
42
+ * When true, default indexes will not be created during initialization.
43
+ * This is useful when:
44
+ * 1. You want to manage indexes separately or use custom indexes only
45
+ * 2. Default indexes don't match your query patterns
46
+ * 3. You want to reduce initialization time in development
47
+ *
48
+ * @default false
49
+ */
50
+ skipDefaultIndexes?: boolean;
51
+ /**
52
+ * Custom indexes to create during initialization.
53
+ * These indexes are created in addition to default indexes (unless skipDefaultIndexes is true).
54
+ *
55
+ * Each index must specify which table it belongs to. The store will route each index
56
+ * to the appropriate domain based on the table name.
57
+ *
58
+ * @example
59
+ * ```typescript
60
+ * const store = new MSSQLStore({
61
+ * connectionString: '...',
62
+ * indexes: [
63
+ * { name: 'my_threads_type_idx', table: 'mastra_threads', columns: ['JSON_VALUE(metadata, \'$.type\')'] },
64
+ * ],
65
+ * });
66
+ * ```
67
+ */
68
+ indexes?: CreateIndexOptions[];
14
69
  } & ({
70
+ /**
71
+ * Pre-configured mssql ConnectionPool.
72
+ * Use this when you need to configure the pool before initialization,
73
+ * e.g., to add pool listeners or set connection-level settings.
74
+ *
75
+ * @example
76
+ * ```typescript
77
+ * import sql from 'mssql';
78
+ *
79
+ * const pool = new sql.ConnectionPool({
80
+ * server: 'localhost',
81
+ * database: 'mydb',
82
+ * user: 'user',
83
+ * password: 'password',
84
+ * });
85
+ *
86
+ * // Custom setup before using
87
+ * pool.on('connect', () => {
88
+ * console.log('Pool connected');
89
+ * });
90
+ *
91
+ * const store = new MSSQLStore({ id: 'my-store', pool });
92
+ * ```
93
+ */
94
+ pool: sql.ConnectionPool;
95
+ } | {
15
96
  server: string;
16
97
  port: number;
17
98
  database: string;
@@ -22,6 +103,28 @@ export type MSSQLConfigType = {
22
103
  connectionString: string;
23
104
  });
24
105
  export type MSSQLConfig = MSSQLConfigType;
106
+ /**
107
+ * MSSQL storage adapter for Mastra.
108
+ *
109
+ * Access domain-specific storage via `getStore()`:
110
+ *
111
+ * @example
112
+ * ```typescript
113
+ * const storage = new MSSQLStore({ id: 'my-store', connectionString: '...' });
114
+ *
115
+ * // Access memory domain
116
+ * const memory = await storage.getStore('memory');
117
+ * await memory?.saveThread({ thread });
118
+ *
119
+ * // Access workflows domain
120
+ * const workflows = await storage.getStore('workflows');
121
+ * await workflows?.persistWorkflowSnapshot({ workflowName, runId, snapshot });
122
+ *
123
+ * // Access observability domain
124
+ * const observability = await storage.getStore('observability');
125
+ * await observability?.createSpan(span);
126
+ * ```
127
+ */
25
128
  export declare class MSSQLStore extends MastraStorage {
26
129
  pool: sql.ConnectionPool;
27
130
  private schema?;
@@ -30,212 +133,11 @@ export declare class MSSQLStore extends MastraStorage {
30
133
  constructor(config: MSSQLConfigType);
31
134
  init(): Promise<void>;
32
135
  private _performInitializationAndStore;
33
- get supports(): {
34
- selectByIncludeResourceScope: boolean;
35
- resourceWorkingMemory: boolean;
36
- hasColumn: boolean;
37
- createTable: boolean;
38
- deleteMessages: boolean;
39
- };
40
- /** @deprecated use getEvals instead */
41
- getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
42
- getEvals(options?: {
43
- agentName?: string;
44
- type?: 'test' | 'live';
45
- } & PaginationArgs): Promise<PaginationInfo & {
46
- evals: EvalRow[];
47
- }>;
48
136
  /**
49
- * @deprecated use getTracesPaginated instead
137
+ * Closes the MSSQL connection pool.
138
+ *
139
+ * This will close the connection pool, including pre-configured pools.
50
140
  */
51
- getTraces(args: StorageGetTracesArg): Promise<Trace[]>;
52
- getTracesPaginated(args: StorageGetTracesPaginatedArg): Promise<PaginationInfo & {
53
- traces: Trace[];
54
- }>;
55
- batchTraceInsert({ records }: {
56
- records: Record<string, any>[];
57
- }): Promise<void>;
58
- createTable({ tableName, schema, }: {
59
- tableName: TABLE_NAMES;
60
- schema: Record<string, StorageColumn>;
61
- }): Promise<void>;
62
- alterTable({ tableName, schema, ifNotExists, }: {
63
- tableName: TABLE_NAMES;
64
- schema: Record<string, StorageColumn>;
65
- ifNotExists: string[];
66
- }): Promise<void>;
67
- clearTable({ tableName }: {
68
- tableName: TABLE_NAMES;
69
- }): Promise<void>;
70
- dropTable({ tableName }: {
71
- tableName: TABLE_NAMES;
72
- }): Promise<void>;
73
- insert({ tableName, record }: {
74
- tableName: TABLE_NAMES;
75
- record: Record<string, any>;
76
- }): Promise<void>;
77
- batchInsert({ tableName, records }: {
78
- tableName: TABLE_NAMES;
79
- records: Record<string, any>[];
80
- }): Promise<void>;
81
- load<R>({ tableName, keys }: {
82
- tableName: TABLE_NAMES;
83
- keys: Record<string, string>;
84
- }): Promise<R | null>;
85
- /**
86
- * Memory
87
- */
88
- getThreadById({ threadId }: {
89
- threadId: string;
90
- }): Promise<StorageThreadType | null>;
91
- /**
92
- * @deprecated use getThreadsByResourceIdPaginated instead
93
- */
94
- getThreadsByResourceId(args: {
95
- resourceId: string;
96
- } & ThreadSortOptions): Promise<StorageThreadType[]>;
97
- getThreadsByResourceIdPaginated(args: {
98
- resourceId: string;
99
- page: number;
100
- perPage: number;
101
- } & ThreadSortOptions): Promise<PaginationInfo & {
102
- threads: StorageThreadType[];
103
- }>;
104
- saveThread({ thread }: {
105
- thread: StorageThreadType;
106
- }): Promise<StorageThreadType>;
107
- updateThread({ id, title, metadata, }: {
108
- id: string;
109
- title: string;
110
- metadata: Record<string, unknown>;
111
- }): Promise<StorageThreadType>;
112
- deleteThread({ threadId }: {
113
- threadId: string;
114
- }): Promise<void>;
115
- /**
116
- * @deprecated use getMessagesPaginated instead
117
- */
118
- getMessages(args: StorageGetMessagesArg & {
119
- format?: 'v1';
120
- }): Promise<MastraMessageV1[]>;
121
- getMessages(args: StorageGetMessagesArg & {
122
- format: 'v2';
123
- }): Promise<MastraMessageV2[]>;
124
- getMessagesById({ messageIds, format }: {
125
- messageIds: string[];
126
- format: 'v1';
127
- }): Promise<MastraMessageV1[]>;
128
- getMessagesById({ messageIds, format }: {
129
- messageIds: string[];
130
- format?: 'v2';
131
- }): Promise<MastraMessageV2[]>;
132
- getMessagesPaginated(args: StorageGetMessagesArg & {
133
- format?: 'v1' | 'v2';
134
- }): Promise<PaginationInfo & {
135
- messages: MastraMessageV1[] | MastraMessageV2[];
136
- }>;
137
- saveMessages(args: {
138
- messages: MastraMessageV1[];
139
- format?: undefined | 'v1';
140
- }): Promise<MastraMessageV1[]>;
141
- saveMessages(args: {
142
- messages: MastraMessageV2[];
143
- format: 'v2';
144
- }): Promise<MastraMessageV2[]>;
145
- updateMessages({ messages, }: {
146
- messages: (Partial<Omit<MastraMessageV2, 'createdAt'>> & {
147
- id: string;
148
- content?: {
149
- metadata?: MastraMessageContentV2['metadata'];
150
- content?: MastraMessageContentV2['content'];
151
- };
152
- })[];
153
- }): Promise<MastraMessageV2[]>;
154
- deleteMessages(messageIds: string[]): Promise<void>;
155
- getResourceById({ resourceId }: {
156
- resourceId: string;
157
- }): Promise<StorageResourceType | null>;
158
- saveResource({ resource }: {
159
- resource: StorageResourceType;
160
- }): Promise<StorageResourceType>;
161
- updateResource({ resourceId, workingMemory, metadata, }: {
162
- resourceId: string;
163
- workingMemory?: string;
164
- metadata?: Record<string, unknown>;
165
- }): Promise<StorageResourceType>;
166
- /**
167
- * Workflows
168
- */
169
- updateWorkflowResults({ workflowName, runId, stepId, result, runtimeContext, }: {
170
- workflowName: string;
171
- runId: string;
172
- stepId: string;
173
- result: StepResult<any, any, any, any>;
174
- runtimeContext: Record<string, any>;
175
- }): Promise<Record<string, StepResult<any, any, any, any>>>;
176
- updateWorkflowState({ workflowName, runId, opts, }: {
177
- workflowName: string;
178
- runId: string;
179
- opts: {
180
- status: string;
181
- result?: StepResult<any, any, any, any>;
182
- error?: string;
183
- suspendedPaths?: Record<string, number[]>;
184
- waitingPaths?: Record<string, number[]>;
185
- };
186
- }): Promise<WorkflowRunState | undefined>;
187
- persistWorkflowSnapshot({ workflowName, runId, snapshot, }: {
188
- workflowName: string;
189
- runId: string;
190
- snapshot: WorkflowRunState;
191
- }): Promise<void>;
192
- loadWorkflowSnapshot({ workflowName, runId, }: {
193
- workflowName: string;
194
- runId: string;
195
- }): Promise<WorkflowRunState | null>;
196
- getWorkflowRuns({ workflowName, fromDate, toDate, limit, offset, resourceId, }?: {
197
- workflowName?: string;
198
- fromDate?: Date;
199
- toDate?: Date;
200
- limit?: number;
201
- offset?: number;
202
- resourceId?: string;
203
- }): Promise<WorkflowRuns>;
204
- getWorkflowRunById({ runId, workflowName, }: {
205
- runId: string;
206
- workflowName?: string;
207
- }): Promise<WorkflowRun | null>;
208
141
  close(): Promise<void>;
209
- /**
210
- * Scorers
211
- */
212
- getScoreById({ id: _id }: {
213
- id: string;
214
- }): Promise<ScoreRowData | null>;
215
- getScoresByScorerId({ scorerId: _scorerId, pagination: _pagination, }: {
216
- scorerId: string;
217
- pagination: StoragePagination;
218
- }): Promise<{
219
- pagination: PaginationInfo;
220
- scores: ScoreRowData[];
221
- }>;
222
- saveScore(_score: ScoreRowData): Promise<{
223
- score: ScoreRowData;
224
- }>;
225
- getScoresByRunId({ runId: _runId, pagination: _pagination, }: {
226
- runId: string;
227
- pagination: StoragePagination;
228
- }): Promise<{
229
- pagination: PaginationInfo;
230
- scores: ScoreRowData[];
231
- }>;
232
- getScoresByEntityId({ entityId: _entityId, entityType: _entityType, pagination: _pagination, }: {
233
- pagination: StoragePagination;
234
- entityId: string;
235
- entityType: string;
236
- }): Promise<{
237
- pagination: PaginationInfo;
238
- scores: ScoreRowData[];
239
- }>;
240
142
  }
241
143
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sB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20250912091900",
3
+ "version": "0.0.0-jail-fs-20260105160110",
4
4
  "description": "MSSQL provider for Mastra - db storage capabilities",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -23,20 +23,21 @@
23
23
  "mssql": "^11.0.1"
24
24
  },
25
25
  "devDependencies": {
26
- "@microsoft/api-extractor": "^7.52.8",
27
26
  "@types/mssql": "^9.1.8",
28
- "@types/node": "^20.19.0",
29
- "eslint": "^9.29.0",
27
+ "@types/node": "22.13.17",
28
+ "@vitest/coverage-v8": "4.0.12",
29
+ "@vitest/ui": "4.0.12",
30
+ "eslint": "^9.37.0",
30
31
  "tsup": "^8.5.0",
31
32
  "typescript": "^5.8.3",
32
- "vitest": "^3.2.4",
33
- "@internal/lint": "0.0.0-iterate-traces-ui-again-20250912091900",
34
- "@internal/types-builder": "0.0.0-iterate-traces-ui-again-20250912091900",
35
- "@mastra/core": "0.0.0-iterate-traces-ui-again-20250912091900",
36
- "@internal/storage-test-utils": "0.0.35"
33
+ "vitest": "4.0.16",
34
+ "@internal/lint": "0.0.0-jail-fs-20260105160110",
35
+ "@internal/storage-test-utils": "0.0.49",
36
+ "@internal/types-builder": "0.0.0-jail-fs-20260105160110",
37
+ "@mastra/core": "0.0.0-jail-fs-20260105160110"
37
38
  },
38
39
  "peerDependencies": {
39
- "@mastra/core": "0.0.0-iterate-traces-ui-again-20250912091900"
40
+ "@mastra/core": "0.0.0-jail-fs-20260105160110"
40
41
  },
41
42
  "files": [
42
43
  "dist",
@@ -51,8 +52,12 @@
51
52
  "bugs": {
52
53
  "url": "https://github.com/mastra-ai/mastra/issues"
53
54
  },
55
+ "engines": {
56
+ "node": ">=22.13.0"
57
+ },
54
58
  "scripts": {
55
59
  "build": "tsup --silent --config tsup.config.ts",
60
+ "postbuild": "pnpx tsx ../../scripts/generate-package-docs.ts stores/mssql",
56
61
  "build:watch": "tsup --watch --silent --config tsup.config.ts",
57
62
  "pretest": "docker compose up -d && (for i in $(seq 1 30); do docker compose ps | grep mssql && break || sleep 1; done) && (for i in $(seq 1 30); do docker inspect --format='{{.State.Health.Status}}' $(docker compose ps -q mssql) | grep healthy && break || sleep 2; done)",
58
63
  "test": "vitest run",
@@ -1,20 +0,0 @@
1
- import { LegacyEvalsStorage } from '@mastra/core/storage';
2
- import type { PaginationArgs, PaginationInfo, EvalRow } from '@mastra/core/storage';
3
- import sql from 'mssql';
4
- export declare class LegacyEvalsMSSQL extends LegacyEvalsStorage {
5
- private pool;
6
- private schema;
7
- constructor({ pool, schema }: {
8
- pool: sql.ConnectionPool;
9
- schema: string;
10
- });
11
- /** @deprecated use getEvals instead */
12
- getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
13
- getEvals(options?: {
14
- agentName?: string;
15
- type?: 'test' | 'live';
16
- } & PaginationArgs): Promise<PaginationInfo & {
17
- evals: EvalRow[];
18
- }>;
19
- }
20
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/legacy-evals/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAe,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,GAAG,MAAM,OAAO,CAAC;AA8BxB,qBAAa,gBAAiB,SAAQ,kBAAkB;IACtD,OAAO,CAAC,IAAI,CAAqB;IACjC,OAAO,CAAC,MAAM,CAAS;gBACX,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QAAE,IAAI,EAAE,GAAG,CAAC,cAAc,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;IAM1E,uCAAuC;IACjC,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IA0BlF,QAAQ,CACZ,OAAO,GAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KACxB,GAAG,cAAmB,GACtB,OAAO,CAAC,cAAc,GAAG;QAAE,KAAK,EAAE,OAAO,EAAE,CAAA;KAAE,CAAC;CAmGlD"}
@@ -1,51 +0,0 @@
1
- import { StoreOperations } from '@mastra/core/storage';
2
- import type { StorageColumn, TABLE_NAMES } from '@mastra/core/storage';
3
- import sql from 'mssql';
4
- export declare class StoreOperationsMSSQL extends StoreOperations {
5
- pool: sql.ConnectionPool;
6
- schemaName?: string;
7
- private setupSchemaPromise;
8
- private schemaSetupComplete;
9
- protected getSqlType(type: StorageColumn['type'], isPrimaryKey?: boolean): string;
10
- constructor({ pool, schemaName }: {
11
- pool: sql.ConnectionPool;
12
- schemaName?: string;
13
- });
14
- hasColumn(table: string, column: string): Promise<boolean>;
15
- private setupSchema;
16
- insert({ tableName, record }: {
17
- tableName: TABLE_NAMES;
18
- record: Record<string, any>;
19
- }): Promise<void>;
20
- clearTable({ tableName }: {
21
- tableName: TABLE_NAMES;
22
- }): Promise<void>;
23
- protected getDefaultValue(type: StorageColumn['type']): string;
24
- createTable({ tableName, schema, }: {
25
- tableName: TABLE_NAMES;
26
- schema: Record<string, StorageColumn>;
27
- }): Promise<void>;
28
- /**
29
- * Alters table schema to add columns if they don't exist
30
- * @param tableName Name of the table
31
- * @param schema Schema of the table
32
- * @param ifNotExists Array of column names to add if they don't exist
33
- */
34
- alterTable({ tableName, schema, ifNotExists, }: {
35
- tableName: TABLE_NAMES;
36
- schema: Record<string, StorageColumn>;
37
- ifNotExists: string[];
38
- }): Promise<void>;
39
- load<R>({ tableName, keys }: {
40
- tableName: TABLE_NAMES;
41
- keys: Record<string, string>;
42
- }): Promise<R | null>;
43
- batchInsert({ tableName, records }: {
44
- tableName: TABLE_NAMES;
45
- records: Record<string, any>[];
46
- }): Promise<void>;
47
- dropTable({ tableName }: {
48
- tableName: TABLE_NAMES;
49
- }): Promise<void>;
50
- }
51
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/operations/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAA2B,MAAM,sBAAsB,CAAC;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEvE,OAAO,GAAG,MAAM,OAAO,CAAC;AAGxB,qBAAa,oBAAqB,SAAQ,eAAe;IAChD,IAAI,EAAE,GAAG,CAAC,cAAc,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,kBAAkB,CAA8B;IACxD,OAAO,CAAC,mBAAmB,CAAkC;IAE7D,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,YAAY,UAAQ,GAAG,MAAM;gBAyBnE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE;QAAE,IAAI,EAAE,GAAG,CAAC,cAAc,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE;IAM7E,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;YAalD,WAAW;IA2CnB,MAAM,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;QAAE,SAAS,EAAE,WAAW,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAiCrG,UAAU,CAAC,EAAE,SAAS,EAAE,EAAE;QAAE,SAAS,EAAE,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA6B1E,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,MAAM;IAWxD,WAAW,CAAC,EAChB,SAAS,EACT,MAAM,GACP,EAAE;QACD,SAAS,EAAE,WAAW,CAAC;QACvB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;KACvC,GAAG,OAAO,CAAC,IAAI,CAAC;IAsFjB;;;;;OAKG;IACG,UAAU,CAAC,EACf,SAAS,EACT,MAAM,EACN,WAAW,GACZ,EAAE;QACD,SAAS,EAAE,WAAW,CAAC;QACvB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QACtC,WAAW,EAAE,MAAM,EAAE,CAAC;KACvB,GAAG,OAAO,CAAC,IAAI,CAAC;IAwCX,IAAI,CAAC,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE;QAAE,SAAS,EAAE,WAAW,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAsCzG,WAAW,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;QAAE,SAAS,EAAE,WAAW,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAyB9G,SAAS,CAAC,EAAE,SAAS,EAAE,EAAE;QAAE,SAAS,EAAE,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAkB1E"}
@@ -1,37 +0,0 @@
1
- import type { PaginationInfo, PaginationArgs } from '@mastra/core/storage';
2
- import { TracesStorage } from '@mastra/core/storage';
3
- import sql from 'mssql';
4
- import type { StoreOperationsMSSQL } from '../operations/index.js';
5
- export declare class TracesMSSQL extends TracesStorage {
6
- pool: sql.ConnectionPool;
7
- private operations;
8
- private schema?;
9
- constructor({ pool, operations, schema, }: {
10
- pool: sql.ConnectionPool;
11
- operations: StoreOperationsMSSQL;
12
- schema?: string;
13
- });
14
- /** @deprecated use getTracesPaginated instead*/
15
- getTraces(args: {
16
- name?: string;
17
- scope?: string;
18
- attributes?: Record<string, string>;
19
- filters?: Record<string, any>;
20
- page: number;
21
- perPage?: number;
22
- fromDate?: Date;
23
- toDate?: Date;
24
- }): Promise<any[]>;
25
- getTracesPaginated(args: {
26
- name?: string;
27
- scope?: string;
28
- attributes?: Record<string, string>;
29
- filters?: Record<string, any>;
30
- } & PaginationArgs): Promise<PaginationInfo & {
31
- traces: any[];
32
- }>;
33
- batchTraceInsert({ records }: {
34
- records: Record<string, any>[];
35
- }): Promise<void>;
36
- }
37
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/traces/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAgB,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEnE,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAG1D,qBAAa,WAAY,SAAQ,aAAa;IACrC,IAAI,EAAE,GAAG,CAAC,cAAc,CAAC;IAChC,OAAO,CAAC,UAAU,CAAuB;IACzC,OAAO,CAAC,MAAM,CAAC,CAAS;gBAEZ,EACV,IAAI,EACJ,UAAU,EACV,MAAM,GACP,EAAE;QACD,IAAI,EAAE,GAAG,CAAC,cAAc,CAAC;QACzB,UAAU,EAAE,oBAAoB,CAAC;QACjC,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB;IAOD,gDAAgD;IACnC,SAAS,CAAC,IAAI,EAAE;QAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACpC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC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