browsercontinuation

package
v1.5.96 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 8 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 browsercontinuation owns local, person-originated browser decisions. Request IDs are presentation handles, never bearer capabilities. This package is used by trusted frontends and is not a model-facing tool.

Index

Constants

This section is empty.

Variables

View Source
var ErrRevoked = errors.New("browser continuation authority was revoked")

Functions

func ConfirmationText

func ConfirmationText(text string) bool

func WaitingTarget

func WaitingTarget(details any) (string, uint64, bool)

WaitingTarget accepts only the structured identity emitted by the trusted browser implementation, not textual errors or arbitrary tool output.

Types

type Coordinator

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

func New

func New(session string) *Coordinator

func (*Coordinator) Close

func (c *Coordinator) Close()

func (*Coordinator) Continue

func (c *Coordinator) Continue(ctx context.Context, id string) error

Continue is callable only from the local user input path. It sends one authenticated request, then queries a receipt rather than replaying on error.

func (*Coordinator) Displayed

func (c *Coordinator) Displayed(id string)

func (*Coordinator) KeepPaused

func (c *Coordinator) KeepPaused(id string) error

func (*Coordinator) Poll

func (c *Coordinator) Poll(ctx context.Context)

func (*Coordinator) ReadyFor

func (c *Coordinator) ReadyFor(browser string, generation uint64) bool

ReadyFor closes the race where a person resumes before the run's tool-end event is delivered. It is still exact-generation state, not a reusable grant; frontends consume their run intent atomically when starting a continuation.

func (*Coordinator) Refresh

func (c *Coordinator) Refresh(ctx context.Context, id string) error

Refresh is a separate, explicit UI action, not an automatic retry. An uncertain prior request can never be replaced with a new request ID.

func (*Coordinator) Register

func (c *Coordinator) Register(key, browser, epoch, origin string, h Host)

Register is called only after the embedder has authenticated and attested a managed view. A new epoch revokes any outstanding decision for its old view.

func (*Coordinator) Session

func (c *Coordinator) Session() string

func (*Coordinator) Snapshot

func (c *Coordinator) Snapshot() []View

func (*Coordinator) TakeReady

func (c *Coordinator) TakeReady() []Ready

type Host

type Ready

type Ready struct {
	BrowserID  string
	Generation uint64
	RequestID  string
}

type View

type View struct {
	ID, BrowserID, Origin, Reason, Error string
	InstanceEpoch                        string
	Generation                           uint64
	ExpiresAt                            time.Time
	Busy, Supported, KeptPaused          bool
	NeedsRefresh, OutcomeUnknown         bool
	Displayed                            bool
	RetryAfterMS                         int64
}

Directories

Path Synopsis
Package continuationtest supplies a credential-free protocol fixture for frontend tests.
Package continuationtest supplies a credential-free protocol fixture for frontend tests.

Jump to

Keyboard shortcuts

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