(
updatedInput: Record<string, unknown>,
permissionUpdates: PermissionUpdate[],
feedback?: string,
permissionPromptStartTimeMs?: number,
contentBlocks?: ContentBlockParam[],
decisionReason?: PermissionDecisionReason,
)
| 289 | return { behavior: 'deny' as const, message, decisionReason } |
| 290 | }, |
| 291 | async handleUserAllow( |
| 292 | updatedInput: Record<string, unknown>, |
| 293 | permissionUpdates: PermissionUpdate[], |
| 294 | feedback?: string, |
| 295 | permissionPromptStartTimeMs?: number, |
| 296 | contentBlocks?: ContentBlockParam[], |
| 297 | decisionReason?: PermissionDecisionReason, |
| 298 | ): Promise<PermissionAllowDecision> { |
| 299 | const acceptedPermanentUpdates = |
| 300 | await this.persistPermissions(permissionUpdates) |
| 301 | this.logDecision( |
| 302 | { |
| 303 | decision: 'accept', |
| 304 | source: { type: 'user', permanent: acceptedPermanentUpdates }, |
| 305 | }, |
| 306 | { input: updatedInput, permissionPromptStartTimeMs }, |
| 307 | ) |
| 308 | const userModified = tool.inputsEquivalent |
| 309 | ? !tool.inputsEquivalent(input, updatedInput) |
| 310 | : false |
| 311 | const trimmedFeedback = feedback?.trim() |
| 312 | return this.buildAllow(updatedInput, { |
| 313 | userModified, |
| 314 | decisionReason, |
| 315 | acceptFeedback: trimmedFeedback || undefined, |
| 316 | contentBlocks, |
| 317 | }) |
| 318 | }, |
| 319 | async handleHookAllow( |
| 320 | finalInput: Record<string, unknown>, |
| 321 | permissionUpdates: PermissionUpdate[], |
nothing calls this directly
no outgoing calls
no test coverage detected