defmodule Symbiont.Telepathy.Supervisor do @moduledoc """ Supervision subtree for Telepathy (email communication layer). Children: - MessageStore — JSONL-backed message persistence - JMAP — Fastmail JMAP client with periodic inbox polling """ use Supervisor def start_link(opts) do Supervisor.start_link(__MODULE__, opts, name: __MODULE__) end @impl true def init(opts) do messages_path = Keyword.get(opts, :messages_path, "/data/telepathy/messages.jsonl") poll_interval_ms = Keyword.get(opts, :poll_interval_ms, 60_000) children = [ {Symbiont.Telepathy.MessageStore, path: messages_path}, {Symbiont.Telepathy.JMAP, poll_interval_ms: poll_interval_ms} ] Supervisor.init(children, strategy: :rest_for_one) end end