frame-presence

Crates.ioframe-presence
lib.rsframe-presence
version0.2.0
created_at2025-12-22 22:15:39.515334+00
updated_at2026-01-08 05:35:05.811104+00
descriptionSession tracking and device fingerprinting for AI systems
homepage
repositoryhttps://github.com/Blackfall-Labs/frame-presence
max_upload_size
id2000373
size112,574
Magnus Trent (magnus-trent)

documentation

README

Frame Presence - Session Tracking and Device Fingerprinting

Track user sessions across devices and enable contextual authentication for AI systems.

Extracted from the Frame microservices architecture.

Features

  • Device Fingerprinting: Identify devices by unique characteristics (user agent, screen resolution, timezone, hardware IDs)
  • Cross-Instance Sessions: Track sessions across desktop, laptop, mobile, Raspberry Pi
  • Contextual Authentication: Skip voice auth on known devices, detect suspicious new devices
  • Device Registry: Manage trusted devices per user
  • Session Continuity: "I see you spoke with me on your desktop"

Quick Start

[dependencies]
sam-session = "0.1.0"

Dependency Architecture

frame-presence depends on:

frame-presence
└── frame-catalog (database)

Used by: frame-mesh (session tracking)

Position in Frame ecosystem:

frame-catalog
    └→ frame-presence
        └→ frame-mesh
use sam_session::{SessionStore, DeviceRegistry, Session, DeviceType};
use frame_catalog::Database;

// Initialize stores
let db = Database::new("sessions.db")?;
let session_store = SessionStore::new(&db)?;
let device_registry = DeviceRegistry::new("devices.db")?;

// Create session
let session = Session::new(
    "user123".to_string(),
    "device-1".to_string(),
    "instance-1".to_string(),
    DeviceType::Desktop
);
session_store.store_session(&session)?;

// Register device
let device_id = device_registry.register_device(
    "user123",
    "Magnus's Desktop",
    "Mozilla/5.0 (X11; Linux x86_64)...",
    Some("192.168.1.100"),
)?;

// Check device trust
if device_registry.is_device_trusted("user123", &device_id)? {
    println!("Known device - expedited auth");
}

Modules

  • sessions (305 LOC) - Session types, device fingerprinting
  • session_store (266 LOC) - SQLite persistence for sessions
  • device_registry (336 LOC) - Device registration and trust tracking

Device Types

  • Desktop
  • Laptop
  • Mobile
  • Tablet
  • RaspberryPi
  • Server
  • Unknown (auto-detected)

Compatibility

  • Rust Edition: 2021
  • MSRV: 1.70+
  • Platforms: All

Dependencies

  • rusqlite (0.31) - Session/device persistence
  • frame-catalog - Database trait
  • num_cpus (1.16) - System info
  • hostname (0.4) - Device identification

Testing

cargo test  # 18 tests passing, 2 doctests ignored

License

MIT - See LICENSE for details.

Author

Magnus Trent magnus@blackfall.dev

Links

Commit count: 4

cargo fmt