(requestId: string)
| 575 | }; |
| 576 | |
| 577 | const approveDevice = async (requestId: string): Promise<ApproveResult> => { |
| 578 | if (stopped) return approveFail('Cache is shutting down', 500); |
| 579 | if (!UUID_RE.test(requestId)) return approveFail('Invalid request ID', 400); |
| 580 | |
| 581 | try { |
| 582 | await execImpl(OPENCLAW_BIN, ['devices', 'approve', requestId]); |
| 583 | } catch (err) { |
| 584 | console.error('[pairing-cache] device approve failed:', err); |
| 585 | return approveFail(errorMessage(err), 500); |
| 586 | } |
| 587 | |
| 588 | await refreshDevicePairingInternal(); |
| 589 | return approveOk('Device approved'); |
| 590 | }; |
| 591 | |
| 592 | const onPairingLogLine = (line: string): void => { |
| 593 | if (stopped) return; |
nothing calls this directly
no test coverage detected