Migrate registerTool to presentation.label for SDK 0.4.16+ - #4
Closed
ChrBoebel wants to merge 1 commit into
Closed
Conversation
`experimental_statusLabels` was folded into `presentation` (labels) in SDK 0.4.16. bb validates registerTool options in the host, not in the SDK bundled into dist/, so the published artifact is rejected at load time on a current bb regardless of which SDK it was built against: plugin advisor failed to load: registerTool: "experimental_statusLabels" was folded into "presentation" (labels) in SDK 0.4.16 (tool "advisor_review") Observed on bb 0.41.0, 466 ms after installing this commit from git:, followed by three further load failures. The option is spread from a constant rather than inlined because the vendored 0.4.2 declarations in types/ do not describe `presentation` yet, so an inline literal trips TypeScript's excess-property check.
This was referenced Sep 3, 2026
Author
|
Closing in favour of #3, which fixes the same registration failure more thoroughly — it extends the vendored declarations instead of spreading the option past the excess-property check, and adds a regression test. It also predates this PR; I had not seen it when I opened mine. I've left the verification I did in a comment on #3, including a reproduction on bb 0.41.0 and a note on the #5 still needs some form of this fix in order to load, so it carries a minimal version of it for now. I'll rebase it onto #3 once that lands. |
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.
What
experimental_statusLabelswas folded intopresentation(labels) in SDK 0.4.16. This swaps the option over.Why this blocks loading rather than just dropping a label
bb validates
registerTooloptions in the host, not in the SDK bundled intodist/, so the published artifact is rejected at load time on a current bb regardless of which SDK it was built against. Installing this repo'smain(bd4b6ae) fromgit:on bb 0.41.0, from~/.bb/logs/server.1.log:466 ms after the install completed, then three more attempts. I can't say how many installs sit on 0.41 — only that on 0.41 the published artifact does not load.
Why the option is spread from a constant instead of inlined
types/vendors the 0.4.2 declarations, which don't describepresentation, so an inline literal trips TypeScript's excess-property check. Spreading it keeps the typecheck green against both declaration generations. Verified both ways:presentation?npm run typecheckbb plugin buildbb-appdevDependency, what CI resolves)The cleaner follow-up is
bb plugin migrate, which moves the plugin off vendoredtypes/onto the@get-bb/plugin-sdkpackage. Happy to do that as a separate PR — it does surface some unrelated drift (supportedPermissionModes→permissionModes, and aprovider.capabilitiesfield in the agent-configuration fixtures), which is why I kept it out of this one.On
enginesLeft at
bb: ">=0.35",bbPluginSdk: "^0.4.1".I checked whether the swap mirrors today's breakage onto older runtimes, and it does not. The SDK 0.4.2 validator is a chain of hand-written per-field checks with no unknown-key rejection: registering a tool with
presentation, and separately with an arbitrary made-up key, both succeed without throwing. The ≥ 0.4.16 error is a targeted deprecation guard for the removed name — it names the old key, the new key and the version, which a generic strict-object check could not produce — so there is no symmetric rejection in the other direction.Below 0.4.16 the tool therefore registers normally and simply renders no status label. Caveat: I exercised the SDK 0.4.2 test harness and bb 0.36.0's builder, not a live bb 0.35–0.40 host. If you'd rather advertise only runtimes that render the label, bump
bbPluginSdkto^0.4.16— that call is yours, and I didn't want to narrow the supported range silently.Verification
npm run typecheckclean ·npm test83/83 ·npm run buildsucceeds.dist/is left untouched:verifyandprepackrebuild it, and I didn't want to guess which bb version you cut releases with. Say so if you'd rather have it in the diff.