agent

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package agent carries the compiled komizo-box binaries, so that installing one is something `komizo init` can do over a plain SSH connection.

EMBEDDED rather than downloaded. init already works on a box with nothing on it but sshd, and making it fetch a release URL would add a network dependency and a supply-chain step to the one operation that is supposed to work when very little else does. It is also the pattern komizo already uses for the provisioning shell -- see scripts/embed.go -- for the same reason.

The cost is the CLI's size, and one build-order constraint: the binaries have to EXIST before the CLI is compiled, because //go:embed reads the filesystem at build time and cannot invoke a compiler. `make agents` builds them; the release workflow runs it. A CLI built without that step still compiles and still does everything else -- the failure is one clear message at the moment somebody tries to install an agent, rather than a build nobody can run.

Index

Constants

This section is empty.

Variables

View Source
var Arches = []string{"amd64", "arm64"}

Arches are the architectures komizo ships an agent for.

Two, because they are what servers are. amd64 is every ordinary VPS, and arm64 is the cheap tier at most providers -- Hetzner, Oracle, AWS Graviton -- which is exactly the tier a project running its own boxes ends up on.

Functions

func ArchFor

func ArchFor(uname string) (string, bool)

ArchFor maps what `uname -m` says to what komizo builds.

The box is asked rather than assumed. komizo is pointed at other people's servers, and a laptop's architecture says nothing about theirs -- installing an amd64 binary on an arm64 box produces "not found" from the kernel, which is the single most confusing thing an exec can say.

func For

func For(arch string) ([]byte, error)

For returns the agent for one architecture.

func Stamp

func Stamp() string

Stamp is the content hash of every agent this komizo carries.

What it answers is "would running the update change anything" -- so it is over the bytes that would be installed, and it covers ALL architectures so that the same komizo produces the same stamp whatever box it is talking to. A per-architecture stamp would make two boxes disagree about whether they were up to date while running the same release.

Empty when no agent is embedded, which reads as "nothing to install" rather than as a hash of nothing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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