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

Function getCoreVersion

packages/agent-core/src/version.ts:4–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2import { fileURLToPath } from 'node:url';
3
4export function getCoreVersion(): string {
5 try {
6 const pkgUrl = new URL('../package.json', import.meta.url);
7 const raw = readFileSync(fileURLToPath(pkgUrl), 'utf-8');
8 const pkg = JSON.parse(raw) as { version?: unknown };
9 return typeof pkg.version === 'string' ? pkg.version : '0.0.0';
10 } catch {
11 return '0.0.0';
12 }
13}

Callers 2

client-shared.tsFile · 0.90
getCoreInfoMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected