CoAgent8 - Source API
    Preparing search index...

    Module sessions/history/retention

    Session history capacity accounting, directory retention, and eviction.

    Enforces the 100 MiB global storage bound across sessions (TOTAL_LIMIT), reserves capacity before writes under directory lock, cleans up sessions older than 7 days, and evicts inactive sessions LRU while protecting active turns.

    adjustCapacityMeta
    calculateDirectoryBytes
    evictOldestSessions
    pruneHistoryDirectory
    pruneHistoryDirectoryInternal
    readCapacityMeta
    releaseCapacity
    reserveCapacity
    sessionMayBeActive
    setHistoryEvictionCallback
    setSessionActivityChecker
    writeCapacityMeta