Commit Graph

12 Commits

Author SHA1 Message Date
ahmet guzererler 2a05e4b5a9
Merge branch 'main' into feature/portfolio-resumability-and-cleanup 2026-03-24 03:32:09 +01:00
Ahmet Guzererler 860968835c feat: add Reset Decision button to clear portfolio stage and re-run
- ReportStore.clear_portfolio_stage(date, portfolio_id): deletes pm_decision
  (.json + .md) and execution_result files for a given date/portfolio
- DELETE /api/run/portfolio-stage endpoint: calls clear_portfolio_stage
  and returns list of deleted files
- Dashboard: 'Reset Decision' button calls the endpoint, then user can
  run Auto to re-run Phase 3 from scratch while skipping Phase 1 & 2

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 00:34:53 +01:00
copilot-swe-agent[bot] 8e48bb4906 Add stop_loss and take_profit fields to Trade entries in database, API, and UI
Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/3b6a6fcc-30ac-48fa-970f-995a3bed80ed
2026-03-23 21:12:01 +00:00
copilot-swe-agent[bot] 9187a69ce2 Fix report saving, event storing, auto tickers, portfolio report loading, and state propagation
Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/9fff2f5e-b384-4b0a-8e23-ede31af12fe2
2026-03-23 18:33:11 +00:00
copilot-swe-agent[bot] 1b5aee572a fix: portfolio field mapping (shares→quantity, cash→cash_balance) and pipeline recursion limit
- Map backend Holding.shares → frontend quantity, include market_value/unrealized_pnl
- Map backend Portfolio.portfolio_id → id, cash → cash_balance
- Map backend Trade.shares → quantity, trade_date → executed_at
- Pass recursion_limit=100 to pipeline astream_events() to prevent GraphRecursionError

Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/b189c934-24b9-49a9-99d9-99ee006da4b0
2026-03-23 09:40:56 +00:00
Ahmet Guzererler 319168c74f feat: Resolve "main_portfolio" alias in portfolio routes and improve LangGraph content extraction robustness with new unit tests. 2026-03-23 10:02:52 +01:00
copilot-swe-agent[bot] b08ce7199e feat: fix prompt display, add event detail modal, run buttons, and node animations
Backend:
- Extract full prompt from all LLM messages (not just first)
- Add prompt/response fields to streamed event payloads
- Improve model name extraction with multiple fallback strategies
- Add run_portfolio and run_auto streaming methods
- Wire portfolio/auto in websocket router
- New tool_result event type for tool completion

Frontend:
- Add full event detail modal with tabs (Prompt, Response, Summary, Metrics)
- Show actual prompt content in drawer instead of "Prompting unknown..."
- Add Scan, Pipeline, Portfolio, Auto buttons to control panel
- Fix node animation: completed nodes never revert to running
- Handle tool_result type for marking tool nodes as done
- Drawer events have "Full Detail →" button to open modal

Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/7997c579-ab7e-4071-afd0-18703a8e5618
2026-03-23 08:04:53 +00:00
copilot-swe-agent[bot] 9d2dbf4a43 fix: add missing __init__.py files to agent_os package tree
The agent_os/, agent_os/backend/, agent_os/backend/routes/, and
agent_os/backend/services/ directories were missing __init__.py,
causing `from agent_os.backend.routes import ...` to fail with
ModuleNotFoundError when running `python agent_os/backend/main.py`.

Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/4b002166-5cc2-4a75-aa01-14d7b5d8d8bc
2026-03-23 07:16:38 +00:00
copilot-swe-agent[bot] e9be24600f fix: AgentOS backend logging/prompts, frontend node persistence, package updates
Backend:
- Replace bare print() with structured logging module
- Include LLM prompt snippets and response content in streamed events
- Extract proper node names from LangGraph metadata (langgraph_node)
- Add latency tracking (start/end time per node)
- Add tool input/output content in events
- Add system log event type for informational messages
- Stream on_tool_end events for tool results

Frontend:
- Fix node disappearing/reappearing: use useNodesState/useEdgesState + useEffect
  for incremental updates instead of useMemo that rebuilt all nodes on each event
- Fix duplicate node creation: use useRef to track seen node IDs persistently
- Fix useAgentStream reconnection loop: remove stale `status` from connect deps
- Use statusRef to avoid stale closure in onclose handler
- Add auto-scroll to terminal, event count, type labels/colors
- Show prompt snippets, tool I/O, and response content in terminal
- Handle 'log' event type

Packages:
- Update all npm deps to latest compatible minor versions
- Remove node_modules from git tracking, add to .gitignore

Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/5c511c4e-5172-4eda-b6de-aefa1859e8ac
2026-03-23 00:51:29 +00:00
Ahmet Guzererler d5df6b93a4 feat: connect Top 3 Metrics to real data from Supabase and macro scans
- add /api/portfolios/{id}/summary endpoint to backend
- parse Sharpe and Drawdown from latest portfolio snapshots
- parse Market Regime from macro_scan/scan_summary.json
- update MetricHeader to fetch real-time metrics with polling
- pass portfolio_id to dashboard and trigger methods
2026-03-22 22:14:27 +01:00
Ahmet Guzererler 078d7e2f2a feat: implement AgentOS frontend and live backend integration
- scaffold Vite + React + TypeScript frontend with Chakra UI and React Flow
- implement AgentGraph, MetricHeader, and Dashboard components
- connect FastAPI to live LangGraph events via astream_events
- implement real-time event mapping for 'scan' and 'pipeline'
- refactor run storage for shared access between REST and WebSockets
2026-03-22 22:12:33 +01:00
Ahmet Guzererler a26c93463a feat: initialize AgentOS observability foundation
- implement FastAPI backend with REST and WebSocket streaming
- add node-level metrics (tokens, latency) to event protocol
- design literal graph and top 3 metrics (Sharpe, Regime, Drawdown)
- scaffold React frontend with Chakra UI and useAgentStream hook
- add DESIGN.md and .env.example
2026-03-22 21:54:13 +01:00