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
batch_key
Key for grouping consecutive similar entries
frontend/src/dashboard/activity_feed.rs:382
↓ 2 callers
Function
bridge_room_matches_search
(display_name: &str, search_term_lower: &str)
backend/src/utils/bridge.rs:247
↓ 2 callers
Function
build_attestation_url
(path: &str)
backend/src/handlers/attestation_handlers.rs:38
↓ 2 callers
Function
build_capability_info
( has_local: bool, country_code: &str, outbound_sms: Option<f32>, inbound_sms: Option<f32>,
backend/src/api/twilio_availability.rs:247
↓ 2 callers
Function
build_delete_media_by_event_command
(event_id: &str)
backend/src/utils/tuwunel_event_cleanup.rs:114
↓ 2 callers
Function
build_redact_event_command
(event_id: &str)
backend/src/utils/tuwunel_event_cleanup.rs:118
↓ 2 callers
Function
build_tool_registry
Build the tool registry with all static tool handlers.
backend/src/lib.rs:364
↓ 2 callers
Function
bump_skipped_duplicate
(service: &str)
backend/src/utils/bridge.rs:79
↓ 2 callers
Function
bump_stored
(service: &str)
backend/src/utils/bridge.rs:69
↓ 2 callers
Function
calculate_smartphone_free_days
Calculate the total smartphone-free days across all subscriptions ever created. For each subscription: - Uses `created` as the start timestamp - Uses
backend/src/services/metrics_service.rs:12
↓ 2 callers
Function
call_llm_condition
( state: &Arc<AppState>, rule: &OntRule, trigger_context: &str, prompt: &str, prefetched:
backend/src/proactive/rules.rs:905
↓ 2 callers
Function
call_llm_round
( input: &AgentLoopInput<'_>, loop_messages: &[chat_completion::ChatCompletionMessage], sticky_pro
backend/src/api/twilio_sms/agent_loop.rs:338
↓ 2 callers
Function
canonical_channel_id
Map a user-provided channel id string to the static id used in the registration table. Returns `None` for unknown ids so we don't poison the order wit
backend/src/channels/router.rs:296
↓ 2 callers
Function
capitalize
(s: &str)
backend/src/utils/bridge.rs:3227
↓ 2 callers
Function
cascade_delete_user_data
Delete every user-owned database row in a single transaction. Pub because `user_core::delete_user` reuses this for full account deletion (it then del
backend/src/services/data_purge.rs:272
↓ 2 callers
Function
cell_stats
(state: &Arc<AppState>)
backend/src/handlers/admin_handlers.rs:1827
↓ 2 callers
Method
chat_completion
Simple chat completion without tools (convenience wrapper).
backend/src/api/tinfoil_client.rs:267
↓ 2 callers
Method
chat_completion_streaming_with_attempts
( &self, provider: AiProvider, request: &openai_api_rs::v1::chat_completion::ChatCompl
backend/src/ai_config.rs:901
↓ 2 callers
Method
chat_completion_with_tools
Chat completion with optional tool definitions. Returns either text content or tool calls.
backend/src/api/tinfoil_client.rs:168
↓ 2 callers
Function
check_contract_approval
( client: &Client, rpc_url: &str, contract: &str, image_id: &str, )
backend/src/handlers/trust_chain_handlers.rs:208
↓ 2 callers
Function
check_message_seen
Check if the user has already seen a message (via read receipts or email Seen flag). Returns true if the message was seen and should be skipped.
backend/src/proactive/rules.rs:1300
↓ 2 callers
Function
checkout_price_for_plan
(plan_type: Option<&str>)
backend/src/handlers/stripe_handlers.rs:42
↓ 2 callers
Function
cleanup_all_signal_rooms
Clean up all Signal bridge rooms for a user This includes the management room and all portal rooms created by the bridge
backend/src/handlers/signal_auth.rs:43
↓ 2 callers
Function
cleanup_whatsapp_if_needed
Internal cleanup helper (callable from connect; no response needed)
backend/src/handlers/whatsapp_auth.rs:605
↓ 2 callers
Method
clear_idempotency
Clear an in-flight reservation when the send fails. Lets the client retry with the same key without waiting for the 24h TTL. Safe to call multiple tim
backend/src/repositories/webhook_tokens_repository.rs:307
↓ 2 callers
Method
clear_magic_token
(&self, user_id: i32)
backend/src/repositories/user_core.rs:422
↓ 2 callers
Method
clear_platform_room_ids
Clear `room_id` on every channel for a given platform/user. Used when a bridge reconnects (e.g. after phone-side unlink + re-link on WhatsApp): the b
backend/src/repositories/ontology_repository.rs:356
↓ 2 callers
Method
clear_route
(&self, country_code: &str)
backend/src/channels/router.rs:68
↓ 2 callers
Function
clear_store
(username: &str)
backend/src/utils/matrix_auth.rs:351
↓ 2 callers
Function
clear_subscription_entitlement
(state: &Arc<AppState>, user_id: i32)
backend/src/handlers/stripe_handlers.rs:149
↓ 2 callers
Function
collapse
Collapse 3+ blank lines left over from dropping, and trim the trailing whitespace. Same transform for both versions — they have the same line structur
backend/src/utils/id_verifier.rs:164
↓ 2 callers
Function
collect_tool_result_ids
Collect every `[id=N]` that appears in any tool-role message in the current turn. These are the "trusted" ids the model is allowed to cite in its fina
backend/src/utils/id_verifier.rs:42
↓ 2 callers
Method
complete_idempotency
Stamp the SID on a previously reserved idempotency row so future replays can return it. Best-effort: if the row was already deleted (e.g. via CASCADE
backend/src/repositories/webhook_tokens_repository.rs:294
↓ 2 callers
Function
compute_response_deltas
Compute response time deltas from a set of messages, grouped by room. Walks each room chronologically and emits one delta per response cycle: the gap
backend/src/repositories/ontology_repository.rs:121
↓ 2 callers
Function
compute_rms
(samples: &[i16])
backend/src/api/voice_pipeline.rs:191
↓ 2 callers
Method
compute_sender_signals
( &self, user_id: i32, room_id: &str, sender_name: &str, now: i32,
backend/src/repositories/ontology_repository.rs:1487
↓ 2 callers
Function
compute_temporal_score
Compute temporal anomaly score using Laplace-smoothed surprisal with confidence gating. Returns (score, current_hour) where score scales with both how
backend/src/repositories/ontology_repository.rs:57
↓ 2 callers
Method
condition_depth
Returns the depth of the deepest condition chain (actions don't count).
backend/src/proactive/rules.rs:88
↓ 2 callers
Function
connect
(props: &ConnectProps)
frontend/src/auth/connect.rs:31
↓ 2 callers
Function
convert_mcp_schema_to_openai
Convert MCP JSON Schema to OpenAI FunctionParameters format
backend/src/tool_call_utils/mcp.rs:230
↓ 2 callers
Function
count_tagged_messages
Count ont_messages matching our unique per-run test tag. The tag appears as the first line of the subject (which is stored in the message cont
scripts/imap_idle_stress.py:178
↓ 2 callers
Method
create
(&self, watch: NewPendingReplyWatch)
backend/src/repositories/pending_reply_watches_repository.rs:31
↓ 2 callers
Method
create_alert
Create a new alert in the database
backend/src/repositories/admin_alert_repository.rs:20
↓ 2 callers
Method
create_backup_codes
Create backup codes for a user (hashed with bcrypt) Returns the plain text codes to show to the user once
backend/src/repositories/totp_repository.rs:122
↓ 2 callers
Function
create_poll_fn
( start_time: f64, poll_durati
frontend/src/connections/bridge_connect.rs:363
↓ 2 callers
Method
create_sender_rule
Insert a new active sender rule. Caller should typically deactivate any pre-existing rule for the same (user, platform, sender_key) first so lookups a
backend/src/repositories/commitment_repository.rs:78
↓ 2 callers
Function
current_local_hour
(now: i32, tz_offset_secs: i32)
backend/src/repositories/ontology_repository.rs:80
↓ 2 callers
Method
deactivate_existing_rules
Deactivate any active rules for a (user, platform, sender_key). Used before creating a new rule so the old one doesn't shadow the new one.
backend/src/repositories/commitment_repository.rs:90
↓ 2 callers
Function
decide_subscription_delete
( is_plan_change: bool, active_subscriptions: &[ActiveSubscriptionSnapshot], )
backend/stripe_webhook_logic/src/lib.rs:125
↓ 2 callers
Function
decide_subscription_upsert
( event: SubscriptionUpsertEvent, status: SubscriptionStatus, is_plan_change: bool, cancel_at_
backend/stripe_webhook_logic/src/lib.rs:87
↓ 2 callers
Method
definitions_for_user
( &self, state: &AppState, user_id: i32, )
backend/src/tools/registry.rs:109
↓ 2 callers
Method
defrost_vehicle
Comprehensive defrost - starts climate, enables max defrost, heats seats and steering wheel
backend/src/api/tesla.rs:468
↓ 2 callers
Method
delete_message_with_retry
Delete a Twilio message with retry logic. Waits 60 seconds before the first attempt to avoid 'resource not complete' errors, then retries up to 3 tim
backend/src/services/twilio_message_service.rs:501
↓ 2 callers
Method
delete_person
Delete a Person and cascade to channels + edits.
backend/src/repositories/ontology_repository.rs:699
↓ 2 callers
Function
describe_action_summary
(action_type: &str, config: &serde_json::Value)
frontend/src/dashboard/rule_builder.rs:6059
↓ 2 callers
Method
display_name
(&self)
backend/src/api/matrix_client.rs:239
↓ 2 callers
Method
endpoint
Get the endpoint URL for a provider
backend/src/ai_config.rs:150
↓ 2 callers
Function
evaluate_and_execute
Evaluate a rule's flow_config tree and execute actions.
backend/src/proactive/rules.rs:395
↓ 2 callers
Function
exceeds_daily_token_budget
Check if user has exceeded daily token budget. Returns true if exceeded.
backend/src/proactive/system_behaviors.rs:556
↓ 2 callers
Function
extract_email_domain
Extract domain from email address. Returns None if email is invalid.
backend/src/handlers/imap_auth.rs:54
↓ 2 callers
Function
extract_scopes_from_jwt
Extract scopes from a Tesla JWT access token without verifying signature Tesla tokens are JWTs that contain the granted scopes in the "scp" claim
backend/src/handlers/tesla_auth.rs:46
↓ 2 callers
Function
extract_tool_params
Peek at a branch node: if it's a tool_call Action, look up the tool's parameter schema and return params that the LLM should fill (excluding auto-inje
backend/src/proactive/rules.rs:663
↓ 2 callers
Function
fetch_attestation
( endpoint: &str, query: &AttestationQuery, )
backend/src/handlers/attestation_handlers.rs:60
↓ 2 callers
Function
fetch_channel_videos_with_token
Helper to fetch channel videos with a given token
backend/src/handlers/youtube.rs:566
↓ 2 callers
Function
fetch_comments_with_token
Helper to fetch video comments with a given token
backend/src/handlers/youtube.rs:1332
↓ 2 callers
Function
fetch_pricing
Fetch messaging and voice pricing for a country using TwilioClient
backend/src/api/twilio_availability.rs:66
↓ 2 callers
Function
fetch_subscription_feed_with_token
Helper to fetch subscription feed with a given token
backend/src/handlers/youtube.rs:131
↓ 2 callers
Function
fetch_subscription_videos
Fetch videos from user's subscriptions
backend/src/tool_call_utils/youtube.rs:256
↓ 2 callers
Function
fetch_video_details_with_token
Helper to fetch video details with a given token
backend/src/handlers/youtube.rs:761
↓ 2 callers
Method
find_by_valid_magic_token
( &self, token: &str, now_ts: i32, )
backend/src/repositories/user_core.rs:327
↓ 2 callers
Function
find_or_create_user_for_stripe_customer
( state: &Arc<AppState>, client: &Client, customer_id: &stripe::CustomerId, email_hint: Option
backend/src/handlers/stripe_handlers.rs:262
↓ 2 callers
Function
first_connected_login_id
Bridge-internal login id of the first CONNECTED login (the value inside the FIRST backtick pair on a `list-logins` line). Use this as the argument to
backend/src/utils/bridge_responses.rs:296
↓ 2 callers
Function
format_digest_message_with_cap
( msg: &crate::models::ontology_models::OntMessage, cap: usize, )
backend/src/jobs/scheduler.rs:1332
↓ 2 callers
Method
format_for_prompt
(&self)
backend/src/proactive/signal_extraction.rs:126
↓ 2 callers
Function
format_timestamp
(timestamp: i64, timezone: Option<String>)
backend/src/handlers/imap_handlers.rs:99
↓ 2 callers
Method
from
(id: ChannelMessageId)
backend/src/channels/traits.rs:63
↓ 2 callers
Function
generate_embedding
Generate an embedding for `text`. Returns `Ok(None)` when the feature is explicitly disabled or no model can be resolved (e.g. a non-tinfoil provider
backend/src/utils/embedding_service.rs:51
↓ 2 callers
Function
generate_or_load_keys
Load or generate the EC key pair used to sign Tesla vehicle commands. Critical invariant: the seeded private key (delivered by entrypoint.sh from the
backend/src/utils/tesla_keys.rs:18
↓ 2 callers
Function
geometric_mean
Geometric mean of positive values. Returns None if empty.
backend/src/models/ontology_models.rs:276
↓ 2 callers
Method
get_active_and_proposed_events
( &self, user_id: i32, )
backend/src/repositories/ontology_repository.rs:2088
↓ 2 callers
Method
get_all_active_imap_connections
Return `(imap_connection.id, user_id)` pairs for every active IMAP connection in the system. Called once at startup by `initialize_all_idle_tasks`.
backend/src/repositories/user_repository.rs:360
↓ 2 callers
Function
get_api_key
()
backend/src/utils/resend_contacts.rs:34
↓ 2 callers
Function
get_available_runtime_tools
Returns the list of available runtime tools for task execution. This is the single source of truth - update this when adding new tools.
backend/src/tool_call_utils/utils.rs:21
↓ 2 callers
Function
get_cached_notification_pricing_sync
Get notification-only pricing from cache synchronously. Used by sync functions like deduct_user_credits. Returns None if not cached or on error - call
backend/src/api/twilio_pricing.rs:115
↓ 2 callers
Function
get_credential
Get a credential (authentication) Takes the options JSON from the backend and calls navigator.credentials.get()
frontend/src/utils/webauthn.rs:132
↓ 2 callers
Method
get_critical_notification_info
( &self, user_id: i32, )
backend/src/repositories/user_core.rs:1304
↓ 2 callers
Method
get_dm_portal_mxid
Resolve a DM portal's Matrix room ID. Layout: portal row keyed by (tgid, tg_receiver) where tgid is the other user (the contact) and tg_receiver is t
backend/src/repositories/telegram_bridge_repository.rs:302
↓ 2 callers
Method
get_enabled_servers_for_user
Get all enabled MCP servers for a user (for AI tool integration)
backend/src/repositories/mcp_repository.rs:71
↓ 2 callers
Method
get_expired_events
Get active or already-notified events with due_at <= now.
backend/src/repositories/ontology_repository.rs:2255
↓ 2 callers
Method
get_joined_rooms
(&self)
backend/src/api/matrix_client.rs:189
↓ 2 callers
Method
get_links_for_entity
Get all links for an entity (both as source and target).
backend/src/repositories/ontology_repository.rs:1001
↓ 2 callers
Function
get_mcp_tools_for_user
Get all MCP tools for a user, converted to OpenAI function calling format. Tool names are prefixed with "mcp:{server_name}:" to enable routing. For e
backend/src/tool_call_utils/mcp.rs:21
↓ 2 callers
Method
get_messages_by_ids
Fetch messages by a list of IDs. Used by the digest builder to re-read messages after lazy classification to pick up their newly-set urgency and summa
backend/src/repositories/ontology_repository.rs:1839
↓ 2 callers
Method
get_metric
Get a metric by key
backend/src/repositories/metrics_repository.rs:20
↓ 2 callers
Method
get_or_create_refund_info
(&self, user_id: i32)
backend/src/repositories/user_subscriptions.rs:227
↓ 2 callers
Function
get_partner_access_token_for_audience
( audience_url: &str, )
backend/src/handlers/tesla_auth.rs:830
↓ 2 callers
Method
get_post
(&self, slug: &str)
backend/src/blog/content.rs:191
↓ 2 callers
Method
get_recent_messages
Get recent messages for a platform since a timestamp.
backend/src/repositories/ontology_repository.rs:1254
↓ 2 callers
Method
get_recent_usage_logs
Get recent usage logs for a user (for activity feed).
backend/src/repositories/user_repository.rs:605
↓ 2 callers
Method
get_recently_created_events
( &self, user_id: i32, since_ts: i32, )
backend/src/repositories/ontology_repository.rs:2100
← previous
next →
401–500 of 2,907, ranked by callers