@mastra/mssql 0.0.0-update-stores-peerDeps-20250723031338 → 0.0.0-vector-extension-schema-20250922130418

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,250 +0,0 @@
1
- import type { EvalRow } from '@mastra/core/storage';
2
- import type { MastraMessageContentV2 } from '@mastra/core/agent';
3
- import type { MastraMessageV1 } from '@mastra/core/memory';
4
- import type { MastraMessageV2 } from '@mastra/core/agent';
5
- import { MastraStorage } from '@mastra/core/storage';
6
- import type { PaginationArgs } from '@mastra/core/storage';
7
- import type { PaginationInfo } from '@mastra/core/storage';
8
- import type { ScoreRowData } from '@mastra/core/scores';
9
- import sql from 'mssql';
10
- import type { StorageColumn } from '@mastra/core/storage';
11
- import type { StorageGetMessagesArg } from '@mastra/core/storage';
12
- import type { StoragePagination } from '@mastra/core/storage';
13
- import type { StorageResourceType } from '@mastra/core/storage';
14
- import type { StorageThreadType } from '@mastra/core/memory';
15
- import type { TABLE_NAMES } from '@mastra/core/storage';
16
- import type { WorkflowRun } from '@mastra/core/storage';
17
- import type { WorkflowRuns } from '@mastra/core/storage';
18
- import type { WorkflowRunState } from '@mastra/core/workflows';
19
-
20
- declare type MastraMessageV2WithTypedContent = Omit<MastraMessageV2, 'content'> & {
21
- content: MastraMessageContentV2;
22
- };
23
- export { MastraMessageV2WithTypedContent }
24
- export { MastraMessageV2WithTypedContent as MastraMessageV2WithTypedContent_alias_1 }
25
-
26
- declare type MSSQLConfig = MSSQLConfigType;
27
- export { MSSQLConfig }
28
- export { MSSQLConfig as MSSQLConfig_alias_1 }
29
-
30
- declare type MSSQLConfigType = {
31
- schemaName?: string;
32
- } & ({
33
- server: string;
34
- port: number;
35
- database: string;
36
- user: string;
37
- password: string;
38
- options?: sql.IOptions;
39
- } | {
40
- connectionString: string;
41
- });
42
- export { MSSQLConfigType }
43
- export { MSSQLConfigType as MSSQLConfigType_alias_1 }
44
-
45
- declare class MSSQLStore extends MastraStorage {
46
- pool: sql.ConnectionPool;
47
- private schema?;
48
- private setupSchemaPromise;
49
- private schemaSetupComplete;
50
- private isConnected;
51
- constructor(config: MSSQLConfigType);
52
- init(): Promise<void>;
53
- private _performInitializationAndStore;
54
- get supports(): {
55
- selectByIncludeResourceScope: boolean;
56
- resourceWorkingMemory: boolean;
57
- hasColumn: boolean;
58
- createTable: boolean;
59
- };
60
- private getTableName;
61
- private getSchemaName;
62
- private transformEvalRow;
63
- /** @deprecated use getEvals instead */
64
- getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
65
- batchInsert({ tableName, records }: {
66
- tableName: TABLE_NAMES;
67
- records: Record<string, any>[];
68
- }): Promise<void>;
69
- /** @deprecated use getTracesPaginated instead*/
70
- getTraces(args: {
71
- name?: string;
72
- scope?: string;
73
- attributes?: Record<string, string>;
74
- filters?: Record<string, any>;
75
- page: number;
76
- perPage?: number;
77
- fromDate?: Date;
78
- toDate?: Date;
79
- }): Promise<any[]>;
80
- getTracesPaginated(args: {
81
- name?: string;
82
- scope?: string;
83
- attributes?: Record<string, string>;
84
- filters?: Record<string, any>;
85
- } & PaginationArgs): Promise<PaginationInfo & {
86
- traces: any[];
87
- }>;
88
- private setupSchema;
89
- protected getSqlType(type: StorageColumn['type'], isPrimaryKey?: boolean): string;
90
- createTable({ tableName, schema, }: {
91
- tableName: TABLE_NAMES;
92
- schema: Record<string, StorageColumn>;
93
- }): Promise<void>;
94
- protected getDefaultValue(type: StorageColumn['type']): string;
95
- alterTable({ tableName, schema, ifNotExists, }: {
96
- tableName: TABLE_NAMES;
97
- schema: Record<string, StorageColumn>;
98
- ifNotExists: string[];
99
- }): Promise<void>;
100
- clearTable({ tableName }: {
101
- tableName: TABLE_NAMES;
102
- }): Promise<void>;
103
- insert({ tableName, record }: {
104
- tableName: TABLE_NAMES;
105
- record: Record<string, any>;
106
- }): Promise<void>;
107
- load<R>({ tableName, keys }: {
108
- tableName: TABLE_NAMES;
109
- keys: Record<string, string>;
110
- }): Promise<R | null>;
111
- getThreadById({ threadId }: {
112
- threadId: string;
113
- }): Promise<StorageThreadType | null>;
114
- getThreadsByResourceIdPaginated(args: {
115
- resourceId: string;
116
- } & PaginationArgs): Promise<PaginationInfo & {
117
- threads: StorageThreadType[];
118
- }>;
119
- saveThread({ thread }: {
120
- thread: StorageThreadType;
121
- }): Promise<StorageThreadType>;
122
- /**
123
- * @deprecated use getThreadsByResourceIdPaginated instead
124
- */
125
- getThreadsByResourceId(args: {
126
- resourceId: string;
127
- }): Promise<StorageThreadType[]>;
128
- /**
129
- * Updates a thread's title and metadata, merging with existing metadata. Returns the updated thread.
130
- */
131
- updateThread({ id, title, metadata, }: {
132
- id: string;
133
- title: string;
134
- metadata: Record<string, unknown>;
135
- }): Promise<StorageThreadType>;
136
- deleteThread({ threadId }: {
137
- threadId: string;
138
- }): Promise<void>;
139
- private _getIncludedMessages;
140
- /**
141
- * @deprecated use getMessagesPaginated instead
142
- */
143
- getMessages(args: StorageGetMessagesArg & {
144
- format?: 'v1';
145
- }): Promise<MastraMessageV1[]>;
146
- getMessages(args: StorageGetMessagesArg & {
147
- format: 'v2';
148
- }): Promise<MastraMessageV2[]>;
149
- getMessagesPaginated(args: StorageGetMessagesArg & {
150
- format?: 'v1' | 'v2';
151
- }): Promise<PaginationInfo & {
152
- messages: MastraMessageV1[] | MastraMessageV2[];
153
- }>;
154
- private _parseAndFormatMessages;
155
- saveMessages(args: {
156
- messages: MastraMessageV1[];
157
- format?: undefined | 'v1';
158
- }): Promise<MastraMessageV1[]>;
159
- saveMessages(args: {
160
- messages: MastraMessageV2[];
161
- format: 'v2';
162
- }): Promise<MastraMessageV2[]>;
163
- persistWorkflowSnapshot({ workflowName, runId, snapshot, }: {
164
- workflowName: string;
165
- runId: string;
166
- snapshot: WorkflowRunState;
167
- }): Promise<void>;
168
- loadWorkflowSnapshot({ workflowName, runId, }: {
169
- workflowName: string;
170
- runId: string;
171
- }): Promise<WorkflowRunState | null>;
172
- private hasColumn;
173
- private parseWorkflowRun;
174
- getWorkflowRuns({ workflowName, fromDate, toDate, limit, offset, resourceId, }?: {
175
- workflowName?: string;
176
- fromDate?: Date;
177
- toDate?: Date;
178
- limit?: number;
179
- offset?: number;
180
- resourceId?: string;
181
- }): Promise<WorkflowRuns>;
182
- getWorkflowRunById({ runId, workflowName, }: {
183
- runId: string;
184
- workflowName?: string;
185
- }): Promise<WorkflowRun | null>;
186
- updateMessages({ messages, }: {
187
- messages: (Partial<Omit<MastraMessageV2, 'createdAt'>> & {
188
- id: string;
189
- content?: {
190
- metadata?: MastraMessageContentV2['metadata'];
191
- content?: MastraMessageContentV2['content'];
192
- };
193
- })[];
194
- }): Promise<MastraMessageV2[]>;
195
- close(): Promise<void>;
196
- getEvals(options?: {
197
- agentName?: string;
198
- type?: 'test' | 'live';
199
- } & PaginationArgs): Promise<PaginationInfo & {
200
- evals: EvalRow[];
201
- }>;
202
- saveResource({ resource }: {
203
- resource: StorageResourceType;
204
- }): Promise<StorageResourceType>;
205
- updateResource({ resourceId, workingMemory, metadata, }: {
206
- resourceId: string;
207
- workingMemory?: string;
208
- metadata?: Record<string, unknown>;
209
- }): Promise<StorageResourceType>;
210
- getResourceById({ resourceId }: {
211
- resourceId: string;
212
- }): Promise<StorageResourceType | null>;
213
- getScoreById({ id }: {
214
- id: string;
215
- }): Promise<ScoreRowData | null>;
216
- saveScore(_score: Omit<ScoreRowData, 'id' | 'createdAt' | 'updatedAt'>): Promise<{
217
- score: ScoreRowData;
218
- }>;
219
- getScoresByScorerId({ scorerId, pagination: _pagination, entityId, entityType, }: {
220
- scorerId: string;
221
- pagination: StoragePagination;
222
- entityId?: string;
223
- entityType?: string;
224
- }): Promise<{
225
- pagination: PaginationInfo;
226
- scores: ScoreRowData[];
227
- }>;
228
- getScoresByRunId({ runId, pagination: _pagination, }: {
229
- runId: string;
230
- pagination: StoragePagination;
231
- }): Promise<{
232
- pagination: PaginationInfo;
233
- scores: ScoreRowData[];
234
- }>;
235
- getScoresByEntityId({ entityId, entityType, pagination: _pagination, }: {
236
- pagination: StoragePagination;
237
- entityId: string;
238
- entityType: string;
239
- }): Promise<{
240
- pagination: PaginationInfo;
241
- scores: ScoreRowData[];
242
- }>;
243
- dropTable({ tableName }: {
244
- tableName: TABLE_NAMES;
245
- }): Promise<void>;
246
- }
247
- export { MSSQLStore }
248
- export { MSSQLStore as MSSQLStore_alias_1 }
249
-
250
- export { }
package/dist/index.d.cts DELETED
@@ -1,4 +0,0 @@
1
- export { MastraMessageV2WithTypedContent } from './_tsup-dts-rollup.cjs';
2
- export { MSSQLConfigType } from './_tsup-dts-rollup.cjs';
3
- export { MSSQLConfig } from './_tsup-dts-rollup.cjs';
4
- export { MSSQLStore } from './_tsup-dts-rollup.cjs';
@@ -1,14 +0,0 @@
1
- services:
2
- mssql:
3
- image: mcr.microsoft.com/mssql/server:2022-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
@@ -1,6 +0,0 @@
1
- import { createConfig } from '@internal/lint/eslint';
2
-
3
- const config = await createConfig();
4
-
5
- /** @type {import("eslint").Linter.Config[]} */
6
- export default [...config];
package/src/index.ts DELETED
@@ -1,2 +0,0 @@
1
- // Entry point for mastra-mssql store
2
- export * from './storage';