Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ahtavarasmus/lightfriend
/ functions
Functions
2,907 in github.com/ahtavarasmus/lightfriend
⨍
Functions
2,907
◇
Types & classes
857
↓ 2 callers
Function
review_action_text
(action_type: &str, config: &serde_json::Value)
frontend/src/dashboard/rule_builder.rs:6628
↓ 2 callers
Function
room_name_matches_service
(room_name: &str, service: &str)
backend/src/utils/bridge.rs:173
↓ 2 callers
Function
run_urgency_classification
Classify urgency of an incoming message and notify user if needed. Runs after a delay, only for unseen messages.
backend/src/proactive/system_behaviors.rs:72
↓ 2 callers
Function
save_accountability_friend_name
( value: UseStateHandle<String>, original: UseStateHandle<String>, save_state: UseStat
frontend/src/profile/settings.rs:1815
↓ 2 callers
Function
save_accountability_friend_phone
Helper: save accountability friend phone (called from blur and Enter handlers)
frontend/src/profile/settings.rs:1762
↓ 2 callers
Function
save_info
Helper function to save info
frontend/src/profile/settings.rs:622
↓ 2 callers
Function
save_location
Helper function to save location
frontend/src/profile/settings.rs:711
↓ 2 callers
Function
save_nearby_places
Helper function to save nearby_places
frontend/src/profile/settings.rs:799
↓ 2 callers
Function
save_nickname
Helper function to save nickname
frontend/src/profile/settings.rs:534
↓ 2 callers
Function
search_bridge_rooms_by_name
Search only the Matrix rooms the client already knows about. This is intentionally narrower than `search_bridge_rooms`: it does not call provisioning
backend/src/utils/bridge.rs:3184
↓ 2 callers
Method
search_chats_for_login
Unified DM+group search for the send path. Returns one `ChatCandidate` per possible target chat for this login, with `mxid` pre-fetched via LEFT JOIN
backend/src/repositories/whatsapp_bridge_repository.rs:293
↓ 2 callers
Method
search_chats_for_user
Unified DM + group + self-chat search for the send path. - DMs: every saved contact (LEFT JOIN portal for mxid). Covers cold DMs that have no portal
backend/src/repositories/telegram_bridge_repository.rs:198
↓ 2 callers
Function
search_telegram_chat_candidate
Fuzzy-match a user's query against the full Telegram chat list from the bridge database. Covers DMs (saved contacts, with portal mxid when materialize
backend/src/tool_call_utils/bridge.rs:337
↓ 2 callers
Function
search_whatsapp_chat_candidate
Fuzzy-match a user's query against the full WhatsApp chat list from the bridge database. Covers both DMs (whatsmeow_contacts) and groups (portal table
backend/src/tool_call_utils/bridge.rs:210
↓ 2 callers
Function
send_admin_room_command
( config: &EventCleanupConfig, target: &AdminCommandTarget, job: &EventCleanupJob, kind: &'sta
backend/src/utils/tuwunel_event_cleanup.rs:636
↓ 2 callers
Function
send_broadcast_email
Send a broadcast email (admin feature updates, announcements, etc.) Uses Resend API for reliable email delivery. Unlike other email functions, this r
backend/src/utils/email.rs:305
↓ 2 callers
Method
send_command_direct_api
Direct API command sender - bypasses proxy for commands that don't require signing Navigation commands must use direct API as the proxy doesn't suppor
backend/src/api/tesla.rs:715
↓ 2 callers
Function
send_early_reply_if_needed
( state: &Arc<AppState>, user: &User, reply: &str, channel: MessageChannel, failure_contex
backend/src/api/twilio_sms/early_flow.rs:44
↓ 2 callers
Function
send_magic_link_email_with_options
Send a magic link email for new subscribers, with option to include phone number warning Uses Resend API for reliable email delivery. If Resend is no
backend/src/utils/email.rs:87
↓ 2 callers
Function
send_password_reset_email
Send a password reset link email Uses Resend API for reliable email delivery. If Resend is not configured, logs a warning and returns Ok (graceful fa
backend/src/utils/email.rs:169
↓ 2 callers
Method
send_text
(&self, message: &str)
backend/src/api/matrix_client.rs:331
↓ 2 callers
Function
set_byot_credentials
Set BYOT credentials for a user (user pays Twilio directly, skips credit check)
backend/src/test_utils.rs:625
↓ 2 callers
Method
set_charge_limit
Set charging limit (percent must be 50-100)
backend/src/api/tesla.rs:508
↓ 2 callers
Method
set_fail_on_update
Configure to fail on next update_message_status call.
backend/src/repositories/mock_twilio_status_repository.rs:58
↓ 2 callers
Method
set_imap_connection_status
Update just the status column of a single IMAP connection. Used by the IDLE loop to flag a connection as `"auth_failed"` after 3 consecutive credentia
backend/src/repositories/user_repository.rs:375
↓ 2 callers
Method
set_prompt_event_id
Attach the resulting ont_event id after a successful track / always action. Separate from claim_prompt because the event id isn't known until the even
backend/src/repositories/commitment_repository.rs:260
↓ 2 callers
Method
set_scheduled_departure
Set a scheduled departure time to trigger preconditioning departure_time is minutes after midnight in vehicle local time (e.g., 480 = 8:00 AM)
backend/src/api/tesla.rs:597
↓ 2 callers
Method
set_selected_vehicle
( &self, user_id: i32, vin: String, name: String, vehicle_id: String,
backend/src/repositories/user_repository.rs:1080
↓ 2 callers
Function
set_twilio_webhook
( account_sid: &str, auth_token: &str, phone_number: &str, _user_id: i32, state: Arc<AppSt
backend/src/api/twilio_utils.rs:21
↓ 2 callers
Method
setup_phone_country
Detect country from phone number and set preferred number.
backend/src/services/signup_service.rs:252
↓ 2 callers
Function
setup_user_subscription
Idempotent subscription entitlement setup. Safe to call multiple times. Stripe webhooks update access and Stripe renewal metadata only; Lightfriend gr
backend/src/handlers/stripe_handlers.rs:191
↓ 2 callers
Method
share_destination
Share a destination to start navigation immediately (uses the share endpoint) This actually starts turn-by-turn navigation, unlike navigation_gps_requ
backend/src/api/tesla.rs:553
↓ 2 callers
Function
short_hash
(hash: &str, len: usize)
frontend/src/pages/trust_chain.rs:78
↓ 2 callers
Function
should_deliver_now
Pure helper used by `deliver_smart_digests` and unit tests: returns true if any of the user's slots equals the snapped current minute-of-day.
backend/src/jobs/scheduler.rs:1231
↓ 2 callers
Function
spawn_idle_task_for_connection
Spawn a per-connection IDLE task if one isn't already running. Safe to call multiple times for the same id — the second call is a no-op if the existi
backend/src/utils/imap_idle.rs:44
↓ 2 callers
Function
split_csv_line
(line: &str)
backend/src/handlers/admin_handlers.rs:86
↓ 2 callers
Function
start_openai_realtime_session
( state: Arc<AppState>, user_id: i32, mode: OpenAiRealtimeAudioMode, send_tx: mpsc::Sender<Mes
backend/src/api/voice_pipeline.rs:1744
↓ 2 callers
Method
stop_climate
Stop climate preconditioning
backend/src/api/tesla.rs:401
↓ 2 callers
Function
strip_sender_prefix
Strip a leading sender-name prefix from a summary, even when the LLM re-states it despite the prompt. Handles common patterns like: "Mom is feeling un
backend/src/jobs/scheduler.rs:1281
↓ 2 callers
Function
strip_wav_header
Strip WAV header and return raw PCM bytes. Searches for the "data" chunk and returns everything after the chunk size.
backend/src/api/voice_pipeline.rs:98
↓ 2 callers
Function
subscription_age_for_legacy_cutoff
( subscription_created: Option<i64>, )
backend/src/utils/country.rs:93
↓ 2 callers
Function
subscription_allows_access
(status: SubscriptionStatus)
backend/stripe_webhook_logic/src/lib.rs:71
↓ 2 callers
Function
subscription_snapshot
( subscription: &Subscription, is_deleted_subscription: bool, )
backend/src/handlers/stripe_handlers.rs:136
↓ 2 callers
Function
sync_contact
Add or update a contact in Resend. Idempotent - safe to call multiple times. Fails silently if RESEND_API_KEY is not set (non-critical feature).
backend/src/utils/resend_contacts.rs:40
↓ 2 callers
Method
test_connection
Test connection to an MCP server
backend/src/services/mcp_client.rs:214
↓ 2 callers
Method
text_to_speech
Text-to-speech. Returns raw WAV bytes.
backend/src/api/tinfoil_client.rs:290
↓ 2 callers
Function
timestamp_from_log_block_timestamp
(log: &serde_json::Value)
backend/src/handlers/trust_chain_handlers.rs:407
↓ 2 callers
Function
timestamp_from_unix_secs
(ts_secs: u64)
backend/src/handlers/trust_chain_handlers.rs:396
↓ 2 callers
Method
to_response
Convert PgMcpServer to McpServerResponse with decrypted URL
backend/src/repositories/mcp_repository.rs:158
↓ 2 callers
Function
trim_error
(error: &str)
backend/src/repositories/tuwunel_cleanup_repository.rs:204
↓ 2 callers
Function
try_handle_reply
(state: &Arc<AppState>, user: &User, body: &str)
backend/src/proactive/alert_feedback.rs:20
↓ 2 callers
Function
unfang_text
Re-fang defanged emails and domains. Patterns handled: - `[.]` / `(.)` / `[dot]` / `(dot)` between word chars → `.` - `(at)` / `[at]` / `[@]` between
backend/src/utils/sms_sanitizer.rs:89
↓ 2 callers
Method
unlock_vehicle
Unlock vehicle
backend/src/api/tesla.rs:381
↓ 2 callers
Function
unpack_embedding
Unpack a BYTEA-stored embedding back into f32 values. Returns None when the byte length is not a multiple of 4.
backend/src/utils/embedding_similarity.rs:22
↓ 2 callers
Method
update_accountability_enabled
( &self, _user_id: i32, _value: bool, )
backend/src/test_utils.rs:952
↓ 2 callers
Method
update_accountability_friend_phone
( &self, _user_id: i32, _value: Option<&str>, )
backend/src/test_utils.rs:936
↓ 2 callers
Method
update_agent_language
(&self, user_id: i32, language: &str)
backend/src/repositories/user_core.rs:745
↓ 2 callers
Method
update_message_commitment
Update a message's commitment-detection result (prompt + LLM output JSON). Stored for activity-feed transparency / debugging.
backend/src/repositories/ontology_repository.rs:1778
↓ 2 callers
Method
update_next_billing_date
(&self, user_id: i32, timestamp: i32)
backend/src/repositories/user_core.rs:1415
↓ 2 callers
Method
update_rule_next_fire_at
( &self, rule_id: i32, next_fire_at: i32, )
backend/src/repositories/ontology_repository.rs:2498
↓ 2 callers
Method
update_rule_status
(&self, rule_id: i32, status: &str)
backend/src/repositories/ontology_repository.rs:2458
↓ 2 callers
Method
update_timezone
(&self, user_id: i32, timezone: &str)
backend/src/repositories/user_core.rs:1154
↓ 2 callers
Method
update_youtube_access_token
( &self, user_id: i32, new_access_token: &str, expires_in: i32, )
backend/src/repositories/user_repository.rs:924
↓ 2 callers
Method
upsert_metric
Upsert a metric (insert or update)
backend/src/repositories/metrics_repository.rs:31
↓ 2 callers
Function
user_tz_offset_secs
Get the user's timezone offset in seconds from their stored timezone name.
backend/src/proactive/utils.rs:9
↓ 2 callers
Function
validate_and_normalize_e164
Parse `phone` and return canonical E.164 (e.g. "+14155551234") if it's a real phone number per libphonenumber. Returns None for invalid input. Forgiv
backend/src/services/signup_service.rs:23
↓ 2 callers
Function
validate_public_mcp_url
(url: &str)
backend/src/handlers/mcp_handlers.rs:43
↓ 2 callers
Method
video_duration
Returns the YouTube API `videoDuration` param (for Videos/Shorts filtering)
frontend/src/dashboard/youtube_quick_panel.rs:345
↓ 2 callers
Function
web_chat
( State(state): State<Arc<AppState>>, auth_user: AuthUser, Json(request): Json<WebChatRequest>, )
backend/src/handlers/profile_handlers.rs:1836
↓ 1 callers
Function
abort_idle_task
Abort a running IDLE task and remove it from the registry. Called from `delete_imap_connection` before the DB row is deleted.
backend/src/utils/imap_idle.rs:69
↓ 1 callers
Method
acknowledge_alert
Acknowledge a single alert
backend/src/repositories/admin_alert_repository.rs:88
↓ 1 callers
Method
acknowledge_all
Acknowledge all alerts
backend/src/repositories/admin_alert_repository.rs:99
↓ 1 callers
Function
add_current_user_message
( chat_messages: &mut Vec<ChatMessage>, payload: &TwilioWebhookPayload, processed_body: &str, )
backend/src/api/twilio_sms/assembly.rs:174
↓ 1 callers
Function
add_history_messages
(chat_messages: &mut Vec<ChatMessage>, ctx: &AgentContext)
backend/src/api/twilio_sms/assembly.rs:155
↓ 1 callers
Function
admin_access_token_from_matrix_user
( state: &Arc<AppState>, admin_user_id: i32, job: &EventCleanupJob, )
backend/src/utils/tuwunel_event_cleanup.rs:534
↓ 1 callers
Method
agent_mode
(self)
backend/src/api/twilio_sms.rs:258
↓ 1 callers
Function
allow_ephemeral_tesla_key
()
backend/src/utils/tesla_keys.rs:80
↓ 1 callers
Function
any_subscription_status
()
backend/stripe_webhook_logic/src/lib.rs:189
↓ 1 callers
Function
append_media_results
(final_response: String, media_results_tag: &str)
backend/src/api/twilio_sms/finalize.rs:205
↓ 1 callers
Function
apply_always
( state: &Arc<AppState>, prompt: &crate::models::commitment_models::CommitmentPrompt, now: i32, )
backend/src/proactive/commitment_replies.rs:180
↓ 1 callers
Function
apply_mute
( state: &Arc<AppState>, prompt: &crate::models::commitment_models::CommitmentPrompt, )
backend/src/proactive/commitment_replies.rs:274
↓ 1 callers
Function
apply_track
( state: &Arc<AppState>, prompt: &crate::models::commitment_models::CommitmentPrompt, now: i32, )
backend/src/proactive/commitment_replies.rs:124
↓ 1 callers
Function
apply_url_filter_only
(body: &str)
backend/src/utils/sms_sanitizer.rs:120
↓ 1 callers
Function
apply_wrong
( state: &Arc<AppState>, prompt: &crate::models::commitment_models::CommitmentPrompt, )
backend/src/proactive/commitment_replies.rs:306
↓ 1 callers
Method
arm_bridge
Arm a bridge watch. `display_name` is what we'll use to label the inbound notification SMS ("Reply from John: ...").
backend/src/repositories/pending_reply_watches_repository.rs:40
↓ 1 callers
Function
assert_charged
Assert user was charged (credits decreased)
backend/src/test_utils.rs:676
↓ 1 callers
Function
assert_sms_deliverable
Assert response is SMS-deliverable (length and non-empty)
backend/src/test_utils.rs:666
↓ 1 callers
Function
attempt_telnyx_delivery_fallback
( state: Arc<AppState>, repository: Arc< crate::repositories::twilio_status_repository_impl::D
backend/src/handlers/twilio_handlers.rs:227
↓ 1 callers
Function
attempt_us_voice_fallback
Try a voice fallback when an SMS notification failed for a US recipient. Best-effort: errors are logged and swallowed so a fallback failure does not
backend/src/proactive/utils.rs:539
↓ 1 callers
Function
auto_generate_name
( trigger_type: &str, trigger_config: &str, action_type: &str, action_config: &str, )
frontend/src/dashboard/rule_builder.rs:6200
↓ 1 callers
Method
auto_injected_params
(&self)
backend/src/tools/email.rs:115
↓ 1 callers
Function
automatic_charge
( State(state): State<Arc<AppState>>, Path(user_id): Path<i32>, )
backend/src/handlers/stripe_handlers.rs:2083
↓ 1 callers
Function
base64_encode
Simple base64 encoding
frontend/src/utils/webauthn.rs:76
↓ 1 callers
Function
bayesian_log_mean
Bayesian estimate blended in log-space for log-normal data (response times). Prior and observed are in original units (seconds). Blending in ln-space
backend/src/models/ontology_models.rs:287
↓ 1 callers
Function
bootstrap_admin_if_needed
Bootstrap an admin user on first startup if the database is empty. This is safe to call on every startup - it only creates a user if: 1. No users exis
backend/src/main.rs:180
↓ 1 callers
Method
bot_user_id
Get the bot user ID for a service
backend/src/test_utils/matrix_test_server.rs:50
↓ 1 callers
Function
build_agent_context
( state: &Arc<AppState>, user: &User, payload: &TwilioWebhookPayload, )
backend/src/api/twilio_sms/assembly.rs:86
↓ 1 callers
Function
build_creation_options
Build credential creation options object from JSON
frontend/src/utils/webauthn.rs:155
↓ 1 callers
Function
build_image_content
(processed_body: &str, media_url: &str)
backend/src/api/twilio_sms/assembly.rs:209
↓ 1 callers
Function
build_initial_messages
(ctx: &AgentContext, channel: MessageChannel)
backend/src/api/twilio_sms/assembly.rs:99
← previous
next →
601–700 of 2,907, ranked by callers