skillruntime

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyProfileBinding

func ApplyProfileBinding(bindings []driver.EnvBinding, profileDir, key string) []driver.EnvBinding

func BuildEphemeralSnapshot

func BuildEphemeralSnapshot(options EphemeralSnapshotOptions) driver.SkillSnapshot

BuildEphemeralSnapshot produces an Admin-layer snapshot for ephemeral adapters. Selected is the union of provider-required + host-selected keys; Payload.Entries contains the fully-materialised skill targets.

func BuildPersistentSnapshot

func BuildPersistentSnapshot(options PersistentSnapshotOptions) driver.SkillSnapshot

BuildPersistentSnapshot produces an Admin-layer snapshot for persistent adapters (those that install skills into a home dir). It records whether each resolved skill currently exists on disk (Installed vs Missing), whether external / user-managed entries shadow the managed ones, and any leftover user-installed entries not covered by the Selected set.

func EnsureSkillTarget

func EnsureSkillTarget(sourcePath, targetPath string, managedRoots []string) (string, error)

func ManagedSkillCacheRoot

func ManagedSkillCacheRoot() string

ManagedSkillCacheRoot mirrors the SDK default materializer's cache root and is re-exported here so adapters (which use it for "is this path managed by us" checks) need not import internal SDK helpers.

func PruneBrokenManagedSkillTargets

func PruneBrokenManagedSkillTargets(skillsHome string, allowedRuntimeNames []string, managedRoots []string) ([]string, error)

func ReadInstalledSkillTargets

func ReadInstalledSkillTargets(skillsHome string) (map[string]InstalledSkillTarget, error)

func RemoveManagedSkillTargets

func RemoveManagedSkillTargets(skillsHome string, allowedRuntimeNames []string, managedRoots []string) ([]string, error)

func ResolveBinding

func ResolveBinding(bindings []driver.EnvBinding, key string) string

func ResolveHome

func ResolveHome(bindings []driver.EnvBinding) string

func SelectedResolvedSkills

func SelectedResolvedSkills(payload driver.ResolvedSkills, selected []string) []driver.ResolvedSkill

SelectedResolvedSkills returns the subset of payload.Entries whose Key is in selected. Helpers kept for adapters that want a straight-through list of already-selected skills.

func WithBinding

func WithBinding(bindings []driver.EnvBinding, key, value string) []driver.EnvBinding

Types

type EphemeralSnapshotOptions

type EphemeralSnapshotOptions struct {
	DriverType       string
	Payload          driver.ResolvedSkills
	Selected         []string
	Resolved         []driver.Skill
	ConfiguredDetail string
	MissingDetail    string
	Externals        map[string]InstalledSkillTarget
	LocationLabel    string
	ExternalDetail   string
}

EphemeralSnapshotOptions contains everything needed to build an Admin-layer snapshot for adapters whose skill-sync mode is ephemeral (e.g. Claude, which re-materialises every run rather than installing into a home dir).

type InstalledSkillTarget

type InstalledSkillTarget struct {
	TargetPath string
	Kind       string
}

InstalledSkillTarget records what the adapter found on disk for one installed skill (in adapter-native skills directory).

type PersistentSnapshotOptions

type PersistentSnapshotOptions struct {
	DriverType             string
	Payload                driver.ResolvedSkills
	Selected               []string
	Resolved               []driver.Skill
	Installed              map[string]InstalledSkillTarget
	SkillsHome             string
	LocationLabel          string
	InstalledDetail        string
	MissingDetail          string
	ExternalConflictDetail string
	ExternalDetail         string
}

PersistentSnapshotOptions contains everything needed to build an Admin-layer snapshot for adapters whose skill-sync mode is persistent (e.g. Cursor, Codex installing to ~/.cursor/skills).

type ProfileResolution

type ProfileResolution struct {
	Bindings []driver.EnvBinding
	Profile  driver.AgentProfile
}

func ResolveProfile

func ResolveProfile(opts ProfileResolveOptions) (ProfileResolution, error)

type ProfileResolveOptions

type ProfileResolveOptions struct {
	Bindings         []driver.EnvBinding
	Selection        *driver.ProfileSelection
	EnvVar           string
	DefaultDir       string
	NativeSharedDir  string
	DedicatedSubdirs []string
	SettingsFiles    []string
	MCPFiles         []string
	SkillsDirs       []string
	AuthFiles        []string
	SkipInitialize   bool
}

type ProfileSkillChange

type ProfileSkillChange struct {
	Key         string
	RuntimeName string
	Action      string
}

type ProfileSkillConflictMode

type ProfileSkillConflictMode string
const (
	ProfileSkillConflictPreserve ProfileSkillConflictMode = "preserve"
	ProfileSkillConflictError    ProfileSkillConflictMode = "error"
)

type ProfileSkillPruneMode

type ProfileSkillPruneMode string
const (
	ProfileSkillPruneNone          ProfileSkillPruneMode = "none"
	ProfileSkillPruneBrokenManaged ProfileSkillPruneMode = "broken_managed"
	ProfileSkillPruneManaged       ProfileSkillPruneMode = "managed"
)

type ProfileSkillReconcileOptions

type ProfileSkillReconcileOptions struct {
	ProfileDir              string
	SkillsHome              string
	Payload                 driver.ResolvedSkills
	Selected                []string
	ManagedRoots            []string
	ConflictMode            ProfileSkillConflictMode
	PruneMode               ProfileSkillPruneMode
	PruneMatchingUnselected bool
}

type ProfileSkillReconcileResult

type ProfileSkillReconcileResult struct {
	Changes []ProfileSkillChange
}

Jump to

Keyboard shortcuts

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