LemonChannels.Adapters.Telegram.Transport.CommandRouter (lemon_channels v0.1.0)

View Source

Command and message-routing decision tree for the Telegram transport shell.

Summary

Types

callbacks()

@type callbacks() :: %{
  bot_username: binary() | nil,
  handle_cwd_command: (map(), map() -> map()),
  handle_checkpoint_command: (map(), map() -> map()),
  handle_goal_command: (map(), map() -> map()),
  handle_kanban_command: (map(), map() -> map()),
  handle_media_command: (map(), map() -> map()),
  handle_media_auto_put: (map(), map() -> map()),
  handle_model_command: (map(), map() -> map()),
  handle_new_session: (map(), map(), binary() | nil -> map()),
  handle_reload_command: (map(), map() -> map()),
  handle_resume_command: (map(), map() -> map()),
  handle_thinking_command: (map(), map() -> map()),
  handle_topic_command: (map(), map() -> map()),
  handle_trigger_command: (map(), map() -> map()),
  maybe_apply_selected_resume: (map(), map(), binary() -> map()),
  maybe_cancel_by_reply: (map(), map() -> any()),
  maybe_handle_model_picker_input: (map(), map(), binary() ->
                                      {map(), boolean()}),
  maybe_log_drop: (map(), map(), atom() -> any()),
  maybe_mark_fork_when_busy: (map(), map() -> map()),
  maybe_mark_new_session_pending: (map(), map() -> map()),
  maybe_switch_session_from_reply: (map(), map() -> {map(), map()}),
  should_ignore_for_trigger?: (map(), map(), binary() -> boolean()),
  submit_inbound_now: (map(), map() -> map())
}

Functions

handle_inbound_message(state, inbound, callbacks)

@spec handle_inbound_message(map(), map(), callbacks()) :: map()