Entropic 2.14.3
Local-first agentic inference engine
Loading...
Searching...
No Matches
tool_namespace.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
27#pragma once
28
29#include <string>
30
31namespace entropic {
32namespace facade {
33
45inline std::string qualify_tool_name(const std::string& prefix,
46 const std::string& suffix) {
47 if (prefix.empty()) {
48 return suffix;
49 }
50 return prefix + "." + suffix;
51}
52
70inline std::string strip_tool_prefix(const std::string& prefix,
71 const std::string& name) {
72 if (prefix.empty()) {
73 return name;
74 }
75 const std::string qualified = prefix + ".";
76 if (name.rfind(qualified, 0) != 0) {
77 return name;
78 }
79 return name.substr(qualified.size());
80}
81
82} // namespace facade
83} // namespace entropic
Activate model on GPU (WARM → ACTIVE).
@ optional
optional: every escape asks the host's path approver
std::string qualify_tool_name(const std::string &prefix, const std::string &suffix)
Qualify a bare tool suffix with the configured namespace.
std::string strip_tool_prefix(const std::string &prefix, const std::string &name)
Recover the bare suffix from a wire name.