feat: harden company resume, external sessions, and Office UI i18n

Improve suspend/resume identity continuity and external broker session handling, add Office UI internationalization with rebuilt assets, and expand company org configs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
小东
2026-07-16 09:20:40 +08:00
parent eb934cf2bd
commit cb6b8ed6e1
32 changed files with 2562 additions and 446 deletions
+22 -4
View File
@@ -5461,7 +5461,18 @@ class CompanyWorkItemExecutor:
await self._emit_progress(f"[Company:{projection_id}] awaiting peer", task_id=task.id)
await self.save_task(task)
else:
await transition_work_item_from_task(
self.store,
task,
target_status_or_phase=result.status,
reason=f"work_item_{result.status.value}",
)
await self._append_progress(
task,
f"Work item ended with status {result.status.value}.",
)
await self._emit_progress(f"[Company:{projection_id}] failed", task_id=task.id)
await self.save_task(task)
return result
# Comms park check: if the agent sent any blocking messages
@@ -7332,12 +7343,19 @@ class CompanyWorkItemExecutor:
metadata_updates["review_resolution"] = copy.deepcopy(resolution)
metadata_updates["review_resolution_state"] = "pending"
try:
current = None
if hasattr(self.store, "get_delegation_work_item"):
current = await self.store.get_delegation_work_item(review_work_item_id)
update_kwargs: dict[str, Any] = {
"claimed_by_role_runtime_session_id": "",
"claimed_by_seat_id": "",
"metadata_updates": metadata_updates,
}
if current is None or current.phase not in DONE_PHASES or current.phase == phase:
update_kwargs["phase"] = phase
persisted = await self.store.update_delegation_work_item(
review_work_item_id,
phase=phase,
claimed_by_role_runtime_session_id="",
claimed_by_seat_id="",
metadata_updates=metadata_updates,
**update_kwargs,
)
except Exception:
logger.opt(exception=True).warning(