Repository navigation
Description
Consolidated scope
This is the parent tracker for host-verified operator authorization available to plugin invocation contexts. #1564 is the concrete consumer: approval bound to an exact destructive tool invocation.
- Supply a verifiable operator principal and request-bound, expiring authorization evidence with consistent semantics across CLI, RPC, HTTP, and agent-tool invocation.
- Plugins need a trustworthy human-origin signal for gating destructive agent tools #1564 — Bind a human approval to the interaction, exact tool/arguments/target, and current invocation; reject replay, changed arguments, and self-issued evidence. Transport class alone must not be treated as proof of human approval.
- Document what the host actually authenticates and the trust boundary; caller-supplied IDs or a local shared secret do not prove operator presence.
#1692 is closed as withdrawn following its author's withdrawal. Its historical observations are retained there; its former consuming project's authority stack is no longer an active dependency. #1564 remains a separate motivating use case. The platform observations below refer to the reported versions and were not reverified by this consolidation.
Problem
Full-trust BB plugins cannot distinguish a verified operator invocation from a local CLI call, plugin-token request, thread-attributed agent action, or unauthenticated execution. Installed BB 0.37.0 exposes request, thread, project, environment, host, provider, plugin, and machine attribution, but no BB-verified operator account subject or host-issued receipt.
Origin/Host checks are a browser boundary; a per-plugin HTTP token proves possession of the plugin secret; thread IDs, senderThreadId, originPluginId, and machine identity are attribution. None proves that the operator authorized a privileged mutation.
The original report cited pixexid/bb-collab#5 as its consumer; that historical motivation is qualified by the withdrawal noted above.
Requested capability
Add one host-issued, read-only operator receipt to plugin invocation contexts. It must be derived from a verified BB app account/session or explicitly authenticated remote session, never from request bodies, thread IDs, Origin, or plugin tokens.
Minimum semantics:
- stable operator
subjectId; - unique
requestId; issuedAtplus bounded validity;- host verification/signature, or an equivalent non-forgeable host attestation;
- identical meaning across plugin CLI, RPC, HTTP, and native agent-tool invocation;
- absent for unauthenticated callers;
- absent for schedules and lifecycle events unless BB explicitly authenticates an operator for that invocation.
The plugin should receive an already-verified claim or a host verification API; it should not receive raw account credentials.
Acceptance
- A plugin can distinguish a verified operator action from local CLI, plugin-token, thread-attributed, machine-attributed, and unauthenticated execution without trusting caller-supplied fields.
- Caller-supplied fake receipts cannot become valid.
- Missing, stale, replayed, wrong-subject, wrong-request, and wrong-host receipts fail closed.
- CLI, RPC, HTTP, and agent-tool paths share documented semantics rather than separate identity mechanisms.
- Schedules/services/events do not acquire operator authority implicitly.
- A full-trust plugin cannot mint a valid operator receipt for itself.
Installed evidence
The BB 0.37.0 plugin contracts inspected through the installed application expose:
- CLI:
argv, optionalcwd,threadId,projectId, and abort signal; - RPC: parsed input only;
- HTTP: Hono context with
local | token | noneroute auth; - agent tool:
threadId,projectId, and abort signal; - agent configuration: thread/project/environment/host/provider/origin attribution;
- services/schedules: abort signal or zero-argument callback;
- thread events: lifecycle/thread metadata and request attribution.
No inspected surface carries a verified operator account subject. Full read-only probe SHA-256: 625ef301f9f79fa2232cae50925808b4760104986b3b121b65466b63cbd5e689.
Boundaries
This asks BB to extend its existing host/plugin invocation boundary. It does not propose a plugin-owned token file, shared secret, browser-origin heuristic, credential access, second authority service, or background implicit operator.
AGENT GENERATED
Activity
[-]Expose a host-issued operator receipt to plugin invocation contexts[/-][+]Host-verified operator authorization for plugin invocations and tool approvals[/+]skillet07 commentedon Nov 6, 2026
Another concrete consumer, observed on BB 0.48.1 / plugin SDK 0.5.29.
Use case. A full-trust plugin whose page (desktop window and remote web/mobile window) performs owner-only writes over plugin RPC: closing tasks, editing records, changing statuses. Agents running in the same BB must not be able to call those writes – they should go through the plugin's own review flow instead. Read-only RPC methods stay open to agents.
What we see.
experimental_caller, but a call from the BB window andbb plugin rpc callfrom an agent thread both arrive as{ kind: "client" }.x-bb-app-surface:desktop/web/mobile/api), but it is not passed intoexperimental_caller.Our interim workaround. A per-process random key that the page fetches over a
bb.http.route(..., { auth: "local" })endpoint and attaches to write calls. As this issue already says, this is not proof of operator presence: a local process can fetch the key by sending a matchingOriginheader. It only closes the default CLI path.Smallest change that would solve our case (a subset of the receipt requested here):
experimental_callerfor RPC, e.g.{ kind: "client", surface: "desktop" | "web" | "mobile" | "cli" | "api" }, set by the host and never taken from request headers a local client can choose.callers: ["app-window"], so the host rejects CLI/agent calls before validation with a 403.Either would let us replace the workaround with one host-verified check. A full operator receipt as described above would also work.
JonniK commentedon Nov 8, 2026
Another concrete consumer: the
message.dispatchhook'sexperimental_submission(set throughcomposer.submit({ experimental_data })). Reproduced on bb 0.49.0 (desktop app, macOS); code checked atmain55135d1.Use case. A plugin lets the user run a shell command from the composer: a send-menu item and a Mod+Shift+Enter command call
composer.submit({ experimental_data: { … } }). The plugin's dispatch hook holds the message, runs the text in the thread's environment (outside the agent's permission mode), and sends the command and its output to the agent. An agent must not be able to trigger it. The SDK docs say the data reaches hooks "with the calling plugin's id", so the gate isctx.experimental_submission.pluginId === bb.pluginId, plusinitiator === "user",senderThreadId === nullandoriginPluginId === null.What we see.
pluginSubmissionis a plain, caller-supplied field of the public send request. The composer handle fills it in on the client, and the server passes it to hooks unchanged:bb/packages/server-contract/src/api/threads.ts
Line 291 in 55135d1
bb/apps/server/src/services/threads/thread-send-request.ts
Line 77 in 55135d1
bb/apps/server/src/services/threads/dispatch-hooks.ts
Line 377 in 55135d1
bb/packages/plugin-sdk/src/internal/composer-handle.ts
Line 330 in 55135d1
Repro, with no token, cookie or
Origin:Result: HTTP 200. The hook sees
experimental_submission: { pluginId: "bang-shell", … }withinitiator: "user",senderThreadId: nullandoriginPluginId: null, which is exactly what a composer submission looks like, so the command runs. An agent's shell hasBB_SERVER_URL, so a prompt-injected agent can do this with one request.bb thread tellcannot set the field, andbb.sdk.threads.sendstampsoriginPluginId, which the plugin refuses. The gate therefore closes only those two paths.I understand that access by local processes is out of scope under SECURITY.md and is tracked in #3708. This comment is about what a plugin can rely on, like the other consumers in this tracker.
Smallest change that would solve this case (a subset of this tracker):
experimental_submission.surface: "app" | "api"orverified: boolean. The server would set it only for submissions from an authenticated app session, such as the per-install secret proposed in Require local authentication on /api/v1 and the realtime socket #3708, and never from a request field or header. Or:pluginSubmissiononly from app surfaces, and strip or reject it on CLI and raw API sends.In both cases, until it ships, the JSDoc of
ComposerSubmitOptions.experimental_dataandMessageDispatchHookContext.experimental_submissionshould say that the plugin id is caller-supplied, not verified.Either change would let a plugin gate a user-only action on a single host-verified check. Until then the plugin's README states that the gate is not a boundary against local processes: https://github.com/jonnik-bb-plugins/bb-plugin-bang-shell (v0.2.0).
robert-j-evc commentedon Nov 28, 2026
Additional consumer: scoped mapping writes and thread-ledger reads
We have another plugin consumer for #1541. In the inspected bb-app 0.50.1 and @get-bb/plugin-sdk 0.6.157 packages, plugin RPC dispatch passes caller and cancellation context;
caller.kind === "client"does not establish an authenticated human identity or permission. This observation is limited to those pinned packages.Two operations remain disabled in our integration pending a supported host contract:
The required boundary is:
pluginMetadata, a transport label, or a plugin-held token. It becomes invalid after logout, disposal, reload/reconnect, or relevant permission changes.keep.mapping.writeor a supported equivalent). The plugin supplies the current server-resolvedorgId / connectionId / revision / hostId; authorization and revision comparison must cover the actual commit, including changes across an await. Stale or changed scope must leave the mapping unchanged.thread.reador its supported equivalent for that person and thread. The plugin then enforces organization, connection, revision, host and request scope. A thread ID selected in the UI grants no authority by itself.A shared installation token or a new caller-kind enum alone would not satisfy this boundary. This is separate from credential storage; it requests no account credentials. The host and its full-trust plugins remain part of the trusted computing base.
Could a maintainer confirm whether a supported API already provides this, or which extension is accepted? To integrate it, we need a named implementation owner, an issue/PR for delivery, exact compatible host and SDK versions plus their release/artifact path, and runnable conformance tests on an isolated host.
Acceptance needs a real authenticated-human positive control and denials for forged app/CLI/metadata input, wrong thread/request, logout, role/scope changes, reconnect, and stale revisions. Each authorization guard should have a bypass mutation that makes its behavioral test fail, followed by the restored positive control, with no skipped cases.
If no supported path is planned, an explicit answer and the intended trust boundary would also let us make the correct product decision.
— Robert, Entire VC
matthiasvongrundherr commentedon Nov 30, 2026
Another use case is model selection in the first message of a new conversation. On desktop 0.50.1 we observed a composer request with
source: "spawn"and its matchingturn/input/accepted. A plugin processing the accepted request later can correlate the two but cannot verify from the persisted events that the authenticated operator submitted it in the app. Thread provisioning in desktop 0.50.1.Could the supported host contract also let a plugin verify that historical attribution for one specific first request after acceptance and restart? An opaque host-verifiable reference bound to the thread, request, and submitted input would cover our use case. This is attribution for the original selection only. It should confer no authority for a subsequent action or a different request. Legacy entries with unknown provenance can remain unknown.