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
+21
View File
@@ -5,6 +5,7 @@ import (
"net/http/httptest"
"reflect"
"sort"
"strings"
"testing"
"time"
@@ -60,6 +61,26 @@ func TestNewListsStoredFileResourceTemplate(t *testing.T) {
}
}
func TestNewExposesWorldModelIntroResource(t *testing.T) {
cs := newStreamableTestClient(t)
listed, err := cs.ListResources(context.Background(), nil)
if err != nil {
t.Fatalf("ListResources() error = %v", err)
}
if len(listed.Resources) != 1 || listed.Resources[0].URI != "amcs://world-model/intro" {
t.Fatalf("ListResources() = %#v, want world model intro", listed.Resources)
}
read, err := cs.ReadResource(context.Background(), &mcp.ReadResourceParams{URI: "amcs://world-model/intro"})
if err != nil {
t.Fatalf("ReadResource() error = %v", err)
}
if len(read.Contents) != 1 || !strings.Contains(read.Contents[0].Text, "bootstrap_world_model") {
t.Fatalf("ReadResource() did not return bootstrap instructions: %#v", read.Contents)
}
}
func newStreamableTestClient(t *testing.T) *mcp.ClientSession {
t.Helper()