Packages
A Fair Source multi-agent runtime with deterministic agent scoring and replayable run history.
Retired package: Deprecated - superseded — operator console moved to the Syntropy app
Current section
Files
Jump to
Current section
Files
lib/syntropy_web/controllers/api/run_json.ex
defmodule SyntropyWeb.Api.RunJSON do
@moduledoc false
@spec run(map()) :: map()
def run(run) do
%{
id: run.id,
status: run.status,
kind: run.kind,
node_id: run.node_id,
coordinator_node_id: run.coordinator_node_id,
prompt: run.prompt,
strategy: run.strategy,
resolved_mode: run.resolved_mode,
selected_agent_ids: run.selected_agent_ids,
selected_agents: run.selected_agents,
contributing_agent_ids: run.contributing_agent_ids,
contributing_agents: run.contributing_agents,
thoughts: run.thoughts,
thought_count: run.thought_count,
agent_attempts: Map.get(run, :agent_attempts, []),
execution_quality: Map.get(run, :execution_quality),
provider_profile: Map.get(run, :provider_profile),
llm_usage: Map.get(run, :llm_usage),
synthesis: run.synthesis,
structured_answer: Map.get(run, :structured_answer),
output_quality: Map.get(run, :output_quality),
selection_trace: run.selection_trace,
recommendation_ids: run.recommendation_ids,
snapshot_ids: run.snapshot_ids,
source_review: run.source_review,
citation_audit: run.citation_audit,
inquiry_rounds: Map.get(run, :inquiry_rounds, []),
tool_attempts: Map.get(run, :tool_attempts, []),
expanded_evidence: Map.get(run, :expanded_evidence, []),
inquiry_quality: Map.get(run, :inquiry_quality),
error: run.error,
started_at: run.started_at,
updated_at: run.updated_at,
completed_at: run.completed_at,
failed_at: run.failed_at
}
end
end