@get-bb/plugin-sdk 0.4.17 → 0.4.18

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.
@@ -9,8 +9,8 @@ import { z } from 'zod';
9
9
 
10
10
  /**
11
11
  * Core `bb` CLI top-level command names (plus commander's built-in help).
12
- * Plugin CLI commands may not shadow these. Maintained by hand and checked
13
- * against the real Commander program by
12
+ * Core commands win these names; plugin scaffolding rejects them. Maintained
13
+ * by hand and checked against the real Commander program by
14
14
  * apps/cli/src/__tests__/plugin-cli-proxy.test.ts.
15
15
  *
16
16
  * "automation" and "connect" are intentionally absent: builtin plugins own
@@ -583,6 +583,7 @@ interface PluginAiServiceDeclaration {
583
583
  readonly kinds: readonly PluginAiServiceKind[];
584
584
  }
585
585
 
586
+ declare function pluginCliCollisionWarning(pluginId: string, commandName: string): string | null;
586
587
  /**
587
588
  * Built-in dynamic tool names plugins may not shadow. Maintained by hand —
588
589
  * kept in sync with the built-in tools in
@@ -789,5 +790,5 @@ declare function agentToolIconRefusalMessage(toolName: string, problem: string):
789
790
  */
790
791
  declare function providerWithoutBridgeMessage(providerId: string): string;
791
792
 
792
- export { AGENT_TOOL_NAME_PATTERN, BACKGROUND_NAME_PATTERN, CLI_COMMAND_NAME_PATTERN, KV_VALUE_MAX_BYTES, MENTION_PROVIDER_ID_PATTERN, PLUGIN_AGENT_DYNAMIC_INSTRUCTIONS_MAX_CHARS, PLUGIN_AGENT_SELECTION_MAX_IDS, PLUGIN_AGENT_STATIC_INSTRUCTIONS_MAX_CHARS, PLUGIN_AGENT_STATUS_LABEL_MAX_CHARS, PLUGIN_AGENT_TOOL_PARAMETERS_MAX_BYTES, PLUGIN_HTTP_METHODS, PLUGIN_MENTION_TRIGGER_VALUES, PLUGIN_PROVIDER_BRIDGE_OPTIONS_MAX_BYTES, PLUGIN_PROVIDER_COMPOSER_ACTION_VALUES, PLUGIN_PROVIDER_DISPLAY_NAME_MAX_CHARS, PLUGIN_PROVIDER_PERMISSION_MODE_VALUES, PLUGIN_PROVIDER_REASONING_LEVEL_VALUES, PROVIDER_ID_PATTERN, RESERVED_AGENT_TOOL_NAMES, RESERVED_BB_CLI_COMMANDS, RPC_METHOD_PATTERN, SERVER_DIRECT_AI_SERVICE_IDS, SETTING_KEY_PATTERN, adoptHttpRouteResponse, agentToolIconRefusalMessage, aiServiceAlreadyRegisteredMessage, assertAiServiceRegistrable, assertNoRecursiveJsonSchemaReferences, deriveValidatedProviderOptions, enforcePluginCliOutputLimit, isPluginMentionTrigger, isStandardSchema, isZodSchemaLike, normalizeMentionProviderTriggers, parsePluginAgentToolPresentation, providerAlreadyRegisteredMessage, providerIconRefusalMessage, providerWithoutBridgeMessage, readRpcMethodContract, registerSettingDescriptors, rejectStaleAgentToolFields, summarizeParseIssues, undeclaredIconProblem, validatePluginAiServiceDeclaration, validatePluginProviderDeclaration, validateSettingsUpdate };
793
+ export { AGENT_TOOL_NAME_PATTERN, BACKGROUND_NAME_PATTERN, CLI_COMMAND_NAME_PATTERN, KV_VALUE_MAX_BYTES, MENTION_PROVIDER_ID_PATTERN, PLUGIN_AGENT_DYNAMIC_INSTRUCTIONS_MAX_CHARS, PLUGIN_AGENT_SELECTION_MAX_IDS, PLUGIN_AGENT_STATIC_INSTRUCTIONS_MAX_CHARS, PLUGIN_AGENT_STATUS_LABEL_MAX_CHARS, PLUGIN_AGENT_TOOL_PARAMETERS_MAX_BYTES, PLUGIN_HTTP_METHODS, PLUGIN_MENTION_TRIGGER_VALUES, PLUGIN_PROVIDER_BRIDGE_OPTIONS_MAX_BYTES, PLUGIN_PROVIDER_COMPOSER_ACTION_VALUES, PLUGIN_PROVIDER_DISPLAY_NAME_MAX_CHARS, PLUGIN_PROVIDER_PERMISSION_MODE_VALUES, PLUGIN_PROVIDER_REASONING_LEVEL_VALUES, PROVIDER_ID_PATTERN, RESERVED_AGENT_TOOL_NAMES, RESERVED_BB_CLI_COMMANDS, RPC_METHOD_PATTERN, SERVER_DIRECT_AI_SERVICE_IDS, SETTING_KEY_PATTERN, adoptHttpRouteResponse, agentToolIconRefusalMessage, aiServiceAlreadyRegisteredMessage, assertAiServiceRegistrable, assertNoRecursiveJsonSchemaReferences, deriveValidatedProviderOptions, enforcePluginCliOutputLimit, isPluginMentionTrigger, isStandardSchema, isZodSchemaLike, normalizeMentionProviderTriggers, parsePluginAgentToolPresentation, pluginCliCollisionWarning, providerAlreadyRegisteredMessage, providerIconRefusalMessage, providerWithoutBridgeMessage, readRpcMethodContract, registerSettingDescriptors, rejectStaleAgentToolFields, summarizeParseIssues, undeclaredIconProblem, validatePluginAiServiceDeclaration, validatePluginProviderDeclaration, validateSettingsUpdate };
793
794
  export type { AiServiceHostBinding, NormalizedPluginProviderDeclaration };
