feat(db): add project personas and skills tables
CI / build-and-test (push) Failing after 1m52s

* Introduce project_personas table with foreign keys to projects and agent_personas
* Add project_skills table with foreign key to projects and agent_skills
* Include override boolean field in agent_persona_skills and project_skills
* Update schema and migration files to reflect new tables and fields
* Enhance CORS handling to reflect request origin
This commit is contained in:
2026-07-04 23:45:51 +02:00
parent 1adf50e3db
commit c179e014ad
69 changed files with 1329 additions and 184 deletions
+19 -12
View File
@@ -81,17 +81,17 @@ type ArcStage struct {
// 2. active arc-stage parts
// 3. persona-linked parts (base)
type PersonaFull struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Body string `json:"body"` // summary or detail, depending on mode
CompiledSummary string `json:"compiled_summary,omitempty"`
Tags []string `json:"tags"`
Parts []AssembledPart `json:"parts"`
Skills []PersonaSkillEntry `json:"skills"`
Guardrails []PersonaGuardrailEntry `json:"guardrails"`
Traits []PersonaTraitEntry `json:"traits"`
Arc *PersonaArcState `json:"arc,omitempty"`
Detail bool `json:"detail"` // whether full detail was requested
Name string `json:"name"`
Description string `json:"description,omitempty"`
Body string `json:"body"` // summary or detail, depending on mode
CompiledSummary string `json:"compiled_summary,omitempty"`
Tags []string `json:"tags"`
Parts []AssembledPart `json:"parts"`
Skills []PersonaSkillEntry `json:"skills"`
Guardrails []PersonaGuardrailEntry `json:"guardrails"`
Traits []PersonaTraitEntry `json:"traits"`
Arc *PersonaArcState `json:"arc,omitempty"`
Detail bool `json:"detail"` // whether full detail was requested
}
type AssembledPart struct {
@@ -109,13 +109,14 @@ type PersonaSkillEntry struct {
Description string `json:"description,omitempty"`
Content string `json:"content,omitempty"` // only when detail=true
Tags []string `json:"tags"`
Override bool `json:"override,omitempty"`
}
type PersonaGuardrailEntry struct {
ID int64 `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Content string `json:"content,omitempty"` // only when detail=true
Content string `json:"content,omitempty"` // only when detail=true
Severity string `json:"severity,omitempty"` // only when detail=true
Tags []string `json:"tags"`
}
@@ -168,6 +169,12 @@ type ManifestSkill struct {
ID int64 `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Override bool `json:"override,omitempty"`
}
type ProjectPersona struct {
Persona Persona `json:"persona"`
IsDefault bool `json:"is_default"`
}
type ManifestGuardrail struct {
+1
View File
@@ -229,6 +229,7 @@ type AgentSkill struct {
DomainTags []string `json:"domain_tags"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Override bool `json:"override,omitempty"`
}
type AgentGuardrail struct {