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

Function cbm_daemon_bootstrap_endpoint_new

src/daemon/bootstrap.c:272–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270#endif
271
272cbm_daemon_ipc_endpoint_t *cbm_daemon_bootstrap_endpoint_new(const char *runtime_parent) {
273 char key[CBM_DAEMON_KEY_SIZE];
274 if (!cbm_daemon_rendezvous_key(key)) {
275 return NULL;
276 }
277 /* The override is resolved HERE, the one function every product endpoint
278 * goes through (daemon, MCP client, local CLI, index worker, activation),
279 * so no call site can silently keep the default. */
280 char override_parent[BOOTSTRAP_PATH_CAP];
281 const char *parent =
282 bootstrap_runtime_parent_resolve(runtime_parent, override_parent, sizeof(override_parent));
283#ifdef CBM_ENABLE_TEST_SEAMS
284 if (!parent && g_bootstrap_default_runtime_forbidden) {
285 (void)fprintf(stderr, "codebase-memory-mcp: test run refused the default daemon runtime "
286 "directory (no explicit parent and CBM_RUNTIME_DIR unset): the "
287 "developer's live daemon listens there\n");
288 return NULL;
289 }
290#endif
291 return cbm_daemon_ipc_endpoint_new(key, parent);
292}
293
294bool cbm_daemon_bootstrap_launch_spec_init(const char *executable_path,
295 cbm_daemon_bootstrap_launch_spec_t *spec_out) {

Callers 10

main_daemon_endpoint_newFunction · 0.85
mainFunction · 0.85
test_cli.cFile · 0.85
cli_scope_host_childFunction · 0.85
cli_scope_fixture_startFunction · 0.85
test_main.cFile · 0.85

Tested by 4

cli_scope_host_childFunction · 0.68
cli_scope_fixture_startFunction · 0.68