MCPcopy Create free account

hub / github.com/ahtavarasmus/lightfriend / functions

Functions2,907 in github.com/ahtavarasmus/lightfriend

↓ 2 callersFunctionget_respond_to_email_tool_for_user
( emails: &[String], )
backend/src/tool_call_utils/email.rs:85
↓ 2 callersMethodget_rules
(&self, user_id: i32)
backend/src/repositories/ontology_repository.rs:2374
↓ 2 callersFunctionget_send_email_tool_for_user
(emails: &[String])
backend/src/tool_call_utils/email.rs:8
↓ 2 callersMethodget_server_by_id
Get a specific MCP server by ID
backend/src/repositories/mcp_repository.rs:82
↓ 2 callersMethodget_server_by_name
Get a specific MCP server by name
backend/src/repositories/mcp_repository.rs:98
↓ 2 callersFunctionget_store_path
Helper function to get the store path
backend/src/handlers/signal_auth.rs:87
↓ 2 callersFunctionget_store_path
Helper function to get the store path
backend/src/handlers/telegram_auth.rs:314
↓ 2 callersMethodget_tesla_token_info
( &self, user_id: i32, )
backend/src/repositories/user_repository.rs:1009
↓ 2 callersMethodget_unacknowledged_count
Get count of unacknowledged alerts
backend/src/repositories/admin_alert_repository.rs:78
↓ 2 callersMethodget_user_by_matrix_user_id
Look up a user by their Matrix username. Queries PG `user_secrets` for the user_id, then PG `users` for the full User.
backend/src/repositories/user_repository.rs:1699
↓ 2 callersMethodget_user_tokens_since
Get total tokens used by a specific user since a given timestamp.
backend/src/repositories/llm_usage_repository.rs:246
↓ 2 callersMethodget_users_by_tier
(&self, tier: &str)
backend/src/repositories/user_core.rs:366
↓ 2 callersFunctionget_weather
( state: &Arc<AppState>, location: &str, units: &str, forecast_type: &str, user_id: i32, )
backend/src/utils/tool_exec.rs:42
↓ 2 callersFunctiongithub_headers
()
scripts/update_enclave_dependency_pins.py:54
↓ 2 callersFunctionhandle_mcp_tool_call
Handle an MCP tool call from the AI. Tool names are in format "mcp:{server_name}:{tool_name}"
backend/src/tool_call_utils/mcp.rs:127
↓ 2 callersFunctionhandle_realtime_function_call
( item: &serde_json::Value, init: &OpenAiRealtimeInit, state: &Arc<AppState>, openai_tx: &mpsc
backend/src/api/voice_pipeline.rs:1528
↓ 2 callersMethodhas_recent_notification
( &self, user_id: i32, activity_type: &str, seconds_ago: i32, )
backend/src/repositories/user_repository.rs:764
↓ 2 callersFunctionhas_service_member
(service: &str, member_localparts: &[String])
backend/src/utils/bridge.rs:183
↓ 2 callersFunctionhash_token
(raw: &str)
backend/src/handlers/webhook_sms_handlers.rs:493
↓ 2 callersFunctionhash_token
(token: &str)
backend/src/handlers/auth_handlers.rs:33
↓ 2 callersFunctionhumanize_tesla_cmd_short
(cmd: &str)
frontend/src/dashboard/rule_builder.rs:6683
↓ 2 callersFunctionid_re
Shared compiled regex — `[id=<digits>]` with no whitespace.
backend/src/utils/id_verifier.rs:28
↓ 2 callersFunctioninit_session
( state: &Arc<AppState>, user_id: i32, stream_sid: String, is_outbound: bool, transport: T
backend/src/api/voice_pipeline.rs:1971
↓ 2 callersFunctionis_actionable
Decide whether a Twilio error code should page the admin immediately. Unknown codes default to Actionable so new failure modes don't go silent.
backend/src/utils/twilio_error_codes.rs:177
↓ 2 callersMethodis_alert_type_disabled
Check if an alert type is disabled
backend/src/repositories/admin_alert_repository.rs:110
↓ 2 callersFunctionis_key_conflict
(e: &matrix_sdk::Error)
backend/src/utils/matrix_auth.rs:365
↓ 2 callersFunctionis_local_number_country
Check if phone number is from a country with local Twilio numbers. These countries use hardcoded pricing and have dedicated Twilio numbers.
backend/src/utils/country.rs:21
↓ 2 callersFunctionis_notification_only_code
Check if country code is notification-only (all non-local countries)
backend/src/handlers/pricing_handlers.rs:450
↓ 2 callersFunctionis_notification_only_country
Check if phone number is from a notification-only country. Returns true for ANY valid phone number that's not a local-number country. These countries
backend/src/utils/country.rs:31
↓ 2 callersFunctionis_notification_only_country_code
Check if a country code is a notification-only country. Returns true for ANY country code that's not a local-number country.
backend/src/utils/country.rs:41
↓ 2 callersFunctionis_one_time_key_conflict
Helper function to detect the one-time key conflict error
backend/src/handlers/signal_auth.rs:78
↓ 2 callersFunctionis_one_time_key_conflict
Helper function to detect the one-time key conflict error
backend/src/handlers/telegram_auth.rs:305
↓ 2 callersFunctionis_private_ip
(ip: IpAddr)
backend/src/handlers/mcp_handlers.rs:25
↓ 2 callersMethodis_type
(&self, t: &str)
frontend/src/dashboard/rule_builder.rs:152
↓ 2 callersFunctionis_us_or_ca
Check if country is US or CA
backend/src/handlers/pricing_handlers.rs:445
↓ 2 callersFunctionkeep_subscription_plan
( state: &Arc<AppState>, user_id: i32, remaining_plan: stripe_webhook_logic::PlanType, )
backend/src/handlers/stripe_handlers.rs:168
↓ 2 callersMethodlist_active_rules
List a user's active rules of a given type (e.g. all muted senders).
backend/src/repositories/commitment_repository.rs:137
↓ 2 callersMethodlist_all
(&self)
backend/src/repositories/provider_routes_repository.rs:20
↓ 2 callersFunctionllm_call_with_gateway
( state: &Arc<AppState>, purpose: ModelPurpose, messages: &[chat_completion::ChatCompletionMessage
backend/src/api/twilio_sms.rs:27
↓ 2 callersMethodlog_bandwidth
( &self, user_id: i32, bridge_type: &str, direction: &str, bytes_estim
backend/src/repositories/bandwidth_repository.rs:27
↓ 2 callersFunctionlog_bridge_error_notice
( direction: &str, user_id: i32, service: &str, room_id: &str, content: &str, )
backend/src/utils/bridge.rs:145
↓ 2 callersFunctionlog_llm_usage
Fire-and-forget helper to log LLM usage from a ChatCompletionResponse. Extracts token counts from the response's `usage` field and writes to the repos
backend/src/ai_config.rs:1254
↓ 2 callersMethodlog_message_status
Log message status to database for tracking.
backend/src/services/twilio_message_service.rs:589
↓ 2 callersFunctionlog_sms_usage
( state: &Arc<AppState>, user_id: i32, sid: Option<String>, processing_time_secs: u64, err
backend/src/api/twilio_sms/delivery.rs:184
↓ 2 callersFunctionmake_notification_call_with_from
Same as `make_notification_call`, but optionally uses an explicit FROM number instead of the user's preferred number. Used by the US voice fallback pa
backend/src/api/voice_pipeline.rs:517
↓ 2 callersMethodmark_room_digest_delivered
Mark "later"-urgency messages in a room as digest-delivered (user replied, no need to remind).
backend/src/repositories/ontology_repository.rs:1899
↓ 2 callersFunctionmask_phone
Mask a phone number for display in the digest: keep the first 3 and last 4 digits, replace the middle with stars. Mirrors the per-event email format.
backend/src/utils/email.rs:462
↓ 2 callersFunctionmax_similarity
Return the highest cosine similarity between `query` and any vector in `candidates`. Returns 0.0 when `candidates` is empty. Skips candidates of the w
backend/src/utils/embedding_similarity.rs:58
↓ 2 callersFunctionmax_user_label_similarity
Brute-force max cosine similarity between `query` and the user's stored embeddings of the given label type. Returns 0.0 on lookup failure or when ther
backend/src/proactive/system_behaviors.rs:2018
↓ 2 callersFunctionmaybe_fetch_timestamp
( client: &Client, rpc_url: &str, block_hex: Option<String>, )
backend/src/handlers/trust_chain_handlers.rs:354
↓ 2 callersMethodmock_room_members
Mock room members endpoint
backend/tests/matrix_mock_test.rs:171
↓ 2 callersMethodmonitor_charging_complete
Monitor charging until complete
backend/src/api/tesla.rs:978
↓ 2 callersFunctionmonitor_whatsapp_connection
Poll `!wa list-logins` until a CONNECTED login appears, then mark the bridge connected and start sync. We do NOT try to match the bridge's transient
backend/src/handlers/whatsapp_auth.rs:876
↓ 2 callersFunctionmulaw_encode
ITU-T G.711 mu-law encode
backend/src/api/voice_pipeline.rs:41
↓ 2 callersMethodname
(&self)
backend/src/tools/email.rs:16
↓ 2 callersMethodnavigate_to_supercharger
Navigate to a Supercharger using navigation_sc_request endpoint This should trigger battery preconditioning since Tesla knows it's a Supercharger Requ
backend/src/api/tesla.rs:581
↓ 2 callersFunctionnew_registry
()
backend/src/services/data_purge.rs:112
↓ 2 callersFunctionnormalize_email
(raw: &str)
backend/src/handlers/admin_handlers.rs:111
↓ 2 callersFunctionnormalize_openai_realtime_voice
(voice: &str)
backend/src/api/voice_pipeline.rs:1274
↓ 2 callersFunctionnormalize_phone
Normalize a phone number to E.164 with `+` prefix.
backend/src/handlers/sinch_handlers.rs:69
↓ 2 callersFunctionnormalize_phone
(phone: &str)
backend/src/repositories/user_core.rs:32
↓ 2 callersFunctionnormalize_tesla_partner_domain
(url_or_domain: &str)
backend/src/api/tesla.rs:1076
↓ 2 callersFunctionnormalize_voice_provider
(_provider: &str)
frontend/src/profile/settings.rs:34
↓ 2 callersMethodnotify
Notify the user via an explicit channel + address. The caller is responsible for resolving the user's notification preference (the router intentionall
backend/src/channels/router.rs:97
↓ 2 callersMethodnotify_activity_feed
Signal that the activity feed has new data for a user. Subscribers (SSE connections) will notify the frontend to re-fetch.
backend/src/lib.rs:358
↓ 2 callersFunctionnow_secs
()
backend/src/handlers/person_handlers.rs:400
↓ 2 callersFunctionont_message_to_bridge_message
Convert an OntMessage to a BridgeMessage for display.
backend/src/utils/bridge.rs:1068
↓ 2 callersFunctionopenai_realtime_available
()
backend/src/api/voice_pipeline.rs:356
↓ 2 callersFunctionopenai_response_create
(instructions: Option<String>)
backend/src/api/voice_pipeline.rs:1411
↓ 2 callersFunctionpack_embedding
Embedding similarity helpers for the commitment detection signal memory. Embeddings are persisted as raw little-endian f32 bytes in `commitment_label
backend/src/utils/embedding_similarity.rs:12
↓ 2 callersFunctionparse_imap_message
Pure parser: turn a `async_imap::types::Fetch` message into an `ImapEmailPreview`. No DB access, no ontology interaction. Extracted from the old inlin
backend/src/handlers/imap_handlers.rs:169
↓ 2 callersFunctionparse_list_logins_line
Parse one line of a bridgev2 `list-logins` response. Returns `None` if the line does not match the verified format exactly. The caller should feed bod
backend/src/utils/bridge_responses.rs:157
↓ 2 callersFunctionpercent
(part: i64, total: i64)
backend/src/handlers/dashboard_handlers.rs:310
↓ 2 callersFunctionperform_search
Perform YouTube search API call
backend/src/tool_call_utils/youtube.rs:172
↓ 2 callersFunctionperform_subscribe
Helper to perform subscribe with a given token
backend/src/handlers/youtube.rs:1027
↓ 2 callersFunctionperform_unsubscribe
Helper to perform unsubscribe with a given token
backend/src/handlers/youtube.rs:1169
↓ 2 callersFunctionperform_youtube_search
Helper to perform YouTube search with a given token
backend/src/handlers/youtube.rs:339
↓ 2 callersMethodpick_channels_for
Decide the ordered list of channel ids to try for this user. Public so callers (tests, admin diagnostics) can introspect. Order of precedence: 1. `us
backend/src/channels/router.rs:235
↓ 2 callersFunctionplan_type_from_product
Determine plan type from a Stripe product ID. Assistant products are treated as legacy Autopilot subscriptions. Unknown pre-cutoff subscription produ
backend/src/utils/country.rs:67
↓ 2 callersFunctionpost_comment_with_token
Helper to post a comment with a given token
backend/src/handlers/youtube.rs:1515
↓ 2 callersFunctionprefetch_sources
( state: &Arc<AppState>, rule: &OntRule, sources: &[FetchSource], )
backend/src/proactive/rules.rs:695
↓ 2 callersFunctionpricing_table_config
()
backend/src/handlers/stripe_handlers.rs:82
↓ 2 callersFunctionprocess_new_emails
Fetch new emails from an already-open IMAP session, insert them into the ontology, and mark them as processed. Used by the IDLE loop on every wake eve
backend/src/handlers/imap_handlers.rs:608
↓ 2 callersFunctionprocess_utterance
( session: &mut CallSession, speech_samples: &[i16], send_tx: &mpsc::Sender<Message>, )
backend/src/api/voice_pipeline.rs:2060
↓ 2 callersMethodpurge_old_events
Purge completed/dismissed/expired/notified events older than max_age_secs.
backend/src/repositories/ontology_repository.rs:2337
↓ 2 callersFunctionrate_video_with_token
Helper to rate a video with a given token
backend/src/handlers/youtube.rs:1725
↓ 2 callersMethodrecord_bridge_disconnection
Bridge disconnection event methods
backend/src/repositories/user_repository.rs:1725
↓ 2 callersFunctionrecord_cleanup_command_accepted
( state: &Arc<AppState>, job: &EventCleanupJob, sent_command: &SentAdminCommand, )
backend/src/utils/tuwunel_event_cleanup.rs:201
↓ 2 callersFunctionrecord_cleanup_enqueued
(state: &Arc<AppState>, job: &EventCleanupJob)
backend/src/utils/tuwunel_event_cleanup.rs:162
↓ 2 callersMethodrecord_failure
( &self, event_id: &str, attempt: u8, status: &str, error: &str,
backend/src/repositories/tuwunel_cleanup_repository.rs:163
↓ 2 callersFunctionrefresh_youtube_token
Refresh YouTube token
backend/src/tool_call_utils/youtube.rs:375
↓ 2 callersFunctionregister_partner_in_regions
()
backend/src/api/tesla.rs:1045
↓ 2 callersFunctionrender_fyi_inline
Render FYI section with per-item summaries, similar to high-signal sections but with a higher cap since these are shorter teasers. Adjacent messages f
backend/src/jobs/scheduler.rs:1437
↓ 2 callersFunctionrequest_headers
(url: str, headers: dict[str, str] | None = None)
scripts/update_enclave_dependency_pins.py:42
↓ 2 callersMethodrequired_failure_names
(&self)
backend/src/api/tesla.rs:78
↓ 2 callersMethodreset_included_usage_window
( &self, user_id: i32, window_start: i32, window_end: i32, included_cr
backend/src/repositories/user_subscriptions.rs:52
↓ 2 callersFunctionresolve_email_account
Resolve which email account to use based on the `from` parameter. - If `from` is specified, look up that specific account. - If only one account exist
backend/src/tool_call_utils/email.rs:153
↓ 2 callersFunctionresolve_prompt_template
Resolve a prompt string. If it starts with "template:", expand to the current canonical prompt text. Otherwise return as-is (custom prompt).
backend/src/proactive/rules.rs:123
↓ 2 callersFunctionresolve_telegram_room
Resolve a Telegram chat_id (numeric tgid as string) to a joined Matrix Room, materializing the portal via `!tg pm <id>` when the bridge DB has no port
backend/src/utils/bridge.rs:1261
↓ 2 callersFunctionresolve_whatsapp_room
Resolve a WhatsApp chat_id (JID) to a joined Matrix Room, materializing the portal via `!wa start-chat` when needed. Only used by the WhatsApp send p
backend/src/utils/bridge.rs:1151
← previousnext →501–600 of 2,907, ranked by callers