Skip to content

Implement BrowserAutomationReceipt and visible automation session controls #25

@mdheller

Description

@mdheller

Parent spec

SourceOS-Linux/sourceos-spec#99

Intent

BearBrowser must make browser automation explicit, user-visible, revocable, and receipt-backed. The log lesson behind this issue is that native automation transports can exist below the UI unless we force every automation session to have a visible owner, permission scope, transport state, and revocation path.

Required behavior

When any browser automation transport starts, BearBrowser must create or update a BrowserAutomationReceipt-compatible record with:

  • stable receipt id: urn:srcos:receipt:browser-automation:<local-id>
  • sessionRef
  • ownerRef
  • transport: native_pipe, cdp, webdriver, extension, or accessibility
  • permission scope, e.g. read_dom, click, type, download, upload, inspect_network, inspect_cookies, use_credentials
  • origin: local, remote, or workspace
  • userVisible: true
  • revocable: true
  • policyDecisionRef
  • evidenceRefs
  • capturedAt

UI requirements

Add a visible automation session surface that shows:

  1. which agent/plugin/workspace owns the session
  2. active transport
  3. controlled tab/window/page scope
  4. granted permissions
  5. local/remote/workspace origin
  6. evidence receipt id
  7. one-click revoke/kill control

Runtime requirements

  • No automation session may run without an owner.
  • No automation session may run without a policy decision.
  • Revocation must terminate the transport and invalidate the session token/pipe/bridge.
  • Orphaned browser automation events must be rejected or quarantined, not silently accepted.
  • Logs should emit compact receipt references, not raw high-leakage topology unless debug mode is explicitly enabled.

Acceptance criteria

  • A fixture/example BrowserAutomationReceipt exists and validates against sourceos-spec once the schema lands.
  • Starting an automation transport produces a receipt.
  • Revoking an automation transport updates or closes the receipt with a terminal state.
  • UI shows session ownership and revocation status.
  • Tests cover at least: successful local automation, denied policy decision, missing owner, revoked session, orphan event.

Notes

This should align with SourceOS receipt conventions and not create a parallel browser governance stack.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions