Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

libtmux_mcp.middleware.AuditMiddleware

Python
  • Python
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust Unavailable
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

API reference · Markdown

class libtmux_mcp.middleware.AuditMiddleware
class [source]
class [source]
class libtmux_mcp.middleware.AuditMiddleware
Bases:
  • Middleware

Emit a structured log record per tool invocation.

Records carry: tool name, outcome (ok/error), duration in ms, error type on failure, the fastmcp client_id / request_id when available, and a redacted argument summary. The logger name is libtmux_mcp.audit by default so operators can route it independently (e.g. to a JSON file) without touching the module libtmux_mcp logger.

Members

__init__

__init__ ( self , logger_name : str = "libtmux_mcp.audit" ) → None
method [source]
method [source]
__init__

on_call_tool

on_call_tool ( self , context : MiddlewareContext , call_next : t.Any ) → t.Any
methodasync [source]
methodasync [source]
on_call_tool

Wrap the tool call with a timer and emit one audit record.

Esc

Type to search.