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

Function install_kimi_durable_context

src/cli/cli.c:8199–8228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8197}
8198
8199static void install_kimi_durable_context(const cbm_agent_registry_context_t *registry,
8200 const char *binary_path, bool force, bool dry_run) {
8201 const char *kimi_home = registry->options.kimi_code_home;
8202 char default_home[CLI_BUF_1K];
8203 if (!kimi_home || !kimi_home[0]) {
8204 snprintf(default_home, sizeof(default_home), "%s/.kimi-code", registry->options.home_dir);
8205 kimi_home = default_home;
8206 }
8207 char instructions_path[CLI_BUF_1K];
8208 char skills_dir[CLI_BUF_1K];
8209 char config_path[CLI_BUF_1K];
8210 snprintf(instructions_path, sizeof(instructions_path), "%s/AGENTS.md", kimi_home);
8211 snprintf(skills_dir, sizeof(skills_dir), "%s/skills", kimi_home);
8212 snprintf(config_path, sizeof(config_path), "%s/config.toml", kimi_home);
8213 install_managed_agent_instructions("Kimi Code CLI", instructions_path, dry_run);
8214 install_agent_skill("Kimi Code CLI", skills_dir, force, dry_run);
8215 if (g_install_plan) {
8216 plan_record("Kimi Code CLI", "hook", config_path);
8217 return;
8218 }
8219 bool installed = true;
8220 if (!dry_run && (!prepare_config_parent(config_path) ||
8221 cbm_upsert_kimi_context_hook(config_path, binary_path) != CLI_OK)) {
8222 installed = false;
8223 record_agent_config_error(false, "Kimi Code CLI", "prompt_hook_install", config_path);
8224 }
8225 if (installed) {
8226 printf(" hook: %s (UserPromptSubmit)\n", config_path);
8227 }
8228}
8229
8230static void install_rovo_durable_context(const char *home, bool force, bool dry_run) {
8231 char instructions_path[CLI_BUF_1K];

Callers 1

Calls 6

install_agent_skillFunction · 0.85
plan_recordFunction · 0.85
prepare_config_parentFunction · 0.85

Tested by

no test coverage detected