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

Auto-compaction implementation. More...

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

Go to the source code of this file.

Namespaces

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

Functions

static void entropic::partition_messages (const std::vector< Message > &messages, size_t start, std::vector< const Message * > &user_msgs, std::vector< const Message * > &assistant_msgs, int &stripped_count)
 Partition messages (from start) into user/assistant/stripped.
 
static std::vector< Messageentropic::assemble_compacted (const Message *system_msg, Message summary_msg, const std::vector< const Message * > &user_msgs, const std::vector< const Message * > &assistant_msgs)
 Assemble the compacted list: system, summary, users, last asst.
 
static bool entropic::is_tool_result (const Message &msg)
 Extract original user task from messages.
 
static std::string entropic::find_tagged (const std::vector< Message > &messages, const std::string &source)
 Find the first message matching a source tag.
 
static std::string entropic::find_first_user_task (const std::vector< Message > &messages)
 Find the first user-role message that isn't a tool result.
 
static std::string entropic::json_escape (const std::string &input)
 Save pre-compaction snapshot via storage interface.
 
static std::string entropic::serialize_messages_json (const std::vector< Message > &messages)
 Serialize messages to minimal JSON array.
 

Variables

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

Detailed Description

Auto-compaction implementation.

Version
1.8.4

Definition in file compaction.cpp.

Variable Documentation

◆ logger

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

Definition at line 14 of file compaction.cpp.