@mastra/cloudflare 0.0.0-vnext-inngest-20250508131921 → 0.0.0-vnext-20251119160359

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/LICENSE.md CHANGED
@@ -1,7 +1,15 @@
1
- Copyright 2025 Mastra AI, Inc.
1
+ # Apache License 2.0
2
2
 
3
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3
+ Copyright (c) 2025 Kepler Software, Inc.
4
4
 
5
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
6
8
 
7
- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
package/README.md CHANGED
@@ -25,7 +25,6 @@ const store = new CloudflareStore({
25
25
  threads: THREADS_KV_NAMESPACE,
26
26
  messages: MESSAGES_KV_NAMESPACE,
27
27
  workflow_snapshot: WORKFLOW_KV_NAMESPACE,
28
- evals: EVALS_KV_NAMESPACE,
29
28
  traces: TRACES_KV_NAMESPACE,
30
29
  },
31
30
  keyPrefix: 'myapp_', // Optional
@@ -40,12 +39,13 @@ const store = new CloudflareStore({
40
39
 
41
40
  // Save a thread
42
41
  await store.saveThread({
43
- id: 'thread-123',
44
- resourceId: 'resource-456',
45
- title: 'My Thread',
46
- metadata: { key: 'value' },
47
- createdAt: new Date(),
48
- updatedAt: new Date(),
42
+ thread: {
43
+ id: 'thread-123',
44
+ resourceId: 'resource-456',
45
+ title: 'My Thread',
46
+ metadata: { key: 'value' },
47
+ createdAt: new Date(),
48
+ },
49
49
  });
50
50
 
51
51
  // Add messages
@@ -62,7 +62,7 @@ await store.saveMessages({
62
62
  });
63
63
 
64
64
  // Query messages
65
- const messages = await store.getMessages({ threadId: 'thread-123' });
65
+ const messages = await store.listMessages({ threadId: 'thread-123' });
66
66
  ```
67
67
 
68
68
  ## Configuration
@@ -95,25 +95,47 @@ const messages = await store.getMessages({ threadId: 'thread-123' });
95
95
 
96
96
  ### Thread Operations
97
97
 
98
- - `saveThread(thread)`: Create or update a thread
98
+ - `saveThread({ thread })`: Create or update a thread
99
99
  - `getThreadById({ threadId })`: Get a thread by ID
100
- - `getThreadsByResourceId({ resourceId })`: Fetch all threads associated with a resource.
100
+ - `listThreadsByResourceId({ resourceId, offset, limit, orderBy? })`: List paginated threads for a resource
101
101
  - `updateThread({ id, title, metadata })`: Update thread title and metadata
102
102
  - `deleteThread({ threadId })`: Delete a thread and its messages
103
103
 
104
104
  ### Message Operations
105
105
 
106
106
  - `saveMessages({ messages })`: Save multiple messages
107
- - `getMessages({ threadId, selectBy? })`: Get messages for a thread with optional filtering (last N, includes, etc)
107
+ - `listMessages({ threadId, perPage?, page? })`: Get messages for a thread with pagination
108
+ - `listMessagesById({ messageIds })`: Get specific messages by their IDs
109
+ - `updateMessages({ messages })`: Update existing messages
110
+
111
+ ### Resource Operations
112
+
113
+ - `getResourceById({ resourceId })`: Get a resource by ID
114
+ - `saveResource({ resource })`: Create or save a resource
115
+ - `updateResource({ resourceId, workingMemory })`: Update resource working memory
108
116
 
109
117
  ### Workflow Operations
110
118
 
111
- - `persistWorkflowSnapshot({ workflowName, runId, snapshot })`: Save workflow state for a given workflow/run.
112
- - `loadWorkflowSnapshot({ workflowName, runId })`: Load ed workflow state.
119
+ - `persistWorkflowSnapshot({ workflowName, runId, snapshot })`: Save workflow state
120
+ - `loadWorkflowSnapshot({ workflowName, runId })`: Load workflow state
121
+ - `listWorkflowRuns({ workflowName, pagination })`: List workflow runs with pagination
122
+ - `getWorkflowRunById({ workflowName, runId })`: Get a specific workflow run
123
+ - `updateWorkflowState({ workflowName, runId, state })`: Update workflow state
124
+ - `updateWorkflowResults({ workflowName, runId, results })`: Update workflow results
125
+
126
+ ### Evaluation/Scoring Operations
127
+
128
+ - `getScoreById({ id })`: Get a score by ID
129
+ - `saveScore(score)`: Save an evaluation score
130
+ - `listScoresByScorerId({ scorerId, pagination })`: List scores by scorer with pagination
131
+ - `listScoresByRunId({ runId, pagination })`: List scores by run with pagination
132
+ - `listScoresByEntityId({ entityId, entityType, pagination })`: List scores by entity with pagination
133
+ - `listScoresBySpan({ traceId, spanId, pagination })`: List scores by span with pagination
113
134
 
114
- ### Trace Operations
135
+ ### Operations Not Currently Supported
115
136
 
116
- - `getTraces({ name?, scope?, page, perPage, attributes? })`: Query trace records with optional filters and pagination.
137
+ - `deleteMessages(messageIds)`: Message deletion is not currently supported
138
+ - AI Observability (traces/spans): Not currently supported
117
139
 
118
140
  ### Utility
119
141