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

Function install_kimi_durable_context

src/cli/cli.c:8006–8035  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8004}
8005
8006static void install_kimi_durable_context(const cbm_agent_registry_context_t *registry,
8007 const char *binary_path, bool force, bool dry_run) {
8008 const char *kimi_home = registry->options.kimi_code_home;
8009 char default_home[CLI_BUF_1K];
8010 if (!kimi_home || !kimi_home[0]) {
8011 snprintf(default_home, sizeof(default_home), "%s/.kimi-code", registry->options.home_dir);
8012 kimi_home = default_home;
8013 }
8014 char instructions_path[CLI_BUF_1K];
8015 char skills_dir[CLI_BUF_1K];
8016 char config_path[CLI_BUF_1K];
8017 snprintf(instructions_path, sizeof(instructions_path), "%s/AGENTS.md", kimi_home);
8018 snprintf(skills_dir, sizeof(skills_dir), "%s/skills", kimi_home);
8019 snprintf(config_path, sizeof(config_path), "%s/config.toml", kimi_home);
8020 install_managed_agent_instructions("Kimi Code CLI", instructions_path, dry_run);
8021 install_agent_skill("Kimi Code CLI", skills_dir, force, dry_run);
8022 if (g_install_plan) {
8023 plan_record("Kimi Code CLI", "hook", config_path);
8024 return;
8025 }
8026 bool installed = true;
8027 if (!dry_run && (!prepare_config_parent(config_path) ||
8028 cbm_upsert_kimi_context_hook(config_path, binary_path) != CLI_OK)) {
8029 installed = false;
8030 record_agent_config_error(false, "Kimi Code CLI", "prompt_hook_install", config_path);
8031 }
8032 if (installed) {
8033 printf(" hook: %s (UserPromptSubmit)\n", config_path);
8034 }
8035}
8036
8037static void install_rovo_durable_context(const char *home, bool force, bool dry_run) {
8038 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