Skip to content

Latest commit

 

History

History
81 lines (50 loc) · 2.71 KB

File metadata and controls

81 lines (50 loc) · 2.71 KB

Platform Console (Visualization Scheme)

This document defines a simple, extensible visualization scheme for the Lula Platform.

Goals

  • Provide a stable mental model: graph + timeline + artifacts.
  • Make every run inspectable via a single JSON trace artifact.
  • Keep the first implementation file-based (no DB required).

1) Graph view

The orchestrator can export a Mermaid graph for the current topology.

  • Export source: export_mermaid()
  • CLI: uv run python -m lg_orch.main export-graph

Render by pasting the output into any Mermaid renderer.

2) Timeline view

Each run emits a trace file (JSON) containing an ordered event list.

Event kinds:

  • node: transitions and node-level metadata
  • tools: batched tool calls executed by the runner

Example trace location:

  • artifacts/runs/run-<run_id>.json

Console-style runtime view:

  • uv run python -m lg_orch.main run "<request>" --view console --trace

Trace dashboard renderer:

  • uv run python -m lg_orch.main trace-view artifacts/runs/run-<run_id>.json
  • uv run python -m lg_orch.main trace-view artifacts/runs/run-<run_id>.json --format html --output artifacts/site/run-<run_id>.html

Static site renderer:

  • uv run python -m lg_orch.main trace-site artifacts/runs --output-dir artifacts/site
  • Open artifacts/site/index.html in a browser.

3) Artifacts view

Artifacts are referenced from the trace and/or exist on disk:

  • patches/diffs (future)
  • verification reports (future)
  • runner stdout/stderr envelopes (present in tool_results)
  • copied raw trace JSON under artifacts/site/traces/ when trace-site is used

4) Config switches

Tracing is enabled by runtime profile.

Keys:

[trace]
enabled = true
output_dir = "artifacts/runs"

5) Next iteration (optional)

  • Add an HTTP API exposing:
    • /v1/runs list
    • /v1/runs/{run_id} trace
  • Evolve the static site into a served web UI with filtering, replay, and richer artifact browsing