RequestSecretCallback typedef
RequestSecretCallback =
Future<RequestSecretResult?> Function(String name, String reason)
Answers the agent's credential request on behalf of the user — the host
UI surface (Flutter bottom sheet). Returns the granted
RequestSecretResult, or null when the user declines: the tool then
resolves with a "user declined" result so the model continues gracefully.
Implementation
typedef RequestSecretCallback =
Future<RequestSecretResult?> Function(String name, String reason);