载入中...
搜索中...
未找到
McpArchitectureTools.cpp
浏览该文件的文档.
27 void node(const std::string& id, const std::string& kind, const std::string& label, const std::string& source = {},
31 void edge(const std::string& from, const std::string& to, const std::string& relation, const std::string& evidence,
86 const auto seed = seedArgument.find(':') == std::string::npos ? "api:" + seedArgument : seedArgument;
90 if (seedArgument.empty() || limit < 1 || limit > 256 || depth < 0 || depth > 8 || bytes < 1024 || bytes > 65536 ||
92 return mcpFailureObject("invalid_query", "seed required; maxNodes 1..256, maxDepth 0..8, maxBytes 1024..65536");
97 return mcpFailureObject("unknown_seed", "Use api: followed by a binding key or a returned node ID");
100 const auto contract = eve::script::generatedBindingContracts().find(graph.nodes.at(seed).label);
143 "Candidate static impact; no runtime causality, dynamic keys or complete call graph. Test references "
145 Array::Ptr nodes = new Array(), edges = new Array(), tests = new Array(), unknowns = new Array(),
196 if (name == "eve_task_context" && args && args->has("projectDir")) return callMcpProjectIndexTool(name, args);
208 for (const auto* name : {"eve_architecture_query", "eve_architecture_impact", "eve_task_context"}) {
213 R"JSON({"type":"object","required":["seed"],"properties":{"seed":{"type":"string"},"expectedInputHash":{"type":"string"},"maxNodes":{"type":"integer","minimum":1,"maximum":256},"maxDepth":{"type":"integer","minimum":0,"maximum":8},"maxBytes":{"type":"integer","minimum":1024,"maximum":65536}}})JSON")
245EVE_MCP_TOOL_FAMILY(Architecture, mcpArchitectureToolSchemas, callMcpArchitectureTool, ContentEnvelope)
std::map< std::string, std::vector< size_t > > adjacency
Definition McpArchitectureTools.cpp:26
#define EVE_MCP_TOOL_FAMILY(Id, Schemas, Handler, Payload)
Declare one family beside its implementation; CMake derives composition from compiled sources.
Definition McpToolFamilies.hpp:86
const BindingContract * find(std::string_view key) const noexcept
Finds a binding contract.
Definition ScriptCompiler.cpp:423
const Value * field(const Value &value, const char *key)
Borrow an optional object field.
Definition BuildingSnapshot.cpp:96
Definition ActionGuideExport.cpp:13
std::string callMcpProjectIndexTool(std::string_view name, Object::Ptr args)
Definition McpProjectIndexTools.cpp:202
@ ContentEnvelope
std::string mcpStringify(const Poco::Dynamic::Var &value)
Compact single-line JSON text for a newline-framed MCP payload.
Definition McpJson.hpp:24
std::string textContentResult(const std::string &text, bool isError=false)
MCP tools/call result object carrying one text content item.
Definition McpJson.hpp:84
std::string_view mcpArchitectureToolSchemas()
Comma-free schema objects for the read-only architecture tools. @ownership Borrowed view of process-o...
Definition McpArchitectureTools.cpp:205
std::string callMcpArchitectureTool(std::string_view name, Object::Ptr args)
Definition McpArchitectureTools.cpp:195
Poco::JSON::Object::Ptr mcpFailureObject(const std::string &error, const std::string &hint={}, bool retryable=false, const std::vector< std::string > &nextTools={})
Structured tool failure object for agent self-correction.
Definition McpJson.hpp:63
bool isMcpArchitectureTool(std::string_view name)
Read-only architecture queries derived from the build's binding registry.
Definition McpArchitectureTools.cpp:192
constexpr HexDirection next(HexDirection d) noexcept
The next direction clockwise (NW wraps to NE).
Definition HexMetrics.h:76
ForceVector add(ForceVector a, ForceVector b)
Definition ForceMath.h:13
const BindingContractRegistry & generatedBindingContracts()
Process-wide generated Binding Contracts for this linked engine build.
Definition ScriptCompiler.cpp:493
enum EVENGINE_API_FOUNDATION Array
OT_ARRAY (editable via Runtime array APIs / ReflectedPropertyModel).
Definition Runtime.h:120
Definition Container.h:602