Model rules: who a chat's model may bring into a conversation

Rules read from the main model decide who it is offered as a crowd member,
a friend and on its roster; any-to-any with denies by default, or
none-to-none with allows. The crowd picker names what it holds back and
why, and a model held back only by a person's own rule -- or by anything,
with the new rules.override -- can still be added by hand. Another data
group is now a deny that an explicit rule opens. Admin -> Model rules and
a card in Settings, each with a matrix drawn by the enforcing function.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-29 17:20:40 +00:00
co-authored by Claude Opus 5.5
parent 9970bb43c6
commit c27fe47d4d
24 changed files with 1324 additions and 29 deletions
+6
View File
@@ -84,6 +84,7 @@ from lembas.db.models.schedule import (
)
from lembas.db.models.setting import Setting
from lembas.db.models.suggestion import Suggestion
from lembas.db.models.talk import ANY_MODEL, EFFECT_ALLOW, EFFECT_DENY, EFFECTS, TalkRule
from lembas.db.models.tool import (
RESPONSE_JSON,
RESPONSE_MODES,
@@ -170,6 +171,11 @@ __all__ = [
"Connection",
"DEFAULT_GROUP",
"DataGroup",
"ANY_MODEL",
"EFFECT_ALLOW",
"EFFECT_DENY",
"EFFECTS",
"TalkRule",
"InDataGroup",
"CustomTool",
"CHUNK_DOCUMENT",