package agentbuiltins_test import ( "context" "slices" "testing" "gitea.stevedudenhoeffer.com/steve/executus/agentbuiltins" "gitea.stevedudenhoeffer.com/steve/executus/persona" ) // TestGifsmithLoads proves executus's shipped gifsmith manifest flows through // the persona loader and lowers into a RunnableAgent carrying the gif pack — the // path a host uses to dogfood it. func TestGifsmithLoads(t *testing.T) { ctx := context.Background() store := persona.NewMemory() n, err := persona.LoadBuiltinAgents(ctx, store, agentbuiltins.FS(), nil) if err != nil { t.Fatal(err) } if n < 1 { t.Fatalf("expected gifsmith seeded, got %d", n) } a, err := store.GetAgentByName(ctx, persona.BuiltinAgentOwnerID, "gifsmith") if err != nil { t.Fatal(err) } if len(a.SkillPacks) != 1 || a.SkillPacks[0] != "gif" { t.Errorf("skill_packs = %v", a.SkillPacks) } if a.ModelTier != "thinking" { t.Errorf("model_tier = %q (want a portable tier name)", a.ModelTier) } if !slices.Contains(a.LowLevelTools, "code_exec") || !slices.Contains(a.LowLevelTools, "send_attachments") { t.Errorf("low_level_tools missing render/deliver tools: %v", a.LowLevelTools) } // The pack must survive the lowering the executor consumes. if ra := a.ToRunnable(); len(ra.SkillPacks) != 1 || ra.SkillPacks[0] != "gif" { t.Errorf("RunnableAgent.SkillPacks = %v", ra.SkillPacks) } }