@get-bb/plugin-sdk 0.4.17 → 0.4.20

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,