@mastra/rag 2.2.0-alpha.0 → 2.2.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 +40 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
# @mastra/rag
|
|
2
2
|
|
|
3
|
+
## 2.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Add RAG observability (#10898) ([#15137](https://github.com/mastra-ai/mastra/pull/15137))
|
|
8
|
+
|
|
9
|
+
Surfaces RAG ingestion and query operations in Mastra's AI tracing.
|
|
10
|
+
|
|
11
|
+
New span types in `@mastra/core/observability`:
|
|
12
|
+
- `RAG_INGESTION` (root) — wraps an ingestion pipeline run
|
|
13
|
+
- `RAG_EMBEDDING` — embedding call (used by ingestion and query)
|
|
14
|
+
- `RAG_VECTOR_OPERATION` — vector store I/O (`query`/`upsert`/`delete`/`fetch`)
|
|
15
|
+
- `RAG_ACTION` — `chunk` / `extract_metadata` / `rerank`
|
|
16
|
+
- `GRAPH_ACTION` — non-RAG graph `build` / `traverse` / `update` / `prune`
|
|
17
|
+
|
|
18
|
+
New helpers exported from `@mastra/core/observability`:
|
|
19
|
+
- `startRagIngestion(opts)` — manual: returns `{ span, observabilityContext }`
|
|
20
|
+
- `withRagIngestion(opts, fn)` — scoped: runs `fn(observabilityContext)`,
|
|
21
|
+
attaches the return value as the span's output, routes thrown errors to
|
|
22
|
+
`span.error(...)`
|
|
23
|
+
|
|
24
|
+
Wired in `@mastra/rag`:
|
|
25
|
+
- `vectorQuerySearch` emits `RAG_EMBEDDING` (mode: `query`) and
|
|
26
|
+
`RAG_VECTOR_OPERATION` (operation: `query`)
|
|
27
|
+
- `rerank` / `rerankWithScorer` emit `RAG_ACTION` (action: `rerank`)
|
|
28
|
+
- `MDocument.chunk` emits `RAG_ACTION` (action: `chunk`) and
|
|
29
|
+
`RAG_ACTION` (action: `extract_metadata`)
|
|
30
|
+
- `createGraphRAGTool` emits `GRAPH_ACTION` (action: `build` / `traverse`)
|
|
31
|
+
- `createVectorQueryTool` and `createGraphRAGTool` thread
|
|
32
|
+
`observabilityContext` from the agent's `TOOL_CALL` span automatically
|
|
33
|
+
|
|
34
|
+
All new instrumentation is opt-in: functions accept an optional
|
|
35
|
+
`observabilityContext` and no-op when absent, so existing callers are
|
|
36
|
+
unaffected.
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- Updated dependencies [[`8db7663`](https://github.com/mastra-ai/mastra/commit/8db7663c9a9c735828094c359d2e327fd4f8fba3), [`153e864`](https://github.com/mastra-ai/mastra/commit/153e86476b425db7cd0dc8490050096e92964a38), [`715710d`](https://github.com/mastra-ai/mastra/commit/715710d12fa47cf88e09d41f13843eddc29327b0), [`378c6c4`](https://github.com/mastra-ai/mastra/commit/378c6c4755726e8d8cf83a14809b350b90d46c62), [`9f91fd5`](https://github.com/mastra-ai/mastra/commit/9f91fd538ab2a44f8cc740bcad8e51205f74fbea), [`ba6fa9c`](https://github.com/mastra-ai/mastra/commit/ba6fa9cc0f3e1912c49fd70d4c3bb8c44903ddaa)]:
|
|
41
|
+
- @mastra/core@1.24.0
|
|
42
|
+
|
|
3
43
|
## 2.2.0-alpha.0
|
|
4
44
|
|
|
5
45
|
### Minor Changes
|
package/dist/docs/SKILL.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/rag",
|
|
3
|
-
"version": "2.2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"typescript": "^5.9.3",
|
|
51
51
|
"vitest": "4.0.18",
|
|
52
52
|
"zod": "^4.3.6",
|
|
53
|
-
"@internal/ai-sdk-v4": "0.0.
|
|
54
|
-
"@internal/
|
|
55
|
-
"@internal/
|
|
56
|
-
"@mastra/core": "1.24.0
|
|
53
|
+
"@internal/ai-sdk-v4": "0.0.28",
|
|
54
|
+
"@internal/lint": "0.0.81",
|
|
55
|
+
"@internal/types-builder": "0.0.56",
|
|
56
|
+
"@mastra/core": "1.24.0"
|
|
57
57
|
},
|
|
58
58
|
"keywords": [
|
|
59
59
|
"rag",
|