From 4f48a28d661186435fee115acca3d6c3f9675a1d Mon Sep 17 00:00:00 2001 From: a2a-cloud Date: Mon, 13 Jul 2026 02:51:21 +0000 Subject: [PATCH] a2a-source-edit: write agent.py --- agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent.py b/agent.py index 1bf7bc6..91e0458 100644 --- a/agent.py +++ b/agent.py @@ -844,7 +844,7 @@ class ProductionIncidentCommander(A2AAgent[CommanderConfig, NoAuth]): pm = Postmortem(incident_id=incident_id, executive_summary=(diagnosis.likely_root_cause if diagnosis and diagnosis.likely_root_cause else "Incident investigated with bounded evidence; final root cause remains unresolved."), customer_impact="Customer-facing impact should be filled from support/business telemetry." if include_customer_summary else "Customer summary omitted by caller.", timeline=timeline, detection="Detected from caller-provided intake and configured evidence sources.", root_cause=root, contributing_factors=["Evidence gaps or missing integration setup may have limited confidence"] if not diagnosis or diagnosis.status != "diagnosed" else [], response_analysis="Response followed intake, scoped evidence collection, hypothesis ranking, approval-gated remediation, and recovery verification.", what_went_well=["Evidence was redacted and written to durable artifacts", "Mutations were separated from diagnosis and planning"], what_went_poorly=["Fill with operator review after incident debrief"], corrective_actions=corrective, evidence_references=[ev.id for ev in diagnosis.evidence_summary] if diagnosis else [], unresolved_questions=[] if diagnosis and diagnosis.status == "diagnosed" else ["What additional evidence would distinguish the top hypotheses?"], artifact_paths=[f"outputs/incidents/{incident_id}/postmortem.json", f"outputs/incidents/{incident_id}/postmortem.md"], receipts=[{"blameless": True, "source_artifacts": [f"outputs/incidents/{incident_id}/diagnosis.json"]}]) await workspace_write_json(ctx, f"outputs/incidents/{incident_id}/postmortem.json", pm) await workspace_write_text(ctx, f"outputs/incidents/{incident_id}/postmortem.md", _postmortem_markdown(pm), "text/markdown") - return pm + return pm.model_dump(mode="json") def _diagnosis_markdown(d: IncidentDiagnosis) -> str: