@mastra/mssql 0.0.0-update-stores-peerDeps-20250723031338 → 0.0.0-usechat-duplicate-20251016110554
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 +463 -3
- package/dist/index.cjs +1753 -1126
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -4
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1753 -1126
- package/dist/index.js.map +1 -0
- 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/operations/index.d.ts +51 -0
- package/dist/storage/domains/operations/index.d.ts.map +1 -0
- package/dist/storage/domains/scores/index.d.ts +54 -0
- package/dist/storage/domains/scores/index.d.ts.map +1 -0
- package/dist/storage/domains/traces/index.d.ts +37 -0
- package/dist/storage/domains/traces/index.d.ts.map +1 -0
- package/dist/storage/domains/utils.d.ts +6 -0
- package/dist/storage/domains/utils.d.ts.map +1 -0
- package/dist/storage/domains/workflows/index.d.ts +55 -0
- package/dist/storage/domains/workflows/index.d.ts.map +1 -0
- package/dist/{_tsup-dts-rollup.d.cts → storage/index.d.ts} +119 -118
- package/dist/storage/index.d.ts.map +1 -0
- package/package.json +26 -12
- package/dist/_tsup-dts-rollup.d.ts +0 -250
- package/dist/index.d.cts +0 -4
- 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 -2134
- package/tsconfig.json +0 -5
- package/vitest.config.ts +0 -12
|
@@ -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,"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"}
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
getScoresBySpan({ traceId, spanId, pagination, }: {
|
|
46
|
+
traceId: string;
|
|
47
|
+
spanId: string;
|
|
48
|
+
pagination: StoragePagination;
|
|
49
|
+
}): Promise<{
|
|
50
|
+
pagination: PaginationInfo;
|
|
51
|
+
scores: ScoreRowData[];
|
|
52
|
+
}>;
|
|
53
|
+
}
|
|
54
|
+
//# 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,EAA6B,MAAM,qBAAqB,CAAC;AAEnF,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;IAiExG,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;IAwD7D,eAAe,CAAC,EACpB,OAAO,EACP,MAAM,EACN,UAAU,GACX,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;CAwDpE"}
|
|
@@ -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,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,MAAM,CAAA;CAAE,UAKjG"}
|
|
@@ -0,0 +1,55 @@
|
|
|
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, resourceId, snapshot, }: {
|
|
33
|
+
workflowName: string;
|
|
34
|
+
runId: string;
|
|
35
|
+
resourceId?: string;
|
|
36
|
+
snapshot: WorkflowRunState;
|
|
37
|
+
}): Promise<void>;
|
|
38
|
+
loadWorkflowSnapshot({ workflowName, runId, }: {
|
|
39
|
+
workflowName: string;
|
|
40
|
+
runId: string;
|
|
41
|
+
}): Promise<WorkflowRunState | null>;
|
|
42
|
+
getWorkflowRunById({ runId, workflowName, }: {
|
|
43
|
+
runId: string;
|
|
44
|
+
workflowName?: string;
|
|
45
|
+
}): Promise<WorkflowRun | null>;
|
|
46
|
+
getWorkflowRuns({ workflowName, fromDate, toDate, limit, offset, resourceId, }?: {
|
|
47
|
+
workflowName?: string;
|
|
48
|
+
fromDate?: Date;
|
|
49
|
+
toDate?: Date;
|
|
50
|
+
limit?: number;
|
|
51
|
+
offset?: number;
|
|
52
|
+
resourceId?: string;
|
|
53
|
+
}): Promise<WorkflowRuns>;
|
|
54
|
+
}
|
|
55
|
+
//# 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,E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CAAC,WAAW,GAAG,IAAI,CAAC;IA2CzB,eAAe,CAAC,EACpB,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,KAAK,EACL,MAAM,EACN,UAAU,GACX,GAAE;QACD,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,EAAE,IAAI,CAAC;QAChB,MAAM,CAAC,EAAE,IAAI,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;KAChB,GAAG,OAAO,CAAC,YAAY,CAAC;CAuE/B"}
|
|
@@ -1,33 +1,15 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
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'> & {
|
|
1
|
+
import type { MastraMessageContentV2, MastraMessageV2 } from '@mastra/core/agent';
|
|
2
|
+
export type MastraMessageV2WithTypedContent = Omit<MastraMessageV2, 'content'> & {
|
|
21
3
|
content: MastraMessageContentV2;
|
|
22
4
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
5
|
+
import type { MastraMessageV1, StorageThreadType } from '@mastra/core/memory';
|
|
6
|
+
import type { ScoreRowData } from '@mastra/core/scores';
|
|
7
|
+
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';
|
|
11
|
+
import sql from 'mssql';
|
|
12
|
+
export type MSSQLConfigType = {
|
|
31
13
|
schemaName?: string;
|
|
32
14
|
} & ({
|
|
33
15
|
server: string;
|
|
@@ -39,15 +21,12 @@ declare type MSSQLConfigType = {
|
|
|
39
21
|
} | {
|
|
40
22
|
connectionString: string;
|
|
41
23
|
});
|
|
42
|
-
export
|
|
43
|
-
export
|
|
44
|
-
|
|
45
|
-
declare class MSSQLStore extends MastraStorage {
|
|
24
|
+
export type MSSQLConfig = MSSQLConfigType;
|
|
25
|
+
export declare class MSSQLStore extends MastraStorage {
|
|
46
26
|
pool: sql.ConnectionPool;
|
|
47
27
|
private schema?;
|
|
48
|
-
private setupSchemaPromise;
|
|
49
|
-
private schemaSetupComplete;
|
|
50
28
|
private isConnected;
|
|
29
|
+
stores: StorageDomains;
|
|
51
30
|
constructor(config: MSSQLConfigType);
|
|
52
31
|
init(): Promise<void>;
|
|
53
32
|
private _performInitializationAndStore;
|
|
@@ -56,42 +35,31 @@ declare class MSSQLStore extends MastraStorage {
|
|
|
56
35
|
resourceWorkingMemory: boolean;
|
|
57
36
|
hasColumn: boolean;
|
|
58
37
|
createTable: boolean;
|
|
38
|
+
deleteMessages: boolean;
|
|
39
|
+
getScoresBySpan: boolean;
|
|
59
40
|
};
|
|
60
|
-
private getTableName;
|
|
61
|
-
private getSchemaName;
|
|
62
|
-
private transformEvalRow;
|
|
63
41
|
/** @deprecated use getEvals instead */
|
|
64
42
|
getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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>;
|
|
43
|
+
getEvals(options?: {
|
|
44
|
+
agentName?: string;
|
|
45
|
+
type?: 'test' | 'live';
|
|
85
46
|
} & PaginationArgs): Promise<PaginationInfo & {
|
|
86
|
-
|
|
47
|
+
evals: EvalRow[];
|
|
87
48
|
}>;
|
|
88
|
-
|
|
89
|
-
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated use getTracesPaginated instead
|
|
51
|
+
*/
|
|
52
|
+
getTraces(args: StorageGetTracesArg): Promise<Trace[]>;
|
|
53
|
+
getTracesPaginated(args: StorageGetTracesPaginatedArg): Promise<PaginationInfo & {
|
|
54
|
+
traces: Trace[];
|
|
55
|
+
}>;
|
|
56
|
+
batchTraceInsert({ records }: {
|
|
57
|
+
records: Record<string, any>[];
|
|
58
|
+
}): Promise<void>;
|
|
90
59
|
createTable({ tableName, schema, }: {
|
|
91
60
|
tableName: TABLE_NAMES;
|
|
92
61
|
schema: Record<string, StorageColumn>;
|
|
93
62
|
}): Promise<void>;
|
|
94
|
-
protected getDefaultValue(type: StorageColumn['type']): string;
|
|
95
63
|
alterTable({ tableName, schema, ifNotExists, }: {
|
|
96
64
|
tableName: TABLE_NAMES;
|
|
97
65
|
schema: Record<string, StorageColumn>;
|
|
@@ -100,34 +68,43 @@ declare class MSSQLStore extends MastraStorage {
|
|
|
100
68
|
clearTable({ tableName }: {
|
|
101
69
|
tableName: TABLE_NAMES;
|
|
102
70
|
}): Promise<void>;
|
|
71
|
+
dropTable({ tableName }: {
|
|
72
|
+
tableName: TABLE_NAMES;
|
|
73
|
+
}): Promise<void>;
|
|
103
74
|
insert({ tableName, record }: {
|
|
104
75
|
tableName: TABLE_NAMES;
|
|
105
76
|
record: Record<string, any>;
|
|
106
77
|
}): Promise<void>;
|
|
78
|
+
batchInsert({ tableName, records }: {
|
|
79
|
+
tableName: TABLE_NAMES;
|
|
80
|
+
records: Record<string, any>[];
|
|
81
|
+
}): Promise<void>;
|
|
107
82
|
load<R>({ tableName, keys }: {
|
|
108
83
|
tableName: TABLE_NAMES;
|
|
109
84
|
keys: Record<string, string>;
|
|
110
85
|
}): Promise<R | null>;
|
|
86
|
+
/**
|
|
87
|
+
* Memory
|
|
88
|
+
*/
|
|
111
89
|
getThreadById({ threadId }: {
|
|
112
90
|
threadId: string;
|
|
113
91
|
}): Promise<StorageThreadType | null>;
|
|
92
|
+
/**
|
|
93
|
+
* @deprecated use getThreadsByResourceIdPaginated instead
|
|
94
|
+
*/
|
|
95
|
+
getThreadsByResourceId(args: {
|
|
96
|
+
resourceId: string;
|
|
97
|
+
} & ThreadSortOptions): Promise<StorageThreadType[]>;
|
|
114
98
|
getThreadsByResourceIdPaginated(args: {
|
|
115
99
|
resourceId: string;
|
|
116
|
-
|
|
100
|
+
page: number;
|
|
101
|
+
perPage: number;
|
|
102
|
+
} & ThreadSortOptions): Promise<PaginationInfo & {
|
|
117
103
|
threads: StorageThreadType[];
|
|
118
104
|
}>;
|
|
119
105
|
saveThread({ thread }: {
|
|
120
106
|
thread: StorageThreadType;
|
|
121
107
|
}): 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
108
|
updateThread({ id, title, metadata, }: {
|
|
132
109
|
id: string;
|
|
133
110
|
title: string;
|
|
@@ -136,7 +113,6 @@ declare class MSSQLStore extends MastraStorage {
|
|
|
136
113
|
deleteThread({ threadId }: {
|
|
137
114
|
threadId: string;
|
|
138
115
|
}): Promise<void>;
|
|
139
|
-
private _getIncludedMessages;
|
|
140
116
|
/**
|
|
141
117
|
* @deprecated use getMessagesPaginated instead
|
|
142
118
|
*/
|
|
@@ -146,12 +122,19 @@ declare class MSSQLStore extends MastraStorage {
|
|
|
146
122
|
getMessages(args: StorageGetMessagesArg & {
|
|
147
123
|
format: 'v2';
|
|
148
124
|
}): Promise<MastraMessageV2[]>;
|
|
125
|
+
getMessagesById({ messageIds, format }: {
|
|
126
|
+
messageIds: string[];
|
|
127
|
+
format: 'v1';
|
|
128
|
+
}): Promise<MastraMessageV1[]>;
|
|
129
|
+
getMessagesById({ messageIds, format }: {
|
|
130
|
+
messageIds: string[];
|
|
131
|
+
format?: 'v2';
|
|
132
|
+
}): Promise<MastraMessageV2[]>;
|
|
149
133
|
getMessagesPaginated(args: StorageGetMessagesArg & {
|
|
150
134
|
format?: 'v1' | 'v2';
|
|
151
135
|
}): Promise<PaginationInfo & {
|
|
152
136
|
messages: MastraMessageV1[] | MastraMessageV2[];
|
|
153
137
|
}>;
|
|
154
|
-
private _parseAndFormatMessages;
|
|
155
138
|
saveMessages(args: {
|
|
156
139
|
messages: MastraMessageV1[];
|
|
157
140
|
format?: undefined | 'v1';
|
|
@@ -160,17 +143,58 @@ declare class MSSQLStore extends MastraStorage {
|
|
|
160
143
|
messages: MastraMessageV2[];
|
|
161
144
|
format: 'v2';
|
|
162
145
|
}): Promise<MastraMessageV2[]>;
|
|
163
|
-
|
|
146
|
+
updateMessages({ messages, }: {
|
|
147
|
+
messages: (Partial<Omit<MastraMessageV2, 'createdAt'>> & {
|
|
148
|
+
id: string;
|
|
149
|
+
content?: {
|
|
150
|
+
metadata?: MastraMessageContentV2['metadata'];
|
|
151
|
+
content?: MastraMessageContentV2['content'];
|
|
152
|
+
};
|
|
153
|
+
})[];
|
|
154
|
+
}): Promise<MastraMessageV2[]>;
|
|
155
|
+
deleteMessages(messageIds: string[]): Promise<void>;
|
|
156
|
+
getResourceById({ resourceId }: {
|
|
157
|
+
resourceId: string;
|
|
158
|
+
}): Promise<StorageResourceType | null>;
|
|
159
|
+
saveResource({ resource }: {
|
|
160
|
+
resource: StorageResourceType;
|
|
161
|
+
}): Promise<StorageResourceType>;
|
|
162
|
+
updateResource({ resourceId, workingMemory, metadata, }: {
|
|
163
|
+
resourceId: string;
|
|
164
|
+
workingMemory?: string;
|
|
165
|
+
metadata?: Record<string, unknown>;
|
|
166
|
+
}): Promise<StorageResourceType>;
|
|
167
|
+
/**
|
|
168
|
+
* Workflows
|
|
169
|
+
*/
|
|
170
|
+
updateWorkflowResults({ workflowName, runId, stepId, result, runtimeContext, }: {
|
|
164
171
|
workflowName: string;
|
|
165
172
|
runId: string;
|
|
173
|
+
stepId: string;
|
|
174
|
+
result: StepResult<any, any, any, any>;
|
|
175
|
+
runtimeContext: Record<string, any>;
|
|
176
|
+
}): Promise<Record<string, StepResult<any, any, any, any>>>;
|
|
177
|
+
updateWorkflowState({ workflowName, runId, opts, }: {
|
|
178
|
+
workflowName: string;
|
|
179
|
+
runId: string;
|
|
180
|
+
opts: {
|
|
181
|
+
status: string;
|
|
182
|
+
result?: StepResult<any, any, any, any>;
|
|
183
|
+
error?: string;
|
|
184
|
+
suspendedPaths?: Record<string, number[]>;
|
|
185
|
+
waitingPaths?: Record<string, number[]>;
|
|
186
|
+
};
|
|
187
|
+
}): Promise<WorkflowRunState | undefined>;
|
|
188
|
+
persistWorkflowSnapshot({ workflowName, runId, resourceId, snapshot, }: {
|
|
189
|
+
workflowName: string;
|
|
190
|
+
runId: string;
|
|
191
|
+
resourceId?: string;
|
|
166
192
|
snapshot: WorkflowRunState;
|
|
167
193
|
}): Promise<void>;
|
|
168
194
|
loadWorkflowSnapshot({ workflowName, runId, }: {
|
|
169
195
|
workflowName: string;
|
|
170
196
|
runId: string;
|
|
171
197
|
}): Promise<WorkflowRunState | null>;
|
|
172
|
-
private hasColumn;
|
|
173
|
-
private parseWorkflowRun;
|
|
174
198
|
getWorkflowRuns({ workflowName, fromDate, toDate, limit, offset, resourceId, }?: {
|
|
175
199
|
workflowName?: string;
|
|
176
200
|
fromDate?: Date;
|
|
@@ -183,56 +207,31 @@ declare class MSSQLStore extends MastraStorage {
|
|
|
183
207
|
runId: string;
|
|
184
208
|
workflowName?: string;
|
|
185
209
|
}): 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
210
|
close(): Promise<void>;
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
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 }: {
|
|
211
|
+
/**
|
|
212
|
+
* Scorers
|
|
213
|
+
*/
|
|
214
|
+
getScoreById({ id: _id }: {
|
|
214
215
|
id: string;
|
|
215
216
|
}): Promise<ScoreRowData | null>;
|
|
216
|
-
|
|
217
|
-
score: ScoreRowData;
|
|
218
|
-
}>;
|
|
219
|
-
getScoresByScorerId({ scorerId, pagination: _pagination, entityId, entityType, }: {
|
|
217
|
+
getScoresByScorerId({ scorerId: _scorerId, pagination: _pagination, }: {
|
|
220
218
|
scorerId: string;
|
|
221
219
|
pagination: StoragePagination;
|
|
222
|
-
entityId?: string;
|
|
223
|
-
entityType?: string;
|
|
224
220
|
}): Promise<{
|
|
225
221
|
pagination: PaginationInfo;
|
|
226
222
|
scores: ScoreRowData[];
|
|
227
223
|
}>;
|
|
228
|
-
|
|
224
|
+
saveScore(_score: ScoreRowData): Promise<{
|
|
225
|
+
score: ScoreRowData;
|
|
226
|
+
}>;
|
|
227
|
+
getScoresByRunId({ runId: _runId, pagination: _pagination, }: {
|
|
229
228
|
runId: string;
|
|
230
229
|
pagination: StoragePagination;
|
|
231
230
|
}): Promise<{
|
|
232
231
|
pagination: PaginationInfo;
|
|
233
232
|
scores: ScoreRowData[];
|
|
234
233
|
}>;
|
|
235
|
-
getScoresByEntityId({ entityId, entityType, pagination: _pagination, }: {
|
|
234
|
+
getScoresByEntityId({ entityId: _entityId, entityType: _entityType, pagination: _pagination, }: {
|
|
236
235
|
pagination: StoragePagination;
|
|
237
236
|
entityId: string;
|
|
238
237
|
entityType: string;
|
|
@@ -240,11 +239,13 @@ declare class MSSQLStore extends MastraStorage {
|
|
|
240
239
|
pagination: PaginationInfo;
|
|
241
240
|
scores: ScoreRowData[];
|
|
242
241
|
}>;
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
242
|
+
getScoresBySpan({ traceId, spanId, pagination: _pagination, }: {
|
|
243
|
+
traceId: string;
|
|
244
|
+
spanId: string;
|
|
245
|
+
pagination: StoragePagination;
|
|
246
|
+
}): Promise<{
|
|
247
|
+
pagination: PaginationInfo;
|
|
248
|
+
scores: ScoreRowData[];
|
|
249
|
+
}>;
|
|
246
250
|
}
|
|
247
|
-
|
|
248
|
-
export { MSSQLStore as MSSQLStore_alias_1 }
|
|
249
|
-
|
|
250
|
-
export { }
|
|
251
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,4BAA4B,EAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,KAAK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