Add revisioned decisions and scoped consultation lifecycle

This commit is contained in:
aiagent
2026-10-19 22:28:53 -07:00
parent 0fcfe1c024
commit 6e4178dc79
27 changed files with 1431 additions and 192 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ def report_process(cfg,root,role,process,records,started_at=None):
health=data.get('health',data)
healthy=health.get('status')=='ok' and time.time()-health.get('updated',0)<60
except (OSError,ValueError):healthy=False
if code is None and role in ('notifier','report_relay') and not healthy and not record and started_at is not None and time.time()-started_at>30:
if code is None and role in ('notifier','report_relay','decision_fleet') and not healthy and not record and started_at is not None and time.time()-started_at>30:
record={'event_id':str(uuid.uuid4()),'state':'firing','pending':'firing','first_seen':time.time(),'severity':'warning'}
records[role]=record
if record and record.get('pending')=='resolved' and not (code is None and healthy):
@@ -54,7 +54,7 @@ def report_process(cfg,root,role,process,records,started_at=None):
try:
Client(cfg['control']).call('/api/hooks',{
'event_id':record['event_id'],'source':'bridge-'+role,'severity':record.get('severity','warning'),
'status':record['pending'],'summary':{'worker':'消息转发暂时中断','mirror':'聊天同步暂时中断','notifier':'事件通知暂时中断','report_relay':'完成上报暂时中断'}.get(role,'本机桥接暂时中断'),
'status':record['pending'],'summary':{'worker':'消息转发暂时中断','mirror':'聊天同步暂时中断','notifier':'事件通知暂时中断','report_relay':'完成上报暂时中断','decision_fleet':'决策咨询桥接暂时中断'}.get(role,'本机桥接暂时中断'),
'impact':'网页收发或历史同步可能延迟',
'evidence':['Private executor log: '+role+'.log'],
'action':'已启用有界重连;结果未知的模型输入不重复执行',