MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / main_set_client_context

Function main_set_client_context

src/main.c:1397–1409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 4

main_run_hook_frontendFunction · 0.85
main_run_daemon_ctlFunction · 0.85
mainFunction · 0.85

Tested by

no test coverage detected