cap: Documentation
Browse Sign In

Runtime Hosting

Plugin runtime, host runtime, and relay switch behavior

PluginRuntime

  • Auto-selects mode: CLI mode when CLI args are present, Bifaci Protocol mode otherwise.
  • In Bifaci Protocol mode, runtime handles HELLO handshake, frame I/O, request routing, and stream abstractions.

PluginHostRuntime

  • Manages multiple plugin binaries with spawn-on-demand by cap URN.
  • Maintains routing tables for inbound/outbound request IDs.
  • Runs heartbeat probes and timeout-based health checks.
  • Rejects Bifaci-Protocol-invalid frame flows (duplicate stream IDs, unknown stream IDs, frame-type violations).

RelaySwitch

  • Aggregates caps from multiple relay masters.
  • Routes REQ by cap-URN acceptance semantics and routes continuations by request IDs.
  • Performs identity verification with nonce challenge-response through the relay chain.
  • Tracks peer-initiated requests for distinct cleanup semantics.

References