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

host

package
v0.17.6 Latest Latest
Warning

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

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

Documentation

Overview

Package host bundles the ports through which the portable core reaches a platform (DECISIONS.md P10). A platform supplies a Host; the core derives its settings, credentials, model catalogs and session journals from it instead of the process environment, home directory or disk.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document added in v0.11.0

type Document = document.Document

Document updates must commit before returning; nil deletes the document.

type Host

type Host struct {
	// AgentDir is the global configuration root in the host's path namespace.
	AgentDir string
	// FS is the file port for tools, resources and session journals.
	FS harness.FileSystem
	// Exec runs processes; nil on platforms that cannot, which omits process tools.
	Exec harness.Shell
	// Store holds settings, credentials and model catalogs.
	Store Store
	// Env supplies ambient provider credentials and file probes; nil uses the
	// process environment.
	Env aiauth.AuthContext
	// Sessions persists session journals; nil keeps JSONL journals on FS under
	// AgentDir/sessions, the upstream harness layout.
	Sessions harness.SessionRepo
}

func (*Host) Document

func (h *Host) Document(name string) Document

Document returns the named kernel document under AgentDir, keyed like the native store so one backend can serve both. A rooted POSIX AgentDir that is not native (a virtual host's tree on win32) keeps its slash-separated keys.

func (*Host) SessionRepo

func (h *Host) SessionRepo() harness.SessionRepo

SessionRepo returns Sessions or the FS-backed JSONL repository.

type Store

type Store interface {
	Document(path string) Document
}

Store is the durable-document port. Paths are the kernel file locations (for example AgentDir/settings.json); backends may map them to files, rows or object keys.

Jump to

Keyboard shortcuts

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