a2a-source-edit: write agent.py
This commit is contained in:
15
agent.py
15
agent.py
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user