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

Function install_kimi_durable_context

src/cli/cli.c:9239–9268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9237}
9238
9239static void install_kimi_durable_context(const cbm_agent_registry_context_t *registry,
9240 const char *binary_path, bool force, bool dry_run) {
9241 const char *kimi_home = registry->options.kimi_code_home;
9242 char default_home[CLI_BUF_1K];
9243 if (!kimi_home || !kimi_home[0]) {
9244 snprintf(default_home, sizeof(default_home), "%s/.kimi-code", registry->options.home_dir);
9245 kimi_home = default_home;
9246 }
9247 char instructions_path[CLI_BUF_1K];
9248 char skills_dir[CLI_BUF_1K];
9249 char config_path[CLI_BUF_1K];
9250 snprintf(instructions_path, sizeof(instructions_path), "%s/AGENTS.md", kimi_home);
9251 snprintf(skills_dir, sizeof(skills_dir), "%s/skills", kimi_home);
9252 snprintf(config_path, sizeof(config_path), "%s/config.toml", kimi_home);
9253 install_managed_agent_instructions("Kimi Code CLI", instructions_path, dry_run);
9254 install_agent_skill("Kimi Code CLI", skills_dir, force, dry_run);
9255 if (g_install_plan) {
9256 plan_record("Kimi Code CLI", "hook", config_path);
9257 return;
9258 }
9259 bool installed = true;
9260 if (!dry_run && (!prepare_config_parent(config_path) ||
9261 cbm_upsert_kimi_context_hook(config_path, binary_path) != CLI_OK)) {
9262 installed = false;
9263 record_agent_config_error(false, "Kimi Code CLI", "prompt_hook_install", config_path);
9264 }
9265 if (installed) {
9266 printf(" hook: %s (UserPromptSubmit)\n", config_path);
9267 }
9268}
9269
9270static void install_rovo_durable_context(const char *home, bool force, bool dry_run) {
9271 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