Versions in this module Expand all Collapse all v0 v0.3.2 Nov 21, 2026 v0.3.1 Nov 21, 2026 Changes in this version + const GitHubRouting + var HoldEvery = 2 * time.Minute + var HoldGrace = time.Minute + var HoldWait = 5 * time.Second + var RequestsEvery = 10 * time.Second + var StillEvery = time.Minute type Authority + func (a *Authority) GitHub(view json.RawMessage) + func (a *Authority) Person() bool type Broker + func (b *Broker) Reroute() type Device + Changed func() type GitSession + Client string + GitHub func() bool + type Holds struct + func NewHolds(post func(target string, open bool) (bool, error)) *Holds + func (h *Holds) Changed() + func (h *Holds) Dial(target string) (<-chan struct{}, func()) + func (h *Holds) Run(ctx context.Context) v0.3.0 Nov 20, 2026 Changes in this version + type Approval struct + State string + Team struct{ ... } type Authority + func (a *Authority) Approval() *Approval type Opener + Approval func() *Approval v0.2.34 Nov 19, 2026 v0.2.33 Nov 19, 2026 v0.2.32 Nov 19, 2026 v0.2.31 Nov 18, 2026 Changes in this version + const ProofsKey + var CloudClient = &http.Client + var CoreRead = 10 * time.Minute + var ErrDeviceChanged = errors.New("native: this computer moved to another device") + var ErrNoAuthority = errors.New("native: this device has no Code authority") + var ErrOffline = errors.New("native: this computer is disconnected from Open Machine") + var ErrUnavailable = errors.New("native: Cloud is unavailable; existing Code sessions only") + var ErrUnreachable = errors.New("offline or unreachable") + var HardwareID = func() func(dir string) (string, error) { ... }() + var JoinTimeout = time.Minute + var MaxDaemonLog int64 = 1 << 20 + var StartMove = func(secret string) bool + var StartUpdate = func() bool + func App(pid int, process func(pid int) (parent int, name string, args []string)) string + func AutoUpdate(ctx context.Context, state string, refused <-chan struct{}, open func() bool, ...) + func Clean(s string) string + func CloudTransport(dial func(ctx context.Context, network, addr string) (net.Conn, error), ...) *http.Transport + func GitCredential(args []string, stdin io.Reader, stdout, stderr io.Writer) int + func GitHub(args []string, stdout, stderr io.Writer) int + func Include(home, dir string) error + func LogDiscarded(dir string) + func PeerUID(proc []byte, peer, local netip.AddrPort) (uint32, bool) + func PinnedClient(pin string, timeout time.Duration) *http.Client + func Probe(addr netip.AddrPort) (web bool, title string, again bool) + func ProcNet(b []byte) map[string]netip.AddrPort + func Proxy(state, host string, stdin io.Reader, stdout io.Writer) error + func ReadApp(r *bufio.Reader) string + func RedactNetwork(line, home, authKey string) string + func Run(ctx context.Context, core Core) error + func SendsScript(line string) bool + func ServeModels(ch io.ReadWriter, list []Service, forwarded func(port int)) + func Sign(key ed25519.PrivateKey, origin, method, path, challengeID, challenge string, ...) string + func StateDir(home string) string + type Authority struct + func NewAuthority(origin, deviceID string, key ed25519.PrivateKey, d Device, log *Log, ...) *Authority + func (a *Authority) Core(v string, policies map[string]string) + func (a *Authority) Current() *Lease + func (a *Authority) Devices() []ViewDevice + func (a *Authority) Joining(reason string) + func (a *Authority) Listening() + func (a *Authority) Recheck() error + func (a *Authority) Refused() <-chan struct{} + func (a *Authority) Run(ctx context.Context) + func (a *Authority) Services(list []Service) + func (a *Authority) Status() string + func (a *Authority) View() ([]byte, <-chan struct{}) + func (a *Authority) Wait(ctx context.Context) (*Lease, error) + type Broker struct + Pin string + URL string + func NewBroker(origin, deviceID string, key ed25519.PrivateKey, client *http.Client, ...) (*Broker, error) + func (b *Broker) Close() error + func (b *Broker) Environment(capability, client string) map[string]string + func (b *Broker) Open(s GitSession) (string, func()) + func (b *Broker) ServeHTTP(w http.ResponseWriter, r *http.Request) + type CommandRule struct + Match []Pattern + Note string + Paths []string + Title string + type Core struct + Args []string + Home string + Python string + func (c Core) Folders(request []byte) (json.RawMessage, error) + type Device interface + Admission func() error + Apply func(l Lease) + Folders func(l Lease) *Refusal + Move func(secret string) bool + Update func() bool + type Discovery struct + func (d *Discovery) Pass(ls []Listener) []Service + type FileRule struct + Level string + Note string + Paths []string + Title string + type GitSession struct + Done <-chan struct{} + Live func() error + Mode string + PolicyRevision int64 + Source string + SourceGrantRevision int64 + TargetGrant string + TargetGrantRevision int64 + Visit string + type Host struct + Aliases []string + DeviceID string + Key string + NodeKey string + User string + type Identity struct + DeviceID string + Key ed25519.PrivateKey + Origin string + PrincipalID string + func ReadIdentity(dir string) (*Identity, error) + func (id *Identity) Admission() error + type Lease struct + Epoch int64 + Hosts []Host + Revision string + Sources []Source + Target *Target + type Listener struct + Addr netip.AddrPort + Exe string + Name string + PID int + func Listed(ls []Listener, first, last int) []Listener + func Lsof(b []byte) []Listener + type Local struct + func NewLocal(o Opener, deviceID, port string) *Local + func (l *Local) Serve(ctx context.Context, port string) + func (l *Local) ServeHTTP(w http.ResponseWriter, r *http.Request) + type Lock struct + Allow [][]string + Note string + Title string + type Log struct + func OpenLog(dir, device string, key ed25519.PrivateKey) *Log + func (l *Log) Close(reason string, lease *Lease) + func (l *Log) Enter(lease *Lease, s Source, app string) *Visit + func (l *Log) Expire(now time.Time) + func (l *Log) Frame() (*LogFrame, <-chan struct{}) + func (l *Log) Logged(queue string, through int64) + func (l *Log) Refuse(source, app, reason, message string) + func (l *Log) Start() + type LogFrame struct + From int64 + Queue string + Records []json.RawMessage + Type string + type Model struct + Chat bool + ID string + type Opener interface + Devices func() []ViewDevice + Dial func(alias, app string) (net.Conn, error) + Key func() ([]byte, error) + Lease func() (*Lease, error) + Pages func() ([]Page, error) + SavePages func([]Page) error + Services func() []Service + type Page struct + Page string + Port int + type Pattern struct + Into []string + Not bool + W [][]string + type Record struct + Access string + App string + At string + Command string + Cut int + Device string + Error string + Exit *int + Folder string + Grant int64 + Host string + Kind string + Last string + Message string + N int64 + Policy int64 + Port int + Queue string + Reason string + Rule string + Script string + Session string + Sig string + Signal string + Source string + SourceGrant int64 + Stage string + Terminal int + Type string + Version string + Visit string + func (r Record) Sign(key ed25519.PrivateKey) string + type Refusal struct + Code string + Index int + type Rules struct + Commands []CommandRule + Copies []string + Files []FileRule + Foot string + Head string + Lock *Lock + Uses []Pattern + Writes []Pattern + func (r *Rules) Check(kind, line, home string) *Stop + type Service struct + Addr netip.AddrPort + Models []Model + Name string + Port int + Web bool + type Source struct + Allow []string + DeviceID string + GrantRevision int64 + Home string + Limit string + NodeKey string + type Stop struct + Lock bool + Message string + Rule string + func (s *Stop) Error() string + type Target struct + GrantID string + GrantRevision int64 + Policy json.RawMessage + Record json.RawMessage + Rules *Rules + type ViewDevice struct + Alias *string + CoreVersion *string + DeviceID string + LastSeenAt *int64 + Mode *string + Name string + State string + Team ... + type Visit struct + func (v *Visit) ID() string + func (v *Visit) Leave() + func (v *Visit) Notice(kind, text string) string + func (v *Visit) Refuse(stage, reason, message string) + func (v *Visit) Write(r Record) error