Changeset 0.17.0 (#75)
This commit is contained in:
@@ -119,6 +119,11 @@ type PersonaStore interface {
|
||||
|
||||
// Access check
|
||||
UserCanAccess(ctx context.Context, userID, personaID string) (bool, error)
|
||||
|
||||
// Knowledge base bindings
|
||||
SetKBs(ctx context.Context, personaID string, kbIDs []string, autoSearch map[string]bool) error
|
||||
GetKBs(ctx context.Context, personaID string) ([]models.PersonaKB, error)
|
||||
GetKBIDs(ctx context.Context, personaID string) ([]string, error)
|
||||
}
|
||||
|
||||
// =========================================
|
||||
@@ -385,6 +390,7 @@ type KnowledgeBaseStore interface {
|
||||
ListDocuments(ctx context.Context, kbID string) ([]models.KBDocument, error)
|
||||
UpdateDocumentStatus(ctx context.Context, id string, status string, errMsg *string) error
|
||||
UpdateDocumentText(ctx context.Context, id string, text string, chunkCount int) error
|
||||
UpdateDocumentStorageKey(ctx context.Context, id string, storageKey string) error
|
||||
DeleteDocument(ctx context.Context, id string) (*models.KBDocument, error) // returns for storage cleanup
|
||||
|
||||
// Chunks
|
||||
@@ -398,9 +404,15 @@ type KnowledgeBaseStore interface {
|
||||
GetChannelKBs(ctx context.Context, channelID string) ([]models.ChannelKB, error)
|
||||
GetActiveKBIDs(ctx context.Context, channelID string, userID string,
|
||||
teamIDs []string) ([]string, error) // enabled + user has access
|
||||
GetActiveKBIDsWithPersona(ctx context.Context, channelID string, userID string,
|
||||
teamIDs []string, personaID string) ([]string, error) // includes persona-bound KBs
|
||||
ListDiscoverable(ctx context.Context, userID string, teamIDs []string) ([]models.KnowledgeBase, error)
|
||||
|
||||
// Stats — recount document_count/chunk_count/total_bytes from child tables
|
||||
UpdateStats(ctx context.Context, kbID string) error
|
||||
|
||||
// Discoverable management
|
||||
SetDiscoverable(ctx context.Context, kbID string, discoverable bool) error
|
||||
}
|
||||
|
||||
// =========================================
|
||||
|
||||
Reference in New Issue
Block a user