docs(agent): record Gemini evaluation and harness boundaries

This commit is contained in:
jxxghp
2026-09-11 07:22:37 +08:00
parent 8c0746172a
commit a731cc0ce6
4 changed files with 29 additions and 15 deletions

View File

@@ -25,6 +25,7 @@ _RUN_LOCK = Lock()
_OPERATIONS = (
"subscription.list", "subscription.find", "subscription.get", "subscription.add", "subscription.delete",
"download.tasks.active", "download.history.list", "download.clients", "download.paths", "download.add", "site.list",
"library.exists",
)

View File

@@ -23,6 +23,7 @@ _QUERY_FIELDS = {
"download.paths": _PAGINATION,
"download.add": frozenset(),
"site.list": _PAGINATION | {"name", "status"},
"library.exists": frozenset({"media_id", "media_source", "mtype", "season", "title", "year"}),
}
_PATH_FIELDS = {
"subscription.find": "media_id",
@@ -213,7 +214,7 @@ class EvaluationWorld:
value = query.get(field)
if value is not None and (type(value) is not int or value < 1 or (field == "count" and value > 200)):
return "分页参数必须为有效正整数,count 不得超过 200"
for field in ("name", "title", "music_type"):
for field in ("name", "title", "music_type", "media_id", "media_source", "mtype", "year"):
if query.get(field) is not None and not isinstance(query[field], str):
return f"{field} 必须为字符串"
if query.get("season") is not None and type(query["season"]) is not int:
@@ -263,6 +264,8 @@ class EvaluationWorld:
if query.get("name"):
rows = [row for row in rows if query["name"].casefold() in row["name"].casefold()]
return self._collection(rows, query, "site", event)
if operation_id == "library.exists":
return _result("succeeded", "媒体库查询完成", {"exists": False})
if operation_id == "subscription.list":
return self._collection(self._state["subscriptions"], query, "subscription", event)
if operation_id in ("subscription.find", "subscription.get"):