feat: add production assurance dashboard flow

This commit is contained in:
thanhnv
2026-07-28 21:49:15 +07:00
parent ee5d1f7af5
commit cce3cbfd42
39 changed files with 1873 additions and 91 deletions
@@ -173,14 +173,14 @@ def handle_stop(payload):
if not ptr:
_emit({})
return 0
bridge.op_finalize({
resp = bridge.op_finalize({
"op": "finalize",
"admission_id": ptr.get("admission_id"),
"stop_reason": "completed",
"assistant_summary": payload.get("last_assistant_message") or payload.get("assistant_summary"),
})
clear_pointer(session)
_emit({})
_emit({"systemMessage": bridge.format_receipt(resp)})
return 0
@@ -182,10 +182,7 @@ def handle_stop(payload):
clear_pointer(session)
return _emit({
"continue": True,
"systemMessage": "CASAN finalized trace %s (certified=%s, strength=%s)" % (
resp.get("trace_id") or "unknown",
str(resp.get("decision") == "certified").lower(),
resp.get("certification_strength") or "unknown"),
"systemMessage": bridge.format_receipt(resp),
}, 0)