@mastra/cloudflare 0.0.0-working-memory-per-user-20250620161509 → 0.0.0-zod-v4-compat-part-2-20250820135355

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.
@@ -1,323 +0,0 @@
1
- import type { EvalRow } from '@mastra/core/storage';
2
- import type { KVNamespace as KVNamespace_2 } from '@cloudflare/workers-types';
3
- import { KVNamespaceListKey as KVNamespaceListKey_2 } from '@cloudflare/workers-types';
4
- import type { MastraMessageContentV2 } from '@mastra/core/agent';
5
- import type { MastraMessageV1 } from '@mastra/core/memory';
6
- import type { MastraMessageV2 } from '@mastra/core/memory';
7
- import { MastraStorage } from '@mastra/core/storage';
8
- import type { PaginationInfo } from '@mastra/core/storage';
9
- import type { StorageColumn } from '@mastra/core/storage';
10
- import type { StorageGetMessagesArg } from '@mastra/core/storage';
11
- import type { StorageGetTracesArg } from '@mastra/core/storage';
12
- import type { StorageResourceType } from '@mastra/core/storage';
13
- import type { StorageThreadType } from '@mastra/core/memory';
14
- import type { TABLE_EVALS } from '@mastra/core/storage';
15
- import type { TABLE_MESSAGES } from '@mastra/core/storage';
16
- import type { TABLE_NAMES } from '@mastra/core/storage';
17
- import type { TABLE_RESOURCES } from '@mastra/core/storage';
18
- import type { TABLE_THREADS } from '@mastra/core/storage';
19
- import type { TABLE_TRACES } from '@mastra/core/storage';
20
- import type { TABLE_WORKFLOW_SNAPSHOT } from '@mastra/core/storage';
21
- import type { Trace } from '@mastra/core/telemetry';
22
- import type { WorkflowRun } from '@mastra/core/storage';
23
- import type { WorkflowRuns } from '@mastra/core/storage';
24
- import type { WorkflowRunState } from '@mastra/core/workflows';
25
- import type { WorkflowRunState as WorkflowRunState_2 } from '@mastra/core';
26
-
27
- /**
28
- * Configuration for Cloudflare KV using REST API
29
- */
30
- export declare interface CloudflareRestConfig {
31
- /** Cloudflare account ID */
32
- accountId: string;
33
- /** Cloudflare API token with KV access */
34
- apiToken: string;
35
- /**
36
- * Prefix for KV namespace names.
37
- * Recommended for production use to ensure data isolation between different instances.
38
- * If not provided, no prefix will be used
39
- */
40
- namespacePrefix?: string;
41
- }
42
-
43
- declare class CloudflareStore extends MastraStorage {
44
- private client?;
45
- private accountId?;
46
- private namespacePrefix;
47
- private bindings?;
48
- private validateWorkersConfig;
49
- private validateRestConfig;
50
- constructor(config: CloudflareStoreConfig);
51
- private getBinding;
52
- private listNamespaces;
53
- private getNamespaceValue;
54
- private putNamespaceValue;
55
- private deleteNamespaceValue;
56
- listNamespaceKeys(tableName: TABLE_NAMES, options?: ListOptions): Promise<KVNamespaceListKey_2<unknown, string>[]>;
57
- private createNamespaceById;
58
- private getNamespaceIdByName;
59
- private createNamespace;
60
- private getOrCreateNamespaceId;
61
- private getNamespaceId;
62
- private LEGACY_NAMESPACE_MAP;
63
- /**
64
- * There were a few legacy mappings for tables such as
65
- * - messages -> threads
66
- * - workflow_snapshot -> mastra_workflows
67
- * - traces -> evals
68
- * This has been updated to use dedicated namespaces for each table.
69
- * In the case of data for a table existing in the legacy namespace, warn the user to migrate to the new namespace.
70
- *
71
- * @param tableName The table name to check for legacy data
72
- * @param prefix The namespace prefix
73
- * @returns The legacy namespace ID if data exists; otherwise, null
74
- */
75
- private checkLegacyNamespace;
76
- /**
77
- * Helper to safely serialize data for KV storage
78
- */
79
- private safeSerialize;
80
- /**
81
- * Helper to safely parse data from KV storage
82
- */
83
- private safeParse;
84
- private putKV;
85
- private getKV;
86
- private deleteKV;
87
- private listKV;
88
- private getSortedMessages;
89
- private updateSorting;
90
- private getIncludedMessagesWithContext;
91
- private getRecentMessages;
92
- private fetchAndParseMessages;
93
- /**
94
- * Queue for serializing sorted order updates.
95
- * Updates the sorted order for a given key. This operation is eventually consistent.
96
- */
97
- private updateQueue;
98
- /**
99
- * Updates the sorted order for a given key. This operation is eventually consistent.
100
- * Note: Operations on the same orderKey are serialized using a queue to prevent
101
- * concurrent updates from conflicting with each other.
102
- */
103
- private updateSortedMessages;
104
- private getRank;
105
- private getRange;
106
- private getLastN;
107
- private getFullOrder;
108
- private getKey;
109
- private getSchemaKey;
110
- private getTableSchema;
111
- private validateColumnValue;
112
- private validateAgainstSchema;
113
- private validateRecord;
114
- private ensureMetadata;
115
- createTable({ tableName, schema, }: {
116
- tableName: TABLE_NAMES;
117
- schema: Record<string, StorageColumn>;
118
- }): Promise<void>;
119
- /**
120
- * No-op: This backend is schemaless and does not require schema changes.
121
- * @param tableName Name of the table
122
- * @param schema Schema of the table
123
- * @param ifNotExists Array of column names to add if they don't exist
124
- */
125
- alterTable(_args: {
126
- tableName: TABLE_NAMES;
127
- schema: Record<string, StorageColumn>;
128
- ifNotExists: string[];
129
- }): Promise<void>;
130
- clearTable({ tableName }: {
131
- tableName: TABLE_NAMES;
132
- }): Promise<void>;
133
- insert<T extends TABLE_NAMES>({ tableName, record, }: {
134
- tableName: T;
135
- record: Record<string, any>;
136
- }): Promise<void>;
137
- load<R>({ tableName, keys }: {
138
- tableName: TABLE_NAMES;
139
- keys: Record<string, string>;
140
- }): Promise<R | null>;
141
- getThreadById({ threadId }: {
142
- threadId: string;
143
- }): Promise<StorageThreadType | null>;
144
- getThreadsByResourceId({ resourceId }: {
145
- resourceId: string;
146
- }): Promise<StorageThreadType[]>;
147
- saveThread({ thread }: {
148
- thread: StorageThreadType;
149
- }): Promise<StorageThreadType>;
150
- updateThread({ id, title, metadata, }: {
151
- id: string;
152
- title: string;
153
- metadata: Record<string, unknown>;
154
- }): Promise<StorageThreadType>;
155
- deleteThread({ threadId }: {
156
- threadId: string;
157
- }): Promise<void>;
158
- private getMessageKey;
159
- private getThreadMessagesKey;
160
- saveMessages(args: {
161
- messages: MastraMessageV1[];
162
- format?: undefined | 'v1';
163
- }): Promise<MastraMessageV1[]>;
164
- saveMessages(args: {
165
- messages: MastraMessageV2[];
166
- format: 'v2';
167
- }): Promise<MastraMessageV2[]>;
168
- getMessages(args: StorageGetMessagesArg & {
169
- format?: 'v1';
170
- }): Promise<MastraMessageV1[]>;
171
- getMessages(args: StorageGetMessagesArg & {
172
- format: 'v2';
173
- }): Promise<MastraMessageV2[]>;
174
- private validateWorkflowParams;
175
- private validateWorkflowState;
176
- private normalizeSteps;
177
- private normalizeWorkflowState;
178
- persistWorkflowSnapshot(params: {
179
- namespace: string;
180
- workflowName: string;
181
- runId: string;
182
- snapshot: WorkflowRunState;
183
- }): Promise<void>;
184
- loadWorkflowSnapshot(params: {
185
- namespace: string;
186
- workflowName: string;
187
- runId: string;
188
- }): Promise<WorkflowRunState | null>;
189
- batchInsert<T extends TABLE_NAMES>(input: {
190
- tableName: T;
191
- records: Partial<RecordTypes[T]>[];
192
- }): Promise<void>;
193
- getTraces({ name, scope, page, perPage, attributes, fromDate, toDate, }: {
194
- name?: string;
195
- scope?: string;
196
- page: number;
197
- perPage: number;
198
- attributes?: Record<string, string>;
199
- fromDate?: Date;
200
- toDate?: Date;
201
- }): Promise<any[]>;
202
- private parseJSON;
203
- getEvalsByAgentName(_agentName: string, _type?: 'test' | 'live'): Promise<EvalRow[]>;
204
- private parseWorkflowRun;
205
- private buildWorkflowSnapshotPrefix;
206
- getWorkflowRuns({ namespace, workflowName, limit, offset, resourceId, fromDate, toDate, }?: {
207
- namespace?: string;
208
- workflowName?: string;
209
- limit?: number;
210
- offset?: number;
211
- resourceId?: string;
212
- fromDate?: Date;
213
- toDate?: Date;
214
- }): Promise<WorkflowRuns>;
215
- getWorkflowRunById({ namespace, runId, workflowName, }: {
216
- namespace: string;
217
- runId: string;
218
- workflowName: string;
219
- }): Promise<WorkflowRun | null>;
220
- getTracesPaginated(_args: StorageGetTracesArg): Promise<PaginationInfo & {
221
- traces: Trace[];
222
- }>;
223
- getThreadsByResourceIdPaginated(_args: {
224
- resourceId: string;
225
- page?: number;
226
- perPage?: number;
227
- }): Promise<PaginationInfo & {
228
- threads: StorageThreadType[];
229
- }>;
230
- getMessagesPaginated(_args: StorageGetMessagesArg): Promise<PaginationInfo & {
231
- messages: MastraMessageV1[] | MastraMessageV2[];
232
- }>;
233
- close(): Promise<void>;
234
- updateMessages(_args: {
235
- messages: Partial<Omit<MastraMessageV2, 'createdAt'>> & {
236
- id: string;
237
- content?: {
238
- metadata?: MastraMessageContentV2['metadata'];
239
- content?: MastraMessageContentV2['content'];
240
- };
241
- }[];
242
- }): Promise<MastraMessageV2[]>;
243
- }
244
- export { CloudflareStore }
245
- export { CloudflareStore as CloudflareStore_alias_1 }
246
-
247
- /**
248
- * Combined configuration type supporting both REST API and Workers Binding API
249
- */
250
- export declare type CloudflareStoreConfig = CloudflareRestConfig | CloudflareWorkersConfig;
251
-
252
- /**
253
- * Configuration for Cloudflare KV using Workers Binding API
254
- */
255
- export declare interface CloudflareWorkersConfig {
256
- /** KV namespace bindings from Workers environment */
257
- bindings: {
258
- [key in TABLE_NAMES]: KVNamespace_2;
259
- };
260
- /** Optional prefix for keys within namespaces */
261
- keyPrefix?: string;
262
- }
263
-
264
- export declare const createSampleTrace: (name: string, scope?: string, attributes?: Record<string, string>) => {
265
- id: string;
266
- parentSpanId: string;
267
- traceId: string;
268
- name: string;
269
- scope: string | undefined;
270
- kind: string;
271
- status: string;
272
- events: string;
273
- links: string;
274
- attributes: string | undefined;
275
- startTime: string;
276
- endTime: string;
277
- other: string;
278
- createdAt: string;
279
- };
280
-
281
- export declare const createSampleWorkflowSnapshot: (threadId: string, status: string, createdAt?: Date) => {
282
- snapshot: WorkflowRunState_2;
283
- runId: string;
284
- stepId: string;
285
- };
286
-
287
- /**
288
- * Helper to determine if a config is using Workers bindings
289
- */
290
- export declare function isWorkersConfig(config: CloudflareStoreConfig): config is CloudflareWorkersConfig;
291
-
292
- /**
293
- * Interface for KV operations with type support
294
- */
295
- export declare interface KVOperation {
296
- /** Table/namespace to operate on */
297
- tableName: TABLE_NAMES;
298
- /** Key to read/write */
299
- key: string;
300
- /** Value to write (for put operations) */
301
- value?: any;
302
- /** Optional metadata to associate with the value */
303
- metadata?: any;
304
- }
305
-
306
- export declare type ListOptions = {
307
- limit?: number;
308
- prefix?: string;
309
- };
310
-
311
- export declare type RecordTypes = {
312
- [TABLE_THREADS]: StorageThreadType;
313
- [TABLE_MESSAGES]: MastraMessageV2;
314
- [TABLE_WORKFLOW_SNAPSHOT]: WorkflowRunState;
315
- [TABLE_EVALS]: EvalRow;
316
- [TABLE_TRACES]: any;
317
- [TABLE_RESOURCES]: StorageResourceType;
318
- };
319
-
320
- export declare const retryUntil: <T>(fn: () => Promise<T>, condition: (result: T) => boolean, timeout?: number, // REST API needs longer timeout due to higher latency
321
- interval?: number) => Promise<T>;
322
-
323
- export { }
@@ -1,323 +0,0 @@
1
- import type { EvalRow } from '@mastra/core/storage';
2
- import type { KVNamespace as KVNamespace_2 } from '@cloudflare/workers-types';
3
- import { KVNamespaceListKey as KVNamespaceListKey_2 } from '@cloudflare/workers-types';
4
- import type { MastraMessageContentV2 } from '@mastra/core/agent';
5
- import type { MastraMessageV1 } from '@mastra/core/memory';
6
- import type { MastraMessageV2 } from '@mastra/core/memory';
7
- import { MastraStorage } from '@mastra/core/storage';
8
- import type { PaginationInfo } from '@mastra/core/storage';
9
- import type { StorageColumn } from '@mastra/core/storage';
10
- import type { StorageGetMessagesArg } from '@mastra/core/storage';
11
- import type { StorageGetTracesArg } from '@mastra/core/storage';
12
- import type { StorageResourceType } from '@mastra/core/storage';
13
- import type { StorageThreadType } from '@mastra/core/memory';
14
- import type { TABLE_EVALS } from '@mastra/core/storage';
15
- import type { TABLE_MESSAGES } from '@mastra/core/storage';
16
- import type { TABLE_NAMES } from '@mastra/core/storage';
17
- import type { TABLE_RESOURCES } from '@mastra/core/storage';
18
- import type { TABLE_THREADS } from '@mastra/core/storage';
19
- import type { TABLE_TRACES } from '@mastra/core/storage';
20
- import type { TABLE_WORKFLOW_SNAPSHOT } from '@mastra/core/storage';
21
- import type { Trace } from '@mastra/core/telemetry';
22
- import type { WorkflowRun } from '@mastra/core/storage';
23
- import type { WorkflowRuns } from '@mastra/core/storage';
24
- import type { WorkflowRunState } from '@mastra/core/workflows';
25
- import type { WorkflowRunState as WorkflowRunState_2 } from '@mastra/core';
26
-
27
- /**
28
- * Configuration for Cloudflare KV using REST API
29
- */
30
- export declare interface CloudflareRestConfig {
31
- /** Cloudflare account ID */
32
- accountId: string;
33
- /** Cloudflare API token with KV access */
34
- apiToken: string;
35
- /**
36
- * Prefix for KV namespace names.
37
- * Recommended for production use to ensure data isolation between different instances.
38
- * If not provided, no prefix will be used
39
- */
40
- namespacePrefix?: string;
41
- }
42
-
43
- declare class CloudflareStore extends MastraStorage {
44
- private client?;
45
- private accountId?;
46
- private namespacePrefix;
47
- private bindings?;
48
- private validateWorkersConfig;
49
- private validateRestConfig;
50
- constructor(config: CloudflareStoreConfig);
51
- private getBinding;
52
- private listNamespaces;
53
- private getNamespaceValue;
54
- private putNamespaceValue;
55
- private deleteNamespaceValue;
56
- listNamespaceKeys(tableName: TABLE_NAMES, options?: ListOptions): Promise<KVNamespaceListKey_2<unknown, string>[]>;
57
- private createNamespaceById;
58
- private getNamespaceIdByName;
59
- private createNamespace;
60
- private getOrCreateNamespaceId;
61
- private getNamespaceId;
62
- private LEGACY_NAMESPACE_MAP;
63
- /**
64
- * There were a few legacy mappings for tables such as
65
- * - messages -> threads
66
- * - workflow_snapshot -> mastra_workflows
67
- * - traces -> evals
68
- * This has been updated to use dedicated namespaces for each table.
69
- * In the case of data for a table existing in the legacy namespace, warn the user to migrate to the new namespace.
70
- *
71
- * @param tableName The table name to check for legacy data
72
- * @param prefix The namespace prefix
73
- * @returns The legacy namespace ID if data exists; otherwise, null
74
- */
75
- private checkLegacyNamespace;
76
- /**
77
- * Helper to safely serialize data for KV storage
78
- */
79
- private safeSerialize;
80
- /**
81
- * Helper to safely parse data from KV storage
82
- */
83
- private safeParse;
84
- private putKV;
85
- private getKV;
86
- private deleteKV;
87
- private listKV;
88
- private getSortedMessages;
89
- private updateSorting;
90
- private getIncludedMessagesWithContext;
91
- private getRecentMessages;
92
- private fetchAndParseMessages;
93
- /**
94
- * Queue for serializing sorted order updates.
95
- * Updates the sorted order for a given key. This operation is eventually consistent.
96
- */
97
- private updateQueue;
98
- /**
99
- * Updates the sorted order for a given key. This operation is eventually consistent.
100
- * Note: Operations on the same orderKey are serialized using a queue to prevent
101
- * concurrent updates from conflicting with each other.
102
- */
103
- private updateSortedMessages;
104
- private getRank;
105
- private getRange;
106
- private getLastN;
107
- private getFullOrder;
108
- private getKey;
109
- private getSchemaKey;
110
- private getTableSchema;
111
- private validateColumnValue;
112
- private validateAgainstSchema;
113
- private validateRecord;
114
- private ensureMetadata;
115
- createTable({ tableName, schema, }: {
116
- tableName: TABLE_NAMES;
117
- schema: Record<string, StorageColumn>;
118
- }): Promise<void>;
119
- /**
120
- * No-op: This backend is schemaless and does not require schema changes.
121
- * @param tableName Name of the table
122
- * @param schema Schema of the table
123
- * @param ifNotExists Array of column names to add if they don't exist
124
- */
125
- alterTable(_args: {
126
- tableName: TABLE_NAMES;
127
- schema: Record<string, StorageColumn>;
128
- ifNotExists: string[];
129
- }): Promise<void>;
130
- clearTable({ tableName }: {
131
- tableName: TABLE_NAMES;
132
- }): Promise<void>;
133
- insert<T extends TABLE_NAMES>({ tableName, record, }: {
134
- tableName: T;
135
- record: Record<string, any>;
136
- }): Promise<void>;
137
- load<R>({ tableName, keys }: {
138
- tableName: TABLE_NAMES;
139
- keys: Record<string, string>;
140
- }): Promise<R | null>;
141
- getThreadById({ threadId }: {
142
- threadId: string;
143
- }): Promise<StorageThreadType | null>;
144
- getThreadsByResourceId({ resourceId }: {
145
- resourceId: string;
146
- }): Promise<StorageThreadType[]>;
147
- saveThread({ thread }: {
148
- thread: StorageThreadType;
149
- }): Promise<StorageThreadType>;
150
- updateThread({ id, title, metadata, }: {
151
- id: string;
152
- title: string;
153
- metadata: Record<string, unknown>;
154
- }): Promise<StorageThreadType>;
155
- deleteThread({ threadId }: {
156
- threadId: string;
157
- }): Promise<void>;
158
- private getMessageKey;
159
- private getThreadMessagesKey;
160
- saveMessages(args: {
161
- messages: MastraMessageV1[];
162
- format?: undefined | 'v1';
163
- }): Promise<MastraMessageV1[]>;
164
- saveMessages(args: {
165
- messages: MastraMessageV2[];
166
- format: 'v2';
167
- }): Promise<MastraMessageV2[]>;
168
- getMessages(args: StorageGetMessagesArg & {
169
- format?: 'v1';
170
- }): Promise<MastraMessageV1[]>;
171
- getMessages(args: StorageGetMessagesArg & {
172
- format: 'v2';
173
- }): Promise<MastraMessageV2[]>;
174
- private validateWorkflowParams;
175
- private validateWorkflowState;
176
- private normalizeSteps;
177
- private normalizeWorkflowState;
178
- persistWorkflowSnapshot(params: {
179
- namespace: string;
180
- workflowName: string;
181
- runId: string;
182
- snapshot: WorkflowRunState;
183
- }): Promise<void>;
184
- loadWorkflowSnapshot(params: {
185
- namespace: string;
186
- workflowName: string;
187
- runId: string;
188
- }): Promise<WorkflowRunState | null>;
189
- batchInsert<T extends TABLE_NAMES>(input: {
190
- tableName: T;
191
- records: Partial<RecordTypes[T]>[];
192
- }): Promise<void>;
193
- getTraces({ name, scope, page, perPage, attributes, fromDate, toDate, }: {
194
- name?: string;
195
- scope?: string;
196
- page: number;
197
- perPage: number;
198
- attributes?: Record<string, string>;
199
- fromDate?: Date;
200
- toDate?: Date;
201
- }): Promise<any[]>;
202
- private parseJSON;
203
- getEvalsByAgentName(_agentName: string, _type?: 'test' | 'live'): Promise<EvalRow[]>;
204
- private parseWorkflowRun;
205
- private buildWorkflowSnapshotPrefix;
206
- getWorkflowRuns({ namespace, workflowName, limit, offset, resourceId, fromDate, toDate, }?: {
207
- namespace?: string;
208
- workflowName?: string;
209
- limit?: number;
210
- offset?: number;
211
- resourceId?: string;
212
- fromDate?: Date;
213
- toDate?: Date;
214
- }): Promise<WorkflowRuns>;
215
- getWorkflowRunById({ namespace, runId, workflowName, }: {
216
- namespace: string;
217
- runId: string;
218
- workflowName: string;
219
- }): Promise<WorkflowRun | null>;
220
- getTracesPaginated(_args: StorageGetTracesArg): Promise<PaginationInfo & {
221
- traces: Trace[];
222
- }>;
223
- getThreadsByResourceIdPaginated(_args: {
224
- resourceId: string;
225
- page?: number;
226
- perPage?: number;
227
- }): Promise<PaginationInfo & {
228
- threads: StorageThreadType[];
229
- }>;
230
- getMessagesPaginated(_args: StorageGetMessagesArg): Promise<PaginationInfo & {
231
- messages: MastraMessageV1[] | MastraMessageV2[];
232
- }>;
233
- close(): Promise<void>;
234
- updateMessages(_args: {
235
- messages: Partial<Omit<MastraMessageV2, 'createdAt'>> & {
236
- id: string;
237
- content?: {
238
- metadata?: MastraMessageContentV2['metadata'];
239
- content?: MastraMessageContentV2['content'];
240
- };
241
- }[];
242
- }): Promise<MastraMessageV2[]>;
243
- }
244
- export { CloudflareStore }
245
- export { CloudflareStore as CloudflareStore_alias_1 }
246
-
247
- /**
248
- * Combined configuration type supporting both REST API and Workers Binding API
249
- */
250
- export declare type CloudflareStoreConfig = CloudflareRestConfig | CloudflareWorkersConfig;
251
-
252
- /**
253
- * Configuration for Cloudflare KV using Workers Binding API
254
- */
255
- export declare interface CloudflareWorkersConfig {
256
- /** KV namespace bindings from Workers environment */
257
- bindings: {
258
- [key in TABLE_NAMES]: KVNamespace_2;
259
- };
260
- /** Optional prefix for keys within namespaces */
261
- keyPrefix?: string;
262
- }
263
-
264
- export declare const createSampleTrace: (name: string, scope?: string, attributes?: Record<string, string>) => {
265
- id: string;
266
- parentSpanId: string;
267
- traceId: string;
268
- name: string;
269
- scope: string | undefined;
270
- kind: string;
271
- status: string;
272
- events: string;
273
- links: string;
274
- attributes: string | undefined;
275
- startTime: string;
276
- endTime: string;
277
- other: string;
278
- createdAt: string;
279
- };
280
-
281
- export declare const createSampleWorkflowSnapshot: (threadId: string, status: string, createdAt?: Date) => {
282
- snapshot: WorkflowRunState_2;
283
- runId: string;
284
- stepId: string;
285
- };
286
-
287
- /**
288
- * Helper to determine if a config is using Workers bindings
289
- */
290
- export declare function isWorkersConfig(config: CloudflareStoreConfig): config is CloudflareWorkersConfig;
291
-
292
- /**
293
- * Interface for KV operations with type support
294
- */
295
- export declare interface KVOperation {
296
- /** Table/namespace to operate on */
297
- tableName: TABLE_NAMES;
298
- /** Key to read/write */
299
- key: string;
300
- /** Value to write (for put operations) */
301
- value?: any;
302
- /** Optional metadata to associate with the value */
303
- metadata?: any;
304
- }
305
-
306
- export declare type ListOptions = {
307
- limit?: number;
308
- prefix?: string;
309
- };
310
-
311
- export declare type RecordTypes = {
312
- [TABLE_THREADS]: StorageThreadType;
313
- [TABLE_MESSAGES]: MastraMessageV2;
314
- [TABLE_WORKFLOW_SNAPSHOT]: WorkflowRunState;
315
- [TABLE_EVALS]: EvalRow;
316
- [TABLE_TRACES]: any;
317
- [TABLE_RESOURCES]: StorageResourceType;
318
- };
319
-
320
- export declare const retryUntil: <T>(fn: () => Promise<T>, condition: (result: T) => boolean, timeout?: number, // REST API needs longer timeout due to higher latency
321
- interval?: number) => Promise<T>;
322
-
323
- export { }
package/dist/index.d.cts DELETED
@@ -1 +0,0 @@
1
- export { CloudflareStore } from './_tsup-dts-rollup.cjs';