Consolidate Odysseus agent harness and tool contracts

This commit is contained in:
pewdiepie-archdaemon
2026-09-17 10:07:40 +00:00
parent 84aa9a91de
commit 218d762427
229 changed files with 28899 additions and 1551 deletions
+8
View File
@@ -786,6 +786,10 @@ def _event_to_dict(ev: CalendarEvent, db=None, owner: str | None = None) -> dict
"reminder_note_id": reminder["note_id"] if reminder else None,
"reminder_due_date": reminder["due_date"] if reminder else None,
"reminder_minutes": reminder["minutes"] if reminder else None,
"source_email_uid": getattr(ev, "source_email_uid", None),
"source_email_folder": getattr(ev, "source_email_folder", None),
"source_email_account_id": getattr(ev, "source_email_account_id", None),
"source_email_message_id": getattr(ev, "source_email_message_id", None),
}
@@ -1610,6 +1614,7 @@ def setup_calendar_routes(upload_handler=None) -> APIRouter:
db.refresh(target_cal)
imported = skipped = repaired = 0
event_uids = []
for comp in cal_data.walk():
if comp.name != "VEVENT":
continue
@@ -1657,6 +1662,7 @@ def setup_calendar_routes(upload_handler=None) -> APIRouter:
if fixed_end != existing.dtend:
existing.dtend = fixed_end
repaired += 1
event_uids.append(existing.uid)
skipped += 1
continue
@@ -1705,6 +1711,7 @@ def setup_calendar_routes(upload_handler=None) -> APIRouter:
rrule=(comp.get("rrule").to_ical().decode() if comp.get("rrule") else ""),
)
db.add(ev)
event_uids.append(uid_val)
imported += 1
db.commit()
@@ -1715,6 +1722,7 @@ def setup_calendar_routes(upload_handler=None) -> APIRouter:
"repaired": repaired,
"calendar": cal_display,
"calendar_id": target_cal.id,
"event_uids": event_uids,
}
except HTTPException:
raise