MCPcopy Index your code
hub / github.com/codeaashu/claude-code / checkPermissions

Function checkPermissions

src/tools/ExitPlanModeTool/ExitPlanModeV2Tool.ts:221–239  ·  view source on GitHub ↗
(input, context)

Source from the content-addressed store, hash-verified

219 return { result: true }
220 },
221 async checkPermissions(input, context) {
222 // For ALL teammates, bypass the permission UI to avoid sending permission_request
223 // The call() method handles the appropriate behavior:
224 // - If isPlanModeRequired(): sends plan_approval_request to leader
225 // - Otherwise: exits plan mode locally (voluntary plan mode)
226 if (isTeammate()) {
227 return {
228 behavior: 'allow' as const,
229 updatedInput: input,
230 }
231 }
232
233 // For non-teammates, require user confirmation to exit plan mode
234 return {
235 behavior: 'ask' as const,
236 message: 'Exit plan mode?',
237 updatedInput: input,
238 }
239 },
240 renderToolUseMessage,
241 renderToolResultMessage,
242 renderToolUseRejectedMessage,

Callers

nothing calls this directly

Calls 1

isTeammateFunction · 0.85

Tested by

no test coverage detected