* 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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user