Skip to content

Releases: agenticmail/enterprise

v0.5.534

15 Mar 16:54

Choose a tag to compare

Fix: Order Status Sync + Market Lookup

Root Cause Found

All 19 orders in the database had status='placed' forever — the system never updated them to filled when the exchange executed them. The CLOB API only shows 2 actually live orders, meaning 17 were filled but the DB didn't know.

poly_get_open_orders — Auto-Sync

  • Compares DB placed orders against CLOB live orders
  • Orders in DB as placed but no longer on exchange → automatically updated to filled
  • This makes them appear in Trade History (which excludes placed)
  • Reports: "17 stale orders synced to filled"
  • Only truly live CLOB orders shown as open

poly_get_market — Better Lookups

  • Added clob_token_ids parameter lookup (agents often pass token IDs)
  • Added CLOB API fallback to resolve condition_id from token
  • Error message now shows the failed input for debugging

v0.5.533

15 Mar 16:38

Choose a tag to compare

Fix: Archive Only Closed Positions + Filters & Detail Modal

Archive Logic Fixed

The archive was incorrectly moving ALL filled trades out of Trade History, leaving it empty. Now it only archives:

  • Failed, rejected, cancelled orders (never executed)
  • Filled trades for closed positions (sold or market resolved) — checked via on-chain position data

Filled trades for positions you still hold stay in Trade History where they belong.

Archive Display

  • Now uses renderFilteredTable with search, filters (Side, Outcome, Status), and sort by date
  • Clicking a row opens the detail modal — same as live trading tab
  • Shows P&L and Cost columns
  • Proper empty state: "Only trades for closed positions (sold or resolved markets) are archived"

Archive GET Endpoint

  • Added pagination (page, pageSize params) with totalPages in response
  • Added filters (side, status, search query params)

v0.5.532

15 Mar 16:29

Choose a tag to compare

Fix: Watcher AI Now Pulls API Keys from Database Settings

The AI analysis was showing 0 calls because getAIConfig() couldn't find the API key. LLM API keys are stored in the database system settings (configured via dashboard), NOT in .env files.

API Key Resolution Order (fixed)

  1. ai_api_key stored directly in poly_watcher_config (if user set one explicitly)
  2. System settings apiKeys from database — the primary source where users configure API keys via the dashboard
  3. Agent's own model config provider key from the database
  4. Environment variables (last resort fallback)

What was wrong

The watcher config had provider=anthropic model=claude-3-5-haiku-latest set but no ai_api_key. The previous fix (v0.5.530) only added env var fallback, but the actual keys live in the database settings. Now it correctly reads from db.getSettings().apiKeys.

v0.5.531

15 Mar 16:25

Choose a tag to compare

Fix: Trade History Archive + Empty Trades Tab

Archive endpoint missing

  • Added GET /polymarket/:agentId/archive/:tab endpoint — was completely missing, causing the "View Archive" button to spin forever
  • Supports tabs: trades, exits, alerts, events
  • Returns archived rows from *_archive tables with total count
  • Gracefully returns empty result with message if archive table doesn't exist yet

Archive loading fix

  • Dashboard archive toggle now handles API errors instead of spinning forever
  • Shows "No archived data yet" message when archive is empty
  • Fixed agentId variable reference (was using wrong scope variable)

Why Trade History might be empty

The Trades tab now correctly excludes status='placed' orders (v0.5.526). If all your orders are still pending/unfilled, the Trades tab will be empty — those orders appear in the Pending Orders tab instead. Only filled, failed, or cancelled orders show in Trade History.

v0.5.530

15 Mar 16:21

Choose a tag to compare

Fix: Watcher AI Analysis Now Uses Environment API Keys

The AI analysis in the Monitor tab was showing 0/10000 calls because getAIConfig() required an API key stored in poly_watcher_config, even when the agent already has API keys in its environment variables.

Fix

  • getAIConfig() now falls back to environment variables when no ai_api_key is stored in the watcher config
  • Supports: ANTHROPIC_API_KEY, XAI_API_KEY, OPENAI_API_KEY, GROQ_API_KEY, DEEPSEEK_API_KEY, OPENROUTER_API_KEY, TOGETHER_API_KEY, FIREWORKS_API_KEY, CEREBRAS_API_KEY
  • Watchers configured with provider=anthropic model=claude-3-5-haiku-latest will now automatically use the ANTHROPIC_API_KEY from the agent's environment
  • No code changes needed by users — just update and restart

v0.5.529

15 Mar 16:17

Choose a tag to compare

PIN-Gated Key Export, Agent Order Awareness, Dashboard Improvements

