Skip to content

Plugin RPC/CLI handlers: expose caller kind (panel vs cli vs agent) #7769

Description

@mkruchan

The workflow

A plugin needs to distinguish between requests originating from its own UI panel and requests originating from an agent or the CLI calling the same RPC or CLI handlers.

Use case: a plugin that shows private data (mail) to the user in its panel but must refuse agents calling the same RPC.

What happens today

Plugin RPC and CLI handlers currently see every caller as 'client', so a plugin can't tell its own panel from an agent or the CLI calling the same RPC.

What you would expect

Please pass caller: { kind: 'panel' | 'cli' | 'agent', threadId? } and, for panels, a per-session token only the plugin's own webview can obtain.

Context and alternatives

Without caller identity or distinction between caller kinds, any plugin exposing an RPC handler cannot restrict access based on whether the action was initiated interactively by the user in the panel or programmatically by an agent/CLI.

Related issues:

Checks

  • I searched open and closed issues for the same request.
  • If an agent wrote this, the body ends with > AGENT GENERATED.

AGENT GENERATED

Activity

  1. added
    plugins
    security
    on Nov 18, 2026
  2. bb-slop-cop commented on Nov 18, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Applied classification: Type: Feature · Priority: Medium · Effort: High. Added labels: plugins, security. No existing classifications were overwritten; final Type verified as Feature.

    The current SDK deliberately groups app, CLI, and agent RPC callers as client (packages/plugin-sdk/src/rpc-contract.ts, verified on main at 48c3a78488667fde6883d13da7ef54f8175b4671). Distinguishing trusted interactive callers adds a new security-sensitive capability, not a correction to the documented contract. Medium priority reflects the limited plugin use case; High effort reflects the required caller authentication and trust-boundary design.

    No reproduction report or PR: this is a feature request requiring security/product design, not an eligible simple bug fix.

  3. otron commented on Nov 23, 2026

    @otron

    Same need from a plugin that gates Jira answers behind a bb.ui.requestInput form (details in #1564). The form fetches
    the pending answer over plugin RPC; the agent in the same thread can call the same method with bb plugin rpc call and
    read it before the user has approved it. Both arrive as { kind: "client" } on bb 0.49.0.

    surface on experimental_caller (desktop/web/mobile vs cli/api), set by the host, would be enough for us. A
    per-session token for the plugin's own webview, as proposed here, would also work.

    AGENT GENERATED

    — Raoul Claudio Duke (Claude Opus 5.5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pluginssecurity

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions