Documentation
¶
Overview ¶
Package agentcapabilities owns the packaged Runtime's inert installation data.
Index ¶
- Constants
- Variables
- func Finalize(installed *os.Root, input proto.CapabilitySources, identity Identity, ...) error
- func InstallPlugin(root *os.Root, slot int, archive []byte, metadata proto.PluginMetadata) error
- func InstallSkill(root *os.Root, archive []byte, metadata proto.SkillMetadata) error
- func ReadTree(root *os.Root, name string, immutable bool) ([]agentbundle.File, error)
- func Rebind(installed *os.Root, manifest *Manifest, input proto.CapabilitySources, ...) error
- func ValidateDirectories(directories []string) error
- func ValidateLocalDirectories(directories []string) error
- func ValidateSelection(manifest Manifest, input proto.CapabilitySources, identity Identity) error
- type DirectoryResolver
- type Identity
- type InstalledMCP
- 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 ¶
func Finalize(installed *os.Root, input proto.CapabilitySources, identity Identity, resolve DirectoryResolver) error
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
func Rebind(installed *os.Root, manifest *Manifest, input proto.CapabilitySources, identity Identity) error
Rebind gives an installation restored from an earlier preparation the identity of this Environment. The earlier preparation must have had the identical selection.
func ValidateDirectories ¶
ValidateDirectories preserves the managed public workspace-path contract.
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 ¶
func ValidateSelection(manifest Manifest, input proto.CapabilitySources, identity Identity) error
ValidateSelection checks reconnect configuration without revisiting sources. Use it only with a manifest returned by Load.
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"`
}
Identity binds an installation to one immutable Environment.
type InstalledMCP ¶
type InstalledMCP struct {
PackageRoot string
Server proto.PluginMCPServer
}
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 Manifest ¶
type Manifest struct {
Identity Identity `json:"identity"`
SelectionSHA256 string `json:"selection_sha256"`
Version int `json:"version"`
Skills []proto.InstalledSkill `json:"skills"`
Plugins []string `json:"plugins,omitempty"`
MCP []InstalledMCP `json:"-"`
}