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

Function plan_record

src/cli/cli.c:7286–7304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7284static int g_agent_uninstall_errors = 0;
7285
7286static void plan_record(const char *agent, const char *kind, const char *path) {
7287 if (!g_install_plan || !path || !path[0]) {
7288 return;
7289 }
7290 cbm_install_plan_t *pl = g_install_plan;
7291 if (pl->count >= pl->cap) {
7292 int ncap = pl->cap ? pl->cap * 2 : CLI_BUF_16;
7293 cbm_plan_entry_t *ni = realloc(pl->items, (size_t)ncap * sizeof(*ni));
7294 if (!ni) {
7295 return;
7296 }
7297 pl->items = ni;
7298 pl->cap = ncap;
7299 }
7300 cbm_plan_entry_t *e = &pl->items[pl->count++];
7301 snprintf(e->agent, sizeof(e->agent), "%s", agent);
7302 snprintf(e->kind, sizeof(e->kind), "%s", kind);
7303 snprintf(e->path, sizeof(e->path), "%s", path);
7304}
7305
7306static void record_agent_config_error(bool uninstalling, const char *agent, const char *operation,
7307 const char *path) {

Calls

no outgoing calls

Tested by

no test coverage detected