fix agent template init workspace writes
All checks were successful
build / build (push) Successful in 2s

This commit is contained in:
robert
2026-05-26 18:59:37 -03:00
parent f7cf3b3c2e
commit a0cd262a02
2 changed files with 72 additions and 7 deletions

View File

@@ -259,13 +259,9 @@ def build_tools(ctx: ToolContext) -> list[Any]:
written: list[dict[str, Any]] = []
for path, content in files.items():
key = prefix + path
s3.put_object(
Bucket=bucket,
Key=key,
Body=content.encode("utf-8"),
ContentType="text/plain; charset=utf-8",
)
written.append({"path": key, "size": len(content)})
encoded = content.encode("utf-8")
store.put(key, encoded, "text/plain; charset=utf-8")
written.append({"path": key, "size": len(encoded)})
return json.dumps({
"ok": True,
"agent": name,