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

Function try_artifact_bootstrap

src/mcp/mcp.c:7177–7184  ·  view source on GitHub ↗

Bootstrap from artifact if no local DB exists for this project. */

Source from the content-addressed store, hash-verified

7175
7176/* Bootstrap from artifact if no local DB exists for this project. */
7177static void try_artifact_bootstrap(const char *project_name, const char *repo_path) {
7178 char db_buf[CBM_SZ_1K];
7179 project_db_path(project_name, db_buf, sizeof(db_buf));
7180 if (cbm_file_size(db_buf) < 0 && cbm_artifact_exists(repo_path)) {
7181 cbm_log_info("index.artifact_bootstrap", "project", project_name);
7182 cbm_artifact_import(repo_path, db_buf);
7183 }
7184}
7185
7186/* Cap on excluded dir paths listed in the response — keep it compact on large
7187 * repos (node_modules / vendor / etc. can produce many skip points). The full

Callers 1

handle_index_repositoryFunction · 0.85

Calls 4

project_db_pathFunction · 0.85
cbm_file_sizeFunction · 0.85
cbm_artifact_existsFunction · 0.85
cbm_artifact_importFunction · 0.85

Tested by

no test coverage detected