fix: automate cross-source media library audits
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"""
|
||||
title: MikeAI Auto Tool Selector
|
||||
author: MikeAI
|
||||
version: 3.3.0
|
||||
version: 3.4.0
|
||||
description: Selects a small, relevant set of MCP servers for each user request.
|
||||
"""
|
||||
|
||||
@@ -99,6 +99,16 @@ class Filter:
|
||||
"Do not ask the user to enable another tool: both required MUA "
|
||||
"capabilities are already attached to this request."
|
||||
)
|
||||
elif "unraid" in selected:
|
||||
rule += (
|
||||
" For bounded file or media-library inventory on Unraid, prefer "
|
||||
"unraid_files_inventory over repeated ls/find shell calls. The "
|
||||
"inventory tool can first locate matching collection directories; "
|
||||
"then call it once more on the exact returned relative_path with an "
|
||||
"empty name filter to inventory that collection. It never reads file "
|
||||
"contents. Use the read-only shell only when that purpose-built tool "
|
||||
"cannot answer."
|
||||
)
|
||||
messages = body.setdefault("messages", [])
|
||||
for message in messages:
|
||||
if message.get("role") == "system" and isinstance(message.get("content"), str):
|
||||
@@ -150,7 +160,9 @@ class Filter:
|
||||
(
|
||||
r"\bsona(?:rr|r)?\b", r"\brada(?:rr|r)\b", r"\barr[- ]mcp\b",
|
||||
r"\b(?:staffel|episode|folge)(?:n)?\b.*\b"
|
||||
r"(?:fehl|such|download|indexer|release|serie)\w*",
|
||||
r"(?:sonarr|radarr|indexer|release|fernsehserie|tv[- ]serie)\w*",
|
||||
r"\b(?:sonarr|radarr|indexer|release|fernsehserie|tv[- ]serie)\w*\b.*\b"
|
||||
r"(?:staffel|episode|folge)(?:n)?\b",
|
||||
r"\b(?:serie|film)\b.*\b(?:sonarr|radarr|indexer|release)\b",
|
||||
),
|
||||
)
|
||||
@@ -190,7 +202,8 @@ class Filter:
|
||||
text,
|
||||
(
|
||||
r"\b(?:nur|lediglich|ausschlie(?:ß|ss)lich)\b.{0,30}\b(?:pr[uü]f|anzeig|auflist|status|nachseh)\w*\b",
|
||||
r"\b(?:keine|nichts?)\b.{0,30}\b(?:[aä]nder|update|aktualisier|durchf[uü]hr|installier)\w*\b",
|
||||
r"\b(?:keine|keinerlei|nichts?)\b.{0,40}\b(?:[aä]nder|update|aktualisier|durchf[uü]hr|installier|download|umbenenn)\w*\b",
|
||||
r"\bohne\b.{0,50}\b(?:[aä]nder|update|aktualisier|durchf[uü]hr|installier|download|umbenenn)\w*\b",
|
||||
r"\b(?:nicht|nichts?)\b.{0,20}\b(?:durchf[uü]hr|ausf[uü]hr|aktualisier|installier)\w*\b",
|
||||
),
|
||||
):
|
||||
|
||||
@@ -216,7 +216,9 @@ with con:
|
||||
"MUA · Unraid-Diagnose (read-only)",
|
||||
"Automatisch verwendbarer, serverseitig in Open WebUI auf reine Lese- und "
|
||||
"Diagnosewerkzeuge begrenzter MUA-Zugang. Für Containerbestand, Logs, System, "
|
||||
"Storage, Shares und Netzwerkstatus. Keine Start/Stop-, Installations-, "
|
||||
"Storage, Shares, kompakte Datei-/Medieninventare und Netzwerkstatus. "
|
||||
"Für Bibliotheksprüfungen unraid_files_inventory statt wiederholter "
|
||||
"ls/find-Aufrufe verwenden. Keine Start/Stop-, Installations-, "
|
||||
"Änderungs- oder freie Shell-Funktion. Bei einer ausdrücklich verlangten "
|
||||
"Änderung stellt die automatische Auswahl zusätzlich MUA-Verwaltung bereit.",
|
||||
),
|
||||
@@ -345,6 +347,7 @@ with con:
|
||||
"unraid_system_health", "unraid_storage_status",
|
||||
"unraid_disk_health", "unraid_notifications_list",
|
||||
"unraid_shares_list", "unraid_share_inspect",
|
||||
"unraid_files_inventory",
|
||||
"unraid_system_connection_test", "unraid_system_shell_readonly",
|
||||
))
|
||||
readonly = copy.deepcopy(mua_source)
|
||||
|
||||
Reference in New Issue
Block a user