Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
entropic_engine Struct Reference

Engine handle struct — owns all subsystems. More...

#include </home/runner/work/entropic/entropic/src/facade/engine_handle.h>

Collaboration diagram for entropic_engine:

Public Attributes

entropic::HookRegistry hook_registry
 Hook dispatch.
 
std::mutex api_mutex
 Serializes API calls.
 
std::string last_error
 Per-handle error message.
 
std::atomic< bool > configured {false}
 True after configure()
 
std::atomic< bool > running {false}
 True during run()
 
int log_id = 0
 gh#59 (v2.3.1): unique handle id for per-handle log routing via entropic::log::HandleAwareSink.
 
entropic::ParsedConfig config
 Parsed config.
 
entropic::config::BundledModels bundled_models
 Model registry.
 
std::unique_ptr< entropic::ModelOrchestratororchestrator
 Model pool + routing.
 
entropic::InferenceInterface inference_iface
 Stable copy for validator lifetime.
 
entropic::InterfaceContextinference_iface_ctx = nullptr
 Per-handle owned context backing inference_iface.user_data.
 
std::unique_ptr< entropic::ServerManagerserver_manager
 MCP server lifecycle.
 
std::unique_ptr< entropic::ToolExecutortool_executor
 Tool dispatch.
 
std::unique_ptr< entropic::IdentityManageridentity_manager
 Identity lifecycle.
 
std::unique_ptr< entropic::MCPAuthorizationManagermcp_auth
 Per-identity tool auth.
 
std::unique_ptr< entropic::AgentEngineengine
 Agentic loop (owns conversation state)
 
std::unique_ptr< entropic::SqliteStorageBackendstorage
 SQLite persistence.
 
std::unique_ptr< entropic::AuditLoggeraudit_logger
 Audit log.
 
std::unique_ptr< entropic::SessionLoggersession_logger
 Model transcript log.
 
std::unique_ptr< entropic::ConstitutionalValidatorvalidator
 Constitutional validation.
 
std::unique_ptr< entropic::CompactorRegistrycompactor_registry
 Compaction strategies.
 
std::unordered_map< std::string, std::vector< std::string > > tier_allowed_tools
 Per-tier allowed_tools from identity frontmatter.
 
std::unordered_map< std::string, std::vector< std::string > > tier_validation_rules
 Per-tier validation_rules from identity frontmatter (v2.0.6).
 
std::unique_ptr< entropic::ExternalBridgeexternal_bridge
 Unix socket MCP bridge.
 
void(* stream_observer )(const char *, size_t, void *) = nullptr
 Global stream observer — fires for all streaming output.
 
void * stream_observer_data = nullptr
 Observer user_data.
 
void(* state_observer )(int, void *) = nullptr
 Observer for engine state transitions.
 
void * state_observer_data = nullptr
 
void(* queue_observer )(const char *, size_t, void *) = nullptr
 Observer fired when a queued mid-gen user message is consumed and seeded as the next turn.
 
void * queue_observer_data = nullptr
 
void(* critique_start_cb )(void *) = nullptr
 Fires before the constitutional validator's critique generate begins.
 
void(* critique_end_cb )(void *) = nullptr
 Fires after the critique generate returns.
 
void * critique_cb_data = nullptr
 Forwarded to both callbacks.
 

Detailed Description

Engine handle struct — owns all subsystems.

The public C API casts entropic_handle_t to/from this struct. Members are grouped by the phase that wires them.

Destruction order
Reverse of creation: engine, storage, audit, constitutional, MCP, inference, config, hooks. Each pointer is null-safe.
Version
2.0.0

Definition at line 73 of file engine_handle.h.

Member Data Documentation

◆ api_mutex

std::mutex entropic_engine::api_mutex

Serializes API calls.

Definition at line 76 of file engine_handle.h.

◆ audit_logger

std::unique_ptr<entropic::AuditLogger> entropic_engine::audit_logger

Audit log.

Definition at line 106 of file engine_handle.h.

◆ bundled_models

entropic::config::BundledModels entropic_engine::bundled_models

Model registry.

Definition at line 88 of file engine_handle.h.

◆ compactor_registry

std::unique_ptr<entropic::CompactorRegistry> entropic_engine::compactor_registry

Compaction strategies.

Definition at line 111 of file engine_handle.h.

◆ config

entropic::ParsedConfig entropic_engine::config

Parsed config.

Definition at line 87 of file engine_handle.h.

◆ configured

std::atomic<bool> entropic_engine::configured {false}

True after configure()

Definition at line 78 of file engine_handle.h.

◆ critique_cb_data

void* entropic_engine::critique_cb_data = nullptr

Forwarded to both callbacks.

Definition at line 151 of file engine_handle.h.

◆ critique_end_cb

void(* entropic_engine::critique_end_cb) (void *) = nullptr

Fires after the critique generate returns.

Definition at line 149 of file engine_handle.h.

◆ critique_start_cb

