feat(serve): forward per-session service logs to remote-dl clients

Mirror each remote session's self.log into a bounded buffer, drained by the client via GET /api/session/{id}/logs and re-emitted locally. Server-account sessions get no relay. Also namespace service CLI options under service_params so a transport key (profile) no longer collides with a service's own option, on both the session and download-job paths.
This commit is contained in:
imSp4rky
2026-08-30 20:52:18 -06:00
parent d9b21229c3
commit f7b1446427
13 changed files with 553 additions and 16 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ async def stats_middleware(request: web.Request, handler: Any) -> web.StreamResp
else:
stats.requests_by_key[mask_key(request_secret_key(request))] += 1
session_id = request.match_info.get("session_id")
if session_id and request.method != "OPTIONS":
if session_id and request.method != "OPTIONS" and not request.path.endswith("/logs"):
from unshackle.core.api.session_store import get_session_store
get_session_store().record_action(