26 lines
1.0 KiB
Python
26 lines
1.0 KiB
Python
from typing import List
|
|
|
|
# Scopes matrix according to prompt.md
|
|
# agent -> list of allowed scopes
|
|
AGENT_SCOPES = {
|
|
"CLAUDE": ["infra", "llm", "nyora", "perso", "tt", "coding"],
|
|
"HERMES_TT": ["infra", "llm", "tt"],
|
|
"HERMES_NYORA": ["infra", "llm", "nyora"],
|
|
"HERMES_PERSO": ["infra", "llm", "nyora", "perso"],
|
|
"GEMINI": ["infra", "llm", "nyora", "coding"],
|
|
"NABIL": ["infra", "llm", "nyora", "perso", "tt", "coding"] # Assuming Nabil has access to all
|
|
}
|
|
|
|
# "coding" est transverse (memory_entries), pas dans ALL_SCOPES qui reste les
|
|
# scopes "rules" historiques (dict plat) ; get_agent_config/get_my_context ne
|
|
# doivent pas essayer de charger "coding" comme un scope rules classique.
|
|
ALL_SCOPES = ["infra", "llm", "nyora", "perso", "tt"]
|
|
MEMORY_SCOPES = ["coding"]
|
|
|
|
def has_scope_access(agent_name: str, scope: str) -> bool:
|
|
allowed_scopes = AGENT_SCOPES.get(agent_name.upper(), [])
|
|
return scope in allowed_scopes
|
|
|
|
def get_allowed_scopes(agent_name: str) -> List[str]:
|
|
return AGENT_SCOPES.get(agent_name.upper(), [])
|