Documentation
¶
Overview ¶
Package browserbridge contains Redeven's local Chrome Native Messaging wire. It carries closed product commands; it never authorizes or evaluates scripts.
Index ¶
- Constants
- func Forward(ctx context.Context, socket, origin string, input io.Reader, output io.Writer) error
- func ReadMessage(reader io.Reader, limit uint32) (json.RawMessage, error)
- func RemoteProfileID(state, owner, installationID string) string
- func WriteMessage(writer io.Writer, value any, limit uint32) error
- type Diagnostic
- type Installation
- type RemoteProfile
Constants ¶
const ExtensionID = "mgfbpkkmocckooenpdfpefknffjanjce"
ExtensionID binds native messaging to the packaged Flower extension key.
const MaxMessageBytes = 24 << 20
const ProtocolVersion = 9
Variables ¶
This section is empty.
Functions ¶
func Forward ¶
Forward is a local byte relay. Chrome starts it from a manifest whose sole allowed origin is the packaged extension. No HTTP port or remote routing is involved; the Runtime owns the private Unix socket and every target grant.
func ReadMessage ¶
func RemoteProfileID ¶
Types ¶
type Diagnostic ¶
type Diagnostic struct {
Stage string `json:"stage"`
Reason string `json:"reason"`
DiagnosticID string `json:"diagnostic_id,omitempty"`
}
Diagnostic exposes stable recovery facts without platform error output.
type Installation ¶
type Installation struct {
ID string `json:"id"`
Kind string `json:"kind"`
Name string `json:"name"`
Installed bool `json:"installed"`
Prepared bool `json:"prepared"`
Connected bool `json:"connected"`
Reason string `json:"reason,omitempty"`
Diagnostic *Diagnostic `json:"diagnostic,omitempty"`
Executable string `json:"-"`
ManifestDirectory string `json:"-"`
PrivateRoot string `json:"-"`
}
Installation is a host-discovered browser, never a caller-selected path. Platform differences stop at launch and Native Messaging file placement.
func Installations ¶
func Installations() ([]Installation, error)
func ResolveInstallation ¶
func ResolveInstallation(id string) (Installation, error)
type RemoteProfile ¶
RemoteProfile describes product-owned browser data for a private graphical application. The host-application service remains its sole process/display owner. These paths and arguments are never accepted from a browser client.
func PrepareRemoteProfile ¶
func PrepareRemoteProfile(state, owner string, installation Installation, nativeHost string) (RemoteProfile, error)
PrepareRemoteProfile never reads a personal profile. Only the existing Runtime registration is installed into this separate browser's data root. Repeated preparation preserves cookies, site storage and extension consent.