pporlock System Architecture

pporlock System Architecture An architecture diagram generated by Archify. Chrome · proxied to :8080 · Architecture component Chrome proxied to :8080 Chrome Extension · MV3 · proxy · tab ids · Architecture component · extension/ Chrome Extension MV3 · proxy · tab ids extension/ Web UI · React · served by daemon · Architecture component · web/ Web UI React · served by daemon web/ AI Agent · any MCP client · AI authoring surface AI Agent any MCP client MCP Server · stdio · 25 tools · AI authoring surface · mcp/ MCP Server stdio · 25 tools mcp/ mitmproxy Addon · TLS termination :8080 · pporlock daemon — one process, one event loop (pporlock run) · addon/ mitmproxy Addon TLS termination :8080 addon/ Control API · loopback :8081 · bearer · pporlock daemon — one process, one event loop (pporlock run) · control/ Control API loopback :8081 · bearer control/ Rules Engine · evaluate · provenance · pporlock daemon — one process, one event loop (pporlock run) · engine/ Rules Engine evaluate · provenance engine/ Capture · ring · redact · dry run · pporlock daemon — one process, one event loop (pporlock run) · capture/ Capture ring · redact · dry run capture/ Module Library · yaml · py · assets/ · on disk, user-owned · examples/modules/ Module Library yaml · py · assets/ examples/modules/ Sessions & State · SQLite · token · sidecars · on disk, user-owned · ~/.pporlock Sessions & State SQLite · token · sidecars ~/.pporlock Origin Servers · upstream HTTPS · Architecture component Origin Servers upstream HTTPS HTTPS via proxy upstream TLS normalize → evaluate → apply loads modules flow + provenance redacted on write chrome.proxy set / clear pairing code · health · tab ids bearer + SSE /events MCP over stdio loopback HTTP, token from state dir enable · reload · profiles flows · sessions · dry run pporlock daemon — one process, one event loop (pporlock run) on disk, user-owned AI authoring surface Legend Frontend Backend Database Security External

MCP: the AI authoring loop

  • • start_recording → reproduce in Chrome → stop_recording; list_session_flows + get_provenance say what happened and why
  • • suggest_rule_from_flow → validate_module → create_module, which arrives disabled; dry_run replays the session through the live evaluator
  • • set_module_enabled is the one separate step that touches live browsing

What MCP deliberately cannot do

  • • Enable a module as a side effect of creating or updating it (MCP-030)
  • • Unmask a redacted value; the client refuses unmask parameters (MCP-003). Unmask is web-UI-only, live-ring-only, per value
  • • Return unbounded output: every tool states its token cost and pages its listings (MCP-005)

Three clients, one control API

  • • Web UI: bearer token plus streaming SSE, the only surface with unmask
  • • Extension: pairing code instead of the token file; proxy control, tab attribution, fail-safe
  • • MCP server: reads the token file as the user and speaks the same loopback HTTP as everyone else