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), "comparison_id": _clean_comparison_id(comparison_id),
} }
try: try:
grant = await ctx.workspace.request_access( reader = getattr(ctx.workspace, "read_bytes")
files=[document.path], raw = reader(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)
except Exception: except Exception:
return { return {
"ok": False, "ok": False,