@mastra/mcp-docs-server 1.2.27-alpha.17 → 1.2.27-alpha.20
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/.docs/integrations/agentic-ui/ai-sdk-ui.md +12 -1
- package/.docs/models/environment-variables.md +211 -211
- package/.docs/models/gateways/netlify.md +1 -2
- package/.docs/models/gateways/openrouter.md +1 -2
- package/.docs/models/gateways/vercel.md +5 -2
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/crossmodel.md +2 -1
- package/.docs/models/providers/kilo.md +9 -10
- package/.docs/models/providers/llmgateway-providers.md +2 -3
- package/.docs/models/providers/minimax-cn-coding-plan.md +5 -5
- package/.docs/models/providers/minimax-cn.md +5 -5
- package/.docs/models/providers/nano-gpt.md +11 -8
- package/.docs/models/providers/nebius.md +4 -1
- package/.docs/models/providers/opencode-go.md +2 -2
- package/.docs/models/providers/opencode.md +1 -4
- package/.docs/models/providers/tensorx.md +31 -32
- package/.docs/models/providers/vivgrid.md +1 -2
- package/.docs/models/providers/zenmux.md +21 -14
- package/.docs/models/providers.md +2 -2
- package/.docs/reference/agents/listSuspendedRuns.md +2 -0
- package/.docs/reference/processors/provider-history-compat.md +17 -8
- package/package.json +4 -4
|
@@ -1262,6 +1262,14 @@ For a complete implementation, see the [workflow-suspend-resume example](https:/
|
|
|
1262
1262
|
|
|
1263
1263
|
Tools can call agents internally and stream the agent's output back to the UI. This creates compact `data-tool-agent` snapshots while the nested step is still running, `data-tool-agent-step` parts when a nested step finishes, and one full `data-tool-agent` snapshot when the nested run finishes.
|
|
1264
1264
|
|
|
1265
|
+
Both part types include delegation metadata for nested supervisor chains:
|
|
1266
|
+
|
|
1267
|
+
- `ancestry`: The delegation path in outer-to-inner order. Each entry contains a `toolCallId` and may include the `toolName` and normalized `agentId`.
|
|
1268
|
+
- `depth`: The number of known agent delegation boundaries. A direct subagent has depth `1`.
|
|
1269
|
+
- `parentAgentId`: The immediate parent agent ID for a nested agent. This field is omitted for a direct subagent because the root supervisor ID isn't part of the tool envelope.
|
|
1270
|
+
|
|
1271
|
+
The part `id` remains the nested agent run ID, so progressive snapshots replace the same UI state as the run continues.
|
|
1272
|
+
|
|
1265
1273
|
The pattern uses:
|
|
1266
1274
|
|
|
1267
1275
|
- `context.mastra.getAgent()` - Get an agent instance from within a tool
|
|
@@ -1357,10 +1365,12 @@ export function NestedAgentChat() {
|
|
|
1357
1365
|
return <p key={index}>{part.text}</p>
|
|
1358
1366
|
}
|
|
1359
1367
|
if (part.type === 'data-tool-agent') {
|
|
1360
|
-
const { id, data } = part as AgentDataPart
|
|
1368
|
+
const { id, data, depth, parentAgentId } = part as AgentDataPart
|
|
1361
1369
|
return (
|
|
1362
1370
|
<div key={index} className="nested-agent">
|
|
1363
1371
|
<strong>Nested Agent: {id}</strong>
|
|
1372
|
+
<p>Delegation depth: {depth}</p>
|
|
1373
|
+
{parentAgentId && <p>Parent agent: {parentAgentId}</p>}
|
|
1364
1374
|
{data.text && <p>{data.text}</p>}
|
|
1365
1375
|
{data.toolErrors?.map(toolError => (
|
|
1366
1376
|
<p key={toolError.toolCallId} className="nested-agent-error">
|
|
@@ -1392,6 +1402,7 @@ Key points:
|
|
|
1392
1402
|
|
|
1393
1403
|
- Piping `fullStream` to `context.writer` creates `data-tool-agent` parts
|
|
1394
1404
|
- Read `data-tool-agent-step` when you need the full payload for the nested step that finished
|
|
1405
|
+
- `AgentDataPart` and `AgentStepDataPart` include the same `ancestry`, `depth`, and optional `parentAgentId` fields
|
|
1395
1406
|
- The `AgentDataPart` has `id` (on the part) and `data.text` (the current nested-agent text snapshot)
|
|
1396
1407
|
- A tool that throws inside the nested agent is reported in `data.toolErrors`, each entry `{ toolCallId, toolName, args?, errorText, providerExecuted? }`. `errorText` is a JSON-safe string, so the failure survives serialization to the client instead of arriving as `{}`
|
|
1397
1408
|
- `toolErrors` resets at each nested step boundary, like `toolCalls` and `toolResults`. For a finished step, read it from `data-tool-agent-step` (`data.step.toolErrors`) or from `data.steps[]` on the final snapshot
|