( args: string[], env: NodeJS.ProcessEnv, )
| 26 | } |
| 27 | |
| 28 | export async function runBuiltCliJson( |
| 29 | args: string[], |
| 30 | env: NodeJS.ProcessEnv, |
| 31 | ): Promise<CliJsonResult> { |
| 32 | const result = await runCmd(process.execPath, ['bin/agent-device.mjs', ...args], { |
| 33 | allowFailure: true, |
| 34 | env, |
| 35 | timeoutMs: CLI_TIMEOUT_MS, |
| 36 | }); |
| 37 | return cliJsonResult(result); |
| 38 | } |
| 39 | |
| 40 | export function formatResultDebug(step: string, args: string[], result: CliJsonResult): string { |
| 41 | const jsonText = |