docs(cockpit): bring the Mastra runtime example to content parity - #912
Merged
Conversation
The mastra topic's cockpit page rendered an empty docs pane and no
backend code: its descriptor declared no docsAssetPaths or
backendAssetPaths and only one prompt, versus the aws-strands and
microsoft-agent-framework siblings (guide.md + two backend files + a
backend-build prompt).
- Add cockpit/runtimes/mastra/angular/docs/guide.md matching the
siblings' structure: what the example demonstrates (camping planner
over @ag-ui/mastra), the suspend/approval interrupt flow and its
command.interruptEvent resume shape, working memory as
STATE_SNAPSHOT/STATE_DELTA, the hand-written Node hosting service at
deployments/ag-ui-mastra/, and the honest subagents note (upstream
reserves ACTIVITY for background tasks).
- Add prompts/mastra-backend.md — the backend-build prompt siblings
keep in their python lane; mastra has no python lane so both prompts
live beside the Angular app.
- Descriptor: declare docsAssetPaths, backendAssetPaths
(deployments/ag-ui-mastra/{agents,server}.mjs — the topic's real
backend lives outside cockpit/ by design), runtimeUrl, devPort.
- apps/cockpit: trace deployments/ag-ui-mastra/*.mjs into the deployed
bundle, map .mjs to javascript highlighting, and extract JSDoc
sections from .mjs backend files.
- Extend the #910 wiring-guard spec: assert the new mastra fields and
that every declared mastra asset exists on disk (the content bundle
degrades to 'File not found' silently otherwise).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
blove
enabled auto-merge (squash)
September 1, 2026 02:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Once the cockpit sidebar shows Mastra (#910, merged — this branch is off
origin/main), its page renders an empty docs pane and no browsable backend: the descriptor had nodocsAssetPaths/backendAssetPathsand one prompt, versus the aws-strands / microsoft-agent-framework siblings (guide.md, two backend files, backend + frontend prompts).What
cockpit/runtimes/mastra/angular/docs/guide.md— same structure and register as the siblings' guides: the demonstrated surfaces table (streaming,check_conditions, working-memory state via STATE_SNAPSHOT + real JSON-Patch STATE_DELTA, the suspend/approval interrupt with theforwardedProps.command = { resume, interruptEvent: { toolCallId, runId } }resume shape), the honest subagents note (upstream reservesACTIVITY_*for background tasks), the Node hosting service atdeployments/ag-ui-mastra/, model client, and local run steps. It lives in theangularlane because that is mastra's only lane (TOPIC_LANES), and the descriptor references it explicitly.prompts/mastra-backend.md— the backend-build prompt the siblings keep in their python lane (their pages surface that one); mastra's page now lists backend + frontend prompts.deployments/ag-ui-mastra/agents.mjs+server.mjs. These deliberately point outsidecockpit/: the Node service IS the topic's backend (no python lane; the registry entry has nopythonDir). The cockpit reads workspace-root-relative paths at request time, so dev works as-is; for the deployed app,next.config.tsnow tracesdeployments/ag-ui-mastra/*.mjs. No source duplication needed.runtimeUrl: 'runtimes/mastra'anddevPort: 4332, matching the siblings..mjsmaps to javascript for shiki, and JSDoc sections are extracted from.mjsbackend files (same comment syntax as.ts).Verification
nx test cockpitgreen (203 tests, incl. the extended guard)./runtimes/core-capabilities/mastra/overview/pythonrenders the guide narrative, both prompts, highlightedagents.mjs/server.mjs, and zero 'File not found'.generate-ag-ui-deployment-config.ts --checkbyte-clean (mastra is excluded from the python generator by design).cockpit-runtimes-mastra-angular:smokegreen.🤖 Generated with Claude Code