package knowledge

import "context"

// Store is the pure interface for knowledge operations.
// Implemented by shell/knowledge.
type Store interface {
	// Search performs full-text search across all documents.
	Search(ctx context.Context, query string, limit int) ([]SearchResult, error)

	// Get retrieves a document by slug.
	Get(ctx context.Context, slug string) (*Document, error)

	// Put creates or updates a document (file + index).
	Put(ctx context.Context, doc Document) error

	// List returns all document slugs with titles.
	List(ctx context.Context) ([]Document, error)

	// Sync re-indexes all files from disk. Called on startup.
	Sync(ctx context.Context) error

	// Close releases resources.
	Close() error
}
