browserext

package
v0.1.4607 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 10 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 browserext is Magpie Browser, the browser extension through which the agents magpie serves use the user's own browser: their tabs, signed in to the sites they use (gateway/browser.go relays the calls). magpie writes it to a folder of its own, pointed at its gateway, for the user to load in chrome://extensions.

Index

Constants

View Source
const Folder = "Magpie Browser Extension"

Folder is the name of the extension's folder.

View Source
const ID = "dmlhojidlfnkgamkekjhacgkpanbkeko"

ID is the extension's ID in every Chromium browser, fixed by the public key in its manifest; the gateway takes a connection from this origin only.

View Source
const Origin = "chrome-extension://" + ID

Origin is what the extension's requests carry as Origin.

Variables

This section is empty.

Functions

func Dir added in v0.1.2864

func Dir() string

Dir is where the extension is written: in the home folder, where Finder and Explorer show it, to drag from or choose.

func File

func File(name string) ([]byte, error)

File is one of the extension's files as magpie has it.

func OldDir added in v0.1.2864

func OldDir() string

OldDir is where v0.1.2442 wrote it, a hidden folder no one could find; a browser that loaded it from there keeps it.

func Older added in v0.1.2864

func Older(a, b string) bool

Older says whether version a (0.1.3) is before b: a newer extension's folder is never written over with an older magpie's.

func Refresh added in v0.1.2864

func Refresh(gatewayURL string) bool

Refresh writes this magpie's extension over every folder an older one was written to, so a browser that reloads it gets this version. A folder never written stays unwritten. It says whether any folder has it.

func Version

func Version() string

Version is the extension's version, from its manifest.

func Write

func Write(dir, gatewayURL string) error

Write puts the extension in dir, pointed at the gateway at gatewayURL (http://127.0.0.1:3425), replacing what an older magpie wrote there. A file is written only when it changed, so a browser that has the folder loaded sees no change it has to reload for.

func Zip added in v0.1.3168

func Zip(gatewayURL, key string) ([]byte, error)

Zip is the extension as a zip of its folder, pointed at the gateway at gatewayURL and taken there with key: for a browser on another computer than magpie's, or outside the container magpie runs in, where magpie can't write the folder.

Types

This section is empty.

Jump to

Keyboard shortcuts

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