@mastra/cloudflare-d1 0.0.0-remove-unused-import-20250909212718 → 0.0.0-remove-unused-model-providers-api-20251030210744
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 +169 -3
- package/dist/index.cjs +238 -319
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +239 -320
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/memory/index.d.ts +8 -7
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/dist/storage/domains/scores/index.d.ts +8 -0
- package/dist/storage/domains/scores/index.d.ts.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +5 -11
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +15 -39
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +9 -9
- package/dist/storage/domains/legacy-evals/index.d.ts +0 -20
- package/dist/storage/domains/legacy-evals/index.d.ts.map +0 -1
- package/dist/storage/domains/traces/index.d.ts +0 -18
- package/dist/storage/domains/traces/index.d.ts.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { MastraMessageContentV2 } from '@mastra/core/agent';
|
|
2
2
|
import type { MastraMessageV1, MastraMessageV2, StorageThreadType } from '@mastra/core/memory';
|
|
3
3
|
import { MemoryStorage } from '@mastra/core/storage';
|
|
4
|
-
import type { PaginationInfo, StorageGetMessagesArg, StorageResourceType } from '@mastra/core/storage';
|
|
4
|
+
import type { PaginationInfo, StorageGetMessagesArg, StorageResourceType, StorageListMessagesInput, StorageListMessagesOutput, StorageListThreadsByResourceIdInput, StorageListThreadsByResourceIdOutput } from '@mastra/core/storage';
|
|
5
5
|
import type { StoreOperationsD1 } from '../operations/index.js';
|
|
6
6
|
export declare class MemoryStorageD1 extends MemoryStorage {
|
|
7
7
|
private operations;
|
|
@@ -64,14 +64,15 @@ export declare class MemoryStorageD1 extends MemoryStorage {
|
|
|
64
64
|
getMessages(args: StorageGetMessagesArg & {
|
|
65
65
|
format: 'v2';
|
|
66
66
|
}): Promise<MastraMessageV2[]>;
|
|
67
|
-
|
|
67
|
+
listMessagesById({ messageIds }: {
|
|
68
68
|
messageIds: string[];
|
|
69
|
-
format: 'v1';
|
|
70
|
-
}): Promise<MastraMessageV1[]>;
|
|
71
|
-
getMessagesById({ messageIds, format, }: {
|
|
72
|
-
messageIds: string[];
|
|
73
|
-
format?: 'v2';
|
|
74
69
|
}): Promise<MastraMessageV2[]>;
|
|
70
|
+
listMessages(args: StorageListMessagesInput): Promise<StorageListMessagesOutput>;
|
|
71
|
+
/**
|
|
72
|
+
* @todo When migrating from getThreadsByResourceIdPaginated to this method,
|
|
73
|
+
* implement orderBy and sortDirection support for full sorting capabilities
|
|
74
|
+
*/
|
|
75
|
+
listThreadsByResourceId(args: StorageListThreadsByResourceIdInput): Promise<StorageListThreadsByResourceIdOutput>;
|
|
75
76
|
getMessagesPaginated({ threadId, resourceId, selectBy, format, }: StorageGetMessagesArg & {
|
|
76
77
|
format?: 'v1' | 'v2';
|
|
77
78
|
}): Promise<PaginationInfo & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/memory/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,EAEL,aAAa,EAMd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/memory/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAA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AAC,eAAe,EAAE,CAAC;IAkDtF,YAAY,CAAC,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAmN7F;;;OAGG;IACU,uBAAuB,CAClC,IAAI,EAAE,mCAAmC,GACxC,OAAO,CAAC,oCAAoC,CAAC;IAOnC,oBAAoB,CAAC,EAChC,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,MAAM,GACP,EAAE,qBAAqB,GAAG;QAAE,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;KAAE,GAAG,OAAO,CAC3D,cAAc,GAAG;QAAE,QAAQ,EAAE,eAAe,EAAE,GAAG,eAAe,EAAE,CAAA;KAAE,CACrE;IA6IK,cAAc,CAAC,IAAI,EAAE;QACzB,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC,GACnD;YACE,EAAE,EAAE,MAAM,CAAC;YACX,OAAO,CAAC,EAAE;gBACR,QAAQ,CAAC,EAAE,sBAAsB,CAAC,UAAU,CAAC,CAAC;gBAC9C,OAAO,CAAC,EAAE,sBAAsB,CAAC,SAAS,CAAC,CAAC;aAC7C,CAAC;SACH,EAAE,CAAC;KACP,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;CAwI/B"}
|
|
@@ -48,5 +48,13 @@ export declare class ScoresStorageD1 extends ScoresStorage {
|
|
|
48
48
|
pagination: PaginationInfo;
|
|
49
49
|
scores: ScoreRowData[];
|
|
50
50
|
}>;
|
|
51
|
+
getScoresBySpan({ traceId, spanId, pagination, }: {
|
|
52
|
+
traceId: string;
|
|
53
|
+
spanId: string;
|
|
54
|
+
pagination: StoragePagination;
|
|
55
|
+
}): Promise<{
|
|
56
|
+
pagination: PaginationInfo;
|
|
57
|
+
scores: ScoreRowData[];
|
|
58
|
+
}>;
|
|
51
59
|
}
|
|
52
60
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/scores/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/scores/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAA6B,MAAM,qBAAqB,CAAC;AAElG,OAAO,EAAE,aAAa,EAAkC,MAAM,sBAAsB,CAAC;AACrF,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AAEzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AAEjG,MAAM,WAAW,QAAQ;IACvB,KAAK,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,aAAa,CAAA;KAAE,CAAC,CAAC;CACpF;AAsBD,qBAAa,eAAgB,SAAQ,aAAa;IAChD,OAAO,CAAC,UAAU,CAAoB;gBAE1B,EAAE,UAAU,EAAE,EAAE;QAAE,UAAU,EAAE,iBAAiB,CAAA;KAAE;IAKvD,YAAY,CAAC,EAAE,EAAE,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAyBlE,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,WAAW,GAAG,WAAW,CAAC,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,YAAY,CAAA;KAAE,CAAC;IA4D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orageListWorkflowRunsInput } from '@mastra/core/storage';
|
|
2
2
|
import { WorkflowsStorage } from '@mastra/core/storage';
|
|
3
3
|
import type { StepResult, WorkflowRunState } from '@mastra/core/workflows';
|
|
4
4
|
import type { StoreOperationsD1 } from '../operations/index.js';
|
|
@@ -12,7 +12,7 @@ export declare class WorkflowsStorageD1 extends WorkflowsStorage {
|
|
|
12
12
|
runId: string;
|
|
13
13
|
stepId: string;
|
|
14
14
|
result: StepResult<any, any, any, any>;
|
|
15
|
-
|
|
15
|
+
requestContext: Record<string, any>;
|
|
16
16
|
}): Promise<Record<string, StepResult<any, any, any, any>>>;
|
|
17
17
|
updateWorkflowState({}: {
|
|
18
18
|
workflowName: string;
|
|
@@ -25,9 +25,10 @@ export declare class WorkflowsStorageD1 extends WorkflowsStorage {
|
|
|
25
25
|
waitingPaths?: Record<string, number[]>;
|
|
26
26
|
};
|
|
27
27
|
}): Promise<WorkflowRunState | undefined>;
|
|
28
|
-
persistWorkflowSnapshot({ workflowName, runId, snapshot, }: {
|
|
28
|
+
persistWorkflowSnapshot({ workflowName, runId, resourceId, snapshot, }: {
|
|
29
29
|
workflowName: string;
|
|
30
30
|
runId: string;
|
|
31
|
+
resourceId?: string;
|
|
31
32
|
snapshot: WorkflowRunState;
|
|
32
33
|
}): Promise<void>;
|
|
33
34
|
loadWorkflowSnapshot(params: {
|
|
@@ -35,14 +36,7 @@ export declare class WorkflowsStorageD1 extends WorkflowsStorage {
|
|
|
35
36
|
runId: string;
|
|
36
37
|
}): Promise<WorkflowRunState | null>;
|
|
37
38
|
private parseWorkflowRun;
|
|
38
|
-
|
|
39
|
-
workflowName?: string;
|
|
40
|
-
fromDate?: Date;
|
|
41
|
-
toDate?: Date;
|
|
42
|
-
limit?: number;
|
|
43
|
-
offset?: number;
|
|
44
|
-
resourceId?: string;
|
|
45
|
-
}): Promise<WorkflowRuns>;
|
|
39
|
+
listWorkflowRuns({ workflowName, fromDate, toDate, limit, offset, resourceId, }?: StorageListWorkflowRunsInput): Promise<WorkflowRuns>;
|
|
46
40
|
getWorkflowRunById({ runId, workflowName, }: {
|
|
47
41
|
runId: string;
|
|
48
42
|
workflowName?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/workflows/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/workflows/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpG,OAAO,EAAuC,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7F,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGvD,qBAAa,kBAAmB,SAAQ,gBAAgB;IACtD,OAAO,CAAC,UAAU,CAAoB;gBAE1B,EAAE,UAAU,EAAE,EAAE;QAAE,UAAU,EAAE,iBAAiB,CAAA;KAAE;IAK7D,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,KAA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
import type { StorageThreadType, MastraMessageV1, MastraMessageV2 } from '@mastra/core/memory';
|
|
4
4
|
import type { ScoreRowData, ScoringSource } from '@mastra/core/scores';
|
|
5
5
|
import { MastraStorage } from '@mastra/core/storage';
|
|
6
|
-
import type {
|
|
7
|
-
import type { Trace } from '@mastra/core/telemetry';
|
|
6
|
+
import type { PaginationInfo, StorageColumn, StorageGetMessagesArg, StorageResourceType, TABLE_NAMES, WorkflowRun, StoragePagination, WorkflowRuns, StorageDomains } from '@mastra/core/storage';
|
|
8
7
|
import type { StepResult, WorkflowRunState } from '@mastra/core/workflows';
|
|
9
8
|
import Cloudflare from 'cloudflare';
|
|
10
9
|
/**
|
|
@@ -64,6 +63,7 @@ export declare class D1Store extends MastraStorage {
|
|
|
64
63
|
hasColumn: boolean;
|
|
65
64
|
createTable: boolean;
|
|
66
65
|
deleteMessages: boolean;
|
|
66
|
+
getScoresBySpan: boolean;
|
|
67
67
|
};
|
|
68
68
|
createTable({ tableName, schema, }: {
|
|
69
69
|
tableName: TABLE_NAMES;
|
|
@@ -139,25 +139,17 @@ export declare class D1Store extends MastraStorage {
|
|
|
139
139
|
getMessages(args: StorageGetMessagesArg & {
|
|
140
140
|
format: 'v2';
|
|
141
141
|
}): Promise<MastraMessageV2[]>;
|
|
142
|
-
getMessagesById({ messageIds, format }: {
|
|
143
|
-
messageIds: string[];
|
|
144
|
-
format: 'v1';
|
|
145
|
-
}): Promise<MastraMessageV1[]>;
|
|
146
|
-
getMessagesById({ messageIds, format }: {
|
|
147
|
-
messageIds: string[];
|
|
148
|
-
format?: 'v2';
|
|
149
|
-
}): Promise<MastraMessageV2[]>;
|
|
150
142
|
getMessagesPaginated({ threadId, selectBy, format, }: StorageGetMessagesArg & {
|
|
151
143
|
format?: 'v1' | 'v2';
|
|
152
144
|
}): Promise<PaginationInfo & {
|
|
153
145
|
messages: MastraMessageV1[] | MastraMessageV2[];
|
|
154
146
|
}>;
|
|
155
|
-
updateWorkflowResults({ workflowName, runId, stepId, result,
|
|
147
|
+
updateWorkflowResults({ workflowName, runId, stepId, result, requestContext, }: {
|
|
156
148
|
workflowName: string;
|
|
157
149
|
runId: string;
|
|
158
150
|
stepId: string;
|
|
159
151
|
result: StepResult<any, any, any, any>;
|
|
160
|
-
|
|
152
|
+
requestContext: Record<string, any>;
|
|
161
153
|
}): Promise<Record<string, StepResult<any, any, any, any>>>;
|
|
162
154
|
updateWorkflowState({ workflowName, runId, opts, }: {
|
|
163
155
|
workflowName: string;
|
|
@@ -170,16 +162,17 @@ export declare class D1Store extends MastraStorage {
|
|
|
170
162
|
waitingPaths?: Record<string, number[]>;
|
|
171
163
|
};
|
|
172
164
|
}): Promise<WorkflowRunState | undefined>;
|
|
173
|
-
persistWorkflowSnapshot({ workflowName, runId, snapshot, }: {
|
|
165
|
+
persistWorkflowSnapshot({ workflowName, runId, resourceId, snapshot, }: {
|
|
174
166
|
workflowName: string;
|
|
175
167
|
runId: string;
|
|
168
|
+
resourceId?: string;
|
|
176
169
|
snapshot: WorkflowRunState;
|
|
177
170
|
}): Promise<void>;
|
|
178
171
|
loadWorkflowSnapshot(params: {
|
|
179
172
|
workflowName: string;
|
|
180
173
|
runId: string;
|
|
181
174
|
}): Promise<WorkflowRunState | null>;
|
|
182
|
-
|
|
175
|
+
listWorkflowRuns({ workflowName, fromDate, toDate, limit, offset, resourceId, }?: {
|
|
183
176
|
workflowName?: string;
|
|
184
177
|
fromDate?: Date;
|
|
185
178
|
toDate?: Date;
|
|
@@ -200,31 +193,6 @@ export declare class D1Store extends MastraStorage {
|
|
|
200
193
|
tableName: TABLE_NAMES;
|
|
201
194
|
records: Record<string, any>[];
|
|
202
195
|
}): Promise<void>;
|
|
203
|
-
/**
|
|
204
|
-
* @deprecated use getTracesPaginated instead
|
|
205
|
-
*/
|
|
206
|
-
getTraces(args: {
|
|
207
|
-
name?: string;
|
|
208
|
-
scope?: string;
|
|
209
|
-
page: number;
|
|
210
|
-
perPage: number;
|
|
211
|
-
attributes?: Record<string, string>;
|
|
212
|
-
fromDate?: Date;
|
|
213
|
-
toDate?: Date;
|
|
214
|
-
}): Promise<Trace[]>;
|
|
215
|
-
getTracesPaginated(args: StorageGetTracesPaginatedArg): Promise<PaginationInfo & {
|
|
216
|
-
traces: Trace[];
|
|
217
|
-
}>;
|
|
218
|
-
/**
|
|
219
|
-
* @deprecated use getEvals instead
|
|
220
|
-
*/
|
|
221
|
-
getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
|
|
222
|
-
getEvals(options: {
|
|
223
|
-
agentName?: string;
|
|
224
|
-
type?: 'test' | 'live';
|
|
225
|
-
} & PaginationArgs): Promise<PaginationInfo & {
|
|
226
|
-
evals: EvalRow[];
|
|
227
|
-
}>;
|
|
228
196
|
updateMessages(_args: {
|
|
229
197
|
messages: Partial<Omit<MastraMessageV2, 'createdAt'>> & {
|
|
230
198
|
id: string;
|
|
@@ -276,6 +244,14 @@ export declare class D1Store extends MastraStorage {
|
|
|
276
244
|
pagination: PaginationInfo;
|
|
277
245
|
scores: ScoreRowData[];
|
|
278
246
|
}>;
|
|
247
|
+
getScoresBySpan({ traceId, spanId, pagination, }: {
|
|
248
|
+
traceId: string;
|
|
249
|
+
spanId: string;
|
|
250
|
+
pagination: StoragePagination;
|
|
251
|
+
}): Promise<{
|
|
252
|
+
pagination: PaginationInfo;
|
|
253
|
+
scores: ScoreRowData[];
|
|
254
|
+
}>;
|
|
279
255
|
/**
|
|
280
256
|
* Close the database connection
|
|
281
257
|
* No explicit cleanup needed for D1 in either REST or Workers Binding mode
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,eAAe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AC;QAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,MAAM,CAAC,EAAE,aAAa,CAAC;KACxB,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,MAAM,EAAE,YAAY,EAAE,CAAA;KAAE,CAAC;IAI7D,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;IAInE;;;OAGG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAI7B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/cloudflare-d1",
|
|
3
|
-
"version": "0.0.0-remove-unused-
|
|
3
|
+
"version": "0.0.0-remove-unused-model-providers-api-20251030210744",
|
|
4
4
|
"description": "D1 provider for Mastra - includes db storage capabilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -26,22 +26,22 @@
|
|
|
26
26
|
"cloudflare": "^4.5.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@cloudflare/workers-types": "^4.
|
|
29
|
+
"@cloudflare/workers-types": "^4.20251008.0",
|
|
30
30
|
"@microsoft/api-extractor": "^7.52.8",
|
|
31
31
|
"@types/node": "^20.19.0",
|
|
32
32
|
"dotenv": "^17.0.0",
|
|
33
|
-
"eslint": "^9.
|
|
34
|
-
"miniflare": "^4.
|
|
33
|
+
"eslint": "^9.37.0",
|
|
34
|
+
"miniflare": "^4.20251008.0",
|
|
35
35
|
"tsup": "^8.5.0",
|
|
36
36
|
"typescript": "^5.8.3",
|
|
37
37
|
"vitest": "^3.2.4",
|
|
38
|
-
"@internal/
|
|
39
|
-
"@internal/
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
38
|
+
"@internal/lint": "0.0.0-remove-unused-model-providers-api-20251030210744",
|
|
39
|
+
"@internal/storage-test-utils": "0.0.49",
|
|
40
|
+
"@internal/types-builder": "0.0.0-remove-unused-model-providers-api-20251030210744",
|
|
41
|
+
"@mastra/core": "0.0.0-remove-unused-model-providers-api-20251030210744"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@mastra/core": "0.0.0-remove-unused-
|
|
44
|
+
"@mastra/core": "0.0.0-remove-unused-model-providers-api-20251030210744"
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://mastra.ai",
|
|
47
47
|
"repository": {
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { LegacyEvalsStorage } from '@mastra/core/storage';
|
|
2
|
-
import type { EvalRow, PaginationArgs, PaginationInfo } from '@mastra/core/storage';
|
|
3
|
-
import type { StoreOperationsD1 } from '../operations/index.js';
|
|
4
|
-
export declare class LegacyEvalsStorageD1 extends LegacyEvalsStorage {
|
|
5
|
-
private operations;
|
|
6
|
-
constructor({ operations }: {
|
|
7
|
-
operations: StoreOperationsD1;
|
|
8
|
-
});
|
|
9
|
-
getEvals(options: {
|
|
10
|
-
agentName?: string;
|
|
11
|
-
type?: 'test' | 'live';
|
|
12
|
-
} & PaginationArgs): Promise<PaginationInfo & {
|
|
13
|
-
evals: EvalRow[];
|
|
14
|
-
}>;
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated use getEvals instead
|
|
17
|
-
*/
|
|
18
|
-
getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
|
|
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,EAA8B,MAAM,sBAAsB,CAAC;AACtF,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGpF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGvD,qBAAa,oBAAqB,SAAQ,kBAAkB;IAC1D,OAAO,CAAC,UAAU,CAAoB;gBAC1B,EAAE,UAAU,EAAE,EAAE;QAAE,UAAU,EAAE,iBAAiB,CAAA;KAAE;IAKvD,QAAQ,CACZ,OAAO,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KACxB,GAAG,cAAc,GACjB,OAAO,CAAC,cAAc,GAAG;QAAE,KAAK,EAAE,OAAO,EAAE,CAAA;KAAE,CAAC;IAoHjD;;OAEG;IACG,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CA0DzF"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { PaginationInfo, StorageGetTracesArg, StorageGetTracesPaginatedArg } from '@mastra/core/storage';
|
|
2
|
-
import { TracesStorage } from '@mastra/core/storage';
|
|
3
|
-
import type { Trace } from '@mastra/core/telemetry';
|
|
4
|
-
import type { StoreOperationsD1 } from '../operations/index.js';
|
|
5
|
-
export declare class TracesStorageD1 extends TracesStorage {
|
|
6
|
-
private operations;
|
|
7
|
-
constructor({ operations }: {
|
|
8
|
-
operations: StoreOperationsD1;
|
|
9
|
-
});
|
|
10
|
-
getTraces(args: StorageGetTracesArg): Promise<Trace[]>;
|
|
11
|
-
getTracesPaginated(args: StorageGetTracesPaginatedArg): Promise<PaginationInfo & {
|
|
12
|
-
traces: Trace[];
|
|
13
|
-
}>;
|
|
14
|
-
batchTraceInsert({ records }: {
|
|
15
|
-
records: Record<string, any>[];
|
|
16
|
-
}): Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
//# 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,mBAAmB,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAC9G,OAAO,EAAgB,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAOvD,qBAAa,eAAgB,SAAQ,aAAa;IAChD,OAAO,CAAC,UAAU,CAAoB;gBAE1B,EAAE,UAAU,EAAE,EAAE;QAAE,UAAU,EAAE,iBAAiB,CAAA;KAAE;IAKvD,SAAS,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAsCtD,kBAAkB,CAAC,IAAI,EAAE,4BAA4B,GAAG,OAAO,CAAC,cAAc,GAAG;QAAE,MAAM,EAAE,KAAK,EAAE,CAAA;KAAE,CAAC;IA+FrG,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAOvF"}
|