| 15511 | } |
| 15512 | |
| 15513 | static int doccand_forward_call(cbm_mcp_server_t *srv, doccand_executor_capture_t *capture, |
| 15514 | const char *repo, const char *extra) { |
| 15515 | char args[1024]; |
| 15516 | snprintf(args, sizeof(args), "{\"repo_path\":\"%s\"%s}", repo, extra); |
| 15517 | free(capture->args); |
| 15518 | capture->args = NULL; |
| 15519 | int before = capture->calls; |
| 15520 | char *resp = cbm_mcp_handle_tool(srv, "index_repository", args); |
| 15521 | free(resp); |
| 15522 | return capture->calls == before + 1 ? doccand_forwarded(capture) : -3; |
| 15523 | } |
| 15524 | |
| 15525 | /* A daemon session forwards doc_candidates only when it is explicit: an |
| 15526 | * argument (caller duplicates replaced by the one resolved value) or a |
no test coverage detected