Changeset 0.17.0 (#75)

This commit is contained in:
2026-02-27 16:25:39 +00:00
parent 8bb77710b9
commit c9141a6896
37 changed files with 2778 additions and 968 deletions

View File

@@ -216,6 +216,9 @@ type Persona struct {
// Loaded from persona_grants, not stored in personas table
Grants []Grant `json:"grants,omitempty" db:"-"`
// Loaded from persona_knowledge_bases, not stored in personas table
KBIDs []string `json:"kb_ids,omitempty" db:"-"`
}
type PersonaPatch struct {
@@ -691,11 +694,25 @@ type KnowledgeBase struct {
DocumentCount int `json:"document_count" db:"document_count"`
ChunkCount int `json:"chunk_count" db:"chunk_count"`
TotalBytes int64 `json:"total_bytes" db:"total_bytes"`
Discoverable bool `json:"discoverable" db:"discoverable"`
Status string `json:"status" db:"status"` // active, processing, error
CreatedAt time.Time `json:"created_at" db:"created_at"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
}
// PersonaKB binds a knowledge base to a persona.
type PersonaKB struct {
PersonaID string `json:"persona_id" db:"persona_id"`
KBID string `json:"kb_id" db:"kb_id"`
AutoSearch bool `json:"auto_search" db:"auto_search"`
AddedAt time.Time `json:"added_at" db:"added_at"`
// Joined fields (not in persona_knowledge_bases table)
KBName string `json:"kb_name,omitempty" db:"kb_name"`
DocumentCount int `json:"document_count,omitempty" db:"document_count"`
ChunkCount int `json:"chunk_count,omitempty" db:"chunk_count"`
}
// KBDocument is a single uploaded file within a knowledge base.
type KBDocument struct {
ID string `json:"id" db:"id"`