write agent.py

This commit is contained in:
a2a-cloud
2026-06-08 23:01:10 +00:00
parent 45e366418a
commit 223ff77df1

View File

@@ -972,7 +972,7 @@ async def _write_iter_manifest(ctx: RunContext[Any], manifest: dict[str, Any]) -
out_dir = OUTPUT_DIR out_dir = OUTPUT_DIR
name = f"iter-plan-" + datetime.now(timezone.utc).strftime("%Y%m%dT%H%M%SZ") + ".json" name = f"iter-plan-" + datetime.now(timezone.utc).strftime("%Y%m%dT%H%M%SZ") + ".json"
path = f"{out_dir}/{name}" path = f"{out_dir}/{name}"
await ctx.workspace.write(path, json.dumps(manifest, ensure_ascii=False, indent=2).encode("utf-8")) ctx.workspace.write_bytes(path, json.dumps(manifest, ensure_ascii=False, indent=2).encode("utf-8"))
return path return path
except Exception: # noqa: BLE001 except Exception: # noqa: BLE001
return "" return ""