LemonCore.Application (lemon_core v0.1.0)

View Source

Application supervisor for the LemonCore OTP application.

This module is the entry point for the lemon_core application. It starts the supervision tree with the following children:

  • The LemonCore.Bus backend - Phoenix.PubSub, or a Registry when phoenix_pubsub is not available
  • LemonCore.ACPClientBridge - Registry for direct ACP client request/reply
  • LemonCore.ConfigCache - Configuration caching service
  • LemonCore.Store - Key-value storage backend
  • LemonCore.RunHistoryStore - Per-session run history (separate SQLite DB)
  • LemonCore.ConfigReloader - Runtime config reload orchestrator
  • LemonCore.ConfigReloader.Watcher - File-system watcher for config changes

The supervisor uses a :one_for_one strategy, meaning if a child process crashes, only that process will be restarted.

LemonCore.RunHistoryStore is only started when the optional :exqlite dependency is present. Durable memory lives in the lemon_memory app and supervises itself.

Configuration

The application reads configuration from the application environment:

  • :lemon_core, LemonCore.ConfigCache - Options passed to ConfigCache
  • :lemon_core, :logging - File logging configuration (optional)
  • :lemon_core, :logger - :logger handlers to attach at boot (e.g. the Sentry error-reporting handler; see docs/error-reporting.md). Empty unless SENTRY_DSN is set at runtime, in which case this is a no-op.

Examples

# Starting the application
Application.ensure_all_started(:lemon_core)

# Accessing the supervisor
Process.whereis(LemonCore.Supervisor)