MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / writeInstalled

Function writeInstalled

packages/agent-core/src/plugin/store.ts:54–64  ·  view source on GitHub ↗
(
  kimiHomeDir: string,
  data: InstalledFile,
)

Source from the content-addressed store, hash-verified

52}
53
54export async function writeInstalled(
55 kimiHomeDir: string,
56 data: InstalledFile,
57): Promise<void> {
58 const dir = path.join(kimiHomeDir, 'plugins');
59 await mkdir(dir, { recursive: true });
60 const final = path.join(dir, 'installed.json');
61 const tmp = `${final}.tmp`;
62 await writeFile(tmp, JSON.stringify(data, null, 2), 'utf8');
63 await rename(tmp, final);
64}

Callers 2

store.test.tsFile · 0.90
persistMethod · 0.90

Calls 2

mkdirFunction · 0.50
writeFileFunction · 0.50

Tested by

no test coverage detected