MCPcopy Create free account

hub / github.com/ahtavarasmus/lightfriend / functions

Functions2,907 in github.com/ahtavarasmus/lightfriend

↓ 1 callersFunctionbuild_matrix_client
Build a fresh Matrix client for `user_id` (login, session restore, E2EE setup, initial sync). This does NOT cache the client or wire event handlers or
backend/src/utils/matrix_auth.rs:442
↓ 1 callersFunctionbuild_message
Build a minimal RFC 5322 message with a unique Message-Id.
scripts/imap_idle_stress.py:93
↓ 1 callersFunctionbuild_query
(query: &AttestationQuery)
backend/src/handlers/attestation_handlers.rs:46
↓ 1 callersFunctionbuild_recent_notification_context
( recent_high_alerts: &[OntMessage], recent_lightfriend_replies: &[PgMessageHistory], now: i32,
backend/src/proactive/system_behaviors.rs:624
↓ 1 callersFunctionbuild_request_options
Build credential request options object from JSON
frontend/src/utils/webauthn.rs:308
↓ 1 callersFunctionbuild_signal_report
Build a structured signal report combining all intelligence sources.
backend/src/proactive/system_behaviors.rs:593
↓ 1 callersFunctionbuild_sms_agent_input
( state: &Arc<AppState>, user: &User, payload: &TwilioWebhookPayload, channel: MessageChannel,
backend/src/api/twilio_sms/assembly.rs:17
↓ 1 callersMethodbuild_tool_for_type
( &self, obj: &ObjectTypeDef, user_data: &OntologyUserData, )
backend/src/ontology/registry.rs:148
↓ 1 callersFunctionbuild_trust_chain_core_response
()
backend/src/handlers/trust_chain_handlers.rs:817
↓ 1 callersFunctionbuild_value_sentence
(watched: i64, quieted: i64, interruptions: i64)
backend/src/handlers/dashboard_handlers.rs:318
↓ 1 callersMethodbulk_set_us_sms_provider
(&self, provider: Option<String>)
backend/src/repositories/user_core.rs:1269
↓ 1 callersFunctionbump_invocation
(service: &str)
backend/src/utils/bridge.rs:52
↓ 1 callersFunctioncalculate_sun_times_from_coords
Calculate sunrise and sunset hours from coordinates
backend/src/handlers/dashboard_handlers.rs:410
↓ 1 callersMethodcall_tool
Call a tool on an MCP server
backend/src/services/mcp_client.rs:138
↓ 1 callersFunctioncancel_pending_message
( state: &Arc<AppState>, user_id: i32, )
backend/src/tool_call_utils/utils.rs:109
↓ 1 callersFunctioncapitalize
(s: &str)
frontend/src/dashboard/rules_section.rs:751
↓ 1 callersMethodchannel
Look up a channel impl by id.
backend/src/channels/router.rs:54
↓ 1 callersFunctioncheck_all_bridges_health
Checks all bridges for all users and deletes any that are confirmed disconnected. Inconclusive probes (bot slow, unknown status, transient matrix erro
backend/src/jobs/scheduler.rs:145
↓ 1 callersFunctioncheck_bridge_seen
Check if user saw a bridge message via the seen_at field on ont_messages. Populated by read receipt events from bridges and user replies.
backend/src/proactive/rules.rs:1394
↓ 1 callersFunctioncheck_contract
(client: &Client, rpc_url: &str, contract: &str, pcr0: &str)
tools/attestation-verifier/src/main.rs:133
↓ 1 callersFunctioncheck_country_capability_internal
Determine the tier for a given country using TwilioClient
backend/src/api/twilio_availability.rs:92
↓ 1 callersFunctioncheck_email_seen
Check if user read the email in their actual email app via IMAP \Seen flag.
backend/src/proactive/rules.rs:1332
↓ 1 callersFunctioncheck_local_numbers_available
Check if a country supports local phone numbers using TwilioClient
backend/src/api/twilio_availability.rs:54
↓ 1 callersFunctioncheck_outgoing_event_resolution
Check if the user's outgoing message indicates a tracked event is already done. Only past-tense completions count ("done", "sent it", "paid it") - not
backend/src/proactive/system_behaviors.rs:2048
↓ 1 callersFunctioncheck_sms_access
(state: &Arc<AppState>, user: &User)
backend/src/api/twilio_sms/early_flow.rs:26
↓ 1 callersMethodclaim_prompt
Atomically claim a prompt for resolution. Updates only when the prompt is still unresolved - duplicate Twilio retries or concurrent replies see `Ok(0)
backend/src/repositories/commitment_repository.rs:241
↓ 1 callersMethodclaim_telnyx_delivery_fallback
Atomically claim a failed Twilio message for Telnyx fallback. The `fallback_attempted_at IS NULL` guard keeps duplicate Twilio callback retries from
backend/src/repositories/twilio_status_repository_impl.rs:40
↓ 1 callersFunctionclaim_telnyx_delivery_fallback_with_retry
( repository: &crate::repositories::twilio_status_repository_impl::DieselTwilioStatusRepository, messa
backend/src/handlers/twilio_handlers.rs:413
↓ 1 callersFunctionclassify_bridgev2_list_logins
Classify the health of a bridgev2 bridge from the full `list-logins` response body. Verified against mautrix-whatsapp v26.04. Same parser shape works
backend/src/utils/bridge_responses.rs:240
↓ 1 callersFunctioncleanup_enabled
()
backend/src/utils/tuwunel_event_cleanup.rs:129
↓ 1 callersFunctioncleanup_stale_connecting_bridges
Delete bridges stuck in "connecting" status for more than 10 minutes. A bridge stuck in "connecting" blocks message processing for that service.
backend/src/jobs/scheduler.rs:385
↓ 1 callersFunctioncleanup_tagged_messages
Mark messages whose Subject contains `tag` as Deleted and expunge. Returns the number of expunged messages. Safe: only touches messages tagged
scripts/imap_idle_stress.py:220
↓ 1 callersMethodclear_calls
(&self)
backend/src/test_utils.rs:832
↓ 1 callersMethodclear_matrix_credentials
Clear all Matrix credentials in PG `user_secrets` table.
backend/src/repositories/user_repository.rs:1487
↓ 1 callersMethodclear_twilio_credentials
Clear BYOT Twilio credentials in PG `user_secrets` table.
backend/src/repositories/user_repository.rs:1668
↓ 1 callersFunctioncommit_display
Returns (truncated subject for the card, full text for the tooltip).
frontend/src/pages/trust_chain.rs:769
↓ 1 callersFunctioncommitment_gate
Pass 1 of commitment detection. Cheap LLM filter that decides whether a message is worth running the full extraction pass on. Uses the Voice model (fa
backend/src/proactive/system_behaviors.rs:771
↓ 1 callersFunctioncompare_history_order_desc
(a: &HistoryOrderKey, b: &HistoryOrderKey)
backend/src/handlers/trust_chain_handlers.rs:463
↓ 1 callersMethodcompute_user_sleep_context
Detect if user is likely sleeping based on their sent-message activity patterns. Uses Laplace-smoothed surprisal with confidence gating - same math as
backend/src/repositories/ontology_repository.rs:1661
↓ 1 callersMethodcompute_user_wake_hour
Compute the user's typical wake-up hour from their activity patterns. Returns the local hour (0-23) when the user typically starts being active.
backend/src/repositories/ontology_repository.rs:2002
↓ 1 callersFunctioncondense_response
( state: &Arc<AppState>, original: &str, max_chars: usize, user_id: i32, sticky_provider:
backend/src/api/twilio_sms/finalize.rs:282
↓ 1 callersMethodconfirm_event
(&self, user_id: i32, event_id: i32)
backend/src/repositories/ontology_repository.rs:2128
↓ 1 callersFunctionconnect_imap
Function to establish an IMAP connection for credential verification. Uses async-imap so the entire connection lifecycle (TCP, TLS, login) runs on the
backend/src/handlers/imap_auth.rs:448
↓ 1 callersFunctionconnect_openai_realtime
( user_id: i32, )
backend/src/api/voice_pipeline.rs:1431
↓ 1 callersFunctionconnect_signal
(client: &MatrixClient, bridge_bot: &str)
backend/src/handlers/signal_auth.rs:162
↓ 1 callersFunctionconnect_signal_with_retry
Wrapper function with retry logic
backend/src/handlers/signal_auth.rs:93
↓ 1 callersFunctionconnect_telegram
( client: &MatrixClient, bridge_bot: &str, user_id: i32, )
backend/src/handlers/telegram_auth.rs:433
↓ 1 callersFunctionconnect_telegram_with_retry
Wrapper function with retry logic
backend/src/handlers/telegram_auth.rs:321
↓ 1 callersFunctionconnect_whatsapp
( client: &MatrixClient, bridge_bot: &str, )
backend/src/handlers/whatsapp_auth.rs:128
↓ 1 callersFunctionconnect_whatsapp_phone
Similar to connect_whatsapp but sends `!wa login phone <number>` and waits for a text pairing code
backend/src/handlers/whatsapp_auth.rs:294
↓ 1 callersFunctionconnect_whatsapp_phone_with_retry
Wrapper with retry logic for phone pairing (mirrors connect_whatsapp_with_retry)
backend/src/handlers/whatsapp_auth.rs:430
↓ 1 callersFunctionconnect_whatsapp_with_retry
Wrapper function with retry logic
backend/src/handlers/whatsapp_auth.rs:62
↓ 1 callersFunctionconstant_time_eq
Constant-time byte comparison. Length-leak is acceptable; byte values don't leak. Avoids pulling in `subtle` for a single comparison.
backend/src/api/sinch_utils.rs:22
↓ 1 callersFunctionconvert_history
( raw: Vec<crate::pg_models::PgMessageHistory>, offset: &FixedOffset, )
backend/src/context.rs:380
↓ 1 callersMethodcooldown_seconds
Get cooldown period in seconds for this severity level
backend/src/utils/notification_utils.rs:27
↓ 1 callersFunctioncosine_similarity
Cosine similarity between two equal-length f32 vectors. Returns 0.0 when either vector is the zero vector (no meaningful similarity).
backend/src/utils/embedding_similarity.rs:36
↓ 1 callersMethodcount_by_type_since
Count alerts of a given type since the given unix timestamp. Used by rate-spike escalation to detect when the same alert is firing abnormally often.
backend/src/repositories/admin_alert_repository.rs:182
↓ 1 callersFunctioncount_files
(path: &Path)
backend/src/bin/tuwunel_restore.rs:92
↓ 1 callersFunctioncount_files_with_ext
(path: &Path, ext: &str)
backend/src/bin/tuwunel_restore.rs:108
↓ 1 callersMethodcount_messages_since
Count messages since a timestamp for a user.
backend/src/repositories/ontology_repository.rs:2535
↓ 1 callersMethodcount_notifications_since
Count successful notification-related usage logs since a timestamp.
backend/src/repositories/user_repository.rs:523
↓ 1 callersFunctioncount_signal_rooms
Count Signal bridge rooms for a user (to detect stale state)
backend/src/handlers/signal_auth.rs:24
↓ 1 callersMethodcount_us_users_by_pin
(&self)
backend/src/repositories/user_core.rs:1255
↓ 1 callersFunctioncount_words
(text: &str)
backend/src/blog/content.rs:77
↓ 1 callersFunctioncreate_admin_command_room
( config: &EventCleanupConfig, access_token: &str, )
backend/src/utils/tuwunel_event_cleanup.rs:559
↓ 1 callersFunctioncreate_credential
Create a credential (registration) Takes the options JSON from the backend and calls navigator.credentials.create()
frontend/src/utils/webauthn.rs:106
↓ 1 callersMethodcreate_credential
Create a new WebAuthn credential for a user
backend/src/repositories/webauthn_repository.rs:34
↓ 1 callersFunctioncreate_dummy_google_oauth_client
Create a dummy Google OAuth client for AppState (not used in credit tests)
backend/src/test_utils.rs:101
↓ 1 callersFunctioncreate_dummy_tesla_oauth_client
Create a dummy Tesla OAuth client for AppState (not used in credit tests)
backend/src/test_utils.rs:109
↓ 1 callersMethodcreate_new_user
Create a new user from Stripe customer data.
backend/src/services/signup_service.rs:158
↓ 1 callersFunctioncreate_openai_client
Creates an OpenAI-compatible client using OpenRouter (for background tasks without user context) This is used by proactive notifications and other sys
backend/src/tool_call_utils/utils.rs:99
↓ 1 callersFunctioncreate_pg_connection
()
backend/tests/migration_test.rs:20
↓ 1 callersMethodcreate_prompt
Insert a new prompt row. Returns `Ok(None)` when the unique partial index on (user_id, platform, sender_key) WHERE resolved_at IS NULL already covers
backend/src/repositories/commitment_repository.rs:177
↓ 1 callersMethodcreate_rule
(&self, rule: &NewOntRule)
backend/src/repositories/ontology_repository.rs:2357
↓ 1 callersMethodcreate_secret
Create a new TOTP secret for a user (encrypted) The secret is stored but not enabled until verified
backend/src/repositories/totp_repository.rs:23
↓ 1 callersMethodcreate_server
Create a new MCP server for a user
backend/src/repositories/mcp_repository.rs:19
↓ 1 callersFunctioncreate_temporary_checkout_customer
( client: &Client, user_id: i32, email: &str, )
backend/src/handlers/stripe_handlers.rs:1265
↓ 1 callersMethodcreate_tesla_connection
( &self, new_connection: crate::pg_models::NewPgTesla, )
backend/src/repositories/user_repository.rs:979
↓ 1 callersFunctioncreate_test_pg_pool
Create a test PG connection pool. Uses TEST_PG_DATABASE_URL env var. If PG is unavailable, creates a dummy pool that will error on first real use. Te
backend/src/test_utils.rs:46
↓ 1 callersFunctioncreate_test_service
()
backend/tests/signup_service_test.rs:13
↓ 1 callersMethodcreate_youtube_connection_with_scope
( &self, user_id: i32, access_token: &str, refresh_token: Option<&str>,
backend/src/repositories/user_repository.rs:843
↓ 1 callersFunctioncurrent_arg
(contents: str, name: str)
scripts/update_enclave_dependency_pins.py:186
↓ 1 callersFunctiondb_err
(e: diesel::result::Error)
backend/src/handlers/webhook_sms_handlers.rs:518
↓ 1 callersFunctiondeactivate_phone_service
Deactivate phone service for a user (for testing stolen phone scenario)
backend/src/test_utils.rs:604
↓ 1 callersMethoddeactivate_rule
Deactivate a specific rule (e.g. user removes it from the dashboard).
backend/src/repositories/commitment_repository.rs:152
↓ 1 callersFunctiondecode_commit_hash_from_log_data
(data_hex: &str)
backend/src/handlers/trust_chain_handlers.rs:427
↓ 1 callersFunctiondecode_image_proposed_activates_at
(data_hex: &str)
backend/src/handlers/trust_chain_handlers.rs:415
↓ 1 callersMethoddefinition_for_user
User-aware tool definition. Override for tools that need to inject per-user data (e.g. email tools listing connected accounts). Default falls back to
backend/src/tools/registry.rs:57
↓ 1 callersMethoddelete_channel
Delete a specific channel.
backend/src/repositories/ontology_repository.rs:724
↓ 1 callersMethoddelete_credential
Delete a credential
backend/src/repositories/webauthn_repository.rs:119
↓ 1 callersMethoddelete_imap_connection_by_email
Delete a specific IMAP connection by email address
backend/src/repositories/user_repository.rs:470
↓ 1 callersFunctiondelete_incoming_media_if_present
( state: &Arc<AppState>, user: &User, payload: &TwilioWebhookPayload, )
backend/src/api/twilio_sms/assembly.rs:120
↓ 1 callersFunctiondelete_incoming_twilio_message
(state: &Arc<AppState>, user: &User, message_sid: &str)
backend/src/api/twilio_sms/delivery.rs:167
↓ 1 callersMethoddelete_message_media
( &self, credentials: &TwilioCredentials, message_sid: &str, media_sid: &str,
backend/src/api/twilio_client.rs:396
↓ 1 callersMethoddelete_old_alerts
Delete alerts older than a given timestamp
backend/src/repositories/admin_alert_repository.rs:168
↓ 1 callersMethoddelete_old_message_history
(&self, user_id: i32)
backend/src/repositories/user_repository.rs:154
↓ 1 callersMethoddelete_old_message_status_logs
Delete old message status logs older than a given timestamp.
backend/src/repositories/user_repository.rs:1389
↓ 1 callersMethoddelete_processed_email
Delete a single processed email record
backend/src/repositories/user_repository.rs:1847
↓ 1 callersMethoddelete_rule
(&self, user_id: i32, rule_id: i32)
backend/src/repositories/ontology_repository.rs:2398
↓ 1 callersMethoddelete_server
Delete an MCP server
backend/src/repositories/mcp_repository.rs:139
← previousnext →701–800 of 2,907, ranked by callers