20#include <shared_mutex>
84 std::vector<ToolCallRecord>
recent(
size_t count)
const;
91 std::vector<ToolCallRecord>
all()
const;
99 std::string
to_json(
size_t count)
const;
109 std::vector<ToolCallRecord> buffer_;
113 mutable std::shared_mutex mutex_;
Fixed-size ring buffer of recent tool calls.
std::vector< ToolCallRecord > all() const
Get all stored entries (oldest first, insertion order).
size_t size() const
Current number of stored entries.
void record(const ToolCallRecord &entry)
Record a completed tool call.
std::vector< ToolCallRecord > recent(size_t count) const
Get the N most recent entries (newest first).
std::string to_json(size_t count) const
Serialize recent entries to JSON array string.
Activate model on GPU (WARM → ACTIVE).
std::string truncate_result(const std::string &text, size_t max_len)
Truncate a string to max_len characters with "..." suffix.
std::string summarize_params(const std::string &args_json)
Extract top-level JSON keys as a comma-separated summary.