Help us shape the future of Go! Take the 2026 Go Developer Survey

skillstore

package
v0.0.51 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package skillstore persists agent-owned skill lifecycle records in a flocked, crash-safe manifest with immutable content-addressed SKILL.md files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Materialization

type Materialization = skillmaterialize.Result

Materialization is the recoverable result of turning a procedure proposal into an unevaluated skill draft and linking the proposal to that draft.

func MaterializeProposal

func MaterializeProposal(ctx context.Context, proposals learning.ProposalRepository, skills learning.SkillRepository, partition learning.SkillPartition, owner string, record learning.ProposalRecord, inventory []learning.SkillInventoryItem, decision learning.Decision) (Materialization, error)

MaterializeProposal preserves the root adapter entry point while delegating portable validation and reconciliation to the importable engine adapter.

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store is a durable learning.SkillRepository. New is lazy: an empty repository does not create its directory until the first mutation.

func New

func New(dir string) (*Store, error)

New prepares a repository rooted at dir without creating it.

func (*Store) Activate

Activate activates a staged PASS version and archives the prior active version atomically.

func (*Store) ActivateValidated

func (s *Store) ActivateValidated(ctx context.Context, p learning.SkillPartition, owner string, id learning.SkillID, version learning.VersionID, expected learning.Revision) (learning.SkillVersion, error)

ActivateValidated atomically activates only an evidence-backed, accepted/exact, staged ABSTAIN version.

func (*Store) Archive

Archive archives an active version under CAS.

func (*Store) CreateDraft

func (s *Store) CreateDraft(ctx context.Context, p learning.SkillPartition, owner string, bundle learning.SkillBundle, provenance learning.SkillProvenance) (out learning.SkillVersion, err error)

CreateDraft creates an immutable body version or merges provenance into its exact duplicate.

func (*Store) Generation added in v0.0.24

func (s *Store) Generation(ctx context.Context, p learning.SkillPartition) (generation learning.SkillGeneration, err error)

Generation returns the durable monotonic generation for one partition.

func (*Store) Get

func (s *Store) Get(ctx context.Context, p learning.SkillPartition, owner string, id learning.SkillID, version learning.VersionID) (out learning.SkillVersion, found bool, err error)

Get returns one exact version, or the latest version when version is empty.

func (*Store) List

func (s *Store) List(ctx context.Context, p learning.SkillPartition, options learning.SkillList) (page learning.SkillPage, err error)

List returns latest versions in deterministic skill-id order.

func (*Store) ListSkillReceipts

func (s *Store) ListSkillReceipts(ctx context.Context, p learning.SkillPartition, options learning.SkillReceiptList) (page learning.SkillReceiptPage, err error)

ListSkillReceipts pages the bounded durable receipt index without scanning skill versions.

func (*Store) RecordEvaluation

func (s *Store) RecordEvaluation(ctx context.Context, p learning.SkillPartition, owner string, id learning.SkillID, version learning.VersionID, expected learning.Revision, evaluation learning.SkillEvaluation) (learning.SkillVersion, error)

RecordEvaluation appends a bounded evaluation under CAS.

func (*Store) Reject

Reject marks a non-active version rejected under CAS.

func (*Store) Rollback

func (s *Store) Rollback(ctx context.Context, p learning.SkillPartition, owner string, id learning.SkillID, expected learning.Revision, target learning.VersionID) (out learning.SkillVersion, err error)

Rollback atomically archives the current active version and reactivates an archived target.

func (*Store) Stage

Stage moves a non-failing evaluated version to staged under CAS.

Jump to

Keyboard shortcuts

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