CMDCOrchestrator.Run (cmdc_orchestrator v0.5.0)

Copy Markdown View Source

一次 workflow 执行的运行账本。

本结构只保存 JSON 安全数据,企业平台可以把它映射到 Ecto schema 或其它持久层。

Summary

Functions

构造运行账本。

生成 run id。

Types

t()

@type t() :: %CMDCOrchestrator.Run{
  completed: map(),
  context_data: map(),
  cost: map(),
  current_node_id: String.t() | nil,
  error: term() | nil,
  finished_at: DateTime.t() | nil,
  id: String.t(),
  input: map() | nil,
  metadata: map(),
  output: map() | nil,
  pruned: [String.t()],
  signal_history: map(),
  started_at: DateTime.t(),
  status: CMDCOrchestrator.RunState.status(),
  tokens: map(),
  trace_id: String.t() | nil,
  trigger_ref: String.t() | nil,
  trigger_source: atom() | String.t() | nil,
  workflow_id: String.t(),
  workflow_name: String.t() | nil,
  workflow_version: String.t() | nil
}

Functions

new(opts)

@spec new(keyword()) :: t()

构造运行账本。

new_id()

@spec new_id() :: String.t()

生成 run id。