Export Private Key — PIN Required

  • Export now requires wallet PIN verification before revealing key
  • First-time users see "Set Up Wallet PIN" flow, then key exports automatically
  • Modal auto-closes after 60 seconds for security
  • Every export attempt requires fresh PIN entry (no cached unlock)

Agent Order Awareness

  • poly_get_open_orders: Returns placed-unfilled orders from trade log + live CLOB orders + total pending capital
  • poly_cancel_order: Actually cancels on Polymarket CLOB exchange (was in-memory only)
  • poly_cancel_all: Cancels both approval-pending and all live CLOB orders
  • System prompt: Agents MUST call poly_get_open_orders at session start (CALL #3)
  • Explicit warning: "placed" ≠ "filled"

Dashboard

  • Pending orders modal: proper background/styling matching other modals
  • Chart hide/show toggle persisted to localStorage
  • Live Positions: page size 10, sorted by closing date
  • Balance: available_to_trade = exchange balance minus pending order capital

v0.5.528

15 Mar 16:07

Choose a tag to compare

Agents Now Track Unfilled Orders + CLOB Cancel + Dashboard Improvements

Agent Order Awareness

  • poly_get_open_orders now returns ALL unfilled orders: approval-pending, placed-but-unfilled from trade log, AND live orders from Polymarket CLOB exchange. Shows total pending capital locked.
  • poly_cancel_order actually cancels on the Polymarket CLOB exchange (was only cancelling in-memory approval orders). Updates trade log to cancelled.
  • poly_cancel_all cancels both in-memory pending AND all live CLOB orders via cancelAll().
  • Session protocol updated: agents MUST call poly_get_open_orders at session start (CALL #3) to review unfilled orders before placing new ones.
  • Explicit system prompt warning: "placed" ≠ "filled" — agents must not treat placed orders as completed trades.

Dashboard

  • Pending order icon on Live Positions: clickable clock icon shows count of pending orders per position. Opens modal with full details (side, outcome, price, shares, cost, date).
  • Chart toggle: Hide/Show Chart button persisted to localStorage — survives page refresh.
  • Live Positions: page size reduced to 10 (was 20). Sorted by closing date (soonest first).
  • Filters on all three tabs: Live Positions, Pending Orders, and Trades.

Balance

  • available_to_trade = exchange balance minus pending order capital (no more double-counting)
  • New pending_order_capital field in balance response

v0.5.526

15 Mar 15:46

Choose a tag to compare

Fix: Balance Calculation & Dashboard Tab Filtering

Balance (poly_get_balance)

  • available_to_trade now correctly = exchange_balance minus capital locked in pending orders (was double-counting wallet + exchange balance)
  • New pending_order_capital field shows how much is locked in unfilled orders
  • Informational message when capital is locked in pending orders

Dashboard Tabs

  • Pending Orders: Approve/Reject buttons only show for approval-mode orders. Placed orders show "Awaiting fill" — no false approve prompts
  • Live Positions: Now shows pending buy/sell indicators per position (e.g., "pending 10.0 sell"). Sorted by closing date (soonest first). Added Side/Outcome filters
  • Trades: Only shows filled/completed trades. Sorted by date. Proper status filters
  • All three tabs now have consistent filter dropdowns

Previous (v0.5.525)

  • Pending orders separated from filled trades across all tabs

v0.5.525

15 Mar 15:24

Choose a tag to compare

Fix: Separate Pending Orders from Filled Trades

Pending (placed but unfilled) orders were incorrectly showing in the Trades tab and Live Positions alongside filled orders, making it look like trades had executed when they hadn't.

Changes

  • Pending Orders tab now shows both approval-pending AND placed-but-unfilled orders
  • Trades tab only shows filled/completed/failed trades (excludes unfilled placed orders)
  • Live Positions fallback only counts filled orders for position calculation
  • Dashboard badges: placed orders show yellow "pending" badge (was green like filled)
  • P&L column: placed orders show "Awaiting fill" instead of "Open"

Also includes (from v0.5.524)

  • Agents can no longer create or import wallets — dashboard only
  • Wallet import requires explicit overwrite confirmation
  • saveWalletCredentials() preserves private key when only updating API creds
  • Fix TypeScript error in connection-manager.ts

v0.5.524

15 Mar 02:43

Choose a tag to compare

Wallet Security — Prevent Private Key Loss

  • Agents can no longer create or import wallets — removed generateWallet(), all poly_create_account/poly_setup_wallet references from system prompts, tools, and docs
  • Wallet import requires confirmation — API returns 409 EXISTING_WALLET if wallet already exists; dashboard shows confirmation dialog warning about permanent key loss
  • saveWalletCredentials() preserves existing private key — when only API creds are being updated, the private key is no longer overwritten
  • All "no wallet" errors now direct users to the dashboard instead of nonexistent agent tools
  • Fix TypeScript error in connection-manager.ts