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

Function createKimiDeviceHeaders

packages/oauth/src/identity.ts:70–82  ·  view source on GitHub ↗
(options: {
  readonly homeDir: string;
  readonly version: string;
})

Source from the content-addressed store, hash-verified

68}
69
70export function createKimiDeviceHeaders(options: {
71 readonly homeDir: string;
72 readonly version: string;
73}): DeviceHeaders {
74 return {
75 'X-Msh-Platform': KIMI_CODE_PLATFORM,
76 'X-Msh-Version': requiredAsciiHeader(options.version, 'Kimi identity version'),
77 'X-Msh-Device-Name': asciiHeader(hostname()),
78 'X-Msh-Device-Model': asciiHeader(deviceModel()),
79 'X-Msh-Os-Version': asciiHeader(release()),
80 'X-Msh-Device-Id': createKimiDeviceId(options.homeDir),
81 };
82}
83
84export function createKimiUserAgent(options: {
85 readonly userAgentProduct: string;

Callers 3

identity.test.tsFile · 0.90
managerForMethod · 0.90
createKimiDefaultHeadersFunction · 0.85

Calls 5

requiredAsciiHeaderFunction · 0.85
createKimiDeviceIdFunction · 0.85
asciiHeaderFunction · 0.70
deviceModelFunction · 0.70
releaseFunction · 0.50

Tested by

no test coverage detected