MCPcopy Create free account
hub / github.com/antirez/ds4 / agent_execute_tool_calls

Function agent_execute_tool_calls

ds4_agent.c:7205–7219  ·  view source on GitHub ↗

Execute all tool calls from one DSML block, preserving per-call labels in the * combined result so the model can associate observations with calls. */

Source from the content-addressed store, hash-verified

7203 const char *glob;
7204 regex_t regex;
7205 bool use_regex;
7206 bool regex_ready;
7207 bool case_sensitive;
7208 int context;
7209 int max_results;
7210 int results;
7211 agent_buf out;
7212} agent_search_ctx;
7213
7214static bool agent_literal_match(const char *s, size_t n, const char *q,
7215 bool case_sensitive) {
7216 size_t qn = strlen(q);
7217 if (!qn) return true;
7218 if (qn > n) return false;
7219 for (size_t i = 0; i + qn <= n; i++) {
7220 bool ok = true;
7221 for (size_t j = 0; j < qn; j++) {
7222 unsigned char a = (unsigned char)s[i + j];

Callers 1

worker_run_turnFunction · 0.85

Calls 3

agent_execute_tool_callFunction · 0.85
agent_buf_putsFunction · 0.85
agent_buf_takeFunction · 0.85

Tested by

no test coverage detected