Documentation
¶
Overview ¶
Package agentcapabilities owns the packaged Runtime's inert installation data.
Index ¶
- Constants
- Variables
- func Finalize(installed *os.Root, input Input, identity Identity, resolve DirectoryResolver) error
- func InstallPlugin(root *os.Root, slot int, archive []byte, metadata agentplugin.Metadata) error
- func InstallSkill(root *os.Root, archive []byte, metadata agentskill.Metadata) error
- func ReadTree(root *os.Root, name string, immutable bool) ([]agentbundle.File, error)
- func Rebind(installed *os.Root, manifest *Manifest, input Input, identity Identity) error
- func ValidateDirectories(directories []string) error
- func ValidateInput(input Input) error
- func ValidateLocalDirectories(directories []string) error
- func ValidateSelection(manifest Manifest, input Input, identity Identity) error
- func ValidateSourceDirectories(directories []string) error
- type DirectoryResolver
- type Identity
- type Input
- type InstalledMCP
- type InstalledSkill
- type Manifest
Constants ¶
const Directory = "/environment/initialization/capabilities"
const ManifestName = "installed.json"
const MaxSkills = 50
const MaxSnapshotBytes = 50 << 20
Variables ¶
var ErrInvalid = errors.New("capability installation unavailable or unsupported")
Functions ¶
func Finalize ¶
Finalize captures declared directories once after setup and binds the snapshot. It emits an installation artifact, not another lifecycle or public catalog.
func InstallPlugin ¶
func InstallSkill ¶
func ReadTree ¶
ReadTree stays inside an already-owned root and rejects aliases/special files. Installation sources may be writable; retained snapshots must be read-only.
func Rebind ¶ added in v0.0.13
Rebind gives an installation restored from an earlier preparation the identity of this Session. The earlier preparation must have had the identical selection.
func ValidateDirectories ¶
ValidateDirectories preserves the managed public workspace-path contract.
func ValidateInput ¶
ValidateInput bounds source selections without reading archives or directories. Portable manifest grammar is checked by the shared Skill and Plugin parsers.
func ValidateLocalDirectories ¶
ValidateLocalDirectories checks source spelling, not local access authority. Runtime requires canonical paths for its own operating system. The resolver owns directory access and protected-root exclusions.
func ValidateSelection ¶
ValidateSelection checks reconnect configuration without revisiting sources. Use it only with a manifest returned by Load.
func ValidateSourceDirectories ¶
ValidateSourceDirectories checks portable absolute source addresses without interpreting them on the Core host. Runtime authorizes and opens local paths.
Types ¶
type DirectoryResolver ¶
DirectoryResolver opens a declared source after local authorization and path checks. Finalize owns and closes each returned root; callers retain no handle.
type Identity ¶
type Identity struct {
EnvironmentID string `json:"environment_id"`
SessionID string `json:"session_id"`
}
Identity binds an installation to one immutable Environment and Session.
type Input ¶
type Input struct {
Skills []agentskill.Metadata `json:"skills,omitempty"`
Plugins []agentplugin.Metadata `json:"plugins,omitempty"`
Directories []string `json:"directories,omitempty"`
}
Input describes frozen sources; directory contents are observed after setup.
type InstalledMCP ¶
type InstalledMCP struct {
PackageRoot string
Server agentplugin.MCPServer
}
InstalledMCP is resolved from a frozen package at load time. The manifest stores the package root, not a second copy of configuration or credentials.
type InstalledSkill ¶
type InstalledSkill struct {
// InstallationRoot is resolved by Runtime and never persisted or accepted over wire.
InstallationRoot string `json:"-"`
Metadata agentskill.Metadata `json:"metadata"`
RelativeRoot string `json:"relative_root"`
PackageRoot string `json:"package_root"`
}
InstalledSkill contains Runtime-owned paths, never public resource metadata.
type Manifest ¶
type Manifest struct {
Identity Identity `json:"identity"`
SelectionSHA256 string `json:"selection_sha256"`
Version int `json:"version"`
Skills []InstalledSkill `json:"skills"`
Plugins []string `json:"plugins,omitempty"`
MCP []InstalledMCP `json:"-"`
}