Skip to content

Feature: Trajectory reporting (whole.log, enhanced history, HTML report)#8

Open
kirahan wants to merge 2 commits into
Mininglamp-AI:mainfrom
kirahan:trajectory
Open

Feature: Trajectory reporting (whole.log, enhanced history, HTML report)#8
kirahan wants to merge 2 commits into
Mininglamp-AI:mainfrom
kirahan:trajectory

Conversation

@kirahan
Copy link
Copy Markdown

@kirahan kirahan commented May 18, 2026

Overview

When save-trajectory is enabled, each run now produces a richer audit bundle under ~/.mano/trajectory/, plus an interactive HTML report—without new config keys beyond the existing save-trajectory flag (default remains false).

What's New

1. Full terminal capture — whole.log

  • Pure stdout/stderr tee for the entire task lifecycle
  • Early buffer captures output before the trajectory folder exists (e.g. Session created:)
  • Flushed into whole.log when the session directory is created; closed after the task summary is printed

2. Enhanced structured history — history.jsonl

Each line now includes:

Field Purpose
phase init / action / terminal
action_kind Report styling (open_app, key, done, …)
screenshot Relative path when a step PNG exists
status Agent terminal state when applicable (e.g. DONE)

Also records step 0 (Initializing) and DONE/FAIL steps; supports multiple lines per step to mirror the terminal timeline.

3. Visual report — report.html

  • Generated from session.json + history.jsonl + screenshots only (does not parse whole.log)
  • English UI: stats header, step groups, collapsible screenshots, action-type color badges
  • Expand/collapse all screenshots; works offline via file://
  • Footer link to whole.log when present
Snipaste_2026-05-18_10-42-55

4. End-of-run convenience

Task summary prints:

Report: <absolute path to report.html>
Preview: file:///.../report.html

Cloud runs optionally store cloud_session_id in session.json alongside the local trajectory session_id.

5. Documentation

README Configuration section documents save-trajectory, artifacts, and mano-cua config usage.

Session folder layout

~/.mano/trajectory/sess-<timestamp>-<id>/
├── session.json
├── history.jsonl
├── screenshots/
├── whole.log      ← new
└── report.html    ← new

Implementation

Area Change
visual/trajectory/ New module: log_tee, history, action_styles, report_generator, unit tests
visual/vla.py Early tee on run; cloud_session_id in session meta
visual/model/task_model.py Tee install, history append, report generation, summary URIs
visual/view_model/task_view_model.py Pass cloud_session_id
visual/config/user_config.py Help text; default save-trajectory = false
README.md Configuration docs

Enable

mano-cua config --set save-trajectory true
mano-cua run "your task"
# Open Report / Preview paths from the terminal summary

Files Changed

  • README.md
  • visual/config/user_config.py
  • visual/model/task_model.py
  • visual/model/tests/__init__.py
  • visual/view_model/task_view_model.py
  • visual/vla.py
  • visual/trajectory/ (module + tests)

Testing

  • PYTHONPATH=. python -m unittest discover -s visual/trajectory/tests -v
  • Enable save-trajectory, run a task, verify all five artifact types exist
  • whole.log includes early logs, step output, summary, and report paths
  • report.html opens in browser with correct steps and screenshots
  • With save-trajectory false, no trajectory folder or tee (unchanged behavior)

Suggested PR title: Feature: trajectory reporting with whole.log and HTML report

hanzhao and others added 2 commits May 18, 2026 10:27
- log_tee: stdout stderr tee with early buffer, gated by save-trajectory
- history.jsonl: phase, action_kind, screenshot refs, init and terminal steps
- report_generator: offline English HTML report from session and history
- task_model: finalize log after summary, print Report and Preview URIs
- vla: enable early buffer on run, persist cloud_session_id in session meta
- user_config: document whole.log and report.html in save-trajectory help
- unit tests for log tee, action styles, history append, report generation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
- Use UTF-16 with BOM for clip.exe stdin instead of raw utf-16le
- Prevents localized Windows from treating paste bytes as ANSI
- Fixes garbled input when typing app names in taskbar search

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant