a2a-source-edit: write agent.py

This commit is contained in:
a2a-cloud
2026-07-18 03:14:24 +00:00
parent 1ef1340262
commit 9cc4068645

View File

@@ -312,19 +312,8 @@ class QuoteJudgeStudioV1(A2AAgent[QuoteJudgeStudioV1Config, PlatformUserAuth]):
"comparison_id": _clean_comparison_id(comparison_id),
}
try:
grant = await ctx.workspace.request_access(
files=[document.path],
mode=WorkspaceMode.READ_ONLY,
reason="Parse the caller-uploaded quote file for comparison.",
purpose="Read uploaded vendor quote file",
)
view = await ctx.workspace.open_view(
purpose="Read uploaded vendor quote file",
hints=[document.path],
max_files=1,
reason="Parse the caller-uploaded quote file for comparison.",
)
raw = await view.read(grant.files[0].path)
reader = getattr(ctx.workspace, "read_bytes")
raw = reader(document.path)
except Exception:
return {
"ok": False,