package skillpack import "context" // Store is the persistence seam for subscriptions (metadata + the current pin). // It is deliberately small; a host backs it with its DB, Memory is the zero-dep // default, and contrib/store can add durable SQLite alongside the other // executus store impls. type Store interface { Initialize(ctx context.Context) error Save(ctx context.Context, s *Subscription) error Get(ctx context.Context, id string) (*Subscription, error) GetByName(ctx context.Context, name string) (*Subscription, error) List(ctx context.Context) ([]Subscription, error) Delete(ctx context.Context, id string) error } // PackCache is the content-addressed store of pinned pack trees, keyed by // content digest. It exists so activating an agent never re-fetches from the // Source (no clone per run) and so a pinned digest's exact bytes survive even if // upstream later force-pushes or disappears. A host may back it with disk; // Memory is the default. Because the key IS the content digest, entries are // immutable and safe to share across subscriptions that pin the same bytes. type PackCache interface { Put(ctx context.Context, digest string, t Tree) error Get(ctx context.Context, digest string) (Tree, error) }