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

Function plan_record

src/cli/cli.c:7450–7468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7448static int g_agent_uninstall_errors = 0;
7449
7450static void plan_record(const char *agent, const char *kind, const char *path) {
7451 if (!g_install_plan || !path || !path[0]) {
7452 return;
7453 }
7454 cbm_install_plan_t *pl = g_install_plan;
7455 if (pl->count >= pl->cap) {
7456 int ncap = pl->cap ? pl->cap * 2 : CLI_BUF_16;
7457 cbm_plan_entry_t *ni = realloc(pl->items, (size_t)ncap * sizeof(*ni));
7458 if (!ni) {
7459 return;
7460 }
7461 pl->items = ni;
7462 pl->cap = ncap;
7463 }
7464 cbm_plan_entry_t *e = &pl->items[pl->count++];
7465 snprintf(e->agent, sizeof(e->agent), "%s", agent);
7466 snprintf(e->kind, sizeof(e->kind), "%s", kind);
7467 snprintf(e->path, sizeof(e->path), "%s", path);
7468}
7469
7470/* Describe what the target actually IS, so a refusal is triageable.
7471 *

Calls

no outgoing calls

Tested by

no test coverage detected