@@ -7865,6 +7865,7 @@ declare const pluginCatalogSearchResultSchema: z$1.ZodObject<{
7865
7865
  iconUrl: z$1.ZodNullable<z$1.ZodString>;
7866
7866
  incompatibleReason: z$1.ZodNullable<z$1.ZodString>;
7867
7867
  installed: z$1.ZodBoolean;
7868
+ installs: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodNumber>>;
7868
7869
  marketplace: z$1.ZodString;
7869
7870
  marketplaceDisplayName: z$1.ZodString;
7870
7871
  official: z$1.ZodBoolean;
@@ -15858,8 +15859,9 @@ interface PluginCliExecutionResult {
15858
15859
  error?: PluginCliOutputLimitError;
15859
15860
  }
15860
15861
  interface PluginCliRegistration {
15861
- /** Top-level command name (`bb <name> …`): lowercase [a-z0-9-]+, and not
15862
- * a core bb command (see RESERVED_BB_CLI_COMMANDS in the server). */
15862
+ /** Preferred top-level command name (`bb <name> …`): lowercase [a-z0-9-]+.
15863
+ * A core collision logs an activation warning and remains available through
15864
+ * `bb plugin run <plugin-id>`. */
15863
15865
  name: string;
15864
15866
  summary: string;
15865
15867
  /** Subcommand metadata rendered in help and the plugin-commands skill
@@ -15871,7 +15873,7 @@ interface PluginCli {
15871
15873
  /**
15872
15874
  * Register this plugin's `bb` subcommand. One registration per factory
15873
15875
  * execution; a repeated call is rejected. Core bb commands always win
15874
- * name collisions; reserved names are rejected at registration.
15876
+ * name collisions; the plugin is warned and remains explicitly callable by id.
15875
15877
  */
15876
15878
  register(registration: PluginCliRegistration): void;
15877
15879
  }
@@ -24,16 +24,23 @@ function parseNamespacedGlyph(glyph) {
24
24
  // ../domain/src/plugin-cli.ts
25
25
  var RESERVED_BB_CLI_COMMANDS = [
26
26
  "environment",
27
+ "file",
27
28
  "guide",
28
29
  "help",
30
+ "machine",
29
31
  "manager",
32
+ "marketplace",
30
33
  "plugin",
31
34
  "project",
32
35
  "provider",
36
+ "settings",
33
37
  "skill",
34
38
  "status",
39
+ "terminal",
35
40
  "theme",
36
- "thread"
41
+ "thread",
42
+ "updates",
43
+ "voice"
37
44
  ];
38
45
 
39
46
  // ../domain/src/provider-fork.ts
@@ -252,6 +259,10 @@ var providerNativeRootSetSchema = z2.object({
252
259
  var PLUGIN_CLI_OUTPUT_MAX_BYTES = 1024 * 1024;
253
260
 
254
261
  // src/internal/host-policy.ts
262
+ function pluginCliCollisionWarning(pluginId, commandName) {
263
+ if (!RESERVED_BB_CLI_COMMANDS.includes(commandName)) return null;
264
+ return `CLI command "${commandName}" collides with core command "bb ${commandName}"; core keeps the short form. Use "bb plugin run ${pluginId}" to invoke this plugin.`;
265
+ }
255
266
  var RESERVED_AGENT_TOOL_NAMES = [
256
267
  "update_environment_directory"
257
268
  ];
@@ -1646,6 +1657,7 @@ export {
1646
1657
  isZodSchemaLike,
1647
1658
  normalizeMentionProviderTriggers,
1648
1659
  parsePluginAgentToolPresentation,
1660
+ pluginCliCollisionWarning,
1649
1661
  providerAlreadyRegisteredMessage,
1650
1662
  providerIconRefusalMessage,
1651
1663
  providerWithoutBridgeMessage,
@@ -6863,31 +6863,44 @@ function buildAcpModelDiscoveryAgentCommand(launchSpec) {
6863
6863
  ...launchEnvVars(launchSpec)
6864
6864
  };
6865
6865
  }
6866
- function buildAcpModelListParams(launchSpec) {
6866
+ function buildAcpModelListParams(launchSpec, options) {
6867
+ const primaryModels = [
6868
+ ...options.primaryModels ?? launchSpec?.modelCli?.primaryModels ?? []
6869
+ ];
6870
+ const reasoningProbePriorityModelIds = [
6871
+ ...options.reasoningProbePriorityModelIds
6872
+ ];
6867
6873
  if (launchSpec === null) {
6868
- return { primaryModels: [] };
6874
+ return {
6875
+ primaryModels,
6876
+ reasoningProbePriorityModelIds,
6877
+ parameterizedModelPicker: options.parameterizedModelPicker
6878
+ };
6869
6879
  }
6870
6880
  const listCommand = buildAcpModelListCommand(launchSpec);
6871
6881
  const agent = buildAcpModelDiscoveryAgentCommand(launchSpec);
6872
6882
  return {
6873
6883
  ...listCommand !== void 0 ? { listCommand } : {},
6874
6884
  ...agent !== void 0 ? { agent } : {},
6875
- primaryModels: [...launchSpec.modelCli?.primaryModels ?? []],
6885
+ primaryModels,
6886
+ reasoningProbePriorityModelIds,
6887
+ parameterizedModelPicker: options.parameterizedModelPicker,
6876
6888
  ...launchSpec.reasoningCli !== void 0 ? { reasoningCli: launchSpec.reasoningCli } : {},
6877
6889
  ...launchSpec.nativeReasoning !== void 0 ? { nativeReasoning: launchSpec.nativeReasoning } : {}
6878
6890
  };
6879
6891
  }
6880
- function buildAcpModelSelectionParam(launchSpec, options) {
6892
+ function buildAcpModelSelectionParam(launchSpec, options, parameterizedModelPicker) {
6881
6893
  const model = options.model;
6882
6894
  const listCommand = buildAcpModelListCommand(launchSpec);
6883
6895
  if (!model || model === ACP_DEFAULT_MODEL_ID) {
6884
6896
  return {};
6885
6897
  }
6886
- if (!listCommand || !launchSpec.modelCli?.selectFlag) {
6898
+ if (parameterizedModelPicker || !listCommand || !launchSpec.modelCli?.selectFlag) {
6887
6899
  return {
6888
6900
  modelSelection: {
6889
6901
  modelId: model,
6890
- ...options.reasoningLevel !== void 0 ? { reasoningLevel: options.reasoningLevel } : {}
6902
+ ...options.reasoningLevel !== void 0 ? { reasoningLevel: options.reasoningLevel } : {},
6903
+ ...parameterizedModelPicker && options.serviceTier !== void 0 ? { serviceTier: options.serviceTier } : {}
6891
6904
  }
6892
6905
  };
6893
6906
  }
@@ -6897,7 +6910,7 @@ function buildAcpModelSelectionParam(launchSpec, options) {
6897
6910
  selectFlag: launchSpec.modelCli.selectFlag,
6898
6911
  model,
6899
6912
  ...options.reasoningLevel !== void 0 ? { reasoningLevel: options.reasoningLevel } : {},
6900
- // Only "fast" changes resolution; "default" is the catalog's normal id.
6913
+ // Only "fast" changes launch resolution; "default" is the normal id.
6901
6914
  ...options.serviceTier === "fast" ? { serviceTier: options.serviceTier } : {}
6902
6915
  }
6903
6916
  };
@@ -6923,7 +6936,12 @@ function buildAcpSessionParams(args) {
6923
6936
  args: [...launchSpec.args]
6924
6937
  },
6925
6938
  ...args.dialectId === void 0 ? {} : { dialectId: args.dialectId },
6926
- ...buildAcpModelSelectionParam(launchSpec, options),
6939
+ ...buildAcpModelSelectionParam(
6940
+ launchSpec,
6941
+ options,
6942
+ args.parameterizedModelPicker
6943
+ ),
6944
+ parameterizedModelPicker: args.parameterizedModelPicker,
6927
6945
  ...launchSpec.reasoningCli !== void 0 ? { reasoningCli: launchSpec.reasoningCli } : {},
6928
6946
  ...launchSpec.nativeReasoning !== void 0 ? { nativeReasoning: launchSpec.nativeReasoning } : {},
6929
6947
  ...launchSpec.permissionCli !== void 0 ? { permissionCli: launchSpec.permissionCli } : {},
@@ -8315,6 +8333,13 @@ async function authenticateAcpAgent(args) {
8315
8333
  );
8316
8334
  }
8317
8335
  }
8336
+ function acpClientCapabilities(parameterizedModelPicker, fsAccess = false) {
8337
+ return {
8338
+ fs: { readTextFile: fsAccess, writeTextFile: fsAccess },
8339
+ terminal: false,
8340
+ ...parameterizedModelPicker === true ? { _meta: { parameterizedModelPicker: true } } : {}
8341
+ };
8342
+ }
8318
8343
  async function loadAgentModelCatalog(listCommand) {
8319
8344
  const stdout = await new Promise((resolveExec, rejectExec) => {
8320
8345
  execFile4(
@@ -8364,8 +8389,12 @@ async function loadAgentModelCatalog(listCommand) {
8364
8389
  cachedModelCatalog = { key, catalog };
8365
8390
  return catalog;
8366
8391
  }
8367
- async function loadSessionDiscoveredModels(agent) {
8368
- const key = JSON.stringify(agent);
8392
+ async function loadSessionDiscoveredModels(agent, reasoningProbePriorityModelIds, parameterizedModelPicker) {
8393
+ const key = JSON.stringify({
8394
+ agent,
8395
+ reasoningProbePriorityModelIds,
8396
+ parameterizedModelPicker
8397
+ });
8369
8398
  if (cachedSessionDiscoveredModels?.key === key && Date.now() - cachedSessionDiscoveredModels.fetchedAt < SESSION_MODEL_DISCOVERY_TTL_MS) {
8370
8399
  return cachedSessionDiscoveredModels.models;
8371
8400
  }
@@ -8406,10 +8435,7 @@ async function loadSessionDiscoveredModels(agent) {
8406
8435
  params: {
8407
8436
  protocolVersion: ACP_PROTOCOL_VERSION,
8408
8437
  clientInfo: { name: "bb", version: "1.0.0" },
8409
- clientCapabilities: {
8410
- fs: { readTextFile: false, writeTextFile: false },
8411
- terminal: false
8412
- }
8438
+ clientCapabilities: acpClientCapabilities(parameterizedModelPicker)
8413
8439
  },
8414
8440
  resultSchema: acpInitializeResultSchema
8415
8441
  });
@@ -8447,7 +8473,8 @@ async function loadSessionDiscoveredModels(agent) {
8447
8473
  const reasoningByModel = await discoverAcpNativeReasoningByModel({
8448
8474
  connection,
8449
8475
  sessionId: newSession.sessionId,
8450
- modelOption
8476
+ modelOption,
8477
+ reasoningProbePriorityModelIds
8451
8478
  });
8452
8479
  const models = reasoningByModel === null ? configOptionModels : buildModelCatalogFromConfigOptions(modelOption, reasoningByModel);
8453
8480
  cachedSessionDiscoveredModels = {
@@ -8475,6 +8502,23 @@ async function discoverAcpNativeReasoningByModel(args) {
8475
8502
  return null;
8476
8503
  }
8477
8504
  const modelOption = args.modelOption;
8505
+ const modelByValue = new Map(
8506
+ modelOptions.map((model) => [model.value, model])
8507
+ );
8508
+ const modelsToProbe = [];
8509
+ const addedModels = /* @__PURE__ */ new Set();
8510
+ for (const value of args.reasoningProbePriorityModelIds) {
8511
+ const model = modelByValue.get(value);
8512
+ if (model && !addedModels.has(model.value)) {
8513
+ modelsToProbe.push(model);
8514
+ addedModels.add(model.value);
8515
+ }
8516
+ }
8517
+ for (const model of modelOptions) {
8518
+ if (!addedModels.has(model.value)) {
8519
+ modelsToProbe.push(model);
8520
+ }
8521
+ }
8478
8522
  const supportByModel = /* @__PURE__ */ new Map();
8479
8523
  let timeout;
8480
8524
  const timeoutReached = new Promise((resolve4) => {
@@ -8486,7 +8530,7 @@ async function discoverAcpNativeReasoningByModel(args) {
8486
8530
  try {
8487
8531
  return await Promise.race([
8488
8532
  (async () => {
8489
- for (const model of modelOptions) {
8533
+ for (const model of modelsToProbe) {
8490
8534
  const configState = await args.connection.request({
8491
8535
  method: "session/set_config_option",
8492
8536
  params: {
@@ -8646,6 +8690,12 @@ async function selectAcpNativeModel(args) {
8646
8690
  modelSelection: selection,
8647
8691
  nativeReasoning: args.nativeReasoning
8648
8692
  });
8693
+ await selectAcpNativeServiceTier({
8694
+ connection: args.connection,
8695
+ sessionId: args.sessionId,
8696
+ configOptions,
8697
+ modelSelection: selection
8698
+ });
8649
8699
  }
8650
8700
  async function selectAcpNativeReasoning(args) {
8651
8701
  const reasoningLevel = args.modelSelection.reasoningLevel;
@@ -8676,6 +8726,28 @@ async function selectAcpNativeReasoning(args) {
8676
8726
  } catch {
8677
8727
  }
8678
8728
  }
8729
+ async function selectAcpNativeServiceTier(args) {
8730
+ const serviceTier = args.modelSelection.serviceTier;
8731
+ if (serviceTier === void 0) {
8732
+ return;
8733
+ }
8734
+ const fastOption = (args.configOptions ?? []).find(
8735
+ (option) => option.id === "fast" && option.type === "select"
8736
+ );
8737
+ const value = serviceTier === "fast" ? "true" : "false";
8738
+ if (!fastOption?.options?.some((option) => option.value === value)) {
8739
+ return;
8740
+ }
8741
+ await args.connection.request({
8742
+ method: "session/set_config_option",
8743
+ params: {
8744
+ sessionId: args.sessionId,
8745
+ configId: fastOption.id,
8746
+ value
8747
+ },
8748
+ resultSchema: acpConfigStateResultSchema
8749
+ });
8750
+ }
8679
8751
  function buildPromptContentBlocks(session, input) {
8680
8752
  const blocks = [];
8681
8753
  const instructions = session.pendingInstructions;
@@ -9041,10 +9113,10 @@ async function startAgentSession(request) {
9041
9113
  params: {
9042
9114
  protocolVersion: ACP_PROTOCOL_VERSION,
9043
9115
  clientInfo: { name: "bb", version: "1.0.0" },
9044
- clientCapabilities: {
9045
- fs: { readTextFile: true, writeTextFile: true },
9046
- terminal: false
9047
- }
9116
+ clientCapabilities: acpClientCapabilities(
9117
+ params.parameterizedModelPicker,
9118
+ true
9119
+ )
9048
9120
  },
9049
9121
  resultSchema: acpInitializeResultSchema
9050
9122
  });
@@ -9514,15 +9586,22 @@ async function handleModelList(id, params) {
9514
9586
  );
9515
9587
  return;
9516
9588
  }
9517
- const sessionDiscoveredModels = params.listCommand === void 0 && params.agent ? await loadSessionDiscoveredModels(params.agent) : null;
9589
+ const sessionDiscoveredModels = params.listCommand === void 0 && params.agent ? await loadSessionDiscoveredModels(
9590
+ params.agent,
9591
+ params.reasoningProbePriorityModelIds,
9592
+ params.parameterizedModelPicker
9593
+ ) : null;
9518
9594
  if (sessionDiscoveredModels) {
9519
- sendResult(id, {
9520
- models: applyConfiguredReasoningToModels(sessionDiscoveredModels, {
9521
- reasoningCli: params.reasoningCli,
9522
- nativeReasoning: params.nativeReasoning
9523
- }),
9524
- selectedOnlyModels: []
9525
- });
9595
+ sendResult(
9596
+ id,
9597
+ splitPrimaryModels(
9598
+ applyConfiguredReasoningToModels(sessionDiscoveredModels, {
9599
+ reasoningCli: params.reasoningCli,
9600
+ nativeReasoning: params.nativeReasoning
9601
+ }),
9602
+ params.primaryModels
9603
+ )
9604
+ );
9526
9605
  return;
9527
9606
  }
9528
9607
  sendResult(id, {
@@ -9554,8 +9633,24 @@ var acpProviderOptionsSchema = z39.object({
9554
9633
  * the provider, so a third-party registration of a known agent gets the
9555
9634
  * same reporting fidelity a first-party one does.
9556
9635
  */
9557
- acpDialect: z39.string().min(1).optional()
9636
+ acpDialect: z39.string().min(1).optional(),
9637
+ /** Enables an agent's separate model configuration options. */
9638
+ parameterizedModelPicker: z39.boolean().optional(),
9639
+ /** Bare model ids shown before the collapsed "More models" pool. */
9640
+ primaryModels: z39.array(z39.string().min(1)).optional(),
9641
+ /** Model ids to probe first during bounded native discovery. */
9642
+ reasoningProbePriorityModelIds: z39.array(z39.string().min(1)).optional()
9558
9643
  }).passthrough();
9644
+ function decodeAcpModelPickerOptions(providerOptions) {
9645
+ const parsed = acpProviderOptionsSchema.parse(providerOptions ?? {});
9646
+ return {
9647
+ parameterizedModelPicker: parsed.parameterizedModelPicker === true,
9648
+ ...parsed.primaryModels === void 0 ? {} : { primaryModels: [...parsed.primaryModels] },
9649
+ reasoningProbePriorityModelIds: [
9650
+ ...parsed.reasoningProbePriorityModelIds ?? []
9651
+ ]
9652
+ };
9653
+ }
9559
9654
  function decodeAdditionalWorkspaceWriteRoots(providerOptions) {
9560
9655
  return acpProviderOptionsSchema.parse(providerOptions ?? {}).additionalWorkspaceWriteRoots ?? [];
9561
9656
  }
@@ -9597,14 +9692,19 @@ async function handleRequest2(request) {
9597
9692
  };
9598
9693
  sendResult(request.id, result);
9599
9694
  return;
9600
- case "model/list":
9695
+ case "model/list": {
9696
+ const modelPicker = decodeAcpModelPickerOptions(
9697
+ request.params.providerOptions
9698
+ );
9601
9699
  await handleModelList(
9602
9700
  request.id,
9603
9701
  buildAcpModelListParams(
9604
- decodeLaunchSpec(request.params.providerOptions)
9702
+ decodeLaunchSpec(request.params.providerOptions),
9703
+ modelPicker
9605
9704
  )
9606
9705
  );
9607
9706
  return;
9707
+ }
9608
9708
  case "provider/health": {
9609
9709
  const launchSpec = decodeLaunchSpec(request.params.providerOptions);
9610
9710
  sendResult(
@@ -9683,6 +9783,9 @@ async function handleRequest2(request) {
9683
9783
  );
9684
9784
  return;
9685
9785
  }
9786
+ const modelPicker = decodeAcpModelPickerOptions(
9787
+ params.options.providerOptions
9788
+ );
9686
9789
  const sessionParams = buildAcpSessionParams({
9687
9790
  additionalWorkspaceWriteRoots: decodeAdditionalWorkspaceWriteRoots(
9688
9791
  params.options.providerOptions
@@ -9694,6 +9797,7 @@ async function handleRequest2(request) {
9694
9797
  ...params.options,
9695
9798
  skillRoots: configuredSkillRoots ?? void 0
9696
9799
  },
9800
+ parameterizedModelPicker: modelPicker.parameterizedModelPicker,
9697
9801
  launchSpec,
9698
9802
  providerLabel: launchSpec.displayName,
9699
9803
  threadId: params.threadId
@@ -37,16 +37,23 @@ function parseNamespacedGlyph(glyph) {
37
37
  // ../domain/src/plugin-cli.ts
38
38
  var RESERVED_BB_CLI_COMMANDS = [
39
39
  "environment",
40
+ "file",
40
41
  "guide",
41
42
  "help",
43
+ "machine",
42
44
  "manager",
45
+ "marketplace",
43
46
  "plugin",
44
47
  "project",
45
48
  "provider",
49
+ "settings",
46
50
  "skill",
47
51
  "status",
52
+ "terminal",
48
53
  "theme",
49
- "thread"
54
+ "thread",
55
+ "updates",
56
+ "voice"
50
57
  ];
51
58
 
52
59
  // ../domain/src/provider-fork.ts
@@ -265,6 +272,10 @@ var providerNativeRootSetSchema = z2.object({
265
272
  var PLUGIN_CLI_OUTPUT_MAX_BYTES = 1024 * 1024;
266
273
 
267
274
  // src/internal/host-policy.ts
275
+ function pluginCliCollisionWarning(pluginId, commandName) {
276
+ if (!RESERVED_BB_CLI_COMMANDS.includes(commandName)) return null;
277
+ return `CLI command "${commandName}" collides with core command "bb ${commandName}"; core keeps the short form. Use "bb plugin run ${pluginId}" to invoke this plugin.`;
278
+ }
268
279
  var RESERVED_AGENT_TOOL_NAMES = [
269
280
  "update_environment_directory"
270
281
  ];
@@ -2265,11 +2276,6 @@ function createFakePluginHostInternal(options, sharedState) {
2265
2276
  `invalid cli command name ${JSON.stringify(name)} \u2014 use lowercase letters, digits, and "-"`
2266
2277
  );
2267
2278
  }
2268
- if (RESERVED_BB_CLI_COMMANDS.includes(name)) {
2269
- throw new Error(
2270
- `cli command name "${name}" is reserved by the bb CLI \u2014 pick another name`
2271
- );
2272
- }
2273
2279
  if (typeof registration.summary !== "string" || registration.summary.trim().length === 0) {
2274
2280
  throw new Error(`cli command "${name}" must provide a summary`);
2275
2281
  }
@@ -2300,6 +2306,8 @@ function createFakePluginHostInternal(options, sharedState) {
2300
2306
  commands: validatedCommands,
2301
2307
  run: registration.run.bind(registration)
2302
2308
  };
2309
+ const warning = pluginCliCollisionWarning(pluginId, name);
2310
+ if (warning) emitLog("warn", warning);
2303
2311
  }
2304
2312
  };
2305
2313
  const agentTools = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@get-bb/plugin-sdk",
3
- "version": "0.4.17",
3
+ "version": "0.4.18",
4
4
  "homepage": "https://github.com/get-bb/bb#readme",
5
5
  "bugs": {
6
6
  "url": "https://github.com/get-bb/bb/issues"