include/entropic/mcp/servers/entropic_server.h

← API

include/entropic/mcp/servers/entropic_server.h

entropic::EntropicServer

gh#32 (v2.1.6) resume

Inherits from entropic::MCPServerBase, entropic::SessionStateOwner.

entropic::EntropicServer::EntropicServer(const std::vector< std::string > &tier_names, const std::string &data_dir, const std::vector< std::string > &require_context_tiers={})

Construct with tier names and data dir.

Construct with tier names and data dir, register tools.

Parameters
  • tier_names — Available tier names for delegate/pipeline schemas.
  • data_dir — Path to bundled data directory.
  • require_context_tiers — gh#162 (v2.13.0): tiers that refuse a delegation carrying no context references. Defaulted so every existing caller keeps its behaviour exactly.
  • require_context_tiers — Tiers that refuse a contextless delegation (gh#162).

entropic::EntropicServer::~EntropicServer() override

Destructor.

bool entropic::EntropicServer::skip_duplicate_check(const std::string &tool_name) const override

delegate and pipeline skip duplicate check.

Skip duplicate check for delegate and pipeline. Both are legitimately repeatable side effects — the same delegation issued twice is two delegations, not a stuck model.

Parameters
  • tool_name — Tool name.
  • tool_name — Local tool name.
Returns
  • true for delegate and pipeline.
  • true for "delegate" and "pipeline"; false for every other entropic tool, which stay duplicate-checked.

bool entropic::EntropicServer::requires_approval(const std::string &tool_name) const override

Engine directives never need the host's approval (v2.14.6).

Engine directives are exempt from the host's approval gate. Every entropic tool is the engine directing itself — completing, delegating, pruning, introspecting — not an action on the user's system. A headless host (no approval callback) denied entropic.complete, so a forced completion retry could never conclude the turn (v2.14.6 gate, test-gh144-bridge-queue). Tier allow-lists and operator deny rules still apply; only the interactive approval step is skipped.

Parameters
  • tool_name — Tool name.
  • tool_name — Local tool name (unused: the answer is server-wide).
Returns
  • false for every entropic tool.
  • false — no entropic tool needs approval.

void entropic::EntropicServer::set_state_provider(const entropic_state_provider_t &provider)

Set the engine state provider for introspection tools.

Until this is called every introspection tool answers with the "engine state provider not configured" error rather than dereferencing a null callback.

Parameters
  • provider — Callback struct with engine state accessors.
  • provider — Callback struct with engine state accessors; copied into the server, and the copy's address handed to diagnose, inspect, context_inspect and followup.

bool entropic::EntropicServer::release_session(const std::string &key) override

Release key 's todo list (gh#158).

Release a session's todo list (gh#158).

Parameters
  • key — Session key.
Returns
true when the session had a list.

std::size_t entropic::EntropicServer::session_count() const override

Sessions holding a todo list on this server (gh#158).

Returns
Session count.