Documentation
¶
Index ¶
- func ApplyProfileBinding(bindings []driver.EnvBinding, profileDir, key string) []driver.EnvBinding
- func BuildEphemeralSnapshot(options EphemeralSnapshotOptions) driver.SkillSnapshot
- func BuildPersistentSnapshot(options PersistentSnapshotOptions) driver.SkillSnapshot
- func EnsureSkillTarget(sourcePath, targetPath string, managedRoots []string) (string, error)
- func ManagedSkillCacheRoot() string
- func PruneBrokenManagedSkillTargets(skillsHome string, allowedRuntimeNames []string, managedRoots []string) ([]string, error)
- func ReadInstalledSkillTargets(skillsHome string) (map[string]InstalledSkillTarget, error)
- func RemoveManagedSkillTargets(skillsHome string, allowedRuntimeNames []string, managedRoots []string) ([]string, error)
- func ResolveBinding(bindings []driver.EnvBinding, key string) string
- func ResolveHome(bindings []driver.EnvBinding) string
- func SelectedResolvedSkills(payload driver.ResolvedSkills, selected []string) []driver.ResolvedSkill
- func WithBinding(bindings []driver.EnvBinding, key, value string) []driver.EnvBinding
- type EphemeralSnapshotOptions
- type InstalledSkillTarget
- type PersistentSnapshotOptions
- type ProfileResolution
- type ProfileResolveOptions
- type ProfileSkillChange
- type ProfileSkillConflictMode
- type ProfileSkillPruneMode
- type ProfileSkillReconcileOptions
- type ProfileSkillReconcileResult
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 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 ReadInstalledSkillTargets ¶
func ReadInstalledSkillTargets(skillsHome string) (map[string]InstalledSkillTarget, 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 ¶
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 ProfileSkillChange ¶
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
}
func ReconcileProfileSkills ¶
func ReconcileProfileSkills(ctx context.Context, opts ProfileSkillReconcileOptions) (ProfileSkillReconcileResult, error)