agentcapabilities

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package agentcapabilities owns the packaged Runtime's inert installation data.

Index

Constants

View Source
const Directory = "/environment/initialization/capabilities"
View Source
const ManifestName = "installed.json"
View Source
const MaxSkills = 50
View Source
const MaxSnapshotBytes = 50 << 20

Variables

View Source
var ErrInvalid = errors.New("capability installation unavailable or unsupported")

Functions

func Finalize

func Finalize(installed *os.Root, input Input, 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 InstallPlugin(root *os.Root, slot int, archive []byte, metadata agentplugin.Metadata) error

func InstallSkill

func InstallSkill(root *os.Root, archive []byte, metadata agentskill.Metadata) error

func ReadTree

func ReadTree(root *os.Root, name string, immutable bool) ([]agentbundle.File, error)

ReadTree stays inside an already-owned root and rejects aliases/special files. Installation sources may be writable; retained snapshots must be read-only.

func ValidateDirectories

func ValidateDirectories(directories []string) error

ValidateDirectories preserves the managed public workspace-path contract.

func ValidateInput

func ValidateInput(input Input) error

ValidateInput bounds source selections without reading archives or directories. Portable manifest grammar is checked by the shared Skill and Plugin parsers.

func ValidateLocalDirectories

func ValidateLocalDirectories(directories []string) error

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 Input, identity Identity) error

ValidateSelection checks reconnect configuration without revisiting sources. Use it only with a manifest returned by Load.

func ValidateSourceDirectories

func ValidateSourceDirectories(directories []string) error

ValidateSourceDirectories checks portable absolute source addresses without interpreting them on the Core host. Runtime authorizes and opens local paths.

Types

type DirectoryResolver

type DirectoryResolver func(string) (*os.Root, error)

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:"-"`
}

func Load

func Load(root *os.Root) (Manifest, error)

Load checks the protected installation; it never reads the original workspace directories, even after a native/Core restart.

Jump to

Keyboard shortcuts

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