MCPcopy Create free account
hub / github.com/RioArisk/claudecode_api_RemoteControl / autoResolveAllPendingApprovals

Function autoResolveAllPendingApprovals

lib/logger.js:110–120  ·  view source on GitHub ↗
(reason = '')

Source from the content-addressed store, hash-verified

108}
109
110function autoResolveAllPendingApprovals(reason = '') {
111 if (state.pendingApprovals.size === 0) return;
112 for (const [id, approval] of state.pendingApprovals) {
113 clearTimeout(approval.timer);
114 approval.res.writeHead(200, { 'Content-Type': 'application/json' });
115 approval.res.end(JSON.stringify({ decision: 'allow' }));
116 log(`Permission #${id}: auto-allowed (${reason || 'effective mode switched to all'})`);
117 }
118 state.pendingApprovals.clear();
119 broadcast({ type: 'clear_permissions' });
120}
121
122function recomputeEffectiveApprovalMode(reason = '') {
123 const connectedHighest = computeConnectedHighestApprovalMode();

Callers 1

Calls 2

logFunction · 0.85
broadcastFunction · 0.85

Tested by

no test coverage detected