@mastra/cloudflare 0.10.3-alpha.1 → 0.10.3-alpha.3

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.
@@ -2,11 +2,12 @@ import type { EvalRow } from '@mastra/core/storage';
2
2
  import type { KVNamespace as KVNamespace_2 } from '@cloudflare/workers-types';
3
3
  import { KVNamespaceListKey as KVNamespaceListKey_2 } from '@cloudflare/workers-types';
4
4
  import type { MastraMessageV1 } from '@mastra/core/memory';
5
- import type { MastraMessageV2 } from '@mastra/core/agent';
6
- import type { MastraMessageV2 as MastraMessageV2_2 } from '@mastra/core/memory';
5
+ import type { MastraMessageV2 } from '@mastra/core/memory';
7
6
  import { MastraStorage } from '@mastra/core/storage';
7
+ import type { PaginationInfo } from '@mastra/core/storage';
8
8
  import type { StorageColumn } from '@mastra/core/storage';
9
9
  import type { StorageGetMessagesArg } from '@mastra/core/storage';
10
+ import type { StorageGetTracesArg } from '@mastra/core/storage';
10
11
  import type { StorageThreadType } from '@mastra/core/memory';
11
12
  import type { TABLE_EVALS } from '@mastra/core/storage';
12
13
  import type { TABLE_MESSAGES } from '@mastra/core/storage';
@@ -14,13 +15,12 @@ import type { TABLE_NAMES } from '@mastra/core/storage';
14
15
  import type { TABLE_THREADS } from '@mastra/core/storage';
15
16
  import type { TABLE_TRACES } from '@mastra/core/storage';
16
17
  import type { TABLE_WORKFLOW_SNAPSHOT } from '@mastra/core/storage';
18
+ import type { Trace } from '@mastra/core/telemetry';
17
19
  import type { WorkflowRun } from '@mastra/core/storage';
18
20
  import type { WorkflowRuns } from '@mastra/core/storage';
19
21
  import type { WorkflowRunState } from '@mastra/core/workflows';
20
22
  import type { WorkflowRunState as WorkflowRunState_2 } from '@mastra/core';
21
23
 
22
- export declare const checkWorkflowSnapshot: (snapshot: WorkflowRunState_2 | string, stepId: string, status: string) => void;
23
-
24
24
  /**
25
25
  * Configuration for Cloudflare KV using REST API
26
26
  */
@@ -214,6 +214,19 @@ declare class CloudflareStore extends MastraStorage {
214
214
  runId: string;
215
215
  workflowName: string;
216
216
  }): Promise<WorkflowRun | null>;
217
+ getTracesPaginated(_args: StorageGetTracesArg): Promise<PaginationInfo & {
218
+ traces: Trace[];
219
+ }>;
220
+ getThreadsByResourceIdPaginated(_args: {
221
+ resourceId: string;
222
+ page?: number;
223
+ perPage?: number;
224
+ }): Promise<PaginationInfo & {
225
+ threads: StorageThreadType[];
226
+ }>;
227
+ getMessagesPaginated(_args: StorageGetMessagesArg): Promise<PaginationInfo & {
228
+ messages: MastraMessageV1[] | MastraMessageV2[];
229
+ }>;
217
230
  close(): Promise<void>;
218
231
  }
219
232
  export { CloudflareStore }
