Add event-driven reporting and durable failure recovery hooks

This commit is contained in:
aiagent
2026-10-19 03:13:33 -07:00
parent 579dece104
commit a4cf70d82b
18 changed files with 711 additions and 8 deletions
+2
View File
@@ -134,6 +134,8 @@ def main():
with AppServer(cfg.get('codex')) as server:
while True:
count=sync(server,client,cfg)
from worker import atomic_json
atomic_json(Path(cfg['state_file']).parent/'mirror-health.json',{'status':'ok','updated':time.time()})
print(json.dumps({'thread_id':cfg['thread_id'],'visible_items':count}),flush=True)
if args.once:
return