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

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

#include <entropic/core/compactor_registry.h>
#include <entropic/types/logging.h>
#include <sstream>
Include dependency graph for compactor_registry.cpp:

Go to the source code of this file.

Classes

struct  entropic::JsonCursor
 Lightweight cursor into a JSON string. More...
 

Namespaces

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

Functions

static const char * entropic::json_escape_char (char c)
 Map a character to its JSON escape sequence.
 
static std::string entropic::json_escape (const std::string &input)
 Escape a string for JSON embedding.
 
static std::string entropic::serialize_messages (const std::vector< Message > &messages)
 Serialize messages to minimal JSON array.
 
static std::string entropic::serialize_config (const CompactionConfig &config, const std::string &identity, int token_count)
 Serialize compaction config + identity to JSON.
 
static void entropic::json_skip_ws (JsonCursor &c)
 Skip whitespace in a JSON cursor.
 
static char entropic::json_unescape_char (char ch)
 Decode one JSON escape sequence character.
 
static bool entropic::json_read_string (JsonCursor &c, std::string &out)
 Read a JSON quoted string from cursor.
 
static void entropic::json_skip_composite (JsonCursor &c)
 Skip a JSON array or object in cursor (nested-aware).
 
static void entropic::json_skip_value (JsonCursor &c)
 Skip one JSON value (string, primitive, array, or object).
 
static bool entropic::json_read_content_part_field (JsonCursor &c, std::string &type_val, std::string &text_val)
 Read one field of a content part object into type/text.
 
static bool entropic::json_parse_content_part (JsonCursor &c, std::string &type_val, std::string &text_val)
 Parse one content part object, extract type and text.
 
static void entropic::append_text_part (const std::string &type_val, const std::string &text_val, std::string &text)
 Append text from a content part if type == "text".
 
static char entropic::json_skip_to_element (JsonCursor &c)
 Read one content part object from an array cursor.
 
static bool entropic::json_read_one_content_part (JsonCursor &c, std::string &text)
 Parse one content part object and append text if applicable.
 
static bool entropic::json_extract_text_from_array (JsonCursor &c, std::string &text)
 Extract concatenated text from a JSON content array.
 
static bool entropic::json_read_field (JsonCursor &c, Message &msg)
 Read one key:value pair and apply to message fields.
 
static bool entropic::json_parse_message (JsonCursor &c, Message &msg)
 Parse one JSON object into a Message (role + content).
 
static bool entropic::json_parse_array (JsonCursor &c, std::vector< Message > &messages)
 Parse message objects from a JSON array cursor.
 
static bool entropic::parse_messages (const char *json, std::vector< Message > &messages)
 Parse a JSON array of message objects.
 

Variables

static auto logger = entropic::log::get("core.compactor_registry")
 

Detailed Description

Per-identity compactor registration and dispatch.

Version
1.9.9

Definition in file compactor_registry.cpp.

Variable Documentation

◆ logger

auto logger = entropic::log::get("core.compactor_registry")
static

Definition at line 13 of file compactor_registry.cpp.