a2a-source-edit: write agent.py

This commit is contained in:
a2a-cloud
2026-07-13 03:17:12 +00:00
parent c7c4c7b5d9
commit fda145246c

View File

@@ -633,7 +633,8 @@ class CustomerIntegrationEngineer(A2AAgent[CustomerIntegrationEngineerConfig, No
warnings.append(f"delivery actions require approval_phrase={APPROVAL_PHRASE!r} and plan_digest={digest}") warnings.append(f"delivery actions require approval_phrase={APPROVAL_PHRASE!r} and plan_digest={digest}")
if approval_required and approval_valid: if approval_required and approval_valid:
warnings.append("approval validated for the listed plan, but this agent still does not deploy, merge, or modify customer systems") warnings.append("approval validated for the listed plan, but this agent still does not deploy, merge, or modify customer systems")
handoff = _render_handoff(request, digest, approval_required, approval_valid) handoff_request = request.model_copy(update={"dry_run": dry_run})
handoff = _render_handoff(handoff_request, digest, approval_required, approval_valid)
path = f"{_integration_base(request.integration_id)}/handoff.md" path = f"{_integration_base(request.integration_id)}/handoff.md"
artifact = await _write_workspace_text(ctx, path, handoff, "text/markdown") artifact = await _write_workspace_text(ctx, path, handoff, "text/markdown")
audit.append(_audit("handoff_completed", request.integration_id, {"handoff": path, "approval_required": approval_required, "approval_valid": approval_valid})) audit.append(_audit("handoff_completed", request.integration_id, {"handoff": path, "approval_required": approval_required, "approval_valid": approval_valid}))