LogInterceptor: Intercepts operational log events emitted byLiopLogger(transports, peer-to-peer gossip, routing).AuditInterceptor: Intercepts cryptographic audit entries emitted byAuditLoggerafter hash sealing (SOC 2 Type II and HIPAA compliance).
Interceptor Architecture
Operational Log Interceptor (LogInterceptor)
LiopLogger emits structured log messages exclusively to stderr to adhere to MCP stdio stream separation constraints (reserving stdout strictly for JSON-RPC framing). The LogInterceptor hook enables developers to forward, analyze, or filter these messages programmatically.
Contract Definition
Registration and Lifecycle
The interceptor is registered directly on theLiopLogger singleton instance:
Recursion Guard
If an interceptor implementation invokes code that triggersLiopLogger (directly or through dependencies), an infinite re-entrant loop could trigger a stack overflow. LiopLogger maintains an internal re-entrancy flag (_isIntercepting) that suppresses recursive interceptor dispatch within the same call frame while preserving normal stderr output.
Cryptographic Audit Interceptor (AuditInterceptor)
AuditLogger records immutable execution traces for every Logic-on-Origin workload. Each AuditEntry is cryptographically bound to its predecessor via SHA-256 hash chaining (prevEntryHash and entryHash), forming an unalterable audit ledger.
Contract Definition
Post-Seal Invariant
TheAuditInterceptor hook executes strictly after the audit entry has been sealed:
- The SHA-256 hash of the entry is calculated and verified.
- The hash chain pointer (
lastEntryHash) is updated. - The entry is persisted to the local JSONL ledger file (if configured).
- The interceptor receives an immutable deep clone created via
Object.freeze(structuredClone(fullEntry)).
Integration Examples
Example 1: Semantic Threat Detection with TypeSafe Jev
Analyze operational errors in real time using TypeSafe Jev System One judgments:Example 2: Compliance Event Streaming to SIEM
Stream sealed audit entries to an external SOC 2 aggregator:Universal Out-of-Band Deployment
UnlikeGatewayInterceptor (which is strictly restricted to perimeter gateways), LogInterceptor and AuditInterceptor can and should be deployed on EVERY node across all tiers:
Because both hooks execute asynchronously via
fire-and-forget (Promise.resolve().then(...) or un-awaited fetch()), external inference latency or remote SIEM outages introduce exactly 0 ms of delay to client RPC responses or host sandbox evaluation.
LIOP Interceptor Topology: Demarcation between Ingress Admission and Enclave Isolation
Security Model Comparison
LIOP defines three complementary interceptor hooks. None replace or compromise the 6 security layers of The Shield:Related References
- Gateway Interceptor — Perimeter admission hook for
LiopHybridGateway. - Audit & Compliance — Hash-chain specifications and SOC 2 Type II controls.