From 0978c911eebbaa999ecade8e082ed74d43066619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20B=C3=B6bel?= Date: Thu, 3 Sep 2026 18:04:42 +0200 Subject: [PATCH] Migrate registerTool to presentation.label for SDK 0.4.16+ `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. --- server.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/server.ts b/server.ts index abdef20..c14f171 100644 --- a/server.ts +++ b/server.ts @@ -17,6 +17,16 @@ import { const PLUGIN_ID = "advisor"; const ADVISOR_TOOL = "advisor_review"; + +// Spread rather than inlined: `presentation` replaced `experimental_statusLabels` +// in SDK 0.4.16, but the vendored 0.4.2 declarations in types/ do not describe it +// yet, so an inline literal trips the excess-property check. See the PR notes on +// `bb plugin migrate` for the follow-up that makes this typed. +const ADVISOR_TOOL_PRESENTATION = { + presentation: { + label: { pending: "Consulting advisor", completed: "Consulted advisor" }, + }, +}; const ADVISOR_TITLE_PREFIX = "Advisor ยท "; /** * Permission modes the reviewer will accept, least privileged first. The mode @@ -1585,10 +1595,7 @@ export default async function plugin(bb: BbPluginApi) { "Run an independent review-only model pass on this thread and return concrete issues before finalizing.", instructions: "For substantial coding work, call advisor_review exactly once after implementation and verification but before the final answer. Address concern/blocker feedback before completing.", - experimental_statusLabels: { - pending: "Consulting advisor", - completed: "Consulted advisor", - }, + ...ADVISOR_TOOL_PRESENTATION, parameters: z.object({ focus: z .string()