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

Function plan_record

src/cli/cli.c:8213–8231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8211}
8212
8213static void plan_record(const char *agent, const char *kind, const char *path) {
8214 if (!g_install_plan || !path || !path[0]) {
8215 return;
8216 }
8217 cbm_install_plan_t *pl = g_install_plan;
8218 if (pl->count >= pl->cap) {
8219 int ncap = pl->cap ? pl->cap * 2 : CLI_BUF_16;
8220 cbm_plan_entry_t *ni = realloc(pl->items, (size_t)ncap * sizeof(*ni));
8221 if (!ni) {
8222 return;
8223 }
8224 pl->items = ni;
8225 pl->cap = ncap;
8226 }
8227 cbm_plan_entry_t *e = &pl->items[pl->count++];
8228 snprintf(e->agent, sizeof(e->agent), "%s", agent);
8229 snprintf(e->kind, sizeof(e->kind), "%s", kind);
8230 snprintf(e->path, sizeof(e->path), "%s", path);
8231}
8232
8233/* Describe what the target actually IS, so a refusal is triageable.
8234 *

Calls

no outgoing calls

Tested by

no test coverage detected