|
1 | 1 | import { execSync } from "node:child_process"; |
2 | 2 | import { mkdirSync, unlinkSync } from "node:fs"; |
3 | | -import { arch, hostname, platform, release } from "node:os"; |
| 3 | +import { arch, platform, release } from "node:os"; |
4 | 4 | import type { MachineRuntime } from "@agent-kanban/shared"; |
5 | 5 | import { MachineClient } from "../client/index.js"; |
6 | 6 | import { getCredentials } from "../config.js"; |
7 | 7 | import { generateDeviceId } from "../device.js"; |
8 | 8 | import { createLogger } from "../logger.js"; |
| 9 | +import { resolveMachineName } from "../machineName.js"; |
9 | 10 | import { PID_FILE, STATE_DIR } from "../paths.js"; |
10 | 11 | import { getAvailableProviders, getProvider } from "../providers/registry.js"; |
11 | 12 | import type { AgentProvider, HistoryEvent } from "../providers/types.js"; |
@@ -168,7 +169,7 @@ function removePidFile(): void { |
168 | 169 | async function getMachineInfo(providers: AgentProvider[], rateLimiter: RateLimiter) { |
169 | 170 | const os = `${platform()} ${arch()} ${release()}`; |
170 | 171 | const runtimes = await buildRuntimeStates(providers, rateLimiter); |
171 | | - return { name: hostname(), os, version: getVersion(), runtimes }; |
| 172 | + return { name: resolveMachineName(), os, version: getVersion(), runtimes }; |
172 | 173 | } |
173 | 174 |
|
174 | 175 | async function buildRuntimeStates(providers: AgentProvider[], rateLimiter: RateLimiter): Promise<MachineRuntime[]> { |
|
0 commit comments