browserbinding

package
v1.5.105 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package browserbinding owns a conversation's browser selection. It contains identity and presentation state, never operator credentials or permission to control a browser. The browser host owns the foreground tab within that view.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SocketKey

func SocketKey(path string) string

Types

type Binding

type Binding struct {
	// contains filtered or unexported fields
}

func New

func New(session string) *Binding

func (*Binding) Clear

func (b *Binding) Clear(expected Snapshot)

func (*Binding) Present

func (b *Binding) Present(expected Snapshot)

Present and Clear are compare-and-swap operations: a late completion from a previous browser cannot reveal or clear a newer binding.

func (*Binding) Restore

func (b *Binding) Restore(endpoint Endpoint)

Restore adopts an unambiguous existing view only on first discovery. A cleared/closed selection must never silently fall through to another view.

func (*Binding) Select

func (b *Binding) Select(endpoint Endpoint)

Select is used by both the trusted GUI and Agent's admitted open/attach path.

func (*Binding) Snapshot

func (b *Binding) Snapshot() Snapshot

type Endpoint

type Endpoint struct {
	Socket    string
	BrowserID string
}

type Snapshot

type Snapshot struct {
	SessionID string
	Endpoint  Endpoint
	Revision  uint64
	Reveal    uint64
	Changed   <-chan struct{}
}

Snapshot is immutable. Changed closes when a newer snapshot is available; readers always fetch the latest state rather than replaying queued events. Reveal advances only for an explicit foreground operation, not discovery or screenshots. Closing a GUI drawer therefore remains a local presentation act.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL