MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / approveDevice

Function approveDevice

services/kiloclaw/controller/src/pairing-cache.ts:577–590  ·  view source on GitHub ↗
(requestId: string)

Source from the content-addressed store, hash-verified

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;

Callers

nothing calls this directly

Calls 5

approveFailFunction · 0.85
approveOkFunction · 0.85
errorMessageFunction · 0.70
errorMethod · 0.65

Tested by

no test coverage detected