@agenticmail/enterprise 0.5.490 → 0.5.492
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +235 -4
- package/dist/agent-tools-LTQRBGPS.js +14677 -0
- package/dist/chunk-35O7J5FW.js +1657 -0
- package/dist/chunk-5SRN7SQF.js +2275 -0
- package/dist/chunk-6CKKEJ2Z.js +5562 -0
- package/dist/chunk-IHBZGGCE.js +5733 -0
- package/dist/chunk-QURJZ7YA.js +1728 -0
- package/dist/chunk-YY545PSF.js +7790 -0
- package/dist/cli-agent-APILWIJS.js +2804 -0
- package/dist/cli-serve-VVEAJWDJ.js +322 -0
- package/dist/cli.js +3 -3
- package/dist/index.js +6 -6
- package/dist/polymarket-F4L5DEBP.js +17 -0
- package/dist/polymarket-runtime-C6VJ2R4D.js +108 -0
- package/dist/polymarket-watcher-IFBZCPTM.js +23 -0
- package/dist/runtime-N5OBHXKI.js +50 -0
- package/dist/server-QEATAIO3.js +36 -0
- package/dist/setup-BXECF4TV.js +20 -0
- package/logs/cloudflared-error.log +87 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -111,6 +111,7 @@ Everything is managed from the dashboard — agent creation, permissions, email
|
|
|
111
111
|
- [Google Workspace Integration](#google-workspace-integration)
|
|
112
112
|
- [145 SaaS Integration Adapters](#145-saas-integration-adapters)
|
|
113
113
|
- [Enterprise Skills](#enterprise-skills)
|
|
114
|
+
- [Polymarket Trading Suite](#polymarket-trading-suite)
|
|
114
115
|
- [Database Backends](#database-backends)
|
|
115
116
|
- [Security & Compliance](#security--compliance)
|
|
116
117
|
- [Data Loss Prevention (DLP)](#data-loss-prevention-dlp)
|
|
@@ -575,8 +576,8 @@ Gmail · Calendar · Drive · Docs · Sheets · Slides · Forms · Meet · Chat
|
|
|
575
576
|
### Microsoft 365 Suite (13 services, 90+ tools)
|
|
576
577
|
Outlook Mail (20 tools) · Outlook Calendar (7) · Teams (15) · OneDrive (12) · Excel (16) · SharePoint (10) · OneNote (6) · Planner (6) · To Do (6) · PowerPoint (5) · Power BI (8) · Contacts (5) · Each with dedicated system prompts and Graph API integration with retry, rate-limit handling, pagination, and batch support.
|
|
577
578
|
|
|
578
|
-
### Polymarket Trading Suite (10 skills,
|
|
579
|
-
Institutional-grade prediction market trading on [Polymarket](https://polymarket.com)
|
|
579
|
+
### Polymarket Trading Suite (10 skills, 126 tools)
|
|
580
|
+
Institutional-grade prediction market trading on [Polymarket](https://polymarket.com). Full details in the [Polymarket Trading Suite](#polymarket-trading-suite) section below.
|
|
580
581
|
- **polymarket** (63 tools) — Trading infrastructure, orders, wallet, risk controls, learning system
|
|
581
582
|
- **polymarket-quant** (14) — Kelly criterion, Black-Scholes, Bayesian, Monte Carlo, RSI/MACD/Bollinger, VaR
|
|
582
583
|
- **polymarket-onchain** (6) — Whale tracking, orderbook depth, on-chain flow, wallet profiling, liquidity mapping
|
|
@@ -588,8 +589,6 @@ Institutional-grade prediction market trading on [Polymarket](https://polymarket
|
|
|
588
589
|
- **polymarket-counterintel** (3) — Manipulation detection, resolution risk scoring, counterparty analysis
|
|
589
590
|
- **polymarket-portfolio** (3) — Portfolio optimization, drawdown monitoring, P&L attribution
|
|
590
591
|
|
|
591
|
-
Full dashboard with daily scorecard, 22 tabs, dedicated system prompt, auto-SDK install, 25+ DB tables, SSE real-time updates.
|
|
592
|
-
|
|
593
592
|
### Enterprise Custom Suite (16+)
|
|
594
593
|
Calendar · Code Sandbox · Database · Diff · Documents · Finance · HTTP · Knowledge Search · Logs · Notifications · Security Scan · Spreadsheet · Translation · Vision · Web Research · Workflow
|
|
595
594
|
|
|
@@ -618,6 +617,238 @@ Custom role templates can be created and managed via the **Roles** dashboard pag
|
|
|
618
617
|
|
|
619
618
|
---
|
|
620
619
|
|
|
620
|
+
## Polymarket Trading Suite
|
|
621
|
+
|
|
622
|
+
Institutional-grade autonomous prediction market trading on [Polymarket](https://polymarket.com) (Polygon/USDC). Deploy AI agents that research, analyze, execute, and learn from trades — with full risk management, multi-layer monitoring, and a 23-tab real-time dashboard.
|
|
623
|
+
|
|
624
|
+
**126 tools across 10 skill modules. 23 dashboard tabs. 17+ database tables. 75+ API routes. 12 watcher types. 3 trading modes.**
|
|
625
|
+
|
|
626
|
+
### Trading Modes
|
|
627
|
+
|
|
628
|
+
| Mode | Behavior |
|
|
629
|
+
|------|----------|
|
|
630
|
+
| **Approval** (default) | All trades queue to "Pending Trades" for human review. Manager approves/rejects from the dashboard. |
|
|
631
|
+
| **Autonomous** | Auto-executes trades that pass all risk checks: size < max, count < daily limit, positive Kelly edge, no circuit breaker. All trades logged and auditable. |
|
|
632
|
+
| **Paper** | Simulated trading. Records predictions, tracks P&L as if real money. Useful for testing strategies. |
|
|
633
|
+
|
|
634
|
+
### Dashboard (23 Tabs)
|
|
635
|
+
|
|
636
|
+
The Polymarket dashboard is a full trading terminal with real-time data:
|
|
637
|
+
|
|
638
|
+
| Group | Tabs |
|
|
639
|
+
|-------|------|
|
|
640
|
+
| **Trading** | Overview, Wallet, Pending Orders, Trades, Paper, Goals |
|
|
641
|
+
| **Automation** | Monitors, Signals |
|
|
642
|
+
| **Journal** | Journal, Strategies, Lessons |
|
|
643
|
+
| **Orders** | Orders, Hedges, Exit Rules |
|
|
644
|
+
| **Intelligence** | On-Chain, Social, Events, Alerts |
|
|
645
|
+
| **Analytics** | Analytics, Drawdown, Attribution, Calibration |
|
|
646
|
+
| **Settings** | Proxy |
|
|
647
|
+
|
|
648
|
+
**Key dashboard features:**
|
|
649
|
+
- **Live Position Chart** — Real-time streaming prices from Polymarket CLOB, updated every 3 seconds, multi-line chart showing % change from entry for each open position
|
|
650
|
+
- **Daily Scorecard** — Realized + unrealized P&L, win rate, target progress, available capital, open positions
|
|
651
|
+
- **Buy/Sell Modals** — Search markets, review orderbook depth, confirm trades with risk checks
|
|
652
|
+
- **SSE Real-Time Updates** — Dashboard auto-refreshes on new trades, signals, alerts, and position changes
|
|
653
|
+
- **Wallet Management** — Balance, transactions, transfers, token swaps, conditional token redemption, whitelisted addresses, security PIN
|
|
654
|
+
|
|
655
|
+
### Monitoring & Automation
|
|
656
|
+
|
|
657
|
+
Two independent monitoring layers run 24/7, even with no active agent session:
|
|
658
|
+
|
|
659
|
+
#### Watchers (AI-Powered, 12 Types)
|
|
660
|
+
|
|
661
|
+
Server-side every 15 seconds. AI analyzes raw data with configurable LLM (Grok, GPT-4o-mini, etc.):
|
|
662
|
+
|
|
663
|
+
| Watcher Type | What It Detects |
|
|
664
|
+
|-------------|-----------------|
|
|
665
|
+
| **price_level** | Price crosses a target threshold (above/below) |
|
|
666
|
+
| **price_change** | Percentage price movement (e.g., 10% move) |
|
|
667
|
+
| **news_intelligence** | Breaking news impact on markets (AI-analyzed) |
|
|
668
|
+
| **geopolitical** | War, elections, sanctions, regime changes (AI-analyzed) |
|
|
669
|
+
| **sentiment_shift** | Twitter/Reddit consensus shifts |
|
|
670
|
+
| **volume_surge** | Unusual trading activity spikes |
|
|
671
|
+
| **crypto_price** | Cryptocurrency price tracking for crypto-exposed markets |
|
|
672
|
+
| **resolution_watch** | Market resolution detection |
|
|
673
|
+
| **portfolio_drift** | Category exposure exceeds threshold |
|
|
674
|
+
| **cross_signal** | Correlation between multiple market signals |
|
|
675
|
+
| **arbitrage_scan** | YES+NO != $1.00 or multi-outcome inconsistencies |
|
|
676
|
+
| **market_scan** | Bulk market scanning by category or keyword |
|
|
677
|
+
|
|
678
|
+
**Auto-trade capability:** Watchers can auto-execute trades when critical signals fire:
|
|
679
|
+
```json
|
|
680
|
+
{ "auto_action": { "action": "SELL", "token_id": "...", "size": 10, "market_question": "..." } }
|
|
681
|
+
```
|
|
682
|
+
|
|
683
|
+
#### Alerts (Simple Price Triggers)
|
|
684
|
+
|
|
685
|
+
Price-level triggers with optional auto-trade execution:
|
|
686
|
+
|
|
687
|
+
| Pattern | How It Works |
|
|
688
|
+
|---------|-------------|
|
|
689
|
+
| **Stop-loss** | Alert at max loss threshold → auto-SELL |
|
|
690
|
+
| **Take-profit** | Alert at profit target (e.g., entry $0.52, target $0.676) → auto-SELL |
|
|
691
|
+
| **Dip buy** | Alert when price drops below target → auto-BUY |
|
|
692
|
+
| **News-driven** | Watcher detects bad/good news → auto-exit/enter |
|
|
693
|
+
|
|
694
|
+
#### Automatic Exit System (3-Layer OCO)
|
|
695
|
+
|
|
696
|
+
Every BUY is auto-protected with three layers — no manual setup required:
|
|
697
|
+
|
|
698
|
+
1. **Bracket Take-Profit** — Auto-sells at +15% above buy price
|
|
699
|
+
2. **Bracket Stop-Loss** — Auto-sells at -10% below buy price
|
|
700
|
+
3. **Trailing Stop** — Tracks peak price, sells if drops 12% from peak
|
|
701
|
+
|
|
702
|
+
All three are OCO (One-Cancel-Other): when any fires, the others auto-cancel. Configurable via `poly_bracket_config`.
|
|
703
|
+
|
|
704
|
+
### 126 Agent Tools (10 Skill Modules)
|
|
705
|
+
|
|
706
|
+
#### Market Discovery & Screening
|
|
707
|
+
| Tool | Purpose |
|
|
708
|
+
|------|---------|
|
|
709
|
+
| `poly_search_markets` | Keyword search across all markets |
|
|
710
|
+
| `poly_screen_markets` | Strategy-based screening (high_volume, momentum, contested, closing_soon, best_opportunities) |
|
|
711
|
+
| `poly_get_market` | Get full market data by slug |
|
|
712
|
+
| `poly_momentum_scanner` | Find price movers right now |
|
|
713
|
+
| `poly_breaking_news` | News-driven opportunities |
|
|
714
|
+
| `poly_calendar_events` | Upcoming market-moving events |
|
|
715
|
+
| `poly_odds_aggregator` | Compare odds vs other prediction/betting platforms |
|
|
716
|
+
|
|
717
|
+
#### Quantitative Analysis (14 Tools)
|
|
718
|
+
Kelly criterion, Black-Scholes binary pricing, Bayesian probability updates, Monte Carlo simulations, RSI/MACD/Bollinger Bands, historical/implied volatility, statistical arbitrage, Value-at-Risk, market entropy, and more.
|
|
719
|
+
|
|
720
|
+
#### On-Chain Intelligence (6 Tools)
|
|
721
|
+
Whale tracking, L2 orderbook depth analysis, net buy/sell flow detection, wallet sophistication profiling, liquidity mapping, CTF framework transaction decoding.
|
|
722
|
+
|
|
723
|
+
#### Social & News Intelligence (5 Tools)
|
|
724
|
+
Twitter sentiment analysis, Reddit consensus, Telegram alpha monitoring, Polymarket community discussion, social velocity (sentiment acceleration).
|
|
725
|
+
|
|
726
|
+
#### Market Analytics (5 Tools)
|
|
727
|
+
Pearson correlation detection, arbitrage scanning (free money when YES+NO != $1), regime detection (trending vs mean-reverting via Hurst exponent), smart money index (composite of whale + orderbook + momentum), manipulation detection (wash trading/spoofing).
|
|
728
|
+
|
|
729
|
+
#### Execution (4 Tools)
|
|
730
|
+
| Tool | Purpose |
|
|
731
|
+
|------|---------|
|
|
732
|
+
| `poly_place_order` | Standard order execution |
|
|
733
|
+
| `poly_sniper` | Trailing limit orders for time-sensitive entries |
|
|
734
|
+
| `poly_scale_in` | TWAP/VWAP for large positions (>$50) |
|
|
735
|
+
| `poly_hedge` | Correlation-based hedging |
|
|
736
|
+
|
|
737
|
+
#### Position & Portfolio Management
|
|
738
|
+
| Tool | Purpose |
|
|
739
|
+
|------|---------|
|
|
740
|
+
| `poly_exit_strategy` | Configure SL/TP/trailing/time-based exits per position |
|
|
741
|
+
| `poly_position_heatmap` | Urgency-ranked view of open positions (CRITICAL/HIGH/MEDIUM/LOW) |
|
|
742
|
+
| `poly_portfolio_optimizer` | Concentration analysis and rebalancing suggestions |
|
|
743
|
+
| `poly_drawdown_monitor` | Portfolio drawdown tracking with threshold alerts |
|
|
744
|
+
| `poly_capital_recycler` | Evaluate redeployment opportunities for freed capital |
|
|
745
|
+
| `poly_profit_lock` | Circuit breaker — halts trading if daily loss threshold exceeded |
|
|
746
|
+
| `poly_daily_scorecard` | Daily P&L dashboard with realized/unrealized breakdown |
|
|
747
|
+
| `poly_pnl_attribution` | P&L breakdown by market and category |
|
|
748
|
+
|
|
749
|
+
#### Learning & Calibration System
|
|
750
|
+
| Tool | Purpose |
|
|
751
|
+
|------|---------|
|
|
752
|
+
| `poly_record_prediction` | Pre-trade journal: predicted outcome, confidence, signals, reasoning |
|
|
753
|
+
| `poly_resolve_prediction` | Post-trade: actual outcome, was_correct, P&L |
|
|
754
|
+
| `poly_trade_review` | Win/loss analysis with lessons extraction |
|
|
755
|
+
| `poly_record_lesson` | Store actionable lessons by category (entry timing, risk management, etc.) |
|
|
756
|
+
| `poly_recall_lessons` | Retrieve relevant lessons before trading similar markets |
|
|
757
|
+
| `poly_calibration` | Confidence calibration: tracks overconfidence/underconfidence across 10 buckets |
|
|
758
|
+
| `poly_strategy_performance` | Win rate, total P&L, Brier score by strategy |
|
|
759
|
+
|
|
760
|
+
#### Counter-Intelligence (3 Tools)
|
|
761
|
+
Manipulation detection (wash trading, spoofing, layering), resolution risk scoring (ambiguous resolution criteria), counterparty analysis (retail vs whale distribution).
|
|
762
|
+
|
|
763
|
+
### Risk Management
|
|
764
|
+
|
|
765
|
+
Built-in risk rules enforced at the system level:
|
|
766
|
+
|
|
767
|
+
| Rule | Limit |
|
|
768
|
+
|------|-------|
|
|
769
|
+
| Max position size | 5% of bankroll (half-Kelly or quarter-Kelly) |
|
|
770
|
+
| Max single-market exposure | 20% of portfolio |
|
|
771
|
+
| Max category exposure | 30% of portfolio |
|
|
772
|
+
| Drawdown > 15% | Reduce all positions by 50% |
|
|
773
|
+
| Drawdown > 25% | Close all positions |
|
|
774
|
+
| Daily loss > 5% | Halt trading |
|
|
775
|
+
| Min liquidity | $5K (skip markets below this) |
|
|
776
|
+
| Slippage > 2% | Limit orders only |
|
|
777
|
+
| Slippage > 5% | Walk away |
|
|
778
|
+
| Resolution proximity | Exit 24h before unless >90% conviction |
|
|
779
|
+
|
|
780
|
+
**Circuit breakers:** `poly_profit_lock` enforces trading mode changes based on daily P&L (NORMAL → CONSERVATIVE → LOCKED).
|
|
781
|
+
|
|
782
|
+
### Trading Philosophy
|
|
783
|
+
|
|
784
|
+
The system prompt enforces **profit over activity** with four time horizons:
|
|
785
|
+
|
|
786
|
+
| Horizon | Duration | Strategy |
|
|
787
|
+
|---------|----------|----------|
|
|
788
|
+
| **Scalp** | Minutes-hours | Momentum, news spikes, mispricing |
|
|
789
|
+
| **Swing** | 1-7 days | Trend-following, event anticipation |
|
|
790
|
+
| **Position** | 1-4 weeks | Fundamental conviction, value bets |
|
|
791
|
+
| **Hold to resolution** | Weeks-months | Deep research, contrarian, >15% edge |
|
|
792
|
+
|
|
793
|
+
Agents are guided to prioritize managing existing positions over placing new trades. No good setups = no new trades.
|
|
794
|
+
|
|
795
|
+
### Wallet & Security
|
|
796
|
+
|
|
797
|
+
| Feature | Description |
|
|
798
|
+
|---------|-------------|
|
|
799
|
+
| **Encrypted storage** | Private keys and API credentials stored encrypted in `poly_wallet_credentials` |
|
|
800
|
+
| **Multi-RPC fallback** | 5 Polygon RPCs tried sequentially — never caches failed $0 balances |
|
|
801
|
+
| **Whitelisted addresses** | Per-address transfer limits (per-tx + daily caps) |
|
|
802
|
+
| **Transfer approval** | All transfers require dashboard approval |
|
|
803
|
+
| **Security PIN** | Optional PIN for sensitive wallet operations |
|
|
804
|
+
| **Token swaps** | USDC.e/USDC/MATIC swaps from dashboard |
|
|
805
|
+
| **Conditional token redemption** | Redeem winning positions directly from dashboard |
|
|
806
|
+
|
|
807
|
+
### Proactive Agent Behavior
|
|
808
|
+
|
|
809
|
+
The watcher engine periodically wakes trading agents for portfolio checks:
|
|
810
|
+
|
|
811
|
+
1. **Priority 1 — Manage Positions:** Check unread signals, review daily P&L, check position heatmap, verify exit conditions, monitor drawdown
|
|
812
|
+
2. **Priority 2 — Review Performance:** Check calibration accuracy, review P&L attribution, evaluate goals
|
|
813
|
+
3. **Priority 3 — Find Opportunities:** Only if genuine edge exists — momentum scan, breaking news, then full analysis pipeline
|
|
814
|
+
|
|
815
|
+
Agents are never pressured to hit trade count targets. The system respects agent pause commands and balance gates (won't wake if wallet < $5).
|
|
816
|
+
|
|
817
|
+
### Database Tables (17+)
|
|
818
|
+
|
|
819
|
+
| Table | Purpose |
|
|
820
|
+
|-------|---------|
|
|
821
|
+
| `poly_wallet_credentials` | Encrypted keys, API creds, RPC URLs |
|
|
822
|
+
| `poly_trading_config` | Agent trading parameters, mode, limits |
|
|
823
|
+
| `poly_pending_trades` | Approval-gated trade queue |
|
|
824
|
+
| `poly_trade_log` | Complete trade history with fills, fees, P&L |
|
|
825
|
+
| `poly_price_alerts` | Price triggers with optional auto-trade |
|
|
826
|
+
| `poly_paper_positions` | Paper trading simulation positions |
|
|
827
|
+
| `poly_daily_counters` | Daily trade count + loss tracking |
|
|
828
|
+
| `poly_auto_approve_rules` | Auto-approval by category/size |
|
|
829
|
+
| `poly_whitelisted_addresses` | Approved withdrawal addresses |
|
|
830
|
+
| `poly_transfer_requests` | Transfer approval queue |
|
|
831
|
+
| `poly_predictions` | Pre-trade prediction journal |
|
|
832
|
+
| `poly_strategy_stats` | Strategy win rates, P&L, Brier scores |
|
|
833
|
+
| `poly_lessons` | Distilled lessons learned |
|
|
834
|
+
| `poly_calibration` | Confidence calibration buckets |
|
|
835
|
+
| `poly_watchers` | Watcher configurations |
|
|
836
|
+
| `poly_watcher_events` | AI-analyzed signals |
|
|
837
|
+
| `poly_watcher_config` | LLM model + budget for watchers |
|
|
838
|
+
| `poly_proxy_config` | CLOB proxy (HTTP/SSH SOCKS) |
|
|
839
|
+
|
|
840
|
+
### Getting Started with Polymarket
|
|
841
|
+
|
|
842
|
+
1. **Create an agent** with the Polymarket skill assigned
|
|
843
|
+
2. Agent runs `poly_create_account` → `poly_setup_wallet` → `poly_set_allowances`
|
|
844
|
+
3. Fund the wallet with USDC.e on Polygon
|
|
845
|
+
4. Configure watcher AI model: `poly_watcher_config action=set provider=xai model=grok-3-mini`
|
|
846
|
+
5. Agent runs `poly_setup_monitors` to create the full monitoring suite
|
|
847
|
+
6. Set trading mode: approval (default), autonomous, or paper
|
|
848
|
+
7. Monitor everything from the 23-tab dashboard
|
|
849
|
+
|
|
850
|
+
---
|
|
851
|
+
|
|
621
852
|
## Database Backends
|
|
622
853
|
|
|
623
854
|
10 backends, all implementing the same adapter interface with full feature parity:
|