API Reference lemon_gateway v#0.1.0
View SourceModules
Public API for submitting execution commands to the Lemon Gateway.
Simple interface for AI chat completions.
OTP application for LemonGateway.
Struct representing a binding between a transport chat/topic and a project configuration.
Resolves bindings and settings for a given chat scope.
Behaviour for slash command plugins.
Registry of slash command modules.
Implements the /cancel slash command.
Centralized configuration for LemonGateway.
Loads gateway configuration and converts raw maps into typed structs (Project, Binding, etc.) for use by the LemonGateway.Config GenServer.
Resolves the default working directory for engine runs.
Centralized dependency availability and startup manager for LemonGateway.
Development helpers.
Behaviour for AI engine plugins.
Parses and strips leading engine directives from user input text.
Mutex lock preventing concurrent engine runs on the same session.
Registry of available AI engine modules.
Engine adapter for the Claude Code CLI tool.
Shared CLI subprocess runner used by the Claude, Codex, Droid, Opencode, and Pi engines.
Engine adapter for the OpenAI Codex CLI tool.
Engine adapter for the Factory Droid CLI tool.
A test and debug engine that echoes the job prompt back as the output.
Engine adapter for the Kimi CLI tool.
Engine adapter for the Opencode CLI tool.
Engine adapter for the Pi runner CLI tool.
Environment variables read by lemon_gateway — engine execution: concurrency, transports, and node identity.
Event types for LemonGateway run lifecycle.
Streaming delta event for incremental text output.
Gateway-private execution request adapter.
Health check system for the gateway.
Plug router that serves the /healthz HTTP health-check endpoint.
Supervisor for gateway-owned ingress children.
Represents a project configuration.
Behaviour for rendering engine events into user-facing text.
Basic plain-text renderer implementing the LemonGateway.Renderer behaviour.
Transport-agnostic run execution.
DynamicSupervisor that manages LemonGateway.Run processes.
Runtime API for submitting and cancelling gateway runs.
Concurrency-limited execution scheduler.
Shared utility functions used across LemonGateway modules.
Configuration reader for SMS webhook settings.
GenServer that stores and queries inbound SMS messages.
Typed wrapper for the SMS inbox table.
Validates Twilio webhook request signatures using HMAC-SHA1.
Plug router that handles inbound Twilio SMS webhooks.
Starts a Bandit HTTP server to host the SMS webhook endpoint.
Process registry for ThreadWorker processes.
Per-conversation FIFO worker.
DynamicSupervisor that manages LemonGateway.ThreadWorker processes.
LemonAgent tool for managing Lemon internal cron/scheduled jobs.
LemonAgent tool definition for sending files to Discord.
LemonAgent tool for claiming an inbound SMS message by its Twilio MessageSid.
LemonAgent tool that returns the configured SMS inbox phone number.
LemonAgent tool for listing and filtering inbound SMS messages.
LemonAgent tool that polls the SMS inbox for incoming verification codes.
LemonAgent tool definition for sending images to Telegram.
Behaviour for transport plugins that receive messages from external sources.
Registry of available transport modules.
Supervisor that starts all enabled transport modules registered in TransportRegistry.
HTTP webhook transport for LemonGateway.
Runtime config and integration lookup helpers for the webhook transport.
Idempotency-key reservation and response persistence for webhook submissions.
Builds router submissions for webhook requests and dispatches them through RouterBridge.
Request parsing, authentication, and metadata helpers for the webhook transport.
Request payload normalization and callback metadata helpers for webhook requests.
Response shaping, completion waiting, and callback delivery helpers for the webhook transport.
Response shaping and callback wait orchestration for webhook runs.
Authorization and signature validation for webhook requests.
Run-context assembly and router-facing run request construction for the webhook transport.
Core type definitions for the LemonGateway domain.
Internal engine-facing compatibility type for gateway run execution.
Pure-Elixir audio format conversion for Twilio voice calls.
GenServer that manages a single voice call session.
Configuration for the voice transport.
WebSocket client for Deepgram streaming speech-to-text.
Downloads Twilio call recordings to a local directory.
Manages call recordings via the Twilio REST API.
WebSocket handler for Twilio Media Streams.
Plug router that handles Twilio voice webhooks.
Where gateway tools write files they hand back to a channel.
Mix Tasks
Interactively prompts for and stores all voice API secrets in the encrypted secrets store.