credentialPathOf function
Extracts the credential path a tool call is about to touch, if any.
Implementation
String? credentialPathOf(ToolCall call) {
for (final key in _pathArgKeys) {
final value = call.arguments[key];
if (value is String && isCredentialFilePath(value)) return value;
}
if (call.name == 'bash') {
final command = call.arguments['command'];
if (command is String) return _bashCredentialReadPath(command);
}
return null;
}