Documentation
¶
Overview ¶
The browser tools: browser_exec runs the model's Python against a real browser, browser_cdp and browser_dialog reach a browser attached over DevTools, browser_vault fills what the user saved into the page
Index ¶
- Constants
- func Browsers() []string
- func CloseProfile(cfg *config.Config, browser string) (bool, string)
- func Opaque(method string, result any, keep func(data string) any) any
- func SharedState() string
- type BadAddress
- type Browser
- func (b *Browser) Attach(ctx context.Context, cfg *config.Config, endpoint, shown string)
- func (b *Browser) CloseProfile(cfg *config.Config, name string) (bool, string)
- func (b *Browser) Connect(ctx context.Context, cfg *config.Config, address string, ...) (bool, string, error)
- func (b *Browser) Disconnect(ctx context.Context, cfg *config.Config) (string, bool, error)
- func (b *Browser) Endpoint(cfg *config.Config) string
- func (b *Browser) Holder(cfg *config.Config) string
- func (b *Browser) Installed(cfg *config.Config) []Installed
- func (b *Browser) Launcher() browser.Registrant
- func (b *Browser) Reap() int
- func (b *Browser) Shown(cfg *config.Config) string
- func (b *Browser) Trial(ctx context.Context, cfg *config.Config) (time.Duration, error)
- type Capture
- type Installed
- type OwnProfile
Constants ¶
const ( // Debugging port of a browser started for /browser connect DefaultPort = 9222 DefaultURL = "http://127.0.0.1:9222" )
const ( Exec = "browser_exec" CDP = "browser_cdp" Dialog = "browser_dialog" Vault = "browser_vault" )
Names of the browser tools, which the views of the chat name too
Variables ¶
This section is empty.
Functions ¶
func Browsers ¶
func Browsers() []string
Keys of the browsers whose profile can be used, for the close-profile flag
func CloseProfile ¶
Ends the browser holding the profile of the browser given, else of the default one, as Close in /browser does
func Opaque ¶
Result of the method with the base64 it carries at its declared paths given to keep in its place, such as its size, for a person who can't read it
func SharedState ¶
func SharedState() string
Folder of the launcher state of the shared profiles of this user, which every icebath of the computer shares and which outlives them
Types ¶
type BadAddress ¶
type BadAddress struct{ Message string }
Error of an address /browser connect refuses, for the person to fix
func (*BadAddress) Error ¶
func (e *BadAddress) Error() string
type Browser ¶
type Browser struct {
// contains filtered or unexported fields
}
The browser host of the plugin: what /browser and `icebath browser` reach
func (*Browser) Attach ¶
Attaches the profile's browser tools to the endpoint, an empty one detaching them; the profile's browsers closed on each side of the change. Shown is the endpoint as a person is shown it, the endpoint itself for none
func (*Browser) CloseProfile ¶
Ends the browser holding the user's own profile, that of the browser named or else of the default one
func (*Browser) Connect ¶
func (b *Browser) Connect(ctx context.Context, cfg *config.Config, address string, say func(message, level string)) (bool, string, error)
Checks, reaches or launches the browser at the address and attaches the profile's browser tools to it, telling each step; whether they are attached and the endpoint, or the one tried when no browser answered
func (*Browser) Disconnect ¶
Detaches the profile's browser tools from the browser they were attached to and forgets its address, answering what happened; held when an environment variable still names an address, which wins
func (*Browser) Holder ¶
Environment variable that names the address of the browser over the settings, empty when none does
func (*Browser) Installed ¶
Every Chromium browser installed on this computer that the profile's browser starts, by its name and its program
func (*Browser) Launcher ¶
func (b *Browser) Launcher() browser.Registrant
The launcher as the browser host takes it, for the plugin to register
func (*Browser) Reap ¶
Stops the Chromium of owners that are gone, of the profiles this icebath serves and of every shared profile, reclaiming their throwaway folders: how many it stopped
func (*Browser) Shown ¶
Endpoint the profile drives over DevTools as a person is shown it, empty when none is attached: the one attached as it was given, else browser.cdp_url as the settings write it, every ${NAME} kept rather than the value of the variable it names
type Capture ¶
type Capture struct {
Title, Path string
}
A file a program the browser tools start for a profile writes its output to, which outlives icebath
type Installed ¶
type Installed struct {
Title, Path, Key string
}
A browser installed on this computer: its name, its program, and the key CloseProfile takes for it
type OwnProfile ¶
type OwnProfile struct {
// Folder inside the browser's data, such as Default or Profile 2, and the name the browser shows for it
Folder, Name string
// The one the browser used last
Last bool
}
A profile of the browser your own profile is copied from
func OwnProfiles ¶
func OwnProfiles() (string, []OwnProfile)
Title of the default browser and its profiles, those its Local State names that are there; no title for a default icebath knows not. The default is the one found at most glanceFor ago