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

Function plan_record

src/cli/cli.c:8419–8437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8417}
8418
8419static void plan_record(const char *agent, const char *kind, const char *path) {
8420 if (!g_install_plan || !path || !path[0]) {
8421 return;
8422 }
8423 cbm_install_plan_t *pl = g_install_plan;
8424 if (pl->count >= pl->cap) {
8425 int ncap = pl->cap ? pl->cap * 2 : CLI_BUF_16;
8426 cbm_plan_entry_t *ni = realloc(pl->items, (size_t)ncap * sizeof(*ni));
8427 if (!ni) {
8428 return;
8429 }
8430 pl->items = ni;
8431 pl->cap = ncap;
8432 }
8433 cbm_plan_entry_t *e = &pl->items[pl->count++];
8434 snprintf(e->agent, sizeof(e->agent), "%s", agent);
8435 snprintf(e->kind, sizeof(e->kind), "%s", kind);
8436 snprintf(e->path, sizeof(e->path), "%s", path);
8437}
8438
8439/* Describe what the target actually IS, so a refusal is triageable.
8440 *

Calls

no outgoing calls

Tested by

no test coverage detected