|
Entropic 2.3.8
Local-first agentic inference engine
|
Storage interface for conversation persistence. More...
#include <entropic/core/engine_types.h>
Public Attributes | |
| bool(* | create_conversation )(const char *title, std::string &conversation_id, void *user_data) = nullptr |
| Create a root conversation row. | |
| bool(* | save_snapshot )(const char *conversation_id, const char *messages_json, void *user_data) = nullptr |
| Save a compaction snapshot (full history before compaction). | |
| bool(* | create_delegation )(const char *parent_id, const char *delegating_tier, const char *target_tier, const char *task, int max_turns, std::string &delegation_id, std::string &child_conversation_id, void *user_data) = nullptr |
| Create a delegation record with child conversation. | |
| bool(* | complete_delegation )(const char *delegation_id, const char *status, const char *summary, void *user_data) = nullptr |
| Complete a delegation record. | |
| bool(* | save_conversation )(const char *conversation_id, const char *messages_json, void *user_data) = nullptr |
| Save messages to a conversation. | |
| bool(* | load_delegation_with_messages )(const char *delegation_id, std::string &result_json, void *user_data) = nullptr |
| Load a delegation's full child conversation (gh#32, v2.1.6). | |
| void * | user_data = nullptr |
| Opaque pointer (storage backend) | |
Storage interface for conversation persistence.
Injected by the facade. Allows core.so to persist conversations, delegation records, and compaction snapshots without depending on storage.so. All callbacks are optional (nullptr = no-op).
Definition at line 402 of file engine_types.h.
| bool(* entropic::StorageInterface::complete_delegation) (const char *delegation_id, const char *status, const char *summary, void *user_data) = nullptr |
Complete a delegation record.
| delegation_id | Delegation ID. |
| status | "completed" or "failed". |
| summary | Result summary (may be nullptr). |
| user_data | Opaque pointer. |
Definition at line 458 of file engine_types.h.
| bool(* entropic::StorageInterface::create_conversation) (const char *title, std::string &conversation_id, void *user_data) = nullptr |
Create a root conversation row.
Called once at AgentEngine::run() init when storage is wired so the engine's LoopContext::conversation_id is populated for the rest of the session. Pre-v2.1.12 (gh#48): no callback existed, root conversation_id stayed empty, every delegation's foreign-key insert into delegations(parent_conversation_id) failed silently against the empty parent string.
| title | Display title (e.g., session description). | |
| [out] | conversation_id | Newly created conversation ID. |
| user_data | Opaque pointer. |
conversation_id populated. Definition at line 417 of file engine_types.h.
| bool(* entropic::StorageInterface::create_delegation) (const char *parent_id, const char *delegating_tier, const char *target_tier, const char *task, int max_turns, std::string &delegation_id, std::string &child_conversation_id, void *user_data) = nullptr |
Create a delegation record with child conversation.
| parent_id | Parent conversation ID. | |
| delegating_tier | Source tier. | |
| target_tier | Target tier. | |
| task | Task description. | |
| max_turns | Turn limit (0 = unlimited). | |
| [out] | delegation_id | Created delegation ID. |
| [out] | child_conversation_id | Created child conversation ID. |
| user_data | Opaque pointer. |
Definition at line 442 of file engine_types.h.
| bool(* entropic::StorageInterface::load_delegation_with_messages) (const char *delegation_id, std::string &result_json, void *user_data) = nullptr |
Load a delegation's full child conversation (gh#32, v2.1.6).
Resolves the delegation by id, then loads the child conversation it spawned. Returns a JSON object whose top-level fields include target_tier, messages (array), and delegation_id. The engine uses this on resume_delegation to seed a fresh child context with the prior conversation history.
| delegation_id | Delegation id (storage PK). | |
| [out] | result_json | Conversation JSON (target_tier + messages). |
| user_data | Opaque pointer (storage backend). |
Definition at line 486 of file engine_types.h.
| bool(* entropic::StorageInterface::save_conversation) (const char *conversation_id, const char *messages_json, void *user_data) = nullptr |
Save messages to a conversation.
| conversation_id | Conversation ID. |
| messages_json | JSON array of message objects. |
| user_data | Opaque pointer. |
Definition at line 469 of file engine_types.h.
| bool(* entropic::StorageInterface::save_snapshot) (const char *conversation_id, const char *messages_json, void *user_data) = nullptr |
Save a compaction snapshot (full history before compaction).
| conversation_id | Conversation to snapshot. |
| messages_json | JSON array of all messages. |
| user_data | Opaque pointer. |
Definition at line 427 of file engine_types.h.
| void* entropic::StorageInterface::user_data = nullptr |
Opaque pointer (storage backend)
Definition at line 491 of file engine_types.h.