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

Function handle_atlas_blast

src/ui/http_server.c:2883–2898  ·  view source on GitHub ↗

GET /api/blast?project=X&files=a,b,c — bucket a file list by region. */

Source from the content-addressed store, hash-verified

2881
2882/* GET /api/blast?project=X&files=a,b,c — bucket a file list by region. */
2883static void handle_atlas_blast(cbm_http_conn_t *c, const cbm_http_req_t *req) {
2884 char project[256] = {0};
2885 cbm_store_t *store = atlas_open_project(c, req, project, sizeof(project));
2886 if (!store)
2887 return;
2888 char files[8192] = {0};
2889 cbm_http_query_param(req->query, "files", files, (int)sizeof(files));
2890 if (!files[0]) {
2891 cbm_store_close(store);
2892 cbm_http_replyf(c, 400, g_cors_json, "{\"error\":\"missing files parameter\"}");
2893 return;
2894 }
2895 char *json = cbm_atlas_blast_json(store, project, files);
2896 cbm_store_close(store);
2897 atlas_reply_json(c, json, 500, "{\"error\":\"blast failed\"}");
2898}
2899
2900/* GET /api/bridges?project=X — boundary spanners by distinct-region reach. */
2901static void handle_atlas_bridges(cbm_http_conn_t *c, const cbm_http_req_t *req) {

Callers 1

dispatch_requestFunction · 0.85

Calls 6

atlas_open_projectFunction · 0.85
cbm_http_query_paramFunction · 0.85
cbm_store_closeFunction · 0.85
cbm_http_replyfFunction · 0.85
cbm_atlas_blast_jsonFunction · 0.85
atlas_reply_jsonFunction · 0.85

Tested by

no test coverage detected