mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-06-18 15:29:36 +00:00
- API routers, ACA modules, integrations (draft operators) - Docs, landing pages, scripts (launch readiness, scorecard) - Tests and CI workflow updates for Dealix Co-authored-by: Cursor <cursoragent@cursor.com>
36 lines
958 B
Python
36 lines
958 B
Python
"""Structured trace event for dashboards (PII-redacted strings)."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import time
|
|
import uuid
|
|
from typing import Any
|
|
|
|
from auto_client_acquisition.security_curator.trace_redactor import redact_trace_payload
|
|
|
|
|
|
def build_trace_event(
|
|
*,
|
|
workflow_name: str,
|
|
agent_name: str,
|
|
action_type: str,
|
|
policy_result: str,
|
|
tool_called: str | None = None,
|
|
outcome: str | None = None,
|
|
metadata: dict[str, Any] | None = None,
|
|
) -> dict[str, Any]:
|
|
meta = metadata or {}
|
|
safe_meta = redact_trace_payload(meta)
|
|
return {
|
|
"trace_id": str(uuid.uuid4()),
|
|
"ts": time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime()),
|
|
"workflow_name": workflow_name,
|
|
"agent_name": agent_name,
|
|
"action_type": action_type,
|
|
"policy_result": policy_result,
|
|
"tool_called": tool_called,
|
|
"outcome": outcome,
|
|
"metadata": safe_meta,
|
|
"demo": True,
|
|
}
|