Merge remote-tracking branch 'origin/main' into bb/gui

# Conflicts:
#	tui_gateway/server.py
This commit is contained in:
Brooklyn Nicholson
2026-05-13 07:37:05 -04:00
37 changed files with 281 additions and 728 deletions
+3 -1
View File
@@ -314,7 +314,9 @@ DANGEROUS_PATTERNS = [
(r'\bdd\s+.*if=', "disk copy"),
(r'>\s*/dev/sd', "write to block device"),
(r'\bDROP\s+(TABLE|DATABASE)\b', "SQL DROP"),
(r'\bDELETE\s+FROM\b(?!.*\bWHERE\b)', "SQL DELETE without WHERE"),
# Use [^\n]* instead of .* so DOTALL mode does not cause a WHERE clause on the
# *next* line to satisfy the negative lookahead, silently allowing DELETE without WHERE.
(r'\bDELETE\s+FROM\b(?![^\n]*\bWHERE\b)', "SQL DELETE without WHERE"),
(r'\bTRUNCATE\s+(TABLE)?\s*\w', "SQL TRUNCATE"),
(r'>\s*/etc/', "overwrite system config"),
(r'\bsystemctl\s+(-[^\s]+\s+)*(stop|restart|disable|mask)\b', "stop/restart system service"),
+2 -1
View File
@@ -461,7 +461,8 @@ async def _send_via_adapter(
adapter = None
if adapter is not None:
try:
result = await adapter.send(chat_id=chat_id, content=chunk)
metadata = {"thread_id": thread_id} if thread_id else None
result = await adapter.send(chat_id=chat_id, content=chunk, metadata=metadata)
except asyncio.CancelledError:
raise
except Exception as e:
+3 -1
View File
@@ -130,7 +130,9 @@ def detect_audio_environment() -> dict:
try:
devices = sd.query_devices()
if not devices:
if termux_capture:
if os.environ.get('PULSE_SERVER'):
notices.append("No PortAudio devices detected but PULSE_SERVER is set -- continuing")
elif termux_capture:
notices.append("No PortAudio devices detected, but Termux:API microphone capture is available")
else:
warnings.append("No audio input/output devices detected")
+2 -1
View File
@@ -593,7 +593,8 @@ def _resolve_web_extract_auxiliary(model: Optional[str] = None) -> tuple[Optiona
extra_body: Dict[str, Any] = {}
if client is not None and _is_nous_auxiliary_client(client):
from agent.auxiliary_client import get_auxiliary_extra_body
extra_body = get_auxiliary_extra_body() or {"tags": ["product=hermes-agent"]}
from agent.portal_tags import nous_portal_tags
extra_body = get_auxiliary_extra_body() or {"tags": nous_portal_tags()}
return client, effective_model, extra_body