Commit pending workspace updates

This commit is contained in:
2026-05-28 20:25:05 -03:00
parent 1ae952ddd6
commit a769766ab4
2 changed files with 9 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.codegraph/

View File

@@ -290,6 +290,7 @@ class BlogOpenapiAgent(A2AAgent):
"Call tools to get real results. Do not invent API responses.",
"For write, update, or delete operations, explain the intended action before calling the tool.",
"If an operation reports missing consumer setup, tell the user which setup field is required.",
"If an operation returns 404, 405, 410, or a schema/validation error that suggests the live API no longer matches these tools, tell the user this generated agent may need to be refreshed from the latest OpenAPI spec and ask whether they want to refresh it.",
"",
"Available operations:",
]
@@ -346,12 +347,18 @@ class BlogOpenapiAgent(A2AAgent):
except ValueError:
payload = response.text
if response.status_code >= 400:
return {
out = {
"ok": False,
"status_code": response.status_code,
"operation_id": operation_id,
"error": payload,
}
if response.status_code in {404, 405, 410, 422}:
out["stale_openapi_hint"] = (
"This generated OpenAPI agent may be stale. Ask the user "
"whether they want to refresh it from the latest OpenAPI spec."
)
return out
return {
"ok": True,
"status_code": response.status_code,