Help us shape the future of Go! Take the 2026 Go Developer Survey

core

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 29 Imported by: 0

Documentation

Overview

Package core wires the agent together and runs it. Assembly and the run loop only — everything with behaviour lives in its own package.

Index

Constants

This section is empty.

Variables

View Source
var Window = handshake.Window{Min: 1, Max: 1}

Window is the protocol range this core accepts. Protocol 1 is current; the window widens when protocol 2 ships.

Functions

func Run

func Run(ctx context.Context, opts Options) error

Run starts core and blocks until ctx ends.

Types

type Options

type Options struct {
	// StateDir overrides the platform layout (dev, tests).
	StateDir string
	// ModulesDir is scanned for installed modules: one subdirectory per
	// module containing module.manifest.json and the module binary.
	// Empty means the layout's modules dir.
	ModulesDir string
	// Verifier authenticates module binaries. Nil refuses everything —
	// core fails closed until the verify milestone wires the real one.
	Verifier supervise.Verifier
	// PolicyFile is the policy set core reads and watches. Empty takes the
	// layout's default (<state>/policy.json).
	PolicyFile string
	// PolicyInterval overrides how often the policy file is checked for a
	// change (zero = policy.DefaultInterval).
	PolicyInterval time.Duration
	// ManifestURL is where the signed channel manifest bundle lives.
	ManifestURL string
	// RootPubPath loads the manifest root public key from a file (dev/
	// self-hosted); release packaging embeds it instead.
	RootPubPath string
	// ChannelPubPath is the Ed25519 public key a host must prove possession
	// of before it may drive this guest over the hypervisor channel. Empty
	// takes the platform default (transport.DefaultChannelKeyPath), which is
	// where a guest image provisions it.
	ChannelPubPath string
	// Channel selects the hypervisor channel transport: "" or "auto" probes
	// for the virtio-serial port, "virtio-serial" forces that probe,
	// "vsock:<port>" (Linux) and "hvsocket:<port>" (Windows) listen for the
	// host on a socket. Socket channels are never inferred — see
	// capability.Channel. A value core cannot honour disables the channel
	// rather than core.
	Channel string
	Log     *slog.Logger
}

Options configure a core run.

Jump to

Keyboard shortcuts

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