@mastra/react 0.1.0-beta.14 → 0.1.0-beta.16

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,81 @@
1
1
  # @mastra/react-hooks
2
2
 
3
+ ## 0.1.0-beta.16
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`6cbb549`](https://github.com/mastra-ai/mastra/commit/6cbb549475201a2fbf158f0fd7323f6495f46d08)]:
8
+ - @mastra/client-js@1.0.0-beta.16
9
+
10
+ ## 0.1.0-beta.15
11
+
12
+ ### Minor Changes
13
+
14
+ - Unified observability schema with entity-based span identification ([#11132](https://github.com/mastra-ai/mastra/pull/11132))
15
+
16
+ ## What changed
17
+
18
+ Spans now use a unified identification model with `entityId`, `entityType`, and `entityName` instead of separate `agentId`, `toolId`, `workflowId` fields.
19
+
20
+ **Before:**
21
+
22
+ ```typescript
23
+ // Old span structure
24
+ span.agentId; // 'my-agent'
25
+ span.toolId; // undefined
26
+ span.workflowId; // undefined
27
+ ```
28
+
29
+ **After:**
30
+
31
+ ```typescript
32
+ // New span structure
33
+ span.entityType; // EntityType.AGENT
34
+ span.entityId; // 'my-agent'
35
+ span.entityName; // 'My Agent'
36
+ ```
37
+
38
+ ## New `listTraces()` API
39
+
40
+ Query traces with filtering, pagination, and sorting:
41
+
42
+ ```typescript
43
+ const { spans, pagination } = await storage.listTraces({
44
+ filters: {
45
+ entityType: EntityType.AGENT,
46
+ entityId: 'my-agent',
47
+ userId: 'user-123',
48
+ environment: 'production',
49
+ status: TraceStatus.SUCCESS,
50
+ startedAt: { start: new Date('2024-01-01'), end: new Date('2024-01-31') },
51
+ },
52
+ pagination: { page: 0, perPage: 50 },
53
+ orderBy: { field: 'startedAt', direction: 'DESC' },
54
+ });
55
+ ```
56
+
57
+ **Available filters:** date ranges (`startedAt`, `endedAt`), entity (`entityType`, `entityId`, `entityName`), identity (`userId`, `organizationId`), correlation IDs (`runId`, `sessionId`, `threadId`), deployment (`environment`, `source`, `serviceName`), `tags`, `metadata`, and `status`.
58
+
59
+ ## New retrieval methods
60
+ - `getSpan({ traceId, spanId })` - Get a single span
61
+ - `getRootSpan({ traceId })` - Get the root span of a trace
62
+ - `getTrace({ traceId })` - Get all spans for a trace
63
+
64
+ ## Backward compatibility
65
+
66
+ The legacy `getTraces()` method continues to work. When you pass `name: "agent run: my-agent"`, it automatically transforms to `entityId: "my-agent", entityType: AGENT`.
67
+
68
+ ## Migration
69
+
70
+ **Automatic:** SQL-based stores (PostgreSQL, LibSQL, MSSQL) automatically add new columns to existing `spans` tables on initialization. Existing data is preserved with new columns set to `NULL`.
71
+
72
+ **No action required:** Your existing code continues to work. Adopt the new fields and `listTraces()` API at your convenience.
73
+
74
+ ### Patch Changes
75
+
76
+ - Updated dependencies [[`d90ea65`](https://github.com/mastra-ai/mastra/commit/d90ea6536f7aa51c6545a4e9215b55858e98e16d), [`d171e55`](https://github.com/mastra-ai/mastra/commit/d171e559ead9f52ec728d424844c8f7b164c4510), [`632fdb8`](https://github.com/mastra-ai/mastra/commit/632fdb8b3cd9ff6f90399256d526db439fc1758b), [`184f01d`](https://github.com/mastra-ai/mastra/commit/184f01d1f534ec0be9703d3996f2e088b4a560eb)]:
77
+ - @mastra/client-js@1.0.0-beta.15
78
+
3
79
  ## 0.1.0-beta.14
4
80
 
5
81
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/react",
3
- "version": "0.1.0-beta.14",
3
+ "version": "0.1.0-beta.16",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/mastra-ai/mastra.git",
@@ -39,7 +39,7 @@
39
39
  "lucide-react": "^0.522.0",
40
40
  "shiki": "^1.29.2",
41
41
  "tailwind-merge": "^3.3.1",
42
- "@mastra/client-js": "1.0.0-beta.14"
42
+ "@mastra/client-js": "1.0.0-beta.16"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": ">=19.0.0",
@@ -66,7 +66,7 @@
66
66
  "vite": "^7.1.9",
67
67
  "vite-plugin-dts": "^4.5.4",
68
68
  "vitest": "4.0.12",
69
- "@mastra/core": "1.0.0-beta.14"
69
+ "@mastra/core": "1.0.0-beta.16"
70
70
  },
71
71
  "eslintConfig": {
72
72
  "extends": [