agentcapabilities

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 18 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 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 InstallPlugin(root *os.Root, slot int, archive []byte, metadata proto.PluginMetadata) error

func InstallSkill

func InstallSkill(root *os.Root, archive []byte, metadata proto.SkillMetadata) 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 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 Session. The earlier preparation must have had the identical selection.

func ValidateDirectories

func ValidateDirectories(directories []string) error

ValidateDirectories preserves the managed public workspace-path contract.

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 proto.CapabilitySources, identity Identity) error

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

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

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