CMDCOrchestrator.RunEvent (cmdc_orchestrator v0.6.0)

Copy Markdown View Source

Workflow run 事件账本条目。

事件 payload 默认裁剪 prompt、chunk、完整 result 等大字段,避免 Trace Viewer 与持久层意外保存大段敏感内容。

Summary

Types

t()

@type t() :: %CMDCOrchestrator.RunEvent{
  id: String.t(),
  node_id: String.t() | nil,
  parent_id: String.t() | nil,
  payload: map(),
  run_id: String.t(),
  span_id: String.t() | nil,
  timestamp: DateTime.t(),
  trace_id: String.t() | nil,
  type: String.t()
}

Functions

new(run_id, type, payload \\ %{}, opts \\ [])

@spec new(String.t(), String.t() | atom(), map(), keyword()) :: t()

构造事件。

sanitize(value)

@spec sanitize(term()) :: term()

裁剪事件 payload。