mirror of
https://github.com/invariantlabs-ai/invariant-gateway.git
synced 2026-07-06 10:57:50 +02:00
line logging
This commit is contained in:
@@ -396,6 +396,7 @@ def stream_and_forward_stdout(mcp_process: subprocess.Popen, ctx: McpContext) ->
|
||||
line_str = line.decode(UTF_8_ENCODING).strip()
|
||||
if not line_str:
|
||||
continue
|
||||
mcp_log(f"[INFO] Received line: {line_str}")
|
||||
|
||||
parsed_json = json.loads(line_str)
|
||||
processed_json = hook_tool_result(ctx, parsed_json)
|
||||
@@ -435,6 +436,8 @@ def run_stdio_input_loop(ctx: McpContext, mcp_process: subprocess.Popen) -> None
|
||||
if not line:
|
||||
break
|
||||
|
||||
mcp_log(f"[INFO] Received line: {line}")
|
||||
|
||||
# Try to decode and parse as JSON to check for tool calls
|
||||
try:
|
||||
text = line.decode(UTF_8_ENCODING)
|
||||
|
||||
Reference in New Issue
Block a user