Note: This question takes a pluralistic / "multiverse" view of sets (including "classes" and "collections") and set theories.
My understanding (from reading many nLab articles) is that there are at least two category-theoretic notions$^\dagger$ of "set":
("intramural" / "within-category" / "internal") a "set" is any discrete category${^\dagger} {^\dagger}$.
("extramural" / "between-categories" / "external") a "category of sets" is a pretopos, possibly with additional regularity conditions${^\dagger} {^\dagger} {^\dagger}$. A "set" is then just an object of a "category of sets".
Question: To what extent are these two definitions equivalent?
Pointers to references would be appreciated.
For example, given any category all of whose objects are discrete categories and whose morphisms are functors, is there always an embedding of categories ("inclusion" / faithful functor injective on objects) into (some) pretopos?
And conversely, given any pretopos is it always equivalent (even isomorphic) to some category all of whose objects are discrete categories and whose morphisms are functors?
Further notes:
The "intramural" vs. "extramural" terminology comes from here.
$^\dagger$: I.e. "definitional set theories" (in the sense of this article) that define sets / set theories in terms of category theory, models (or rather interpretations?) of sets / set theories in categorical model theory, studying sets / set theories as object theories with (the first-order theory of) category theory as the metatheory. Cf. (1), (2), (3), (4), (5), (6), (7), etc. This is in contrast to the common approach of studying category theory as the object theory with a fixed set theory (ZFC) as the metatheory.
${^\dagger} {^\dagger}$: I.e. any $0$-category, any category equivalent to its $0$-truncation.
Seemingly defining whether a category is "small" requires studying category theory as the object theory with a fixed set theory as the metatheory, whereas this question is about defining non-fixed set theories as object theories with category theory as the metatheory. Seemingly whether the "skeletal" requirement is acceptable depends on how one feels about first order logic with equality vs. without equality, but because it is not difficult to translate between the two flavors of logic, and because any category is equivalent to any of its skeletons, I don't care whether the "skeletal" requirement is included or not.
${^\dagger} {^\dagger} {^\dagger}$: In ETCS the definition is a cocomplete well-pointed topos with a natural numbers object and satisfying the axiom of choice, others say more generally just a cocomplete well-pointed topos, others would just say an (elementary) topos, some constructive or predicativist set theories correspond to just a pretopos, and "categories of classes" and/or "categories with class structure" are also pretoposes / pretopoi (with additional properties / regularity conditions). So "pretopos" seems to be the most general / pluralistic definition. (Again I want to ignore size issues because that seems to presuppose a fixed set theory as metatheory, rather than considering non-fixed set theories as object theories, so the definition should work for any category of "classes" / "collections", not just for categories of "proper" / "small" sets.)
Related questions: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11)