void(* entropic_engine::critique_start_cb) (void *) = nullptr

Fires before the constitutional validator's critique generate begins.

Stored on the handle so pre-configure registration survives validator reconstruction (the rewire_critique_callbacks helper re-applies the slot to any newly-built ConstitutionalValidator).

Definition at line 147 of file engine_handle.h.

◆ engine

std::unique_ptr<entropic::AgentEngine> entropic_engine::engine

Agentic loop (owns conversation state)

Definition at line 104 of file engine_handle.h.

◆ external_bridge

std::unique_ptr<entropic::ExternalBridge> entropic_engine::external_bridge

Unix socket MCP bridge.

Definition at line 120 of file engine_handle.h.

◆ hook_registry

entropic::HookRegistry entropic_engine::hook_registry

Hook dispatch.

Definition at line 75 of file engine_handle.h.

◆ identity_manager

std::unique_ptr<entropic::IdentityManager> entropic_engine::identity_manager

Identity lifecycle.

Definition at line 100 of file engine_handle.h.

◆ inference_iface

entropic::InferenceInterface entropic_engine::inference_iface

Stable copy for validator lifetime.

Definition at line 92 of file engine_handle.h.

◆ inference_iface_ctx

entropic::InterfaceContext* entropic_engine::inference_iface_ctx = nullptr

Per-handle owned context backing inference_iface.user_data.

Pre-v2.2.6 this was a process-global static — gh#58 follow-up.

Definition at line 95 of file engine_handle.h.

◆ last_error

std::string entropic_engine::last_error

Per-handle error message.

Definition at line 77 of file engine_handle.h.

◆ log_id

int entropic_engine::log_id = 0

gh#59 (v2.3.1): unique handle id for per-handle log routing via entropic::log::HandleAwareSink.

Monotonic 1.. (0 is reserved for "no handle scope"). Set in entropic_create.

Definition at line 84 of file engine_handle.h.

◆ mcp_auth

std::unique_ptr<entropic::MCPAuthorizationManager> entropic_engine::mcp_auth

Per-identity tool auth.

Definition at line 101 of file engine_handle.h.

◆ orchestrator

std::unique_ptr<entropic::ModelOrchestrator> entropic_engine::orchestrator

Model pool + routing.

Definition at line 91 of file engine_handle.h.

◆ queue_observer

void(* entropic_engine::queue_observer) (const char *, size_t, void *) = nullptr

Observer fired when a queued mid-gen user message is consumed and seeded as the next turn.

Stored on the handle so pre-configure registration survives engine construction.

Definition at line 138 of file engine_handle.h.

◆ queue_observer_data

void* entropic_engine::queue_observer_data = nullptr

Definition at line 139 of file engine_handle.h.

◆ running

std::atomic<bool> entropic_engine::running {false}

True during run()

Definition at line 79 of file engine_handle.h.

◆ server_manager

std::unique_ptr<entropic::ServerManager> entropic_engine::server_manager

MCP server lifecycle.

Definition at line 98 of file engine_handle.h.

◆ session_logger

std::unique_ptr<entropic::SessionLogger> entropic_engine::session_logger

Model transcript log.

Definition at line 107 of file engine_handle.h.

◆ state_observer

void(* entropic_engine::state_observer) (int, void *) = nullptr

Observer for engine state transitions.

Forwarded to engine callbacks so bridge async tasks can project VERIFYING → "validating"/"revising" phases.

Definition at line 131 of file engine_handle.h.

◆ state_observer_data

void* entropic_engine::state_observer_data = nullptr

Definition at line 132 of file engine_handle.h.

◆ storage

std::unique_ptr<entropic::SqliteStorageBackend> entropic_engine::storage

SQLite persistence.

Definition at line 105 of file engine_handle.h.

◆ stream_observer

void(* entropic_engine::stream_observer) (const char *, size_t, void *) = nullptr

Global stream observer — fires for all streaming output.

Definition at line 124 of file engine_handle.h.

◆ stream_observer_data

void* entropic_engine::stream_observer_data = nullptr

Observer user_data.

Definition at line 125 of file engine_handle.h.

◆ tier_allowed_tools

std::unordered_map<std::string, std::vector<std::string> > entropic_engine::tier_allowed_tools

Per-tier allowed_tools from identity frontmatter.

Definition at line 115 of file engine_handle.h.

◆ tier_validation_rules

std::unordered_map<std::string, std::vector<std::string> > entropic_engine::tier_validation_rules

Per-tier validation_rules from identity frontmatter (v2.0.6).

Definition at line 117 of file engine_handle.h.

◆ tool_executor

std::unique_ptr<entropic::ToolExecutor> entropic_engine::tool_executor

Tool dispatch.

Definition at line 99 of file engine_handle.h.

◆ validator

std::unique_ptr<entropic::ConstitutionalValidator> entropic_engine::validator

Constitutional validation.

Definition at line 110 of file engine_handle.h.


The documentation for this struct was generated from the following file: