a2a-source-edit: write agent.py

This commit is contained in:
a2a-cloud
2026-07-13 02:50:59 +00:00
parent 5e32328f67
commit f99f3d07cb

View File

@@ -764,7 +764,7 @@ class ProductionIncidentCommander(A2AAgent[CommanderConfig, NoAuth]):
if approval_acknowledgement != APPROVAL_ACK: if approval_acknowledgement != APPROVAL_ACK:
result = ExecutionResult(incident_id=incident_id, status="denied", dry_run=dry_run, approval_provenance={"accepted": False, "reason": "approval acknowledgement mismatch"}, step_results=[], final_incident_state="unchanged", artifact_paths=[f"outputs/incidents/{incident_id}/execution.json"]) result = ExecutionResult(incident_id=incident_id, status="denied", dry_run=dry_run, approval_provenance={"accepted": False, "reason": "approval acknowledgement mismatch"}, step_results=[], final_incident_state="unchanged", artifact_paths=[f"outputs/incidents/{incident_id}/execution.json"])
await workspace_write_json(ctx, f"outputs/incidents/{incident_id}/execution.json", result) await workspace_write_json(ctx, f"outputs/incidents/{incident_id}/execution.json", result)
return result return result.model_dump(mode="json")
clean = validate_incident_path(plan_path, incident_id, must_exist_under_incident=True) clean = validate_incident_path(plan_path, incident_id, must_exist_under_incident=True)
text = await workspace_read_text(ctx, clean) text = await workspace_read_text(ctx, clean)
plan = RemediationPlan.model_validate_json(text) plan = RemediationPlan.model_validate_json(text)