Adds a canonical machine-readable probability signal endpoint that distils
a completed simulation report into a structured prediction thesis.
New: backend/app/services/signal_extractor.py
- SignalExtractor.extract() calls chat_json() (3 attempts, temp 0.1, step 0.05)
against the report markdown and returns a validated MiroSignal dataclass
- Validates and normalises all fields: p_yes clamped to [0.01, 0.99],
confidence/action enums enforced, action recomputed from p_yes when invalid
- _trim_report() keeps the tail (conclusions) for long reports to stay within
token limits
- _salvage() fallback_parser recovers a minimal signal from partial LLM output
using regex probability extraction
New endpoint: POST /api/report/<report_id>/signal
- 404 if report not found
- 400 if report not yet completed or content is empty
- 422 if LLM fails after all retry attempts
- Returns canonical signal with thesis.{p_yes, confidence, action, regime,
summary, drivers, invalidators} — schema_version 1.1
New: backend/tests/services/test_signal_extractor.py
- 27 tests covering happy path, field validation/normalisation, report
trimming, _salvage fallback, and LLM failure propagation
- No real API calls — LLMClient fully mocked
Closes#277
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Introduced a unique report ID generation mechanism to enhance tracking and management of reports.
- Implemented detailed logging for the report generation process, including agent actions, planning stages, and tool calls, improving traceability and debugging.
- Added new API endpoints for retrieving agent and console logs, allowing users to access detailed execution logs and console outputs during report generation.
- Enhanced the frontend GraphPanel component with a notification for users when simulations finish, improving user experience and feedback.
- Introduced the Report Agent module to facilitate the automatic generation of simulation analysis reports using LangChain and Zep, following the ReACT model.
- Added functionality for report outline planning, segmented content generation, and user interaction through a dialogue interface.
- Implemented new API endpoints for report generation, status checking, and retrieval, enhancing the overall reporting capabilities.
- Updated README.md to include detailed instructions on the new report generation features and API usage.
- Enhanced the project structure to accommodate the new report management functionalities, including report storage and retrieval mechanisms.