@mastra/cloudflare 1.0.0-beta.9 → 1.0.0
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 +904 -0
- package/README.md +1 -1
- package/dist/docs/README.md +31 -0
- package/dist/docs/SKILL.md +32 -0
- package/dist/docs/SOURCE_MAP.json +6 -0
- package/dist/docs/storage/01-reference.md +64 -0
- package/dist/index.cjs +34 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +35 -29
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/memory/index.d.ts +2 -2
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +2 -2
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +9 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MastraMessageContentV2 } from '@mastra/core/agent';
|
|
2
2
|
import type { MastraDBMessage, StorageThreadType } from '@mastra/core/memory';
|
|
3
|
-
import type { StorageResourceType, StorageListMessagesInput, StorageListMessagesOutput,
|
|
3
|
+
import type { StorageResourceType, StorageListMessagesInput, StorageListMessagesOutput, StorageListThreadsInput, StorageListThreadsOutput } from '@mastra/core/storage';
|
|
4
4
|
import { MemoryStorage } from '@mastra/core/storage';
|
|
5
5
|
import type { CloudflareDomainConfig } from '../../types.js';
|
|
6
6
|
export declare class MemoryStorageCloudflare extends MemoryStorage {
|
|
@@ -17,7 +17,7 @@ export declare class MemoryStorageCloudflare extends MemoryStorage {
|
|
|
17
17
|
getThreadById({ threadId }: {
|
|
18
18
|
threadId: string;
|
|
19
19
|
}): Promise<StorageThreadType | null>;
|
|
20
|
-
|
|
20
|
+
listThreads(args: StorageListThreadsInput): Promise<StorageListThreadsOutput>;
|
|
21
21
|
saveThread({ thread }: {
|
|
22
22
|
thread: StorageThreadType;
|
|
23
23
|
}): Promise<StorageThreadType>;
|
|
@@ -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,EAAmB,eAAe,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,KAAK,EACV,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,
|
|
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,EAAmB,eAAe,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,KAAK,EACV,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAIL,aAAa,EAOd,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE1D,qBAAa,uBAAwB,SAAQ,aAAa;;gBAG5C,MAAM,EAAE,sBAAsB;IAKpC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IAM1C,OAAO,CAAC,cAAc;IAKtB;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAQzB,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;IA6B7E,WAAW,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAkFpF,UAAU,CAAC,EAAE,MAAM,EAAE,EAAE;QAAE,MAAM,EAAE,iBAAiB,CAAA;KAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAkBj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AC,EAAE,MAAM,CAAC;YAClB,OAAO,CAAC,EAAE;gBACR,QAAQ,CAAC,EAAE,sBAAsB,CAAC,UAAU,CAAC,CAAC;gBAC9C,OAAO,CAAC,EAAE,sBAAsB,CAAC,SAAS,CAAC,CAAC;aAC7C,CAAC;SACH,CAAC,EAAE,CAAC;KACN,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IA2JxB,eAAe,CAAC,EAAE,UAAU,EAAE,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;IA6B1B,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CA4D1D"}
|
package/dist/storage/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MastraCompositeStore } from '@mastra/core/storage';
|
|
2
2
|
import type { StorageDomains } from '@mastra/core/storage';
|
|
3
3
|
import { MemoryStorageCloudflare } from './domains/memory/index.js';
|
|
4
4
|
import { ScoresStorageCloudflare } from './domains/scores/index.js';
|
|
@@ -24,7 +24,7 @@ import type { CloudflareStoreConfig } from './types.js';
|
|
|
24
24
|
* await workflows?.persistWorkflowSnapshot({ workflowName, runId, snapshot });
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
|
-
export declare class CloudflareStore extends
|
|
27
|
+
export declare class CloudflareStore extends MastraCompositeStore {
|
|
28
28
|
stores: StorageDomains;
|
|
29
29
|
private client?;
|
|
30
30
|
private accountId?;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/cloudflare",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Cloudflare provider for Mastra - includes db storage capabilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"eslint": "^9.37.0",
|
|
36
36
|
"miniflare": "^4.20251109.0",
|
|
37
37
|
"tsup": "^8.5.0",
|
|
38
|
-
"typescript": "^5.
|
|
39
|
-
"vitest": "4.0.
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"@internal/
|
|
43
|
-
"@internal/
|
|
38
|
+
"typescript": "^5.9.3",
|
|
39
|
+
"vitest": "4.0.16",
|
|
40
|
+
"@mastra/core": "1.0.0",
|
|
41
|
+
"@internal/storage-test-utils": "0.0.50",
|
|
42
|
+
"@internal/types-builder": "0.0.29",
|
|
43
|
+
"@internal/lint": "0.0.54"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@mastra/core": ">=1.0.0-0 <2.0.0-0"
|
|
@@ -58,7 +58,8 @@
|
|
|
58
58
|
"node": ">=22.13.0"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
|
-
"build": "tsup --silent --config tsup.config.ts",
|
|
61
|
+
"build:lib": "tsup --silent --config tsup.config.ts",
|
|
62
|
+
"build:docs": "pnpx tsx ../../scripts/generate-package-docs.ts stores/cloudflare",
|
|
62
63
|
"build:watch": "tsup --watch --silent --config tsup.config.ts",
|
|
63
64
|
"test": "vitest run",
|
|
64
65
|
"lint": "eslint ."
|