# `Mnemosyne.Supervisor`
[🔗](https://github.com/edlontech/mnemosyne/blob/main/lib/mnemosyne/supervisor.ex#L1)

Top-level supervisor for the Mnemosyne runtime.

Starts the process tree with `:rest_for_one` strategy:
SessionRegistry -> RepoRegistry -> TaskSupervisor -> RepoSupervisor -> SessionSupervisor.

Shared defaults (config, LLM adapter, embedding adapter, notifier) are stored
in `:persistent_term` and applied to each repo opened via `Mnemosyne.open_repo/2`.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `get_defaults`

```elixir
@spec get_defaults(module()) :: %{
  config: term(),
  llm: module(),
  embedding: module(),
  notifier: module()
}
```

Returns shared defaults (config, LLM adapter, embedding adapter)
for the given supervisor instance.

# `registry_name`

```elixir
@spec registry_name(module()) :: module()
```

Derives the session Registry name for the given supervisor.

# `repo_registry_name`

```elixir
@spec repo_registry_name(module()) :: module()
```

Derives the repo Registry name for the given supervisor.

# `repo_supervisor_name`

```elixir
@spec repo_supervisor_name(module()) :: module()
```

Derives the RepoSupervisor name for the given supervisor.

# `session_supervisor_name`

```elixir
@spec session_supervisor_name(module()) :: module()
```

Derives the SessionSupervisor name for the given supervisor.

# `task_supervisor_name`

```elixir
@spec task_supervisor_name(module()) :: module()
```

Derives the TaskSupervisor name for the given supervisor.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
