Releases: agenticmail/enterprise
Releases · agenticmail/enterprise
v0.5.490
Fix Daily Scorecard P&L Calculation
Bug: Unrealized P&L was using cashPnl from the Data API, which is NOT unrealized P&L — it's total/cumulative P&L. Realized P&L was fragile (matching SELLs to BUYs in trade log, missing bracket/auto-trade executions and resolutions).
Fix:
- Unrealized P&L: Now uses
(currentPrice - entryPrice) × sizefor open positions (matches trading-optimizer logic) - Realized P&L: Now uses
cashPnlfrom closed/resolved positions via Data API (not trade log matching) - Fetches ALL positions with
sizeThreshold=0(previously missed resolved positions entirely) - Win rate now counts from actual closed positions with positive/negative cashPnl
v0.5.489
Trading Agent: Profit-Focused Behavior Rewrite
System Prompt Changes:
- Replaced "redeploy freed capital immediately" with "evaluate opportunities, don't rush to redeploy"
- Replaced "Overtrading (max 10-50/day)" with quality-focused guidance: "3-5 high-conviction trades beat 20 scattered bets"
- De-emphasized trade count goals in favor of P&L targets
- Added "Blind redeployment" as explicit anti-pattern
Proactive Watcher Rewrite:
- Removed trade count pressure ("You have X/15 trades today — Y more needed")
- Now wakes agents for portfolio management checks regardless of trade count
- Restructured wake priorities: (1) manage positions, (2) review performance, (3) find opportunities with real edge
- Reinforces: "NO good setups = NO new trades. Managing profitable positions IS working."
v0.5.488
Changes
- Daily Scorecard now uses real trading data — Was hardcoded to
poly_paper_positions(always empty for live trading). Now pulls:- Live positions + unrealized P&L from Polymarket Data API (
data-api.polymarket.com/positions) - Realized P&L by matching SELL trades to BUY entries in trade log
- Wallet balance via multi-RPC fallback (3 Polygon RPCs)
- Trade count from daily counters
- Live positions + unrealized P&L from Polymarket Data API (
- Daily P&L Target modal (v0.5.487) — proper modal instead of browser
prompt()
Full Changelog: v0.5.487...v0.5.488
v0.5.487
Changes
- Daily P&L Target modal — Replaced browser
prompt()with a proper styled modal dialog for setting the daily P&L target in the Daily Scorecard. Includes input validation, save/cancel buttons, and loading state. - Fixed target persistence — PUT request now sends only
{ target_value }instead of the entire goal object with all DB metadata, preventing potential field conflicts.
Full Changelog: v0.5.486...v0.5.487
v0.5.486
Changes
- Fix wallet balance showing $0 on RPC failures — The balance endpoint used a single Polygon RPC. When it returned errors (rate limits, gas price errors), balance showed $0 and the bad value was cached over good data. Now tries 5 RPCs sequentially until one succeeds, and only caches successful results.
- Fix poly_screen_markets returning 0 results (v0.5.485) — Fixed snake_case order fields (
end_date,created_at) that the Gamma API rejected silently.
Full Changelog: v0.5.485...v0.5.486
v0.5.485
Changes
- Fix poly_screen_markets returning 0 results — The Gamma API uses camelCase order fields (
endDate,createdAt,startDate) but we were sending snake_case (end_date,created_at), causing validation errors that were silently swallowed. Fixed in screener engine, search tool, and skill definitions. - Fix amber color visibility in light mode (from v0.5.484) — All
#f59e0bamber colors replaced with darker#b45309for contrast on cream backgrounds.
Full Changelog: v0.5.483...v0.5.485
v0.5.484
Changes
- Fix amber color visibility in light mode — Replaced all
#f59e0b(amber-500) with#b45309(amber-700) across the Polymarket dashboard for better contrast against the cream/butter light theme. Affects Redeem All Winnings button, warning indicators, chart accents, status badges, and all amber-tinted backgrounds. - Fix fola-agent trading loop — Cleared 15 stuck polymarket memory entries from non-trading agent that was incorrectly receiving proactive trading tasks.
Full Changelog: v0.5.483...v0.5.484
v0.5.483
What's New
Screenshot Compression
- Sharp image processing now active (was no-op stubs) — screenshots auto-compressed to max 1024px, 150KB JPEG
- Prevents 145K+ token payloads that crashed primary LLM model
- Browser screenshot defaults lowered: max side 2000→1280px, max bytes 5MB→200KB
Search Relevance
- Client-side relevance filtering for
poly_search_marketsand screener - No more irrelevant political/gossip markets appearing in sports/entertainment searches
- Volume ordering removed when search query is provided — API ranks by relevance instead
Wallet Redeem (No LLM Required)
- New endpoint:
POST /polymarket/:agentId/wallet/redeem— direct on-chain CTF redemption - Dashboard redeem button now calls API directly with confirmation dialog
- "Redeem All Winnings" button for batch claims
- No redeem button shown on lost trades
Trading Improvements
poly_place_order: auto-derives price from midpoint when not specified, clamps to 0.01-0.99 rangepoly_get_market: uses slug as primary ID (fixes "Market not found" errors)- Momentum scanner filters out expired game markets (no more fake momentum)
web_fetcherrors now show clean page title instead of raw CSS/HTML
Position Display
- Won positions show WON (green), lost show LOST (red) in the Ends column
- Lost positions auto-hidden from view after 3 days
- Won positions show "Awaiting redeem" when not yet redeemable
Bug Fixes
- Fixed TSC type errors (Buffer casts, DB shim assertions, event type widening)
- Zero
tsc --noEmiterrors
v0.5.468
Fixes
- Polymarket pause/resume now works: Dashboard pause/resume was only writing to
poly_daily_countersbut the watcher checkspoly_proactive_pause— completely disconnected tables. Now syncs both. Resume also wakes the agent by sending a message to its runtime endpoint via the correct channel (Telegram if configured).
v0.5.467
Fixes
- Dynamic welcome message: No longer hardcoded to email. Automatically selects the best channel: Telegram > WhatsApp > Email based on what's configured. Uses AI session with plain-text instructions for messaging channels.
- Shutdown Telegram detection: Now checks
trustedChatIdsandmanagerIdentity.telegramIdso shutdown goodbye actually reaches Telegram users. - poly_recall_lessons empty results: Was using
$1Postgres-style params on SQLite, silently returning empty even when lessons exist. Now usessafeDbQueryfor cross-dialect compatibility. Same fix forgetCalibration.