| 1397 | } |
| 1398 | |
| 1399 | static bool main_set_client_context(cbm_daemon_runtime_client_t *client, const char *preferred_root, |
| 1400 | cbm_mcp_tool_profile_t tool_profile, const char *hook_event, |
| 1401 | const char *hook_dialect, uint32_t timeout_ms) { |
| 1402 | char root[MAIN_PATH_CAP]; |
| 1403 | char allowed[MAIN_PATH_CAP]; |
| 1404 | const char *allowed_ptr = NULL; |
| 1405 | if (!main_session_context(preferred_root, root, allowed, &allowed_ptr)) { |
| 1406 | return false; |
| 1407 | } |
| 1408 | return cbm_daemon_application_client_set_context(client, root, allowed_ptr, tool_profile, |
| 1409 | hook_event, hook_dialect, timeout_ms) == |
| 1410 | CBM_DAEMON_RUNTIME_APPLICATION_OK; |
| 1411 | } |
| 1412 | |
| 1413 | /* Parse a strict MAJOR.MINOR.PATCH triple; false for anything else (dev |
| 1414 | * builds and prereleases never participate in auto-drain decisions). */ |
no test coverage detected