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

Function dsml_parse_leaf_param_json

ds4_server.c:4362–4398  ·  view source on GitHub ↗

DSML produced by the model is usually a flat list of typed parameters: * * /tmp/x * 10 * * Long generations sometimes drift into a looser XML-ish shape, omitting the * outer string attribute and putting child parameters inside it. The server * does not know client tool schemas, so it c

Source from the content-addressed store, hash-verified

4360 free(item_id);
4361 free(arguments);
4362 free(output);
4363 free(input_str);
4364 free(summary);
4365 free(action);
4366 free(result);
4367 free(tools_json);
4368 free(status_str);
4369 server_image_inputs_free(&content_images);
4370 server_image_inputs_free(&output_images);
4371 buf_free(&pending_reasoning);
4372 return false;
4373 }
4374 if ((content_images.len &&
4375 (strcmp(t, "message") || (role && strcmp(role, "user")))) ||
4376 (output_images.len && strcmp(t, "function_call_output") &&
4377 strcmp(t, "custom_tool_call_output"))) {
4378 free(type);
4379 free(role);
4380 free(content);
4381 free(name);
4382 free(namespace);
4383 free(call_id);
4384 free(item_id);
4385 free(arguments);
4386 free(output);
4387 free(input_str);
4388 free(summary);
4389 free(action);
4390 free(result);
4391 free(tools_json);
4392 free(status_str);
4393 server_image_inputs_free(&content_images);
4394 server_image_inputs_free(&output_images);
4395 buf_free(&pending_reasoning);
4396 return false;
4397 }
4398 /* Three classes of items:
4399 * 1. consumes_reasoning: assistant message / function_call / hosted-tool
4400 * call. Attaches pending reasoning to its own assistant message.
4401 * 2. is_bookkeeping: compaction / context_compaction etc. Semantically

Callers 1

Calls 5

dsml_attrFunction · 0.85
dsml_unescape_textFunction · 0.85
tool_call_json_args_addFunction · 0.85
xstrndupFunction · 0.70
xstrdupFunction · 0.70

Tested by

no test coverage detected