Generated by AI agent: add beam-create-microview skill, supersede the portal-extension one - #4804
Open
Brandoffsky wants to merge 1 commit into
Open
Generated by AI agent: add beam-create-microview skill, supersede the portal-extension one#4804Brandoffsky wants to merge 1 commit into
Brandoffsky wants to merge 1 commit into
Conversation
…on skill
microView is the current name for the feature; the backend has not caught up.
Every CLI command, flag, and directory still spells it "extension"
(`project new portal-extension`, `portal extension list-extension-options`,
`extensions/<Name>/`), and agents reading a "portal extension" skill either
use the old name with users or try to "correct" the commands to match the new
one and hit commands that do not exist.
Add `beam-create-microview`, derived from `beam-create-portal-extension`. It
speaks microViews to the user and calls the un-renamed commands verbatim, with
an explicit mapping table up front so the mismatch reads as intentional rather
than as a bug to fix. Adds two things beyond the rename:
- Tells the agent to STOP when `list-extension-options` returns an empty
catalog rather than inventing a mount page or selector. The catalog comes
from `{env}.console.beamable.com/extension-pages.json` and not every
environment publishes it, so an empty list is a normal outcome; a guessed
mount value produces a microView that silently never mounts.
- Uses the hub-path form (`hub` / `hub/page`) in the page-microView command
example and pitfalls, rather than `<routePrefix><your-route>`. The
Hubs-vs-pages section already explains `routePrefix` is a discovery marker
and the `!` in `!hub/` is a wildcard marker, not part of the value -- the
older literal-concatenation phrasing contradicts it.
Mark `beam-create-portal-extension` superseded in its description and body,
but keep it. The skill name is what `beam_get_skill` matches on, so removing
or renaming it would break anything that asks for it by name; the description
is what steers an agent choosing between the two.
Descriptions are deliberately plain single-line text with no wrapping quotes:
McpToolExecutor.ExtractDescription is a line-prefix scan, not a YAML parser,
so quoted or multi-line YAML would surface its own quoting in the catalog.
Verified by rendering every template through Scriban 5.12.0 (the version the
generator uses) -- all 17 parse and render, and the descriptions extract the
way the MCP layer will read them -- then building the CLI with the rendered
skills embedded and fetching the new one over a live `beam mcp serve`:
`beam_get_skill('beam-create-microview')` returns it, and the catalog lists
both skills with the superseded one pointing at the new one.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
|
Lightbeam link |
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.
Ticket
https://disruptorbeam.atlassian.net/browse/BEAM-XXXX
Brief Description
microView is the current name for the feature; the backend hasn't caught up. Every CLI command, flag, and directory still spells it
extension—project new portal-extension,portal extension list-extension-options,extensions/<Name>/. Today the only skill covering this flow isbeam-create-portal-extension, so an agent either uses the old name with users, or "corrects" the commands to match the new name and hits commands that don't exist.Adds
beam-create-microview, derived frombeam-create-portal-extension. It speaks microViews to the user and calls the un-renamed commands verbatim, with an explicit mapping table up front so the mismatch reads as intentional:project new portal-extensionportal extension list-extension-optionsportal extension add-microserviceportal open-extensionextensions/<Name>/Two changes beyond the rename
list-extension-optionsreads{env}.console.beamable.com/extension-pages.json, and not every environment publishes it — an empty list is a normal outcome, not an error. The skill now tells the agent to report that and stop, because a guessed--mount-page/--mount-selectorproduces a microView that silently never mounts.hub/hub/pagerather than<routePrefix><your-route>. The Hubs-vs-pages section (added to the portal-extension skill recently) already explains thatroutePrefixis a discovery marker and the!in!hub/is a wildcard marker rather than part of the value — the literal-concatenation phrasing elsewhere contradicts it.On the old skill
beam-create-portal-extensionis marked superseded in its description and body but kept.beam_get_skillmatches on the skill name, so removing or renaming it would break anything asking for it by name; the description is what steers an agent choosing between the two.Descriptions are deliberately plain single-line text with no wrapping quotes —
McpToolExecutor.ExtractDescriptionis a line-prefix scan, not a YAML parser, so quoted or multi-line YAML surfaces its own quoting in the catalog output.No registry to update:
GenerateSkillDocsCommandglobsSkillTemplates/*.md.scriban, and<EmbeddedResource Include="Docs\**\*.md" />picks up the rendered result.Checklist
Notes
Verification. The
RegenerateSkillDocsMSBuild target can't run in a local checkout — its type-schema prerequisite dies onclient/Packages/com.beamable/Samples/.../LootBoxService.csproj(The expression "[System.IO.File]::ReadAllText(/.config/dotnet-tools.json)" cannot be evaluated), and the target setsIgnoreExitCode="true", so the build goes green whileDocs/Skills/stays empty. That's pre-existing and unrelated to this PR, but it's worth someone looking at — it means skill-template changes are unverifiable locally through the normal build.Verified around it instead:
cli.csprojpins) replicatingGenerateSkillDocsCommand's parse+render — all parse and render, and each description extracts the wayExtractDescriptionwill read it. This matters because a template withHasErrorsis logged and skipped, so a syntax error would silently drop the skill rather than fail the build.beam mcp serve(JSON-RPCinitialize→tools/call):To reproduce the MCP check: build
cli/cli.csproj, run<bin>/Beamable.Tools mcp servefrom a dir containing.beamroot, theninitialize+tools/call beam_get_skill.Related: #4803 fixes
list-extension-options, which is step 1 of this skill — it currently 404s against a hardcodedlocalhost:4950. This PR is independently mergeable, but the skill's step 1 won't work until that lands (and then only on dev, which is why the empty-catalog guidance above matters).🤖 Generated with Claude Code