Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
compactor_registry.h File Reference

Per-identity compactor registration and dispatch. More...

#include <entropic/core/compaction.h>
#include <entropic/entropic.h>
#include <functional>
#include <shared_mutex>
#include <string>
#include <unordered_map>
Include dependency graph for compactor_registry.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  entropic::CompactorEntry
 A registered compactor entry. More...
 
class  entropic::CompactorRegistry
 Per-identity compactor registry and dispatch. More...
 

Namespaces

namespace  entropic
 Activate model on GPU (WARM → ACTIVE).
 

Typedefs

using entropic::CompactorFn = std::function< CompactionResult(const std::vector< Message > &messages, const CompactionConfig &config, const std::string &identity)>
 Internal C++ compactor function type.
 

Detailed Description

Per-identity compactor registration and dispatch.

Manages custom compactor functions that replace or augment the default value-density compaction strategy. Consumers register C function pointers per identity; the registry resolves which compactor to call based on identity → global → built-in default.

Thread safety
Registration/deregistration take a write lock. Dispatch takes a read lock to snapshot the compactor, then releases before calling. Safe to register from one thread while compacting on another.
Ownership
Owned by the engine handle. One CompactorRegistry per engine instance. The default compactor (value-density) is set at construction.
Version
1.9.9

Definition in file compactor_registry.h.