Commit Graph

2 Commits

Author SHA1 Message Date
swj.premkumar 97d13ee1ed 2026-01-15 (Phase 1: The Foundation)
### Added
- **Hyper-Immutability (Physically Secured State)**: Implemented `FactLedger` (TypedDict) and `write_once_enforce` reducer in `agent_states.py` to cryptographically lock data reality.
    - Ledger is hashed (SHA-256) upon creation.
    - Wrapped in `MappingProxyType` to prevent any downstream agent from mutating the facts.
- **The Data Registrar (Parallel Gatekeeper)**: Created `DataRegistrar` node (`tradingagents/agents/data_registrar.py`) that acts as the Single Source of Truth.
    - **Parallel I/O**: Fetches Price, Fundamentals, News, and Insider data concurrently (4x speedup over sequential).
    - **Partial Poisoning Guard**: Hard "Fail-Fast" if critical domains (Price, Fundamentals) are missing.
    - **Freshness Simulation**: Configurable `TRADING_MODE` (simulation/production) to allow rigorous testing without stale-data aborts.

### Fixed
- **Hallucination Vectors (The Lobotomy)**: Removed ALL tool access from `Market`, `Social`, `News`, and `Fundamentals` analysts.
    - Analysts now consume exclusively from `FactLedger`.
    - Eliminated "Tool Use Loop" latency and potential for agents to fetch divergent data.
- **Graph Wiring**: Refactored `setup.py` to route `START` -> `Data Registrar` -> `Market Analyst` -> Parallel Fan-Out.
2026-01-15 11:02:35 -06:00
swj.premkumar e7784f2b99 - Guarantees clean string outputs for downstream consumers (CLI, WebUI).
- Prevents crashes when LLMs return complex JSON/List structures.
2026-01-15 02:01:54 -06:00