@@ -285,7 +298,7 @@ export declare type ListOptions = {
285
298
 
286
299
  export declare type RecordTypes = {
287
300
  [TABLE_THREADS]: StorageThreadType;
288
- [TABLE_MESSAGES]: MastraMessageV2_2;
301
+ [TABLE_MESSAGES]: MastraMessageV2;
289
302
  [TABLE_WORKFLOW_SNAPSHOT]: WorkflowRunState;
290
303
  [TABLE_EVALS]: EvalRow;
291
304
  [TABLE_TRACES]: any;
@@ -2,11 +2,12 @@ import type { EvalRow } from '@mastra/core/storage';
2
2
  import type { KVNamespace as KVNamespace_2 } from '@cloudflare/workers-types';
3
3
  import { KVNamespaceListKey as KVNamespaceListKey_2 } from '@cloudflare/workers-types';
4
4
  import type { MastraMessageV1 } from '@mastra/core/memory';
5
- import type { MastraMessageV2 } from '@mastra/core/agent';
6
- import type { MastraMessageV2 as MastraMessageV2_2 } from '@mastra/core/memory';
5
+ import type { MastraMessageV2 } from '@mastra/core/memory';
7
6
  import { MastraStorage } from '@mastra/core/storage';
7
+ import type { PaginationInfo } from '@mastra/core/storage';
8
8
  import type { StorageColumn } from '@mastra/core/storage';
9
9
  import type { StorageGetMessagesArg } from '@mastra/core/storage';
10
+ import type { StorageGetTracesArg } from '@mastra/core/storage';
10
11
  import type { StorageThreadType } from '@mastra/core/memory';
11
12
  import type { TABLE_EVALS } from '@mastra/core/storage';
12
13
  import type { TABLE_MESSAGES } from '@mastra/core/storage';
@@ -14,13 +15,12 @@ import type { TABLE_NAMES } from '@mastra/core/storage';
14
15
  import type { TABLE_THREADS } from '@mastra/core/storage';
15
16
  import type { TABLE_TRACES } from '@mastra/core/storage';
16
17
  import type { TABLE_WORKFLOW_SNAPSHOT } from '@mastra/core/storage';
18
+ import type { Trace } from '@mastra/core/telemetry';
17
19
  import type { WorkflowRun } from '@mastra/core/storage';
18
20
  import type { WorkflowRuns } from '@mastra/core/storage';
19
21
  import type { WorkflowRunState } from '@mastra/core/workflows';
20
22
  import type { WorkflowRunState as WorkflowRunState_2 } from '@mastra/core';
21
23
 
22
- export declare const checkWorkflowSnapshot: (snapshot: WorkflowRunState_2 | string, stepId: string, status: string) => void;
23
-
24
24
  /**
25
25
  * Configuration for Cloudflare KV using REST API
26
26
  */
@@ -214,6 +214,19 @@ declare class CloudflareStore extends MastraStorage {
214
214
  runId: string;
215
215
  workflowName: string;
216
216
  }): Promise<WorkflowRun | null>;
217
+ getTracesPaginated(_args: StorageGetTracesArg): Promise<PaginationInfo & {
218
+ traces: Trace[];
219
+ }>;
220
+ getThreadsByResourceIdPaginated(_args: {
221
+ resourceId: string;
222
+ page?: number;
223
+ perPage?: number;
224
+ }): Promise<PaginationInfo & {
225
+ threads: StorageThreadType[];
226
+ }>;
227
+ getMessagesPaginated(_args: StorageGetMessagesArg): Promise<PaginationInfo & {
228
+ messages: MastraMessageV1[] | MastraMessageV2[];
229
+ }>;
217
230
  close(): Promise<void>;
218
231
  }
219
232
  export { CloudflareStore }
@@ -285,7 +298,7 @@ export declare type ListOptions = {
285
298
 
286
299
  export declare type RecordTypes = {
287
300
  [TABLE_THREADS]: StorageThreadType;
288
- [TABLE_MESSAGES]: MastraMessageV2_2;
301
+ [TABLE_MESSAGES]: MastraMessageV2;
289
302
  [TABLE_WORKFLOW_SNAPSHOT]: WorkflowRunState;
290
303
  [TABLE_EVALS]: EvalRow;
291
304
  [TABLE_TRACES]: any;
package/dist/index.cjs CHANGED
@@ -1232,6 +1232,15 @@ var CloudflareStore = class extends storage.MastraStorage {
1232
1232
  return null;
1233
1233
  }
1234
1234
  }
1235
+ async getTracesPaginated(_args) {
1236
+ throw new Error("Method not implemented.");
1237
+ }
1238
+ async getThreadsByResourceIdPaginated(_args) {
1239
+ throw new Error("Method not implemented.");
1240
+ }
1241
+ async getMessagesPaginated(_args) {
1242
+ throw new Error("Method not implemented.");
1243
+ }
1235
1244
  async close() {
1236
1245
  }
1237
1246
  };
package/dist/index.js CHANGED
@@ -1226,6 +1226,15 @@ var CloudflareStore = class extends MastraStorage {
1226
1226
  return null;
1227
1227
  }
1228
1228
  }
1229
+ async getTracesPaginated(_args) {
1230
+ throw new Error("Method not implemented.");
1231
+ }
1232
+ async getThreadsByResourceIdPaginated(_args) {
1233
+ throw new Error("Method not implemented.");
1234
+ }
1235
+ async getMessagesPaginated(_args) {
1236
+ throw new Error("Method not implemented.");
1237
+ }
1229
1238
  async close() {
1230
1239
  }
1231
1240
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/cloudflare",
3
- "version": "0.10.3-alpha.1",
3
+ "version": "0.10.3-alpha.3",
4
4
  "description": "Cloudflare provider for Mastra - includes db storage capabilities",
5
5
  "type": "module",
6
6
  "files": [
@@ -35,12 +35,12 @@
35
35
  "tsup": "^8.5.0",
36
36
  "typescript": "^5.8.2",
37
37
  "vitest": "^3.2.2",
38
- "@internal/lint": "0.0.10",
39
38
  "@internal/storage-test-utils": "0.0.6",
40
- "@mastra/core": "0.10.4-alpha.1"
39
+ "@internal/lint": "0.0.10",
40
+ "@mastra/core": "0.10.4-alpha.3"
41
41
  },
42
42
  "peerDependencies": {
43
- "@mastra/core": "^0.10.2-alpha.0"
43
+ "@mastra/core": ">=0.10.4-0 <0.11.0"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting",