@mastra/mssql 0.0.0-new-scorer-api-20250801075530 → 0.0.0-remove-unused-import-20250909212718

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.
@@ -0,0 +1,20 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,98 @@
1
+ import type { MastraMessageContentV2 } from '@mastra/core/agent';
2
+ import type { MastraMessageV1, MastraMessageV2, StorageThreadType } from '@mastra/core/memory';
3
+ import { MemoryStorage } from '@mastra/core/storage';
4
+ import type { StorageGetMessagesArg, PaginationInfo, PaginationArgs, StorageResourceType, ThreadSortOptions } from '@mastra/core/storage';
5
+ import sql from 'mssql';
6
+ import type { StoreOperationsMSSQL } from '../operations/index.js';
7
+ export declare class MemoryMSSQL extends MemoryStorage {
8
+ private pool;
9
+ private schema;
10
+ private operations;
11
+ private _parseAndFormatMessages;
12
+ constructor({ pool, schema, operations, }: {
13
+ pool: sql.ConnectionPool;
14
+ schema: string;
15
+ operations: StoreOperationsMSSQL;
16
+ });
17
+ getThreadById({ threadId }: {
18
+ threadId: string;
19
+ }): Promise<StorageThreadType | null>;
20
+ getThreadsByResourceIdPaginated(args: {
21
+ resourceId: string;
22
+ } & PaginationArgs & ThreadSortOptions): Promise<PaginationInfo & {
23
+ threads: StorageThreadType[];
24
+ }>;
25
+ saveThread({ thread }: {
26
+ thread: StorageThreadType;
27
+ }): Promise<StorageThreadType>;
28
+ /**
29
+ * @deprecated use getThreadsByResourceIdPaginated instead
30
+ */
31
+ getThreadsByResourceId(args: {
32
+ resourceId: string;
33
+ } & ThreadSortOptions): Promise<StorageThreadType[]>;
34
+ /**
35
+ * Updates a thread's title and metadata, merging with existing metadata. Returns the updated thread.
36
+ */
37
+ updateThread({ id, title, metadata, }: {
38
+ id: string;
39
+ title: string;
40
+ metadata: Record<string, unknown>;
41
+ }): Promise<StorageThreadType>;
42
+ deleteThread({ threadId }: {
43
+ threadId: string;
44
+ }): Promise<void>;
45
+ private _getIncludedMessages;
46
+ /**
47
+ * @deprecated use getMessagesPaginated instead
48
+ */
49
+ getMessages(args: StorageGetMessagesArg & {
50
+ format?: 'v1';
51
+ }): Promise<MastraMessageV1[]>;
52
+ getMessages(args: StorageGetMessagesArg & {
53
+ format: 'v2';
54
+ }): Promise<MastraMessageV2[]>;
55
+ getMessagesById({ messageIds, format, }: {
56
+ messageIds: string[];
57
+ format: 'v1';
58
+ }): Promise<MastraMessageV1[]>;
59
+ getMessagesById({ messageIds, format, }: {
60
+ messageIds: string[];
61
+ format?: 'v2';
62
+ }): Promise<MastraMessageV2[]>;
63
+ getMessagesPaginated(args: StorageGetMessagesArg & {
64
+ format?: 'v1' | 'v2';
65
+ }): Promise<PaginationInfo & {
66
+ messages: MastraMessageV1[] | MastraMessageV2[];
67
+ }>;
68
+ saveMessages(args: {
69
+ messages: MastraMessageV1[];
70
+ format?: undefined | 'v1';
71
+ }): Promise<MastraMessageV1[]>;
72
+ saveMessages(args: {
73
+ messages: MastraMessageV2[];
74
+ format: 'v2';
75
+ }): Promise<MastraMessageV2[]>;
76
+ updateMessages({ messages, }: {
77
+ messages: (Partial<Omit<MastraMessageV2, 'createdAt'>> & {
78
+ id: string;
79
+ content?: {
80
+ metadata?: MastraMessageContentV2['metadata'];
81
+ content?: MastraMessageContentV2['content'];
82
+ };
83
+ })[];
84
+ }): Promise<MastraMessageV2[]>;
85
+ deleteMessages(messageIds: string[]): Promise<void>;
86
+ getResourceById({ resourceId }: {
87
+ resourceId: string;
88
+ }): Promise<StorageResourceType | null>;
89
+ saveResource({ resource }: {
90
+ resource: StorageResourceType;
91
+ }): Promise<StorageResourceType>;
92
+ updateResource({ resourceId, workingMemory, metadata, }: {
93
+ resourceId: string;
94
+ workingMemory?: string;
95
+ metadata?: Record<string, unknown>;
96
+ }): Promise<StorageResourceType>;
97
+ }
98
+ //# sourceMappingURL=index.d.ts.map
@@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C;KACpC,GAAG,OAAO,CAAC,mBAAmB,CAAC;CA8DjC"}
@@ -0,0 +1,51 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"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AE,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"}
@@ -0,0 +1,46 @@
1
+ import type { ScoreRowData } from '@mastra/core/scores';
2
+ import type { PaginationInfo, StoragePagination } from '@mastra/core/storage';
3
+ import { ScoresStorage } from '@mastra/core/storage';
4
+ import type { ConnectionPool } from 'mssql';
5
+ import type { StoreOperationsMSSQL } from '../operations/index.js';
6
+ export declare class ScoresMSSQL extends ScoresStorage {
7
+ pool: ConnectionPool;
8
+ private operations;
9
+ private schema?;
10
+ constructor({ pool, operations, schema, }: {
11
+ pool: ConnectionPool;
12
+ operations: StoreOperationsMSSQL;
13
+ schema?: string;
14
+ });
15
+ getScoreById({ id }: {
16
+ id: string;
17
+ }): Promise<ScoreRowData | null>;
18
+ saveScore(score: Omit<ScoreRowData, 'id' | 'createdAt' | 'updatedAt'>): Promise<{
19
+ score: ScoreRowData;
20
+ }>;
21
+ getScoresByScorerId({ scorerId, pagination, }: {
22
+ scorerId: string;
23
+ pagination: StoragePagination;
24
+ entityId?: string;
25
+ entityType?: string;
26
+ }): Promise<{
27
+ pagination: PaginationInfo;
28
+ scores: ScoreRowData[];
29
+ }>;
30
+ getScoresByRunId({ runId, pagination, }: {
31
+ runId: string;
32
+ pagination: StoragePagination;
33
+ }): Promise<{
34
+ pagination: PaginationInfo;
35
+ scores: ScoreRowData[];
36
+ }>;
37
+ getScoresByEntityId({ entityId, entityType, pagination, }: {
38
+ pagination: StoragePagination;
39
+ entityId: string;
40
+ entityType: string;
41
+ }): Promise<{
42
+ pagination: PaginationInfo;
43
+ scores: ScoreRowData[];
44
+ }>;
45
+ }
46
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/scores/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAiB,MAAM,sBAAsB,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AA4B1D,qBAAa,WAAY,SAAQ,aAAa;IACrC,IAAI,EAAE,cAAc,CAAC;IAC5B,OAAO,CAAC,UAAU,CAAuB;IACzC,OAAO,CAAC,MAAM,CAAC,CAAS;gBAEZ,EACV,IAAI,EACJ,UAAU,EACV,MAAM,GACP,EAAE;QACD,IAAI,EAAE,cAAc,CAAC;QACrB,UAAU,EAAE,oBAAoB,CAAC;QACjC,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB;IAOK,YAAY,CAAC,EAAE,EAAE,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IA0BlE,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,GAAG,WAAW,GAAG,WAAW,CAAC,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,YAAY,CAAA;KAAE,CAAC;IAmDxG,mBAAmB,CAAC,EACxB,QAAQ,EACR,UAAU,GACX,EAAE;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,iBAAiB,CAAC;QAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,MAAM,EAAE,YAAY,EAAE,CAAA;KAAE,CAAC;IAsD7D,gBAAgB,CAAC,EACrB,KAAK,EACL,UAAU,GACX,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;IAsD7D,mBAAmB,CAAC,EACxB,QAAQ,EACR,UAAU,EACV,UAAU,GACX,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;CAuDpE"}
@@ -0,0 +1,37 @@
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
@@ -0,0 +1 @@
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;QAC9B,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,IAAI,CAAC;QAChB,MAAM,CAAC,EAAE,IAAI,CAAC;KACf,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAWL,kBAAkB,CAC7B,IAAI,EAAE;QACJ,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;KAC/B,GAAG,cAAc,GACjB,OAAO,CACR,cAAc,GAAG;QACf,MAAM,EAAE,GAAG,EAAE,CAAC;KACf,CACF;IAgJK,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAOvF"}
@@ -0,0 +1,6 @@
1
+ export declare function getSchemaName(schema?: string): string | undefined;
2
+ export declare function getTableName({ indexName, schemaName }: {
3
+ indexName: string;
4
+ schemaName?: string;
5
+ }): string;
6
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/storage/domains/utils.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,sBAE5C;AAED,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,UAKjG"}
@@ -0,0 +1,54 @@
1
+ import type { StepResult, WorkflowRun, WorkflowRuns, WorkflowRunState } from '@mastra/core';
2
+ import { WorkflowsStorage } from '@mastra/core/storage';
3
+ import sql from 'mssql';
4
+ import type { StoreOperationsMSSQL } from '../operations/index.js';
5
+ export declare class WorkflowsMSSQL extends WorkflowsStorage {
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
+ updateWorkflowResults({}: {
15
+ workflowName: string;
16
+ runId: string;
17
+ stepId: string;
18
+ result: StepResult<any, any, any, any>;
19
+ runtimeContext: Record<string, any>;
20
+ }): Promise<Record<string, StepResult<any, any, any, any>>>;
21
+ updateWorkflowState({}: {
22
+ workflowName: string;
23
+ runId: string;
24
+ opts: {
25
+ status: string;
26
+ result?: StepResult<any, any, any, any>;
27
+ error?: string;
28
+ suspendedPaths?: Record<string, number[]>;
29
+ waitingPaths?: Record<string, number[]>;
30
+ };
31
+ }): Promise<WorkflowRunState | undefined>;
32
+ persistWorkflowSnapshot({ workflowName, runId, snapshot, }: {
33
+ workflowName: string;
34
+ runId: string;
35
+ snapshot: WorkflowRunState;
36
+ }): Promise<void>;
37
+ loadWorkflowSnapshot({ workflowName, runId, }: {
38
+ workflowName: string;
39
+ runId: string;
40
+ }): Promise<WorkflowRunState | null>;
41
+ getWorkflowRunById({ runId, workflowName, }: {
42
+ runId: string;
43
+ workflowName?: string;
44
+ }): Promise<WorkflowRun | null>;
45
+ getWorkflowRuns({ workflowName, fromDate, toDate, limit, offset, resourceId, }?: {
46
+ workflowName?: string;
47
+ fromDate?: Date;
48
+ toDate?: Date;
49
+ limit?: number;
50
+ offset?: number;
51
+ resourceId?: string;
52
+ }): Promise<WorkflowRuns>;
53
+ }
54
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/workflows/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAE5F,OAAO,EAAE,gBAAgB,EAA2B,MAAM,sBAAsB,CAAC;AACjF,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAsB1D,qBAAa,cAAe,SAAQ,gBAAgB;IAC3C,IAAI,EAAE,GAAG,CAAC,cAAc,CAAC;IAChC,OAAO,CAAC,UAAU,CAAuB;IACzC,OAAO,CAAC,MAAM,CAAS;gBAEX,EACV,IAAI,EACJ,UAAU,EACV,MAAM,GACP,EAAE;QACD,IAAI,EAAE,GAAG,CAAC,cAAc,CAAC;QACzB,UAAU,EAAE,oBAAoB,CAAC;QACjC,MAAM,EAAE,MAAM,CAAC;KAChB;IAOD,qBAAqB,CACnB,EAMC,EAAE;QACD,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QACvC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KACrC,GACA,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAG1D,mBAAmB,CACjB,EAIC,EAAE;QACD,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE;YACJ,MAAM,EAAE,MAAM,CAAC;Y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5,9 @@ export type MastraMessageV2WithTypedContent = Omit<MastraMessageV2, 'content'> &
5
5
  import type { MastraMessageV1, StorageThreadType } from '@mastra/core/memory';
