Mead.Gateway (mead v0.1.1)

Copy Markdown View Source

The single plug behind the shared Bandit listener: it hands a request to the MCP plug or to the deck plug by the first segment of its path.

  • /deck and anything under it go to the deck plug, when there is one;
  • everything else goes to the MCP plug, when there is one, so its own refusals (the JSON-RPC 404 for a path other than /mcp) stay byte for byte what they were before the deck existed;
  • with no plug to answer, the reply is an empty 404.

Only the first segment selects a plug; the plugs do the rest of their own routing and refuse what they do not serve. The options are mcp: and deck:, each nil or {module, options}; each plug's init/1 runs once, here.