@mastra/cloudflare 0.0.0-toolOptionTypes-20250917085558 → 0.0.0-trace-timeline-update-20251121114225

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/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