MCPcopy Create free account
hub / github.com/codeaashu/claude-code / buildAllow

Function buildAllow

src/hooks/toolPermission/PermissionContext.ts:264–284  ·  view source on GitHub ↗
(
      updatedInput: Record<string, unknown>,
      opts?: {
        userModified?: boolean
        decisionReason?: PermissionDecisionReason
        acceptFeedback?: string
        contentBlocks?: ContentBlockParam[]
      },
    )

Source from the content-addressed store, hash-verified

262 return null
263 },
264 buildAllow(
265 updatedInput: Record<string, unknown>,
266 opts?: {
267 userModified?: boolean
268 decisionReason?: PermissionDecisionReason
269 acceptFeedback?: string
270 contentBlocks?: ContentBlockParam[]
271 },
272 ): PermissionAllowDecision {
273 return {
274 behavior: 'allow' as const,
275 updatedInput,
276 userModified: opts?.userModified ?? false,
277 ...(opts?.decisionReason && { decisionReason: opts.decisionReason }),
278 ...(opts?.acceptFeedback && { acceptFeedback: opts.acceptFeedback }),
279 ...(opts?.contentBlocks &&
280 opts.contentBlocks.length > 0 && {
281 contentBlocks: opts.contentBlocks,
282 }),
283 }
284 },
285 buildDeny(
286 message: string,
287 decisionReason: PermissionDecisionReason,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected