@mastra/cloudflare 0.0.0-error-handler-fix-20251020202607 → 0.0.0-execa-dynamic-import-20260304221256
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 +1812 -3
- package/LICENSE.md +15 -0
- package/README.md +38 -16
- package/dist/docs/SKILL.md +22 -0
- package/dist/docs/assets/SOURCE_MAP.json +6 -0
- package/dist/docs/references/reference-storage-cloudflare.md +88 -0
- package/dist/index.cjs +1499 -1762
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1468 -1734
- package/dist/index.js.map +1 -1
- package/dist/storage/{domains/operations → db}/index.d.ts +22 -26
- package/dist/storage/db/index.d.ts.map +1 -0
- package/dist/storage/domains/memory/index.d.ts +60 -41
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/dist/storage/domains/scores/index.d.ts +16 -28
- package/dist/storage/domains/scores/index.d.ts.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +18 -24
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +27 -217
- 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 +94 -8
- package/dist/storage/types.d.ts.map +1 -1
- package/package.json +19 -15
- 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/operations/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
package/dist/storage/index.d.ts
CHANGED
|
@@ -1,12 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import type { CloudflareStoreConfig
|
|
9
|
-
|
|
1
|
+
import { MastraCompositeStore } from '@mastra/core/storage';
|
|
2
|
+
import type { StorageDomains } from '@mastra/core/storage';
|
|
3
|
+
import { MemoryStorageCloudflare } from './domains/memory/index.js';
|
|
4
|
+
import { ScoresStorageCloudflare } from './domains/scores/index.js';
|
|
5
|
+
import { WorkflowsStorageCloudflare } from './domains/workflows/index.js';
|
|
6
|
+
export { MemoryStorageCloudflare, ScoresStorageCloudflare, WorkflowsStorageCloudflare };
|
|
7
|
+
export type { CloudflareDomainConfig } from './types.js';
|
|
8
|
+
import type { CloudflareStoreConfig } from './types.js';
|
|
9
|
+
/**
|
|
10
|
+
* Cloudflare KV storage adapter for Mastra.
|
|
11
|
+
*
|
|
12
|
+
* Access domain-specific storage via `getStore()`:
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* const storage = new CloudflareStore({ id: 'my-store', accountId: '...', apiToken: '...' });
|
|
17
|
+
*
|
|
18
|
+
* // Access memory domain
|
|
19
|
+
* const memory = await storage.getStore('memory');
|
|
20
|
+
* await memory?.saveThread({ thread });
|
|
21
|
+
*
|
|
22
|
+
* // Access workflows domain
|
|
23
|
+
* const workflows = await storage.getStore('workflows');
|
|
24
|
+
* await workflows?.persistWorkflowSnapshot({ workflowName, runId, snapshot });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare class CloudflareStore extends MastraCompositeStore {
|
|
10
28
|
stores: StorageDomains;
|
|
11
29
|
private client?;
|
|
12
30
|
private accountId?;
|
|
@@ -14,215 +32,7 @@ export declare class CloudflareStore extends MastraStorage {
|
|
|
14
32
|
private bindings?;
|
|
15
33
|
private validateWorkersConfig;
|
|
16
34
|
private validateRestConfig;
|
|
17
|
-
get supports(): {
|
|
18
|
-
selectByIncludeResourceScope: boolean;
|
|
19
|
-
resourceWorkingMemory: boolean;
|
|
20
|
-
hasColumn: boolean;
|
|
21
|
-
createTable: boolean;
|
|
22
|
-
deleteMessages: boolean;
|
|
23
|
-
aiTracing?: boolean;
|
|
24
|
-
indexManagement?: boolean;
|
|
25
|
-
getScoresBySpan?: boolean;
|
|
26
|
-
};
|
|
27
35
|
constructor(config: CloudflareStoreConfig);
|
|
28
|
-
createTable({ tableName, schema, }: {
|
|
29
|
-
tableName: TABLE_NAMES;
|
|
30
|
-
schema: Record<string, StorageColumn>;
|
|
31
|
-
}): Promise<void>;
|
|
32
|
-
alterTable(_args: {
|
|
33
|
-
tableName: TABLE_NAMES;
|
|
34
|
-
schema: Record<string, StorageColumn>;
|
|
35
|
-
ifNotExists: string[];
|
|
36
|
-
}): Promise<void>;
|
|
37
|
-
clearTable({ tableName }: {
|
|
38
|
-
tableName: TABLE_NAMES;
|
|
39
|
-
}): Promise<void>;
|
|
40
|
-
dropTable({ tableName }: {
|
|
41
|
-
tableName: TABLE_NAMES;
|
|
42
|
-
}): Promise<void>;
|
|
43
|
-
insert<T extends TABLE_NAMES>({ tableName, record, }: {
|
|
44
|
-
tableName: T;
|
|
45
|
-
record: Record<string, any>;
|
|
46
|
-
}): Promise<void>;
|
|
47
|
-
load<R>({ tableName, keys }: {
|
|
48
|
-
tableName: TABLE_NAMES;
|
|
49
|
-
keys: Record<string, string>;
|
|
50
|
-
}): Promise<R | null>;
|
|
51
|
-
getThreadById({ threadId }: {
|
|
52
|
-
threadId: string;
|
|
53
|
-
}): Promise<StorageThreadType | null>;
|
|
54
|
-
getThreadsByResourceId({ resourceId }: {
|
|
55
|
-
resourceId: string;
|
|
56
|
-
}): Promise<StorageThreadType[]>;
|
|
57
|
-
saveThread({ thread }: {
|
|
58
|
-
thread: StorageThreadType;
|
|
59
|
-
}): Promise<StorageThreadType>;
|
|
60
|
-
updateThread({ id, title, metadata, }: {
|
|
61
|
-
id: string;
|
|
62
|
-
title: string;
|
|
63
|
-
metadata: Record<string, unknown>;
|
|
64
|
-
}): Promise<StorageThreadType>;
|
|
65
|
-
deleteThread({ threadId }: {
|
|
66
|
-
threadId: string;
|
|
67
|
-
}): Promise<void>;
|
|
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
|
-
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, }: {
|
|
83
|
-
workflowName: string;
|
|
84
|
-
runId: string;
|
|
85
|
-
stepId: string;
|
|
86
|
-
result: StepResult<any, any, any, any>;
|
|
87
|
-
runtimeContext: Record<string, any>;
|
|
88
|
-
}): Promise<Record<string, StepResult<any, any, any, any>>>;
|
|
89
|
-
updateWorkflowState({ workflowName, runId, opts, }: {
|
|
90
|
-
workflowName: string;
|
|
91
|
-
runId: string;
|
|
92
|
-
opts: {
|
|
93
|
-
status: string;
|
|
94
|
-
result?: StepResult<any, any, any, any>;
|
|
95
|
-
error?: string;
|
|
96
|
-
suspendedPaths?: Record<string, number[]>;
|
|
97
|
-
waitingPaths?: Record<string, number[]>;
|
|
98
|
-
};
|
|
99
|
-
}): Promise<WorkflowRunState | undefined>;
|
|
100
|
-
getMessagesById({ messageIds, format }: {
|
|
101
|
-
messageIds: string[];
|
|
102
|
-
format: 'v1';
|
|
103
|
-
}): Promise<MastraMessageV1[]>;
|
|
104
|
-
getMessagesById({ messageIds, format }: {
|
|
105
|
-
messageIds: string[];
|
|
106
|
-
format?: 'v2';
|
|
107
|
-
}): Promise<MastraMessageV2[]>;
|
|
108
|
-
persistWorkflowSnapshot(params: {
|
|
109
|
-
workflowName: string;
|
|
110
|
-
runId: string;
|
|
111
|
-
resourceId?: string;
|
|
112
|
-
snapshot: WorkflowRunState;
|
|
113
|
-
}): Promise<void>;
|
|
114
|
-
loadWorkflowSnapshot(params: {
|
|
115
|
-
workflowName: string;
|
|
116
|
-
runId: string;
|
|
117
|
-
}): Promise<WorkflowRunState | null>;
|
|
118
|
-
batchInsert<T extends TABLE_NAMES>(input: {
|
|
119
|
-
tableName: T;
|
|
120
|
-
records: Partial<RecordTypes[T]>[];
|
|
121
|
-
}): Promise<void>;
|
|
122
|
-
getTraces({ name, scope, page, perPage, attributes, fromDate, toDate, }: {
|
|
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>;
|
|
150
|
-
getWorkflowRunById({ runId, workflowName, }: {
|
|
151
|
-
runId: string;
|
|
152
|
-
workflowName: string;
|
|
153
|
-
}): 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
|
-
updateMessages(args: {
|
|
168
|
-
messages: Partial<Omit<MastraMessageV2, 'createdAt'>> & {
|
|
169
|
-
id: string;
|
|
170
|
-
content?: {
|
|
171
|
-
metadata?: MastraMessageContentV2['metadata'];
|
|
172
|
-
content?: MastraMessageContentV2['content'];
|
|
173
|
-
};
|
|
174
|
-
}[];
|
|
175
|
-
}): Promise<MastraMessageV2[]>;
|
|
176
|
-
getScoreById({ id }: {
|
|
177
|
-
id: string;
|
|
178
|
-
}): Promise<ScoreRowData | null>;
|
|
179
|
-
saveScore(score: ScoreRowData): Promise<{
|
|
180
|
-
score: ScoreRowData;
|
|
181
|
-
}>;
|
|
182
|
-
getScoresByRunId({ runId, pagination, }: {
|
|
183
|
-
runId: string;
|
|
184
|
-
pagination: StoragePagination;
|
|
185
|
-
}): Promise<{
|
|
186
|
-
pagination: PaginationInfo;
|
|
187
|
-
scores: ScoreRowData[];
|
|
188
|
-
}>;
|
|
189
|
-
getScoresByEntityId({ entityId, entityType, pagination, }: {
|
|
190
|
-
pagination: StoragePagination;
|
|
191
|
-
entityId: string;
|
|
192
|
-
entityType: string;
|
|
193
|
-
}): Promise<{
|
|
194
|
-
pagination: PaginationInfo;
|
|
195
|
-
scores: ScoreRowData[];
|
|
196
|
-
}>;
|
|
197
|
-
getScoresByScorerId({ scorerId, entityId, entityType, source, pagination, }: {
|
|
198
|
-
scorerId: string;
|
|
199
|
-
entityId?: string;
|
|
200
|
-
entityType?: string;
|
|
201
|
-
source?: ScoringSource;
|
|
202
|
-
pagination: StoragePagination;
|
|
203
|
-
}): Promise<{
|
|
204
|
-
pagination: PaginationInfo;
|
|
205
|
-
scores: ScoreRowData[];
|
|
206
|
-
}>;
|
|
207
|
-
getScoresBySpan({ traceId, spanId, pagination, }: {
|
|
208
|
-
traceId: string;
|
|
209
|
-
spanId: string;
|
|
210
|
-
pagination: StoragePagination;
|
|
211
|
-
}): Promise<{
|
|
212
|
-
pagination: PaginationInfo;
|
|
213
|
-
scores: ScoreRowData[];
|
|
214
|
-
}>;
|
|
215
|
-
getResourceById({ resourceId }: {
|
|
216
|
-
resourceId: string;
|
|
217
|
-
}): Promise<StorageResourceType | null>;
|
|
218
|
-
saveResource({ resource }: {
|
|
219
|
-
resource: StorageResourceType;
|
|
220
|
-
}): Promise<StorageResourceType>;
|
|
221
|
-
updateResource({ resourceId, workingMemory, metadata, }: {
|
|
222
|
-
resourceId: string;
|
|
223
|
-
workingMemory?: string;
|
|
224
|
-
metadata?: Record<string, unknown>;
|
|
225
|
-
}): Promise<StorageResourceType>;
|
|
226
36
|
close(): Promise<void>;
|
|
227
37
|
}
|
|
228
38
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,oBAAoB,EAKrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAExE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAIjE,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,CAAC;AACxF,YAAY,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,KAAK,EAAE,qBAAqB,EAAiD,MAAM,SAAS,CAAC;AAEpG;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,eAAgB,SAAQ,oBAAoB;IACvD,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,CAAC,MAAM,CAAC,CAAa;IAC5B,OAAO,CAAC,SAAS,CAAC,CAAS;IAC3B,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,CAAmC;IAEpD,OAAO,CAAC,qBAAqB;IAkB7B,OAAO,CAAC,kBAAkB;gBAYd,MAAM,EAAE,qBAAqB;IAyDnC,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,47 @@
|
|
|
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, TABLE_AGENTS, TABLE_AGENT_VERSIONS, TABLE_DATASETS, TABLE_DATASET_ITEMS, TABLE_DATASET_VERSIONS, TABLE_EXPERIMENTS, TABLE_EXPERIMENT_RESULTS, TABLE_PROMPT_BLOCKS, TABLE_PROMPT_BLOCK_VERSIONS, TABLE_SCORER_DEFINITIONS, TABLE_SCORER_DEFINITION_VERSIONS, TABLE_MCP_CLIENTS, TABLE_MCP_CLIENT_VERSIONS, TABLE_MCP_SERVERS, TABLE_MCP_SERVER_VERSIONS, TABLE_WORKSPACES, TABLE_WORKSPACE_VERSIONS, TABLE_SKILLS, TABLE_SKILL_VERSIONS, TABLE_SKILL_BLOBS, SpanRecord, StorageAgentType, StoragePromptBlockType, StorageScorerDefinitionType, StorageMCPClientType, StorageMCPServerType, StorageWorkspaceType, StorageSkillType, StorageBlobEntry } from '@mastra/core/storage';
|
|
5
|
+
import type { AgentVersion } from '@mastra/core/storage/domains/agents';
|
|
6
|
+
import type { MCPClientVersion } from '@mastra/core/storage/domains/mcp-clients';
|
|
7
|
+
import type { MCPServerVersion } from '@mastra/core/storage/domains/mcp-servers';
|
|
8
|
+
import type { PromptBlockVersion } from '@mastra/core/storage/domains/prompt-blocks';
|
|
9
|
+
import type { ScorerDefinitionVersion } from '@mastra/core/storage/domains/scorer-definitions';
|
|
10
|
+
import type { SkillVersion } from '@mastra/core/storage/domains/skills';
|
|
11
|
+
import type { WorkspaceVersion } from '@mastra/core/storage/domains/workspaces';
|
|
5
12
|
import type { WorkflowRunState } from '@mastra/core/workflows';
|
|
13
|
+
import type Cloudflare from 'cloudflare';
|
|
14
|
+
/**
|
|
15
|
+
* Base configuration options shared across Cloudflare configurations
|
|
16
|
+
*/
|
|
17
|
+
export interface CloudflareBaseConfig {
|
|
18
|
+
/** Storage instance ID */
|
|
19
|
+
id: string;
|
|
20
|
+
/**
|
|
21
|
+
* When true, automatic initialization (table creation/migrations) is disabled.
|
|
22
|
+
* This is useful for CI/CD pipelines where you want to:
|
|
23
|
+
* 1. Run migrations explicitly during deployment (not at runtime)
|
|
24
|
+
* 2. Use different credentials for schema changes vs runtime operations
|
|
25
|
+
*
|
|
26
|
+
* When disableInit is true:
|
|
27
|
+
* - The storage will not automatically create/alter tables on first use
|
|
28
|
+
* - You must call `storage.init()` explicitly in your CI/CD scripts
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* // In CI/CD script:
|
|
32
|
+
* const storage = new CloudflareStore({ ...config, disableInit: false });
|
|
33
|
+
* await storage.init(); // Explicitly run migrations
|
|
34
|
+
*
|
|
35
|
+
* // In runtime application:
|
|
36
|
+
* const storage = new CloudflareStore({ ...config, disableInit: true });
|
|
37
|
+
* // No auto-init, tables must already exist
|
|
38
|
+
*/
|
|
39
|
+
disableInit?: boolean;
|
|
40
|
+
}
|
|
6
41
|
/**
|
|
7
42
|
* Configuration for Cloudflare KV using REST API
|
|
8
43
|
*/
|
|
9
|
-
export interface CloudflareRestConfig {
|
|
44
|
+
export interface CloudflareRestConfig extends CloudflareBaseConfig {
|
|
10
45
|
/** Cloudflare account ID */
|
|
11
46
|
accountId: string;
|
|
12
47
|
/** Cloudflare API token with KV access */
|
|
@@ -21,7 +56,7 @@ export interface CloudflareRestConfig {
|
|
|
21
56
|
/**
|
|
22
57
|
* Configuration for Cloudflare KV using Workers Binding API
|
|
23
58
|
*/
|
|
24
|
-
export interface CloudflareWorkersConfig {
|
|
59
|
+
export interface CloudflareWorkersConfig extends CloudflareBaseConfig {
|
|
25
60
|
/** KV namespace bindings from Workers environment */
|
|
26
61
|
bindings: {
|
|
27
62
|
[key in TABLE_NAMES]: KVNamespace;
|
|
@@ -52,16 +87,67 @@ export interface KVOperation {
|
|
|
52
87
|
export declare function isWorkersConfig(config: CloudflareStoreConfig): config is CloudflareWorkersConfig;
|
|
53
88
|
export type RecordTypes = {
|
|
54
89
|
[TABLE_THREADS]: StorageThreadType;
|
|
55
|
-
[TABLE_MESSAGES]:
|
|
90
|
+
[TABLE_MESSAGES]: MastraDBMessage;
|
|
56
91
|
[TABLE_WORKFLOW_SNAPSHOT]: WorkflowRunState;
|
|
57
|
-
[TABLE_EVALS]: EvalRow;
|
|
58
92
|
[TABLE_SCORERS]: ScoreRowData;
|
|
59
93
|
[TABLE_TRACES]: any;
|
|
60
94
|
[TABLE_RESOURCES]: StorageResourceType;
|
|
61
|
-
[
|
|
95
|
+
[TABLE_SPANS]: SpanRecord;
|
|
96
|
+
[TABLE_AGENTS]: StorageAgentType;
|
|
97
|
+
[TABLE_AGENT_VERSIONS]: AgentVersion;
|
|
98
|
+
[TABLE_DATASETS]: Record<string, any>;
|
|
99
|
+
[TABLE_DATASET_ITEMS]: Record<string, any>;
|
|
100
|
+
[TABLE_DATASET_VERSIONS]: Record<string, any>;
|
|
101
|
+
[TABLE_EXPERIMENTS]: Record<string, any>;
|
|
102
|
+
[TABLE_EXPERIMENT_RESULTS]: Record<string, any>;
|
|
103
|
+
[TABLE_PROMPT_BLOCKS]: StoragePromptBlockType;
|
|
104
|
+
[TABLE_PROMPT_BLOCK_VERSIONS]: PromptBlockVersion;
|
|
105
|
+
[TABLE_SCORER_DEFINITIONS]: StorageScorerDefinitionType;
|
|
106
|
+
[TABLE_SCORER_DEFINITION_VERSIONS]: ScorerDefinitionVersion;
|
|
107
|
+
[TABLE_MCP_CLIENTS]: StorageMCPClientType;
|
|
108
|
+
[TABLE_MCP_CLIENT_VERSIONS]: MCPClientVersion;
|
|
109
|
+
[TABLE_MCP_SERVERS]: StorageMCPServerType;
|
|
110
|
+
[TABLE_MCP_SERVER_VERSIONS]: MCPServerVersion;
|
|
111
|
+
[TABLE_WORKSPACES]: StorageWorkspaceType;
|
|
112
|
+
[TABLE_WORKSPACE_VERSIONS]: WorkspaceVersion;
|
|
113
|
+
[TABLE_SKILLS]: StorageSkillType;
|
|
114
|
+
[TABLE_SKILL_VERSIONS]: SkillVersion;
|
|
115
|
+
[TABLE_SKILL_BLOBS]: StorageBlobEntry;
|
|
62
116
|
};
|
|
63
117
|
export type ListOptions = {
|
|
64
118
|
limit?: number;
|
|
65
119
|
prefix?: string;
|
|
66
120
|
};
|
|
121
|
+
/**
|
|
122
|
+
* Configuration for standalone domain usage.
|
|
123
|
+
* Accepts either:
|
|
124
|
+
* 1. An existing Cloudflare client (REST API) or bindings (Workers API)
|
|
125
|
+
* 2. Config to create a new client internally
|
|
126
|
+
*/
|
|
127
|
+
export type CloudflareDomainConfig = CloudflareDomainClientConfig | CloudflareDomainBindingsConfig | CloudflareDomainRestConfig;
|
|
128
|
+
/**
|
|
129
|
+
* Pass an existing Cloudflare SDK client (REST API)
|
|
130
|
+
*/
|
|
131
|
+
export interface CloudflareDomainClientConfig {
|
|
132
|
+
client: Cloudflare;
|
|
133
|
+
accountId: string;
|
|
134
|
+
namespacePrefix?: string;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Pass existing KV bindings (Workers Binding API)
|
|
138
|
+
*/
|
|
139
|
+
export interface CloudflareDomainBindingsConfig {
|
|
140
|
+
bindings: {
|
|
141
|
+
[key in TABLE_NAMES]: KVNamespace;
|
|
142
|
+
};
|
|
143
|
+
keyPrefix?: string;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Pass config to create a new Cloudflare client internally (REST API)
|
|
147
|
+
*/
|
|
148
|
+
export interface CloudflareDomainRestConfig {
|
|
149
|
+
accountId: string;
|
|
150
|
+
apiToken: string;
|
|
151
|
+
namespacePrefix?: string;
|
|
152
|
+
}
|
|
67
153
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -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,qBAAqB,CAAC;AAC9E,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,uBAAuB,EACvB,YAAY,EACZ,eAAe,EACf,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,wBAAwB,EACxB,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,EACxB,gCAAgC,EAChC,iBAAiB,EACjB,yBAAyB,EACzB,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,wBAAwB,EACxB,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACj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ED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/cloudflare",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-execa-dynamic-import-20260304221256",
|
|
4
4
|
"description": "Cloudflare provider for Mastra - includes db storage capabilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -27,22 +27,23 @@
|
|
|
27
27
|
"cloudflare": "^4.5.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@cloudflare/workers-types": "^4.
|
|
31
|
-
"@
|
|
32
|
-
"@
|
|
33
|
-
"
|
|
30
|
+
"@cloudflare/workers-types": "^4.20251111.0",
|
|
31
|
+
"@types/node": "22.19.7",
|
|
32
|
+
"@vitest/coverage-v8": "4.0.18",
|
|
33
|
+
"@vitest/ui": "4.0.18",
|
|
34
|
+
"dotenv": "^17.2.3",
|
|
34
35
|
"eslint": "^9.37.0",
|
|
35
|
-
"miniflare": "^4.
|
|
36
|
-
"tsup": "^8.5.
|
|
37
|
-
"typescript": "^5.
|
|
38
|
-
"vitest": "
|
|
39
|
-
"@internal/
|
|
40
|
-
"@internal/
|
|
41
|
-
"@
|
|
42
|
-
"@
|
|
36
|
+
"miniflare": "^4.20251109.0",
|
|
37
|
+
"tsup": "^8.5.1",
|
|
38
|
+
"typescript": "^5.9.3",
|
|
39
|
+
"vitest": "4.0.18",
|
|
40
|
+
"@internal/lint": "0.0.0-execa-dynamic-import-20260304221256",
|
|
41
|
+
"@internal/storage-test-utils": "0.0.61",
|
|
42
|
+
"@mastra/core": "0.0.0-execa-dynamic-import-20260304221256",
|
|
43
|
+
"@internal/types-builder": "0.0.0-execa-dynamic-import-20260304221256"
|
|
43
44
|
},
|
|
44
45
|
"peerDependencies": {
|
|
45
|
-
"@mastra/core": "0.0.0-
|
|
46
|
+
"@mastra/core": "0.0.0-execa-dynamic-import-20260304221256"
|
|
46
47
|
},
|
|
47
48
|
"homepage": "https://mastra.ai",
|
|
48
49
|
"repository": {
|
|
@@ -53,8 +54,11 @@
|
|
|
53
54
|
"bugs": {
|
|
54
55
|
"url": "https://github.com/mastra-ai/mastra/issues"
|
|
55
56
|
},
|
|
57
|
+
"engines": {
|
|
58
|
+
"node": ">=22.13.0"
|
|
59
|
+
},
|
|
56
60
|
"scripts": {
|
|
57
|
-
"build": "tsup --silent --config tsup.config.ts",
|
|
61
|
+
"build:lib": "tsup --silent --config tsup.config.ts",
|
|
58
62
|
"build:watch": "tsup --watch --silent --config tsup.config.ts",
|
|
59
63
|
"test": "vitest run",
|
|
60
64
|
"lint": "eslint ."
|
|
@@ -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,C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C,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,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"}
|