a2a-source-edit: write agent.py
This commit is contained in:
8
agent.py
8
agent.py
@@ -767,6 +767,14 @@ def redact_secrets(text: str) -> str:
|
|||||||
return redacted
|
return redacted
|
||||||
|
|
||||||
|
|
||||||
|
def _redact_match(match: re.Match[str]) -> str:
|
||||||
|
return (match.group(1) if match.lastindex else "") + "[REDACTED]"
|
||||||
|
|
||||||
|
|
||||||
|
def _jsonschema_error_path(error: Any) -> Any:
|
||||||
|
return error.path
|
||||||
|
|
||||||
|
|
||||||
def redact_obj(value: Any) -> Any:
|
def redact_obj(value: Any) -> Any:
|
||||||
if isinstance(value, dict):
|
if isinstance(value, dict):
|
||||||
out: dict[str, Any] = {}
|
out: dict[str, Any] = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user