Documentation
¶
Overview ¶
Package workspace is the agent's /workspace on a turn: the tree of mounts the host chose (package vfs), and what the harness gets from it. That is the read and write tools, index_file and unindex into the brain, the skills directory, and a place to keep results trimmed from the window.
The harness core does not import this package. A Linux worker host wires it in (worker.Config.Workspace); a host without one has no workspace.
Index ¶
Constants ¶
const DefaultSkillsPath = mount.WorkspacePoint + "/skills"
DefaultSkillsPath is where skills load from when Config.SkillsPath is empty.
Variables ¶
This section is empty.
Functions ¶
func IndexTools ¶
func IndexTools(ix *vfsindex.MountIndexer) []*tacklr.Tool
IndexTools are index_file and unindex, which put workspace files into the brain through ix and take them out.
func Overflow ¶
Overflow keeps trimmed results under dir, a directory on a writable mount of ms, where the agent reads them with read.
func Skills ¶
func Skills(ms *vfs.MountSession, dir string) skills.SkillLoader
Skills loads one skill per directory under dir on ms (empty: DefaultSkillsPath). A missing directory has no skills.
Types ¶
type Config ¶
type Config struct {
// Open builds the turn's tree. Nil: no workspace.
Open vfs.OpenVFS
// SkillsPath is the workspace directory the agent's skills load from
// when the agent has no SkillsLoader. Empty is DefaultSkillsPath.
SkillsPath string
// OverflowPath is a directory on a writable mount (for example an
// object-storage mount) that keeps the full text of results trimmed
// from the window, at <OverflowPath>/<session>/<call id>.txt. Empty:
// the full text is not kept.
OverflowPath string
// IndexReaders resolves a file's source ACL when index_file indexes it
// (see vfsindex.MountIndexer.Readers). Nil indexes files visible to the
// whole SearchNamespace.
IndexReaders vfsindex.ReadersFunc
}
Config is an agent's workspace.
func (Config) Bind ¶
func (c Config) Bind(opts tacklr.AgentOptions, ms *vfs.MountSession) (tacklr.AgentOptions, error)
Bind returns opts for a turn whose workspace is ms: its Tools, its IndexTools when opts has a Brain, its skills directory unless opts has a SkillsLoader, and its Overflow when OverflowPath is set.