MCPcopy Create free account
hub / github.com/tiann/hapi / getMachineIdOrExit

Function getMachineIdOrExit

cli/src/agent/sessionFactory.ts:110–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

108}
109
110async function getMachineIdOrExit(): Promise<string> {
111 const settings = await readSettings()
112 const machineId = settings?.machineId
113 if (!machineId) {
114 console.error(`[START] No machine ID found in settings, which is unexpected since authAndSetupMachineIfNeeded should have created it. Please report this issue on ${packageJson.bugs}`)
115 process.exit(1)
116 }
117 logger.debug(`Using machineId: ${machineId}`)
118 return machineId
119}
120
121async function reportSessionStarted(sessionId: string, metadata: Metadata): Promise<void> {
122 try {

Callers 2

bootstrapSessionFunction · 0.85
bootstrapExistingSessionFunction · 0.85

Calls 3

readSettingsFunction · 0.90
errorMethod · 0.80
debugMethod · 0.80

Tested by

no test coverage detected