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

Read-only engine state provider for introspection tools. More...

#include <entropic/interfaces/i_mcp_server.h>

Public Attributes

char *(* get_config )(void *user_data)
 Get current engine configuration as JSON.
 
char *(* get_identities )(void *user_data)
 Get loaded identities as JSON array.
 
char *(* get_tools )(void *user_data)
 Get available tools as JSON array.
 
char *(* get_history )(int max_entries, void *user_data)
 Get recent tool call history as JSON array.
 
char *(* get_state )(void *user_data)
 Get engine state as JSON.
 
char *(* get_metrics )(void *user_data)
 Get engine metrics as JSON.
 
char *(* get_docs )(const char *section, void *user_data)
 Get bundled documentation as text.
 
char *(* search_delegations )(const char *query, int max_results, void *user_data)
 Search prior delegation summaries (gh#32, v2.1.6).
 
char *(* load_delegation_conversation )(const char *delegation_id, void *user_data)
 Load a delegation's full child conversation (gh#32, v2.1.6).
 
char *(* get_residency )(void *user_data)
 Get current VRAM residency-set snapshot (gh#57, v2.2.4).
 
void * user_data
 Opaque user data passed to all callbacks.
 

Detailed Description

Read-only engine state provider for introspection tools.

Callback struct passed to EntropicServer for entropic.diagnose and entropic.inspect. Each callback returns a JSON string allocated with malloc/strdup. Caller must free with free().

The facade implements these callbacks by querying the appropriate subsystem (config loader, prompt manager, server manager, etc.).

Version
1.9.12

Definition at line 137 of file i_mcp_server.h.

Member Data Documentation

◆ get_config

char *(* entropic_state_provider_t::get_config) (void *user_data)

Get current engine configuration as JSON.

Definition at line 139 of file i_mcp_server.h.

◆ get_docs

char *(* entropic_state_provider_t::get_docs) (const char *section, void *user_data)

Get bundled documentation as text.

Parameters
sectionSection name (NULL = full doc).

Definition at line 163 of file i_mcp_server.h.

◆ get_history

char *(* entropic_state_provider_t::get_history) (int max_entries, void *user_data)

Get recent tool call history as JSON array.

Parameters
max_entriesMaximum entries to return (0 = all).

Definition at line 151 of file i_mcp_server.h.

◆ get_identities

char *(* entropic_state_provider_t::get_identities) (void *user_data)

Get loaded identities as JSON array.

Definition at line 142 of file i_mcp_server.h.

◆ get_metrics

char *(* entropic_state_provider_t::get_metrics) (void *user_data)

Get engine metrics as JSON.

Definition at line 157 of file i_mcp_server.h.

◆ get_residency

char *(* entropic_state_provider_t::get_residency) (void *user_data)

Get current VRAM residency-set snapshot (gh#57, v2.2.4).

Backs the engine's introspection surface for prompt-time decisioning ("which tier models are loaded right now"). Mirrors the C ABI entropic_residency_snapshot JSON schema exactly. May be NULL on pre-v2.2.4 engines or before configure_dir runs; the tool surfaces an empty residency array in that case.

Caller must free with entropic_free().

Parameters
user_dataOpaque provider state.
Returns
JSON string (caller frees), or NULL on error.
Version
2.2.4

Definition at line 218 of file i_mcp_server.h.

◆ get_state

char *(* entropic_state_provider_t::get_state) (void *user_data)

Get engine state as JSON.

Definition at line 154 of file i_mcp_server.h.

◆ get_tools

char *(* entropic_state_provider_t::get_tools) (void *user_data)

Get available tools as JSON array.

Definition at line 145 of file i_mcp_server.h.

◆ load_delegation_conversation

char *(* entropic_state_provider_t::load_delegation_conversation) (const char *delegation_id, void *user_data)

Load a delegation's full child conversation (gh#32, v2.1.6).

Backs entropic.resume_delegation. Returns the conversation JSON previously persisted via storage_save_conversation, scoped to the delegation's child_conversation_id. May be NULL when storage is unavailable or the id is unknown — the tool surfaces a typed error.

Caller must free with entropic_free().

Parameters
delegation_idStorage delegation id.
user_dataOpaque provider state.
Returns
JSON string (caller frees), or NULL on error.
Version
2.1.6

Definition at line 200 of file i_mcp_server.h.

◆ search_delegations

char *(* entropic_state_provider_t::search_delegations) (const char *query, int max_results, void *user_data)

Search prior delegation summaries (gh#32, v2.1.6).

Backs entropic.followup. Returns a JSON array of objects with fields {delegation_id, target_tier, summary, completed_at}, containing up to max_results records whose summary substring-matches query. May be NULL on engines built without a storage backend; the tool surfaces a typed error in that case.

Caller must free the returned string with entropic_free().

Parameters
queryKeyword/phrase to match (NULL-safe).
max_resultsMaximum records to return (>=1).
user_dataOpaque provider state.
Returns
JSON string (caller frees), or NULL on error.
Version
2.1.6

Definition at line 182 of file i_mcp_server.h.

◆ user_data

void* entropic_state_provider_t::user_data

Opaque user data passed to all callbacks.

Definition at line 221 of file i_mcp_server.h.


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