a2a-source-edit: write agent.py

This commit is contained in:
a2a-cloud
2026-07-18 08:15:29 +00:00
parent 15e98b9ace
commit 78f8677e6f

View File

@@ -333,9 +333,8 @@ def _extract_deadlines(text: str) -> list[ExtractedDeadline]:
)
)
seen.add(("notice", notice_date))
deadlines.sort(key=lambda item: (item.deadline_date, item.kind != "notice"))
# Public contract wants renewal before derived notice for the same clause.
deadlines.sort(key=lambda item: 0 if item.kind == "renewal" else 1)
# Public contract wants renewal before the derived notice date for a clause.
deadlines.sort(key=_deadline_sort_key)
return deadlines