Introduce Devii agents subsystem with supervisor, policy, and evals

- Add agents package: controller, runner, store, tools, actions, evals, policy
- Wire agents into Devii service, session, registry, CLI, and dispatcher
- Extend database schema and config for agent persistence
- Add news and telegram bridge updates plus landing UI and docs
- Cover agents, news, and telegram flows with unit tests
This commit is contained in:
2026-10-26 02:54:44 +01:00
parent 407673bf57
commit 3bfde87fdb
50 changed files with 4102 additions and 78 deletions
+43
View File
@@ -45,3 +45,46 @@ def test_the_workspace_rule_tables_filter_on_a_column_that_exists(local_db):
assert quota._rule_for("user", "nobody-at-all") is None
assert editor.prefs_for("nobody-at-all") is None
def test_retired_aquality_grading_settings_heal_to_gateway(local_db):
from devplacepy.config import (
AQUALITY_NEWS_GRADING_MODEL,
AQUALITY_NEWS_GRADING_URL,
INTERNAL_GATEWAY_URL,
NEWS_GRADING_MODEL_DEFAULT,
)
from devplacepy.database import get_setting, set_setting
from devplacepy.database.schema import migrate_ai_gateway_settings
prev_url = get_setting("news_ai_url", "")
prev_model = get_setting("news_ai_model", "")
try:
set_setting("news_ai_url", AQUALITY_NEWS_GRADING_URL)
set_setting("news_ai_model", AQUALITY_NEWS_GRADING_MODEL)
migrate_ai_gateway_settings()
assert get_setting("news_ai_url", "") == INTERNAL_GATEWAY_URL
assert get_setting("news_ai_model", "") == NEWS_GRADING_MODEL_DEFAULT
finally:
set_setting("news_ai_url", prev_url)
set_setting("news_ai_model", prev_model)
def test_custom_grading_settings_survive_migration(local_db):
from devplacepy.database import get_setting, set_setting
from devplacepy.database.schema import migrate_ai_gateway_settings
prev_url = get_setting("news_ai_url", "")
prev_model = get_setting("news_ai_model", "")
try:
set_setting("news_ai_url", "http://custom.test/v1/chat/completions")
set_setting("news_ai_model", "custom-model")
migrate_ai_gateway_settings()
assert (
get_setting("news_ai_url", "")
== "http://custom.test/v1/chat/completions"
)
assert get_setting("news_ai_model", "") == "custom-model"
finally:
set_setting("news_ai_url", prev_url)
set_setting("news_ai_model", prev_model)