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 interface {
Read(context.Context) ([]byte, error)
Update(context.Context, func([]byte) ([]byte, error)) error
}
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 ¶
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.