@mastra/cloudflare 0.13.2 → 1.0.0-beta.1
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 +230 -14
- package/README.md +37 -15
- package/dist/index.cjs +334 -571
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +334 -571
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/memory/index.d.ts +18 -36
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/dist/storage/domains/operations/index.d.ts +0 -1
- package/dist/storage/domains/operations/index.d.ts.map +1 -1
- package/dist/storage/domains/scores/index.d.ts +5 -5
- package/dist/storage/domains/scores/index.d.ts.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +3 -10
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +23 -79
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/test-utils.d.ts.map +1 -1
- package/dist/storage/types.d.ts +9 -6
- package/dist/storage/types.d.ts.map +1 -1
- package/package.json +14 -16
- package/dist/storage/domains/legacy-evals/index.d.ts +0 -21
- 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,6 +1,6 @@
|
|
|
1
1
|
import type { MastraMessageContentV2 } from '@mastra/core/agent';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { MastraDBMessage, StorageThreadType } from '@mastra/core/memory';
|
|
3
|
+
import type { StorageResourceType, StorageListMessagesInput, StorageListMessagesOutput, StorageListThreadsByResourceIdInput, StorageListThreadsByResourceIdOutput } from '@mastra/core/storage';
|
|
4
4
|
import { MemoryStorage } from '@mastra/core/storage';
|
|
5
5
|
import type { StoreOperationsCloudflare } from '../operations/index.js';
|
|
6
6
|
export declare class MemoryStorageCloudflare extends MemoryStorage {
|
|
@@ -9,19 +9,15 @@ export declare class MemoryStorageCloudflare extends MemoryStorage {
|
|
|
9
9
|
operations: StoreOperationsCloudflare;
|
|
10
10
|
});
|
|
11
11
|
private ensureMetadata;
|
|
12
|
+
/**
|
|
13
|
+
* Summarizes message content without exposing raw data (for logging).
|
|
14
|
+
* Returns type, length, and keys only to prevent PII leakage.
|
|
15
|
+
*/
|
|
16
|
+
private summarizeMessageContent;
|
|
12
17
|
getThreadById({ threadId }: {
|
|
13
18
|
threadId: string;
|
|
14
19
|
}): Promise<StorageThreadType | null>;
|
|
15
|
-
|
|
16
|
-
resourceId: string;
|
|
17
|
-
}): Promise<StorageThreadType[]>;
|
|
18
|
-
getThreadsByResourceIdPaginated(args: {
|
|
19
|
-
resourceId: string;
|
|
20
|
-
page?: number;
|
|
21
|
-
perPage?: number;
|
|
22
|
-
}): Promise<PaginationInfo & {
|
|
23
|
-
threads: StorageThreadType[];
|
|
24
|
-
}>;
|
|
20
|
+
listThreadsByResourceId(args: StorageListThreadsByResourceIdInput): Promise<StorageListThreadsByResourceIdOutput>;
|
|
25
21
|
saveThread({ thread }: {
|
|
26
22
|
thread: StorageThreadType;
|
|
27
23
|
}): Promise<StorageThreadType>;
|
|
@@ -51,13 +47,10 @@ export declare class MemoryStorageCloudflare extends MemoryStorage {
|
|
|
51
47
|
private getSortedMessages;
|
|
52
48
|
private migrateMessage;
|
|
53
49
|
saveMessages(args: {
|
|
54
|
-
messages:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
messages: MastraMessageV2[];
|
|
59
|
-
format: 'v2';
|
|
60
|
-
}): Promise<MastraMessageV2[]>;
|
|
50
|
+
messages: MastraDBMessage[];
|
|
51
|
+
}): Promise<{
|
|
52
|
+
messages: MastraDBMessage[];
|
|
53
|
+
}>;
|
|
61
54
|
private getRank;
|
|
62
55
|
private getRange;
|
|
63
56
|
private getLastN;
|
|
@@ -65,25 +58,14 @@ export declare class MemoryStorageCloudflare extends MemoryStorage {
|
|
|
65
58
|
private getIncludedMessagesWithContext;
|
|
66
59
|
private getRecentMessages;
|
|
67
60
|
private fetchAndParseMessagesFromMultipleThreads;
|
|
68
|
-
|
|
69
|
-
format?: 'v1';
|
|
70
|
-
}): Promise<MastraMessageV1[]>;
|
|
71
|
-
getMessages(args: StorageGetMessagesArg & {
|
|
72
|
-
format: 'v2';
|
|
73
|
-
}): Promise<MastraMessageV2[]>;
|
|
74
|
-
getMessagesById({ messageIds, format, }: {
|
|
75
|
-
messageIds: string[];
|
|
76
|
-
format: 'v1';
|
|
77
|
-
}): Promise<MastraMessageV1[]>;
|
|
78
|
-
getMessagesById({ messageIds, format, }: {
|
|
61
|
+
listMessagesById({ messageIds }: {
|
|
79
62
|
messageIds: string[];
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
getMessagesPaginated(args: StorageGetMessagesArg): Promise<PaginationInfo & {
|
|
83
|
-
messages: MastraMessageV1[] | MastraMessageV2[];
|
|
63
|
+
}): Promise<{
|
|
64
|
+
messages: MastraDBMessage[];
|
|
84
65
|
}>;
|
|
66
|
+
listMessages(args: StorageListMessagesInput): Promise<StorageListMessagesOutput>;
|
|
85
67
|
updateMessages(args: {
|
|
86
|
-
messages: (Partial<Omit<
|
|
68
|
+
messages: (Partial<Omit<MastraDBMessage, 'createdAt'>> & {
|
|
87
69
|
id: string;
|
|
88
70
|
threadId?: string;
|
|
89
71
|
content?: {
|
|
@@ -91,7 +73,7 @@ export declare class MemoryStorageCloudflare extends MemoryStorage {
|
|
|
91
73
|
content?: MastraMessageContentV2['content'];
|
|
92
74
|
};
|
|
93
75
|
})[];
|
|
94
|
-
}): Promise<
|
|
76
|
+
}): Promise<MastraDBMessage[]>;
|
|
95
77
|
getResourceById({ resourceId }: {
|
|
96
78
|
resourceId: string;
|
|
97
79
|
}): Promise<StorageResourceType | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/memory/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA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,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC;IA8B5F,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE;QAAE,QAAQ,EAAE,mBAAmB,CAAA;KAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC;IA6B3F,cAAc,CAAC,EACnB,UAAU,EACV,aAAa,EACb,QAAQ,GACT,EAAE;QACD,UAAU,EAAE,MAAM,CAAC;QACnB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpC,GAAG,OAAO,CAAC,mBAAmB,CAAC;CA4BjC"}
|
|
@@ -49,7 +49,6 @@ export declare class StoreOperationsCloudflare extends StoreOperations {
|
|
|
49
49
|
tableName: TABLE_NAMES;
|
|
50
50
|
record: Record<string, any>;
|
|
51
51
|
}): Promise<void>;
|
|
52
|
-
private ensureMetadata;
|
|
53
52
|
load<R>({ tableName, keys }: {
|
|
54
53
|
tableName: TABLE_NAMES;
|
|
55
54
|
keys: Record<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/operations/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/operations/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EACL,eAAe,EAMhB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,E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W;YAsCvD,oBAAoB;IAY5B,QAAQ,CAAC,SAAS,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAS5D,MAAM,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAQ9F"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ScoreRowData, ScoringSource } from '@mastra/core/
|
|
1
|
+
import type { ScoreRowData, ScoringSource } from '@mastra/core/evals';
|
|
2
2
|
import { ScoresStorage } from '@mastra/core/storage';
|
|
3
3
|
import type { StoragePagination, PaginationInfo } from '@mastra/core/storage';
|
|
4
4
|
import type { StoreOperationsCloudflare } from '../operations/index.js';
|
|
@@ -13,7 +13,7 @@ export declare class ScoresStorageCloudflare extends ScoresStorage {
|
|
|
13
13
|
saveScore(score: Omit<ScoreRowData, 'createdAt' | 'updatedAt'>): Promise<{
|
|
14
14
|
score: ScoreRowData;
|
|
15
15
|
}>;
|
|
16
|
-
|
|
16
|
+
listScoresByScorerId({ scorerId, entityId, entityType, source, pagination, }: {
|
|
17
17
|
scorerId: string;
|
|
18
18
|
entityId?: string;
|
|
19
19
|
entityType?: string;
|
|
@@ -23,14 +23,14 @@ export declare class ScoresStorageCloudflare extends ScoresStorage {
|
|
|
23
23
|
pagination: PaginationInfo;
|
|
24
24
|
scores: ScoreRowData[];
|
|
25
25
|
}>;
|
|
26
|
-
|
|
26
|
+
listScoresByRunId({ runId, pagination, }: {
|
|
27
27
|
runId: string;
|
|
28
28
|
pagination: StoragePagination;
|
|
29
29
|
}): Promise<{
|
|
30
30
|
pagination: PaginationInfo;
|
|
31
31
|
scores: ScoreRowData[];
|
|
32
32
|
}>;
|
|
33
|
-
|
|
33
|
+
listScoresByEntityId({ entityId, entityType, pagination, }: {
|
|
34
34
|
pagination: StoragePagination;
|
|
35
35
|
entityId: string;
|
|
36
36
|
entityType: string;
|
|
@@ -38,7 +38,7 @@ export declare class ScoresStorageCloudflare extends ScoresStorage {
|
|
|
38
38
|
pagination: PaginationInfo;
|
|
39
39
|
scores: ScoreRowData[];
|
|
40
40
|
}>;
|
|
41
|
-
|
|
41
|
+
listScoresBySpan({ traceId, spanId, pagination, }: {
|
|
42
42
|
traceId: string;
|
|
43
43
|
spanId: string;
|
|
44
44
|
pagination: StoragePagination;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/scores/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAA6B,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/scores/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAA6B,MAAM,oBAAoB,CAAC;AACjG,OAAO,EACL,aAAa,EAKd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAkB/D,qBAAa,uBAAwB,SAAQ,aAAa;IACxD,OAAO,CAAC,UAAU,CAA4B;gBAElC,EAAE,UAAU,EAAE,EAAE;QAAE,UAAU,EAAE,yBAAyB,CAAA;KAAE;IAK/D,YAAY,CAAC,EAAE,EAAE,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAuBlE,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,WAAW,GAAG,WAAW,CAAC,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,YAAY,CAAA;KAAE,CAAC;IA6DjG,oBAAoB,CAAC,EACzB,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,MAAM,EACN,UAAU,GACX,EAAE;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,MAAM,CAAC,EAAE,aAAa,CAAC;QACvB,UAAU,EAAE,iBAAiB,CAAC;KAC/B,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,MAAM,EAAE,YAAY,EAAE,CAAA;KAAE,CAAC;IA+D7D,iBAAiB,CAAC,EACtB,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;IAoD7D,oBAAoB,CAAC,EACzB,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;IAoD7D,gBAAgB,CAAC,EACrB,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;CAmDpE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WorkflowsStorage } from '@mastra/core/storage';
|
|
2
|
-
import type { WorkflowRun, WorkflowRuns } from '@mastra/core/storage';
|
|
2
|
+
import type { WorkflowRun, WorkflowRuns, StorageListWorkflowRunsInput } from '@mastra/core/storage';
|
|
3
3
|
import type { StepResult, WorkflowRunState } from '@mastra/core/workflows';
|
|
4
4
|
import type { StoreOperationsCloudflare } from '../operations/index.js';
|
|
5
5
|
export declare class WorkflowsStorageCloudflare extends WorkflowsStorage {
|
|
@@ -13,7 +13,7 @@ export declare class WorkflowsStorageCloudflare extends WorkflowsStorage {
|
|
|
13
13
|
runId: string;
|
|
14
14
|
stepId: string;
|
|
15
15
|
result: StepResult<any, any, any, any>;
|
|
16
|
-
|
|
16
|
+
requestContext: Record<string, any>;
|
|
17
17
|
}): Promise<Record<string, StepResult<any, any, any, any>>>;
|
|
18
18
|
updateWorkflowState({}: {
|
|
19
19
|
workflowName: string;
|
|
@@ -38,14 +38,7 @@ export declare class WorkflowsStorageCloudflare extends WorkflowsStorage {
|
|
|
38
38
|
}): Promise<WorkflowRunState | null>;
|
|
39
39
|
private parseWorkflowRun;
|
|
40
40
|
private buildWorkflowSnapshotPrefix;
|
|
41
|
-
|
|
42
|
-
workflowName?: string;
|
|
43
|
-
limit?: number;
|
|
44
|
-
offset?: number;
|
|
45
|
-
resourceId?: string;
|
|
46
|
-
fromDate?: Date;
|
|
47
|
-
toDate?: Date;
|
|
48
|
-
}): Promise<WorkflowRuns>;
|
|
41
|
+
listWorkflowRuns({ workflowName, page, perPage, resourceId, fromDate, toDate, status, }?: StorageListWorkflowRunsInput): Promise<WorkflowRuns>;
|
|
49
42
|
getWorkflowRunById({ runId, workflowName, }: {
|
|
50
43
|
runId: string;
|
|
51
44
|
workflowName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/workflows/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAuC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/workflows/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAuC,gBAAgB,EAAoB,MAAM,s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AG,SAAS,CAAC;IAIlC,uBAAuB,CAAC,MAAM,EAAE;QACpC,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,gBAAgB,CAAC;KAC5B,GAAG,OAAO,CAAC,IAAI,CAAC;IAiCX,oBAAoB,CAAC,MAAM,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAgC7G,OAAO,CAAC,gBAAgB;IAqBxB,OAAO,CAAC,2BAA2B;IAmB7B,gBAAgB,CAAC,EACrB,YAAY,EACZ,IAAQ,EACR,OAAY,EACZ,UAAU,EACV,QAAQ,EACR,MAAM,EACN,MAAM,GACP,GAAE,4BAAiC,GAAG,OAAO,CAAC,YAAY,CAAC;IAqFtD,kBAAkB,CAAC,EACvB,KAAK,EACL,YAAY,GACb,EAAE;QACD,KAAK,EAAE,MAAM,CAAC;QACd,YAAY,EAAE,MAAM,CAAC;KACtB,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CA4ChC"}
|
package/dist/storage/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { MastraMessageContentV2 } from '@mastra/core/agent';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { ScoreRowData, ScoringSource } from '@mastra/core/evals';
|
|
3
|
+
import type { StorageThreadType, MastraDBMessage } from '@mastra/core/memory';
|
|
4
4
|
import { MastraStorage } from '@mastra/core/storage';
|
|
5
|
-
import type { TABLE_NAMES, StorageColumn,
|
|
6
|
-
import type { Trace } from '@mastra/core/telemetry';
|
|
5
|
+
import type { TABLE_NAMES, StorageColumn, WorkflowRuns, WorkflowRun, PaginationInfo, StoragePagination, StorageDomains, StorageResourceType, StorageListWorkflowRunsInput } from '@mastra/core/storage';
|
|
7
6
|
import type { StepResult, WorkflowRunState } from '@mastra/core/workflows';
|
|
8
7
|
import type { CloudflareStoreConfig, RecordTypes } from './types.js';
|
|
9
8
|
export declare class CloudflareStore extends MastraStorage {
|
|
@@ -20,9 +19,9 @@ export declare class CloudflareStore extends MastraStorage {
|
|
|
20
19
|
hasColumn: boolean;
|
|
21
20
|
createTable: boolean;
|
|
22
21
|
deleteMessages: boolean;
|
|
23
|
-
|
|
22
|
+
observabilityInstance?: boolean;
|
|
24
23
|
indexManagement?: boolean;
|
|
25
|
-
|
|
24
|
+
listScoresBySpan?: boolean;
|
|
26
25
|
};
|
|
27
26
|
constructor(config: CloudflareStoreConfig);
|
|
28
27
|
createTable({ tableName, schema, }: {
|
|
@@ -51,9 +50,6 @@ export declare class CloudflareStore extends MastraStorage {
|
|
|
51
50
|
getThreadById({ threadId }: {
|
|
52
51
|
threadId: string;
|
|
53
52
|
}): Promise<StorageThreadType | null>;
|
|
54
|
-
getThreadsByResourceId({ resourceId }: {
|
|
55
|
-
resourceId: string;
|
|
56
|
-
}): Promise<StorageThreadType[]>;
|
|
57
53
|
saveThread({ thread }: {
|
|
58
54
|
thread: StorageThreadType;
|
|
59
55
|
}): Promise<StorageThreadType>;
|
|
@@ -66,25 +62,16 @@ export declare class CloudflareStore extends MastraStorage {
|
|
|
66
62
|
threadId: string;
|
|
67
63
|
}): Promise<void>;
|
|
68
64
|
saveMessages(args: {
|
|
69
|
-
messages:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
format: 'v2';
|
|
75
|
-
}): Promise<MastraMessageV2[]>;
|
|
76
|
-
getMessages(args: StorageGetMessagesArg & {
|
|
77
|
-
format?: 'v1';
|
|
78
|
-
}): Promise<MastraMessageV1[]>;
|
|
79
|
-
getMessages(args: StorageGetMessagesArg & {
|
|
80
|
-
format: 'v2';
|
|
81
|
-
}): Promise<MastraMessageV2[]>;
|
|
82
|
-
updateWorkflowResults({ workflowName, runId, stepId, result, runtimeContext, }: {
|
|
65
|
+
messages: MastraDBMessage[];
|
|
66
|
+
}): Promise<{
|
|
67
|
+
messages: MastraDBMessage[];
|
|
68
|
+
}>;
|
|
69
|
+
updateWorkflowResults({ workflowName, runId, stepId, result, requestContext, }: {
|
|
83
70
|
workflowName: string;
|
|
84
71
|
runId: string;
|
|
85
72
|
stepId: string;
|
|
86
73
|
result: StepResult<any, any, any, any>;
|
|
87
|
-
|
|
74
|
+
requestContext: Record<string, any>;
|
|
88
75
|
}): Promise<Record<string, StepResult<any, any, any, any>>>;
|
|
89
76
|
updateWorkflowState({ workflowName, runId, opts, }: {
|
|
90
77
|
workflowName: string;
|
|
@@ -97,14 +84,11 @@ export declare class CloudflareStore extends MastraStorage {
|
|
|
97
84
|
waitingPaths?: Record<string, number[]>;
|
|
98
85
|
};
|
|
99
86
|
}): Promise<WorkflowRunState | undefined>;
|
|
100
|
-
|
|
87
|
+
listMessagesById({ messageIds }: {
|
|
101
88
|
messageIds: string[];
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
messageIds: string[];
|
|
106
|
-
format?: 'v2';
|
|
107
|
-
}): Promise<MastraMessageV2[]>;
|
|
89
|
+
}): Promise<{
|
|
90
|
+
messages: MastraDBMessage[];
|
|
91
|
+
}>;
|
|
108
92
|
persistWorkflowSnapshot(params: {
|
|
109
93
|
workflowName: string;
|
|
110
94
|
runId: string;
|
|
@@ -119,74 +103,34 @@ export declare class CloudflareStore extends MastraStorage {
|
|
|
119
103
|
tableName: T;
|
|
120
104
|
records: Partial<RecordTypes[T]>[];
|
|
121
105
|
}): Promise<void>;
|
|
122
|
-
|
|
123
|
-
name?: string;
|
|
124
|
-
scope?: string;
|
|
125
|
-
page: number;
|
|
126
|
-
perPage: number;
|
|
127
|
-
attributes?: Record<string, string>;
|
|
128
|
-
fromDate?: Date;
|
|
129
|
-
toDate?: Date;
|
|
130
|
-
}): Promise<any[]>;
|
|
131
|
-
getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
|
|
132
|
-
getEvals(options: {
|
|
133
|
-
agentName?: string;
|
|
134
|
-
type?: 'test' | 'live';
|
|
135
|
-
dateRange?: {
|
|
136
|
-
start?: Date;
|
|
137
|
-
end?: Date;
|
|
138
|
-
};
|
|
139
|
-
} & PaginationArgs): Promise<PaginationInfo & {
|
|
140
|
-
evals: EvalRow[];
|
|
141
|
-
}>;
|
|
142
|
-
getWorkflowRuns({ workflowName, limit, offset, resourceId, fromDate, toDate, }?: {
|
|
143
|
-
workflowName?: string;
|
|
144
|
-
limit?: number;
|
|
145
|
-
offset?: number;
|
|
146
|
-
resourceId?: string;
|
|
147
|
-
fromDate?: Date;
|
|
148
|
-
toDate?: Date;
|
|
149
|
-
}): Promise<WorkflowRuns>;
|
|
106
|
+
listWorkflowRuns({ workflowName, perPage, page, resourceId, fromDate, toDate, status, }?: StorageListWorkflowRunsInput): Promise<WorkflowRuns>;
|
|
150
107
|
getWorkflowRunById({ runId, workflowName, }: {
|
|
151
108
|
runId: string;
|
|
152
109
|
workflowName: string;
|
|
153
110
|
}): Promise<WorkflowRun | null>;
|
|
154
|
-
getTracesPaginated(args: StorageGetTracesPaginatedArg): Promise<PaginationInfo & {
|
|
155
|
-
traces: Trace[];
|
|
156
|
-
}>;
|
|
157
|
-
getThreadsByResourceIdPaginated(args: {
|
|
158
|
-
resourceId: string;
|
|
159
|
-
page: number;
|
|
160
|
-
perPage: number;
|
|
161
|
-
}): Promise<PaginationInfo & {
|
|
162
|
-
threads: StorageThreadType[];
|
|
163
|
-
}>;
|
|
164
|
-
getMessagesPaginated(args: StorageGetMessagesArg): Promise<PaginationInfo & {
|
|
165
|
-
messages: MastraMessageV1[] | MastraMessageV2[];
|
|
166
|
-
}>;
|
|
167
111
|
updateMessages(args: {
|
|
168
|
-
messages: Partial<Omit<
|
|
112
|
+
messages: (Partial<Omit<MastraDBMessage, 'createdAt'>> & {
|
|
169
113
|
id: string;
|
|
170
114
|
content?: {
|
|
171
115
|
metadata?: MastraMessageContentV2['metadata'];
|
|
172
116
|
content?: MastraMessageContentV2['content'];
|
|
173
117
|
};
|
|
174
|
-
}[];
|
|
175
|
-
}): Promise<
|
|
118
|
+
})[];
|
|
119
|
+
}): Promise<MastraDBMessage[]>;
|
|
176
120
|
getScoreById({ id }: {
|
|
177
121
|
id: string;
|
|
178
122
|
}): Promise<ScoreRowData | null>;
|
|
179
123
|
saveScore(score: ScoreRowData): Promise<{
|
|
180
124
|
score: ScoreRowData;
|
|
181
125
|
}>;
|
|
182
|
-
|
|
126
|
+
listScoresByRunId({ runId, pagination, }: {
|
|
183
127
|
runId: string;
|
|
184
128
|
pagination: StoragePagination;
|
|
185
129
|
}): Promise<{
|
|
186
130
|
pagination: PaginationInfo;
|
|
187
131
|
scores: ScoreRowData[];
|
|
188
132
|
}>;
|
|
189
|
-
|
|
133
|
+
listScoresByEntityId({ entityId, entityType, pagination, }: {
|
|
190
134
|
pagination: StoragePagination;
|
|
191
135
|
entityId: string;
|
|
192
136
|
entityType: string;
|
|
@@ -194,7 +138,7 @@ export declare class CloudflareStore extends MastraStorage {
|
|
|
194
138
|
pagination: PaginationInfo;
|
|
195
139
|
scores: ScoreRowData[];
|
|
196
140
|
}>;
|
|
197
|
-
|
|
141
|
+
listScoresByScorerId({ scorerId, entityId, entityType, source, pagination, }: {
|
|
198
142
|
scorerId: string;
|
|
199
143
|
entityId?: string;
|
|
200
144
|
entityType?: string;
|
|
@@ -204,7 +148,7 @@ export declare class CloudflareStore extends MastraStorage {
|
|
|
204
148
|
pagination: PaginationInfo;
|
|
205
149
|
scores: ScoreRowData[];
|
|
206
150
|
}>;
|
|
207
|
-
|
|
151
|
+
listScoresBySpan({ traceId, spanId, pagination, }: {
|
|
208
152
|
traceId: string;
|
|
209
153
|
spanId: string;
|
|
210
154
|
pagination: StoragePagination;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AACA,OA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P,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;IAI7D,eAAe,CAAC,EAAE,UAAU,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC;IAI5F,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE;QAAE,QAAQ,EAAE,mBAAmB,CAAA;KAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAI3F,cAAc,CAAC,EACnB,UAAU,EACV,aAAa,EACb,QAAQ,GACT,EAAE;QACD,UAAU,EAAE,MAAM,CAAC;QACnB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpC,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAI1B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../../src/storage/test-utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,EAAE,QAAQ,MAAM,EAAE,aAAa,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;CAejG,CAAC;AAEH,eAAO,MAAM,4BAA4B,GAAI,UAAU,MAAM,EAAE,QAAQ,MAAM,EAAE,YAAY,IAAI;;;;
|
|
1
|
+
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../../src/storage/test-utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,EAAE,QAAQ,MAAM,EAAE,aAAa,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;CAejG,CAAC;AAEH,eAAO,MAAM,4BAA4B,GAAI,UAAU,MAAM,EAAE,QAAQ,MAAM,EAAE,YAAY,IAAI;;;;CA4B9F,CAAC;AAGF,eAAO,MAAM,UAAU,GAAU,CAAC,EAChC,IAAI,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,WAAW,CAAC,MAAM,EAAE,CAAC,KAAK,OAAO,EACjC,gBAAe,EAAE,sDAAsD;AACvE,iBAAe,KACd,OAAO,CAAC,CAAC,CAYX,CAAC"}
|
package/dist/storage/types.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { KVNamespace } from '@cloudflare/workers-types';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type { TABLE_MESSAGES, TABLE_THREADS, TABLE_WORKFLOW_SNAPSHOT,
|
|
2
|
+
import type { ScoreRowData } from '@mastra/core/evals';
|
|
3
|
+
import type { StorageThreadType, MastraDBMessage } from '@mastra/core/memory';
|
|
4
|
+
import type { TABLE_MESSAGES, TABLE_THREADS, TABLE_WORKFLOW_SNAPSHOT, TABLE_TRACES, TABLE_RESOURCES, TABLE_NAMES, StorageResourceType, TABLE_SCORERS, TABLE_SPANS, SpanRecord } from '@mastra/core/storage';
|
|
5
5
|
import type { WorkflowRunState } from '@mastra/core/workflows';
|
|
6
6
|
/**
|
|
7
7
|
* Configuration for Cloudflare KV using REST API
|
|
8
8
|
*/
|
|
9
9
|
export interface CloudflareRestConfig {
|
|
10
|
+
/** Storage instance ID */
|
|
11
|
+
id: string;
|
|
10
12
|
/** Cloudflare account ID */
|
|
11
13
|
accountId: string;
|
|
12
14
|
/** Cloudflare API token with KV access */
|
|
@@ -22,6 +24,8 @@ export interface CloudflareRestConfig {
|
|
|
22
24
|
* Configuration for Cloudflare KV using Workers Binding API
|
|
23
25
|
*/
|
|
24
26
|
export interface CloudflareWorkersConfig {
|
|
27
|
+
/** Storage instance ID */
|
|
28
|
+
id: string;
|
|
25
29
|
/** KV namespace bindings from Workers environment */
|
|
26
30
|
bindings: {
|
|
27
31
|
[key in TABLE_NAMES]: KVNamespace;
|
|
@@ -52,13 +56,12 @@ export interface KVOperation {
|
|
|
52
56
|
export declare function isWorkersConfig(config: CloudflareStoreConfig): config is CloudflareWorkersConfig;
|
|
53
57
|
export type RecordTypes = {
|
|
54
58
|
[TABLE_THREADS]: StorageThreadType;
|
|
55
|
-
[TABLE_MESSAGES]:
|
|
59
|
+
[TABLE_MESSAGES]: MastraDBMessage;
|
|
56
60
|
[TABLE_WORKFLOW_SNAPSHOT]: WorkflowRunState;
|
|
57
|
-
[TABLE_EVALS]: EvalRow;
|
|
58
61
|
[TABLE_SCORERS]: ScoreRowData;
|
|
59
62
|
[TABLE_TRACES]: any;
|
|
60
63
|
[TABLE_RESOURCES]: StorageResourceType;
|
|
61
|
-
[
|
|
64
|
+
[TABLE_SPANS]: SpanRecord;
|
|
62
65
|
};
|
|
63
66
|
export type ListOptions = {
|
|
64
67
|
limit?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/storage/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/storage/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,qBAAq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BAAgB,CAAC;IAC5C,CAAC,aAAa,CAAC,EAAE,YAAY,CAAC;IAC9B,CAAC,YAAY,CAAC,EAAE,GAAG,CAAC;IACpB,CAAC,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACvC,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/cloudflare",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-beta.1",
|
|
4
4
|
"description": "Cloudflare provider for Mastra - includes db storage capabilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -27,22 +27,24 @@
|
|
|
27
27
|
"cloudflare": "^4.5.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@cloudflare/workers-types": "^4.
|
|
30
|
+
"@cloudflare/workers-types": "^4.20251111.0",
|
|
31
31
|
"@microsoft/api-extractor": "^7.52.8",
|
|
32
|
-
"@types/node": "
|
|
32
|
+
"@types/node": "22.13.17",
|
|
33
|
+
"@vitest/coverage-v8": "4.0.8",
|
|
34
|
+
"@vitest/ui": "4.0.8",
|
|
33
35
|
"dotenv": "^17.0.0",
|
|
34
36
|
"eslint": "^9.37.0",
|
|
35
|
-
"miniflare": "^4.
|
|
37
|
+
"miniflare": "^4.20251109.0",
|
|
36
38
|
"tsup": "^8.5.0",
|
|
37
39
|
"typescript": "^5.8.3",
|
|
38
|
-
"vitest": "^
|
|
39
|
-
"@internal/
|
|
40
|
-
"@internal/
|
|
41
|
-
"@
|
|
42
|
-
"@
|
|
40
|
+
"vitest": "^4.0.8",
|
|
41
|
+
"@internal/lint": "0.0.53",
|
|
42
|
+
"@internal/storage-test-utils": "0.0.49",
|
|
43
|
+
"@internal/types-builder": "0.0.28",
|
|
44
|
+
"@mastra/core": "1.0.0-beta.3"
|
|
43
45
|
},
|
|
44
46
|
"peerDependencies": {
|
|
45
|
-
"@mastra/core": ">=0.
|
|
47
|
+
"@mastra/core": ">=1.0.0-0 <2.0.0-0"
|
|
46
48
|
},
|
|
47
49
|
"homepage": "https://mastra.ai",
|
|
48
50
|
"repository": {
|
|
@@ -53,12 +55,8 @@
|
|
|
53
55
|
"bugs": {
|
|
54
56
|
"url": "https://github.com/mastra-ai/mastra/issues"
|
|
55
57
|
},
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"publish-branch": [
|
|
59
|
-
"main",
|
|
60
|
-
"0.x"
|
|
61
|
-
]
|
|
58
|
+
"engines": {
|
|
59
|
+
"node": ">=22.13.0"
|
|
62
60
|
},
|
|
63
61
|
"scripts": {
|
|
64
62
|
"build": "tsup --silent --config tsup.config.ts",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { LegacyEvalsStorage } from '@mastra/core/storage';
|
|
2
|
-
import type { EvalRow, PaginationArgs, PaginationInfo } from '@mastra/core/storage';
|
|
3
|
-
import type { StoreOperationsCloudflare } from '../operations/index.js';
|
|
4
|
-
export declare class LegacyEvalsStorageCloudflare extends LegacyEvalsStorage {
|
|
5
|
-
operations: StoreOperationsCloudflare;
|
|
6
|
-
constructor({ operations }: {
|
|
7
|
-
operations: StoreOperationsCloudflare;
|
|
8
|
-
});
|
|
9
|
-
getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
|
|
10
|
-
getEvals(options: {
|
|
11
|
-
agentName?: string;
|
|
12
|
-
type?: 'test' | 'live';
|
|
13
|
-
dateRange?: {
|
|
14
|
-
start?: Date;
|
|
15
|
-
end?: Date;
|
|
16
|
-
};
|
|
17
|
-
} & PaginationArgs): Promise<PaginationInfo & {
|
|
18
|
-
evals: EvalRow[];
|
|
19
|
-
}>;
|
|
20
|
-
}
|
|
21
|
-
//# 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":"AACA,OAAO,EAAE,kBAAkB,EAAe,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAE/D,qBAAa,4BAA6B,SAAQ,kBAAkB;IAClE,UAAU,EAAE,yBAAyB,CAAC;gBAC1B,EAAE,UAAU,EAAE,EAAE;QAAE,UAAU,EAAE,yBAAyB,CAAA;KAAE;IAK/D,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAqDlF,QAAQ,CACZ,OAAO,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE;YAAE,KAAK,CAAC,EAAE,IAAI,CAAC;YAAC,GAAG,CAAC,EAAE,IAAI,CAAA;SAAE,CAAA;KAAE,GAAG,cAAc,GACjH,OAAO,CAAC,cAAc,GAAG;QAAE,KAAK,EAAE,OAAO,EAAE,CAAA;KAAE,CAAC;CAwElD"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { TracesStorage } from '@mastra/core/storage';
|
|
2
|
-
import type { StorageGetTracesArg, StorageGetTracesPaginatedArg, PaginationInfo } from '@mastra/core/storage';
|
|
3
|
-
import type { Trace } from '@mastra/core/telemetry';
|
|
4
|
-
import type { StoreOperationsCloudflare } from '../operations/index.js';
|
|
5
|
-
export declare class TracesStorageCloudflare extends TracesStorage {
|
|
6
|
-
private operations;
|
|
7
|
-
constructor({ operations }: {
|
|
8
|
-
operations: StoreOperationsCloudflare;
|
|
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,EAAgB,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,4BAA4B,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC9G,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAE/D,qBAAa,uBAAwB,SAAQ,aAAa;IACxD,OAAO,CAAC,UAAU,CAA4B;gBAElC,EAAE,UAAU,EAAE,EAAE;QAAE,UAAU,EAAE,yBAAyB,CAAA;KAAE;IAK/D,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"}
|