6
6
  import type { ScoreRowData } 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, StorageGetTracesArg, StorageGetTracesPaginatedArg } from '@mastra/core/storage';
9
+ import type { Trace } from '@mastra/core/telemetry';
10
+ import type { StepResult, WorkflowRunState } from '@mastra/core/workflows';
10
11
  import sql from 'mssql';
11
12
  export type MSSQLConfigType = {
12
13
  schemaName?: string;
@@ -24,9 +25,8 @@ export type MSSQLConfig = MSSQLConfigType;
24
25
  export declare class MSSQLStore extends MastraStorage {
25
26
  pool: sql.ConnectionPool;
26
27
  private schema?;
27
- private setupSchemaPromise;
28
- private schemaSetupComplete;
29
28
  private isConnected;
29
+ stores: StorageDomains;
30
30
  constructor(config: MSSQLConfigType);
31
31
  init(): Promise<void>;
32
32
  private _performInitializationAndStore;
@@ -37,41 +37,28 @@ export declare class MSSQLStore extends MastraStorage {
37
37
  createTable: boolean;
38
38
  deleteMessages: boolean;
39
39
  };
40
- private getTableName;
41
- private getSchemaName;
42
- private transformEvalRow;
43
40
  /** @deprecated use getEvals instead */
44
41
  getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
45
- batchInsert({ tableName, records }: {
46
- tableName: TABLE_NAMES;
47
- records: Record<string, any>[];
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>;
42
+ getEvals(options?: {
43
+ agentName?: string;
44
+ type?: 'test' | 'live';
65
45
  } & PaginationArgs): Promise<PaginationInfo & {
66
- traces: any[];
46
+ evals: EvalRow[];
47
+ }>;
48
+ /**
49
+ * @deprecated use getTracesPaginated instead
50
+ */
51
+ getTraces(args: StorageGetTracesArg): Promise<Trace[]>;
52
+ getTracesPaginated(args: StorageGetTracesPaginatedArg): Promise<PaginationInfo & {
53
+ traces: Trace[];
67
54
  }>;
68
- private setupSchema;
69
- protected getSqlType(type: StorageColumn['type'], isPrimaryKey?: boolean): string;
55
+ batchTraceInsert({ records }: {
56
+ records: Record<string, any>[];
57
+ }): Promise<void>;
70
58
  createTable({ tableName, schema, }: {
71
59
  tableName: TABLE_NAMES;
72
60
  schema: Record<string, StorageColumn>;
73
61
  }): Promise<void>;
74
- protected getDefaultValue(type: StorageColumn['type']): string;
75
62
  alterTable({ tableName, schema, ifNotExists, }: {
76
63
  tableName: TABLE_NAMES;
77
64
  schema: Record<string, StorageColumn>;
@@ -80,34 +67,43 @@ export declare class MSSQLStore extends MastraStorage {
80
67
  clearTable({ tableName }: {
81
68
  tableName: TABLE_NAMES;
82
69
  }): Promise<void>;
70
+ dropTable({ tableName }: {
71
+ tableName: TABLE_NAMES;
72
+ }): Promise<void>;
83
73
  insert({ tableName, record }: {
84
74
  tableName: TABLE_NAMES;
85
75
  record: Record<string, any>;
86
76
  }): Promise<void>;
77
+ batchInsert({ tableName, records }: {
78
+ tableName: TABLE_NAMES;
79
+ records: Record<string, any>[];
80
+ }): Promise<void>;
87
81
  load<R>({ tableName, keys }: {
88
82
  tableName: TABLE_NAMES;
89
83
  keys: Record<string, string>;
90
84
  }): Promise<R | null>;
85
+ /**
86
+ * Memory
87
+ */
91
88
  getThreadById({ threadId }: {
92
89
  threadId: string;
93
90
  }): Promise<StorageThreadType | null>;
91
+ /**
92
+ * @deprecated use getThreadsByResourceIdPaginated instead
93
+ */
94
+ getThreadsByResourceId(args: {
95
+ resourceId: string;
96
+ } & ThreadSortOptions): Promise<StorageThreadType[]>;
94
97
  getThreadsByResourceIdPaginated(args: {
95
98
  resourceId: string;
96
- } & PaginationArgs): Promise<PaginationInfo & {
99
+ page: number;
100
+ perPage: number;
101
+ } & ThreadSortOptions): Promise<PaginationInfo & {
97
102
  threads: StorageThreadType[];
98
103
  }>;
99
104
  saveThread({ thread }: {
100
105
  thread: StorageThreadType;
101
106
  }): 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
107
  updateThread({ id, title, metadata, }: {
112
108
  id: string;
113
109
  title: string;
@@ -116,7 +112,6 @@ export declare class MSSQLStore extends MastraStorage {
116
112
  deleteThread({ threadId }: {
117
113
  threadId: string;
118
114
  }): Promise<void>;
119
- private _getIncludedMessages;
120
115
  /**
121
116
  * @deprecated use getMessagesPaginated instead
122
117
  */
@@ -126,12 +121,19 @@ export declare class MSSQLStore extends MastraStorage {
126
121
  getMessages(args: StorageGetMessagesArg & {
127
122
  format: 'v2';
128
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[]>;
129
132
  getMessagesPaginated(args: StorageGetMessagesArg & {
130
133
  format?: 'v1' | 'v2';
131
134
  }): Promise<PaginationInfo & {
132
135
  messages: MastraMessageV1[] | MastraMessageV2[];
133
136
  }>;
134
- private _parseAndFormatMessages;
135
137
  saveMessages(args: {
136
138
  messages: MastraMessageV1[];
137
139
  format?: undefined | 'v1';
@@ -140,6 +142,48 @@ export declare class MSSQLStore extends MastraStorage {
140
142
  messages: MastraMessageV2[];
141
143
  format: 'v2';
142
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>;
143
187
  persistWorkflowSnapshot({ workflowName, runId, snapshot, }: {
144
188
  workflowName: string;
145
189
  runId: string;
@@ -149,8 +193,6 @@ export declare class MSSQLStore extends MastraStorage {
149
193
  workflowName: string;
150
194
  runId: string;
151
195
  }): Promise<WorkflowRunState | null>;
152
- private hasColumn;
153
- private parseWorkflowRun;
154
196
  getWorkflowRuns({ workflowName, fromDate, toDate, limit, offset, resourceId, }?: {
155
197
  workflowName?: string;
156
198
  fromDate?: Date;
@@ -163,56 +205,31 @@ export declare class MSSQLStore extends MastraStorage {
163
205
  runId: string;
164
206
  workflowName?: string;
165
207
  }): 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
208
  close(): Promise<void>;
176
- getEvals(options?: {
177
- agentName?: string;
178
- type?: 'test' | 'live';
179
- } & PaginationArgs): Promise<PaginationInfo & {
180
- evals: EvalRow[];
181
- }>;
182
- saveResource({ resource }: {
183
- resource: StorageResourceType;
184
- }): Promise<StorageResourceType>;
185
- updateResource({ resourceId, workingMemory, metadata, }: {
186
- resourceId: string;
187
- workingMemory?: string;
188
- metadata?: Record<string, unknown>;
189
- }): Promise<StorageResourceType>;
190
- getResourceById({ resourceId }: {
191
- resourceId: string;
192
- }): Promise<StorageResourceType | null>;
193
- getScoreById({ id }: {
209
+ /**
210
+ * Scorers
211
+ */
212
+ getScoreById({ id: _id }: {
194
213
  id: string;
195
214
  }): Promise<ScoreRowData | null>;
196
- saveScore(_score: Omit<ScoreRowData, 'id' | 'createdAt' | 'updatedAt'>): Promise<{
197
- score: ScoreRowData;
198
- }>;
199
- getScoresByScorerId({ scorerId, pagination: _pagination, entityId, entityType, }: {
215
+ getScoresByScorerId({ scorerId: _scorerId, pagination: _pagination, }: {
200
216
  scorerId: string;
201
217
  pagination: StoragePagination;
202
- entityId?: string;
203
- entityType?: string;
204
218
  }): Promise<{
205
219
  pagination: PaginationInfo;
206
220
  scores: ScoreRowData[];
207
221
  }>;
208
- getScoresByRunId({ runId, pagination: _pagination, }: {
222
+ saveScore(_score: ScoreRowData): Promise<{
223
+ score: ScoreRowData;
224
+ }>;
225
+ getScoresByRunId({ runId: _runId, pagination: _pagination, }: {
209
226
  runId: string;
210
227
  pagination: StoragePagination;
211
228
  }): Promise<{
212
229
  pagination: PaginationInfo;
213
230
  scores: ScoreRowData[];
214
231
  }>;
215
- getScoresByEntityId({ entityId, entityType, pagination: _pagination, }: {
232
+ getScoresByEntityId({ entityId: _entityId, entityType: _entityType, pagination: _pagination, }: {
216
233
  pagination: StoragePagination;
217
234
  entityId: string;
218
235
  entityType: string;
@@ -220,8 +237,5 @@ export declare class MSSQLStore extends MastraStorage {
220
237
  pagination: PaginationInfo;
221
238
  scores: ScoreRowData[];
222
239
  }>;
223
- dropTable({ tableName }: {
224
- tableName: TABLE_NAMES;
225
- }): Promise<void>;
226
240
  }
227
241
  //# sourceMappingURL=index.d.ts.map