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

Function install_kimi_durable_context

src/cli/cli.c:8414–8443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8412}
8413
8414static void install_kimi_durable_context(const cbm_agent_registry_context_t *registry,
8415 const char *binary_path, bool force, bool dry_run) {
8416 const char *kimi_home = registry->options.kimi_code_home;
8417 char default_home[CLI_BUF_1K];
8418 if (!kimi_home || !kimi_home[0]) {
8419 snprintf(default_home, sizeof(default_home), "%s/.kimi-code", registry->options.home_dir);
8420 kimi_home = default_home;
8421 }
8422 char instructions_path[CLI_BUF_1K];
8423 char skills_dir[CLI_BUF_1K];
8424 char config_path[CLI_BUF_1K];
8425 snprintf(instructions_path, sizeof(instructions_path), "%s/AGENTS.md", kimi_home);
8426 snprintf(skills_dir, sizeof(skills_dir), "%s/skills", kimi_home);
8427 snprintf(config_path, sizeof(config_path), "%s/config.toml", kimi_home);
8428 install_managed_agent_instructions("Kimi Code CLI", instructions_path, dry_run);
8429 install_agent_skill("Kimi Code CLI", skills_dir, force, dry_run);
8430 if (g_install_plan) {
8431 plan_record("Kimi Code CLI", "hook", config_path);
8432 return;
8433 }
8434 bool installed = true;
8435 if (!dry_run && (!prepare_config_parent(config_path) ||
8436 cbm_upsert_kimi_context_hook(config_path, binary_path) != CLI_OK)) {
8437 installed = false;
8438 record_agent_config_error(false, "Kimi Code CLI", "prompt_hook_install", config_path);
8439 }
8440 if (installed) {
8441 printf(" hook: %s (UserPromptSubmit)\n", config_path);
8442 }
8443}
8444
8445static void install_rovo_durable_context(const char *home, bool force, bool dry_run) {
8446 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