crypto-quant-signal-mcp 1.25.0 → 1.27.0
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 +27 -32
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +210 -28
- package/dist/index.js.map +1 -1
- package/dist/lib/account-handlers.js +7 -7
- package/dist/lib/account-handlers.js.map +1 -1
- package/dist/lib/adapters/binance.d.ts.map +1 -1
- package/dist/lib/adapters/binance.js +30 -20
- package/dist/lib/adapters/binance.js.map +1 -1
- package/dist/lib/adapters/bingx.d.ts.map +1 -1
- package/dist/lib/adapters/bingx.js +27 -15
- package/dist/lib/adapters/bingx.js.map +1 -1
- package/dist/lib/adapters/bitget.d.ts.map +1 -1
- package/dist/lib/adapters/bitget.js +27 -17
- package/dist/lib/adapters/bitget.js.map +1 -1
- package/dist/lib/adapters/bitmart.d.ts.map +1 -1
- package/dist/lib/adapters/bitmart.js +32 -17
- package/dist/lib/adapters/bitmart.js.map +1 -1
- package/dist/lib/adapters/bybit.d.ts.map +1 -1
- package/dist/lib/adapters/bybit.js +31 -19
- package/dist/lib/adapters/bybit.js.map +1 -1
- package/dist/lib/adapters/edgex.d.ts.map +1 -1
- package/dist/lib/adapters/edgex.js +4 -7
- package/dist/lib/adapters/edgex.js.map +1 -1
- package/dist/lib/adapters/gateio.d.ts.map +1 -1
- package/dist/lib/adapters/gateio.js +34 -20
- package/dist/lib/adapters/gateio.js.map +1 -1
- package/dist/lib/adapters/htx.d.ts.map +1 -1
- package/dist/lib/adapters/htx.js +13 -6
- package/dist/lib/adapters/htx.js.map +1 -1
- package/dist/lib/adapters/hyperliquid.d.ts.map +1 -1
- package/dist/lib/adapters/hyperliquid.js +32 -24
- package/dist/lib/adapters/hyperliquid.js.map +1 -1
- package/dist/lib/adapters/kucoin.js +1 -1
- package/dist/lib/adapters/kucoin.js.map +1 -1
- package/dist/lib/adapters/okx.d.ts.map +1 -1
- package/dist/lib/adapters/okx.js +27 -19
- package/dist/lib/adapters/okx.js.map +1 -1
- package/dist/lib/adapters/phemex.d.ts.map +1 -1
- package/dist/lib/adapters/phemex.js +27 -15
- package/dist/lib/adapters/phemex.js.map +1 -1
- package/dist/lib/adapters/weex.d.ts.map +1 -1
- package/dist/lib/adapters/weex.js +26 -14
- package/dist/lib/adapters/weex.js.map +1 -1
- package/dist/lib/adapters/whitebit.d.ts.map +1 -1
- package/dist/lib/adapters/whitebit.js +31 -17
- package/dist/lib/adapters/whitebit.js.map +1 -1
- package/dist/lib/adapters/xt.d.ts.map +1 -1
- package/dist/lib/adapters/xt.js +26 -13
- package/dist/lib/adapters/xt.js.map +1 -1
- package/dist/lib/call-class.d.ts +28 -3
- package/dist/lib/call-class.d.ts.map +1 -1
- package/dist/lib/call-class.js +84 -16
- package/dist/lib/call-class.js.map +1 -1
- package/dist/lib/contact-leads-store.d.ts +28 -0
- package/dist/lib/contact-leads-store.d.ts.map +1 -0
- package/dist/lib/contact-leads-store.js +64 -0
- package/dist/lib/contact-leads-store.js.map +1 -0
- package/dist/lib/contact-page.d.ts +31 -0
- package/dist/lib/contact-page.d.ts.map +1 -0
- package/dist/lib/contact-page.js +113 -0
- package/dist/lib/contact-page.js.map +1 -0
- package/dist/lib/contact-submit.d.ts +113 -0
- package/dist/lib/contact-submit.d.ts.map +1 -0
- package/dist/lib/contact-submit.js +143 -0
- package/dist/lib/contact-submit.js.map +1 -0
- package/dist/lib/email.d.ts +40 -0
- package/dist/lib/email.d.ts.map +1 -1
- package/dist/lib/email.js +125 -25
- package/dist/lib/email.js.map +1 -1
- package/dist/lib/equities/equity-tool-formatters.d.ts.map +1 -1
- package/dist/lib/equities/equity-tool-formatters.js +25 -10
- package/dist/lib/equities/equity-tool-formatters.js.map +1 -1
- package/dist/lib/errors.d.ts +46 -1
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +53 -4
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/feature-registry.d.ts +6 -3
- package/dist/lib/feature-registry.d.ts.map +1 -1
- package/dist/lib/feature-registry.js +8 -3
- package/dist/lib/feature-registry.js.map +1 -1
- package/dist/lib/footer-content.d.ts +35 -4
- package/dist/lib/footer-content.d.ts.map +1 -1
- package/dist/lib/footer-content.js +37 -8
- package/dist/lib/footer-content.js.map +1 -1
- package/dist/lib/funding-window.d.ts +20 -0
- package/dist/lib/funding-window.d.ts.map +1 -0
- package/dist/lib/funding-window.js +23 -0
- package/dist/lib/funding-window.js.map +1 -0
- package/dist/lib/funnel-scoreboard.d.ts +69 -2
- package/dist/lib/funnel-scoreboard.d.ts.map +1 -1
- package/dist/lib/funnel-scoreboard.js +122 -17
- package/dist/lib/funnel-scoreboard.js.map +1 -1
- package/dist/lib/funnel-snapshot.d.ts +46 -0
- package/dist/lib/funnel-snapshot.d.ts.map +1 -1
- package/dist/lib/funnel-snapshot.js +136 -5
- package/dist/lib/funnel-snapshot.js.map +1 -1
- package/dist/lib/indeterminate-counter.d.ts +52 -0
- package/dist/lib/indeterminate-counter.d.ts.map +1 -0
- package/dist/lib/indeterminate-counter.js +72 -0
- package/dist/lib/indeterminate-counter.js.map +1 -0
- package/dist/lib/integrations-data/ai-agents.js +1 -1
- package/dist/lib/integrations-data/mcp-clients.d.ts +20 -8
- package/dist/lib/integrations-data/mcp-clients.d.ts.map +1 -1
- package/dist/lib/integrations-data/mcp-clients.js +181 -11
- package/dist/lib/integrations-data/mcp-clients.js.map +1 -1
- package/dist/lib/integrations-data/types.d.ts +47 -3
- package/dist/lib/integrations-data/types.d.ts.map +1 -1
- package/dist/lib/integrations-data/types.js +11 -2
- package/dist/lib/integrations-data/types.js.map +1 -1
- package/dist/lib/landing-content.d.ts.map +1 -1
- package/dist/lib/landing-content.js +6 -2
- package/dist/lib/landing-content.js.map +1 -1
- package/dist/lib/license.d.ts +78 -11
- package/dist/lib/license.d.ts.map +1 -1
- package/dist/lib/license.js +315 -32
- package/dist/lib/license.js.map +1 -1
- package/dist/lib/nudge-copy.d.ts +1 -1
- package/dist/lib/nudge-copy.d.ts.map +1 -1
- package/dist/lib/nudge-copy.js +14 -3
- package/dist/lib/nudge-copy.js.map +1 -1
- package/dist/lib/performance-db.d.ts.map +1 -1
- package/dist/lib/performance-db.js +61 -5
- package/dist/lib/performance-db.js.map +1 -1
- package/dist/lib/plans.d.ts +207 -4
- package/dist/lib/plans.d.ts.map +1 -1
- package/dist/lib/plans.js +291 -8
- package/dist/lib/plans.js.map +1 -1
- package/dist/lib/quota-notice.d.ts +29 -1
- package/dist/lib/quota-notice.d.ts.map +1 -1
- package/dist/lib/quota-notice.js +47 -6
- package/dist/lib/quota-notice.js.map +1 -1
- package/dist/lib/receipts.d.ts +87 -1
- package/dist/lib/receipts.d.ts.map +1 -1
- package/dist/lib/receipts.js +62 -9
- package/dist/lib/receipts.js.map +1 -1
- package/dist/lib/referral-pages.d.ts.map +1 -1
- package/dist/lib/referral-pages.js +5 -3
- package/dist/lib/referral-pages.js.map +1 -1
- package/dist/lib/signin-component.js +1 -1
- package/dist/lib/signup-flow.d.ts +11 -15
- package/dist/lib/signup-flow.d.ts.map +1 -1
- package/dist/lib/signup-flow.js +89 -33
- package/dist/lib/signup-flow.js.map +1 -1
- package/dist/lib/stripe.d.ts +162 -1
- package/dist/lib/stripe.d.ts.map +1 -1
- package/dist/lib/stripe.js +328 -69
- package/dist/lib/stripe.js.map +1 -1
- package/dist/lib/subscriber-attribution.d.ts +227 -1
- package/dist/lib/subscriber-attribution.d.ts.map +1 -1
- package/dist/lib/subscriber-attribution.js +383 -6
- package/dist/lib/subscriber-attribution.js.map +1 -1
- package/dist/lib/telegram.d.ts +26 -0
- package/dist/lib/telegram.d.ts.map +1 -1
- package/dist/lib/telegram.js +53 -11
- package/dist/lib/telegram.js.map +1 -1
- package/dist/lib/trade-call-scanner.d.ts +1 -1
- package/dist/lib/trade-call-scanner.d.ts.map +1 -1
- package/dist/lib/utc-day.d.ts +45 -0
- package/dist/lib/utc-day.d.ts.map +1 -0
- package/dist/lib/utc-day.js +58 -0
- package/dist/lib/utc-day.js.map +1 -0
- package/dist/lib/venue-store.d.ts +43 -0
- package/dist/lib/venue-store.d.ts.map +1 -1
- package/dist/lib/venue-store.js +95 -0
- package/dist/lib/venue-store.js.map +1 -1
- package/dist/lib/verdict-factors.d.ts +383 -0
- package/dist/lib/verdict-factors.d.ts.map +1 -0
- package/dist/lib/verdict-factors.js +846 -0
- package/dist/lib/verdict-factors.js.map +1 -0
- package/dist/lib/webhook-delivery.d.ts.map +1 -1
- package/dist/lib/webhook-delivery.js +14 -5
- package/dist/lib/webhook-delivery.js.map +1 -1
- package/dist/lib/welcome-page.d.ts.map +1 -1
- package/dist/lib/welcome-page.js +30 -16
- package/dist/lib/welcome-page.js.map +1 -1
- package/dist/lib/x402-http-routes.d.ts +8 -1
- package/dist/lib/x402-http-routes.d.ts.map +1 -1
- package/dist/lib/x402-http-routes.js +53 -11
- package/dist/lib/x402-http-routes.js.map +1 -1
- package/dist/lib/x402-idempotency-store.d.ts +39 -9
- package/dist/lib/x402-idempotency-store.d.ts.map +1 -1
- package/dist/lib/x402-idempotency-store.js +89 -39
- package/dist/lib/x402-idempotency-store.js.map +1 -1
- package/dist/lib/x402-operator-wallets.d.ts +40 -2
- package/dist/lib/x402-operator-wallets.d.ts.map +1 -1
- package/dist/lib/x402-operator-wallets.js +42 -3
- package/dist/lib/x402-operator-wallets.js.map +1 -1
- package/dist/lib/x402.d.ts +1 -1
- package/dist/lib/x402.d.ts.map +1 -1
- package/dist/lib/x402.js +7 -5
- package/dist/lib/x402.js.map +1 -1
- package/dist/scripts/backfill-x402-payer-wallet.d.ts +22 -0
- package/dist/scripts/backfill-x402-payer-wallet.d.ts.map +1 -1
- package/dist/scripts/backfill-x402-payer-wallet.js +113 -20
- package/dist/scripts/backfill-x402-payer-wallet.js.map +1 -1
- package/dist/scripts/closedbar-recalibrate-readiness.d.ts +103 -0
- package/dist/scripts/closedbar-recalibrate-readiness.d.ts.map +1 -0
- package/dist/scripts/closedbar-recalibrate-readiness.js +438 -0
- package/dist/scripts/closedbar-recalibrate-readiness.js.map +1 -0
- package/dist/scripts/evaluate-venues.d.ts +44 -6
- package/dist/scripts/evaluate-venues.d.ts.map +1 -1
- package/dist/scripts/evaluate-venues.js +120 -10
- package/dist/scripts/evaluate-venues.js.map +1 -1
- package/dist/scripts/extend-venue.d.ts +22 -0
- package/dist/scripts/extend-venue.d.ts.map +1 -0
- package/dist/scripts/extend-venue.js +207 -0
- package/dist/scripts/extend-venue.js.map +1 -0
- package/dist/tool-descriptions.d.ts +1 -1
- package/dist/tool-descriptions.d.ts.map +1 -1
- package/dist/tool-descriptions.js +1 -1
- package/dist/tool-descriptions.js.map +1 -1
- package/dist/tools/get-market-regime.d.ts.map +1 -1
- package/dist/tools/get-market-regime.js +6 -0
- package/dist/tools/get-market-regime.js.map +1 -1
- package/dist/tools/get-trade-call.d.ts.map +1 -1
- package/dist/tools/get-trade-call.js +160 -53
- package/dist/tools/get-trade-call.js.map +1 -1
- package/dist/tools/scan-funding-arb.d.ts.map +1 -1
- package/dist/tools/scan-funding-arb.js +6 -0
- package/dist/tools/scan-funding-arb.js.map +1 -1
- package/dist/tools/scan-trade-calls.d.ts.map +1 -1
- package/dist/tools/scan-trade-calls.js +8 -4
- package/dist/tools/scan-trade-calls.js.map +1 -1
- package/dist/types.d.ts +9 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/server.json +2 -2
package/README.md
CHANGED
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
13
|
<p align="center">
|
|
14
|
-
<span data-tr-field="pfe_wr">91.
|
|
14
|
+
<span data-tr-field="pfe_wr">91.8%</span> PFE win rate across <span data-tr-field="total_calls">459,396</span>+ verified calls. Merkle-verified on Base L2. Don't trust — verify. <!-- SNAPSHOT-LINE -->
|
|
15
15
|
</p>
|
|
16
16
|
|
|
17
17
|
<p align="center">
|
|
18
|
-
<strong>
|
|
18
|
+
<strong>200 free calls/month, 100/day. Start in 30 seconds.</strong>
|
|
19
19
|
</p>
|
|
20
20
|
|
|
21
21
|
<p align="center">
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
No code. No API key. No install. The server speaks Streamable HTTP at `https://api.algovault.com/mcp` — any [Model Context Protocol](https://github.com/modelcontextprotocol) client connects directly.
|
|
45
45
|
|
|
46
|
-
**1. Add the connector.** In Claude → Settings →
|
|
46
|
+
**1. Add the connector.** In Claude → Settings → Connectors → Add custom connector:
|
|
47
47
|
|
|
48
48
|
| Field | Value |
|
|
49
49
|
|---|---|
|
|
@@ -94,7 +94,7 @@ Under the hood, a self-tuning model fuses momentum, trend structure, derivatives
|
|
|
94
94
|
{ "coin": "SOL", "timeframe": "15m", "confidence": 73 }
|
|
95
95
|
],
|
|
96
96
|
"_algovault": {
|
|
97
|
-
"version": "1.
|
|
97
|
+
"version": "1.27.0",
|
|
98
98
|
"tool": "get_trade_call",
|
|
99
99
|
"compatible_with": ["crypto-quant-risk-mcp", "crypto-quant-backtest-mcp"]
|
|
100
100
|
}
|
|
@@ -112,7 +112,7 @@ The `_algovault` block makes outputs composable: downstream risk and backtest to
|
|
|
112
112
|
scripts/snapshot-landing-data.mjs at npm-publish + Hetzner-deploy. Do NOT hand-edit the
|
|
113
113
|
numbers; edit "What's new" by hand. Wired by OPS-NPM-README-SINGLE-SOT-W1 (2026-05-31). -->
|
|
114
114
|
<p align="center">
|
|
115
|
-
<strong><span data-tr-field="pfe_wr">91.
|
|
115
|
+
<strong><span data-tr-field="pfe_wr">91.8%</span> PFE Win Rate</strong> · <strong><span data-tr-field="total_calls">459,396</span> trade calls</strong> · <strong><span data-tr-field="merkle_batches">122</span> on-chain batches</strong> · <strong><span data-tr-field="hold_rate">99.2%</span> HOLD rate</strong> <!-- SNAPSHOT-LINE -->
|
|
116
116
|
</p>
|
|
117
117
|
|
|
118
118
|
<p align="center">
|
|
@@ -138,7 +138,7 @@ AlgoVault is drop-in for every MCP-spec client, every major agent framework, and
|
|
|
138
138
|
|
|
139
139
|
| Client | Config |
|
|
140
140
|
|---|---|
|
|
141
|
-
| **Claude Desktop** | Settings →
|
|
141
|
+
| **Claude Desktop** | Settings → Connectors → Add custom connector → `https://api.algovault.com/mcp` |
|
|
142
142
|
| **Claude Code** (CLI) | `claude mcp add crypto-quant-signal https://api.algovault.com/mcp` |
|
|
143
143
|
| **Cursor** | `~/.cursor/config.json` → `mcpServers` block → `url: "https://api.algovault.com/mcp"` |
|
|
144
144
|
| **Cline** | VS Code Cline extension → MCP server settings → add Streamable HTTP server |
|
|
@@ -229,30 +229,41 @@ Single-prompt wrappers over 1–3 tool calls — regime gating, multi-timeframe
|
|
|
229
229
|
|
|
230
230
|
## Pricing
|
|
231
231
|
|
|
232
|
-
Quota-only tiers. Every tier gets all venues, all assets, all timeframes — you pay for call volume, nothing else.
|
|
232
|
+
Quota-only tiers. Every tier gets all venues, all assets, all timeframes — you pay for call volume, nothing else.
|
|
233
233
|
|
|
234
|
-
|
|
234
|
+
Two meters per paid tier, monthly and daily, enforced independently: a call is refused when either is exhausted, and the daily window is a UTC calendar day resetting at 00:00 UTC. Every successful verdict counts against them, HOLD included — knowing when *not* to trade is the other half of the product, and it costs the same to compute.
|
|
235
|
+
|
|
236
|
+
| Feature | Free | Starter ($9.99/mo · $39.90/6mo) | Pro ($49/mo · $129/6mo) | Enterprise (contact us) | x402 (per call) |
|
|
235
237
|
|---------|------|-------------------|-------------|---------------------|-----------------|
|
|
236
238
|
| Exchanges | All 15 | All 15 | All 15 | All 15 | All 15 | <!-- SNAPSHOT-LINE-TABLE -->
|
|
237
|
-
| Assets | All
|
|
239
|
+
| Assets | All 1560+ | All 1560+ | All 1560+ | All 1560+ | All 1560+ | <!-- SNAPSHOT-LINE-TABLE -->
|
|
238
240
|
| Asset classes | Crypto + TradFi | Crypto + TradFi | Crypto + TradFi | Crypto + TradFi | Crypto + TradFi |
|
|
239
241
|
| Timeframes | All 11 | All 11 | All 11 | All 11 | All 11 |
|
|
240
242
|
| Funding arb results | Top 5 | Unlimited | Unlimited | Unlimited | Unlimited |
|
|
241
243
|
| Track record | Full access | Full access | Full access | Full access | Full access |
|
|
242
|
-
| Monthly calls |
|
|
243
|
-
|
|
|
244
|
-
| Price | $0 | $9.99/mo | $49/mo
|
|
245
|
-
| HOLD calls | Free | Free | Free | Free | Free |
|
|
244
|
+
| Monthly calls | 200/mo | 10,000/mo | 100,000/mo | Custom volume — contact us | Unlimited |
|
|
245
|
+
| Daily calls | 100/day | 1,000/day | 10,000/day | Custom volume — contact us | Unlimited |
|
|
246
|
+
| Price | $0 | $9.99/mo or $39.90/6mo | $49/mo or $129/6mo | Contact us | $0.01–0.05/call |
|
|
246
247
|
|
|
247
|
-
\* HOLD verdicts (engine says "don't trade") are always free across all tiers — no x402 charge, no quota deduction. We only get paid when we see a tradeable opportunity.
|
|
248
248
|
|
|
249
|
-
**Subscriptions:** Sign up at [api.algovault.com/signup](https://api.algovault.com/signup). Starter ($9.99/mo
|
|
249
|
+
**Subscriptions:** Sign up at [api.algovault.com/signup](https://api.algovault.com/signup). Starter unlocks 10,000 calls/mo (up to 1,000/day) for $9.99/mo, or $39.90 for six months prepaid — add `?interval=6month` to pick the prepay term. API key delivered instantly after checkout.
|
|
250
250
|
|
|
251
251
|
**x402 micropayments:** AI agents pay per HTTP call with USDC on [Base](https://www.base.org) — no signup, no API key, no billing. The payment receipt is the credential. See [x402.org](https://x402.org).
|
|
252
252
|
|
|
253
253
|
---
|
|
254
254
|
|
|
255
|
-
## What's new in v1.
|
|
255
|
+
## What's new in v1.27.0
|
|
256
|
+
|
|
257
|
+
- **🧮 Every verdict counts.** Your allowance covers every call the engine answers, on both the MCP and HTTP rails.
|
|
258
|
+
- **📶 A new call ladder.** Free: 200/month plus 100/day. Starter: 10,000/month plus 1,000/day. Pro: 100,000/month plus 10,000/day.
|
|
259
|
+
- **💳 6-month prepay replaces annual.** Starter is **$39.90** (~$6.65/mo, 33% off monthly) and Pro is **$129** (~$21.50/mo, 56% off monthly). Pick it at [signup](https://api.algovault.com/signup) with `?interval=6month`. Enterprise remains contact-us.
|
|
260
|
+
- **⏱️ Daily limits say when they reset.** Hit a daily cap and the refusal tells you the hours remaining, not a monthly figure.
|
|
261
|
+
|
|
262
|
+
### v1.26.0 highlights (recap)
|
|
263
|
+
|
|
264
|
+
- **💳 Annual plans — prepay a year, save up to 49%.** Starter was **$79/yr** (~$6.58/mo) and Pro was **$299/yr** (~$24.92/mo). **Superseded: annual was retired on 2026-08-09 and replaced by 6-month prepay (see v1.27.0); `?interval=year` now redirects to the 6-month checkout, so existing links still work.**
|
|
265
|
+
|
|
266
|
+
### v1.25.0 highlights (recap)
|
|
256
267
|
|
|
257
268
|
- **🎯 Screen the scan universe by liquidity.** `scan_trade_calls` now takes an optional `minLiquidityUsd` floor — filter to names with real depth, by notional open interest or 24h volume. Omit it for no floor.
|
|
258
269
|
- **💳 Charge-correctness on the paid path.** A paid request whose body was dropped could return a defaults-only result. Every payable route now rejects a dropped body, and a rejected request explains why.
|
|
@@ -261,22 +272,6 @@ Quota-only tiers. Every tier gets all venues, all assets, all timeframes — you
|
|
|
261
272
|
|
|
262
273
|
> New optional parameter — MCP clients cache `tools/list` at session start. Toggle the connector off/on (or restart the MCP connection) to see `minLiquidityUsd`.
|
|
263
274
|
|
|
264
|
-
### v1.24.0 highlights (recap)
|
|
265
|
-
|
|
266
|
-
- **🌐 Three new exchanges: WhiteBIT, BitMart, XT.** AlgoVault's signal engine spans more perpetual-futures venues. Point any tool at the new venues via the `exchange` parameter.
|
|
267
|
-
- **🔌 New venue integration pages.** Per-venue connect guides at [algovault.com/integrations](https://algovault.com/integrations).
|
|
268
|
-
|
|
269
|
-
### v1.23.1 highlights (recap)
|
|
270
|
-
|
|
271
|
-
- **🔗 A dedicated page for every way to connect.** New hub pages walk through each access channel end-to-end, with copy-paste code and a quick FAQ: [MCP](https://algovault.com/mcp), [REST API](https://algovault.com/rest-api), and [webhooks](https://algovault.com/webhooks).
|
|
272
|
-
- **🧭 Tools index + unified navigation.** Browse all public tools at [algovault.com/tools](https://algovault.com/tools); a new Platform menu makes the whole site easier to navigate.
|
|
273
|
-
|
|
274
|
-
### v1.23.0 highlights (recap)
|
|
275
|
-
|
|
276
|
-
- **📡 Cross-venue funding arbitrage now spans 7 venues.** `scan_funding_arb` expanded from 3 to 7 — Hyperliquid, Binance, Bybit, Gate, KuCoin, Aster, and OKX — with interval-correct annualization per venue and a per-leg liquidity filter, so only tradeable spreads surface.
|
|
277
|
-
|
|
278
|
-
> MCP clients cache `tools/list` at session start — toggle the connector off/on (or restart the MCP connection) to pick up the updated `scan_funding_arb`.
|
|
279
|
-
|
|
280
275
|
|
|
281
276
|
> **Refresh your MCP client to pick up this release.** MCP clients cache `tools/list` at session start — Claude.ai/Desktop: toggle the connector off+on; Cursor/Cline: restart the MCP server connection.
|
|
282
277
|
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAWA,OAAO,EAAE,SAAS,EAAuC,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAWA,OAAO,EAAE,SAAS,EAAuC,MAAM,yCAAyC,CAAC;AAiTzG;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,MAAM,EAAE,MAAM,GACb,MAAM,CAOR;AAED;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,OAAO,SAAS,EAAE,OAAO,EAC9B,GAAG,EAAE,OAAO,SAAS,EAAE,QAAQ,EAC/B,UAAU,EAAE,MAAM,SAAS,GAC1B,OAAO,CAAC,IAAI,CAAC,CAYf;AA85ID,wBAAgB,mBAAmB,cAElC"}
|
package/dist/index.js
CHANGED
|
@@ -206,6 +206,7 @@ function toolErrorContent(err) {
|
|
|
206
206
|
return { content: [{ type: 'text', text: JSON.stringify({ error: message }) }], isError: true };
|
|
207
207
|
}
|
|
208
208
|
const signup_flow_js_1 = require("./lib/signup-flow.js");
|
|
209
|
+
const contact_page_js_1 = require("./lib/contact-page.js");
|
|
209
210
|
const account_handlers_js_1 = require("./lib/account-handlers.js");
|
|
210
211
|
const site_nav_js_1 = require("./lib/site-nav.js");
|
|
211
212
|
const oi_ranking_js_1 = require("./lib/oi-ranking.js");
|
|
@@ -371,8 +372,6 @@ function createServer() {
|
|
|
371
372
|
// contract-correct engine. Quota is handled inside whichever engine runs.
|
|
372
373
|
const { route, result } = await (0, upstream_weight_budget_js_1.runAsCaller)(toolNameForAnalytics, () => (0, trade_call_router_js_1.routeTradeCall)({ coin, timeframe, includeReasoning, exchange, assetClass, license }));
|
|
373
374
|
const verdict = result.call;
|
|
374
|
-
// Verdict stored for x402 settlement skip (HOLDs / error paths don't settle).
|
|
375
|
-
(0, license_js_1.setRequestVerdict)(verdict ?? 'HOLD');
|
|
376
375
|
(0, analytics_js_1.logRequest)({
|
|
377
376
|
sessionId: (0, license_js_1.getRequestSessionId)(),
|
|
378
377
|
toolName: toolNameForAnalytics,
|
|
@@ -1007,7 +1006,15 @@ async function startHttp() {
|
|
|
1007
1006
|
// Fire-and-forget so a Stripe API hiccup never delays server boot.
|
|
1008
1007
|
void import('./lib/referral-accrual.js').then((m) => m.ensureReferralWebhookEvents()).catch(() => { });
|
|
1009
1008
|
const { default: express } = await import('express');
|
|
1010
|
-
const { default: rateLimit } = await import('express-rate-limit');
|
|
1009
|
+
const { default: rateLimit, ipKeyGenerator } = await import('express-rate-limit');
|
|
1010
|
+
// CH4 per-key burst guard: same Bearer extraction as webhook-api.ts#apiKeyOf. Kept local
|
|
1011
|
+
// rather than exported from there — that module owns webhook routing, not MCP transport.
|
|
1012
|
+
const bearerKeyOf = (req) => {
|
|
1013
|
+
const auth = req.headers.authorization;
|
|
1014
|
+
if (typeof auth === 'string' && auth.startsWith('Bearer '))
|
|
1015
|
+
return auth.slice(7).trim() || null;
|
|
1016
|
+
return null;
|
|
1017
|
+
};
|
|
1011
1018
|
const app = express();
|
|
1012
1019
|
app.set('trust proxy', 1); // Trust Caddy reverse proxy for req.secure, req.ip
|
|
1013
1020
|
const port = parseInt(process.env.PORT || '3000', 10);
|
|
@@ -1033,9 +1040,38 @@ async function startHttp() {
|
|
|
1033
1040
|
res.setHeader('Referrer-Policy', 'strict-origin-when-cross-origin');
|
|
1034
1041
|
// 'unsafe-inline' mirrors the Caddy policy: the function-rendered pages emit
|
|
1035
1042
|
// inline <script> hydration and inline style="" attributes.
|
|
1043
|
+
//
|
|
1044
|
+
// DESIGN-ACCOUNT-THEME-TOKENS-W1 — style-src allows https://algovault.com.
|
|
1045
|
+
//
|
|
1046
|
+
// WHY: /account and /track-record link the canonical design loader
|
|
1047
|
+
// (https://algovault.com/_design/algovault-design.css), which is where the brand
|
|
1048
|
+
// design TOKENS live (:root{--bg,--fg,--fg-2,--fg-3,--line,--mint,--accent,--font-*}).
|
|
1049
|
+
// On the APEX that URL is 'self' and resolves. On api.algovault.com it is CROSS-ORIGIN,
|
|
1050
|
+
// this policy refused it, and every token fell back to nothing — so `background: var(--bg)`
|
|
1051
|
+
// painted the browser default WHITE and `color: var(--fg-3)` painted near-black tab labels
|
|
1052
|
+
// on a hardcoded dark bar. Identical page, correct on apex, broken on api: origin-dependent.
|
|
1053
|
+
//
|
|
1054
|
+
// Exact origin, never a wildcard. The alternative — inlining a :root block per page — would
|
|
1055
|
+
// put the brand palette in a 5th place and mask this fault while /track-record stayed broken.
|
|
1056
|
+
//
|
|
1057
|
+
// HONEST COST, recorded rather than discovered later: this makes api-host pages carry a
|
|
1058
|
+
// CROSS-HOST RUNTIME DEPENDENCY on the apex. If Caddy is down or the apex cert lapses while
|
|
1059
|
+
// Node is up, every api page renders unstyled. Both hosts are the same box, so they mostly
|
|
1060
|
+
// fail together — but not always, and the apex cert renews on its own schedule. The real end
|
|
1061
|
+
// state is serving this stylesheet same-origin from the api host too; that needs a Dockerfile
|
|
1062
|
+
// + deploy.yml change (api/_design/… is 404 today, the file is not in the runtime image), so
|
|
1063
|
+
// it is deliberately NOT bundled here → OPS-DESIGN-CSS-SAME-ORIGIN-W{NEXT}.
|
|
1064
|
+
//
|
|
1065
|
+
// SCOPE: this is GLOBAL middleware (one setter, no per-route override), so the widening
|
|
1066
|
+
// applies to every Express route including /mcp — harmless for style-src, since JSON
|
|
1067
|
+
// endpoints load no stylesheets, but stated so it is not a surprise in a later audit.
|
|
1068
|
+
// The Caddyfile twin is deliberately NOT widened: the pages it covers are served from the
|
|
1069
|
+
// apex and are same-origin with the stylesheet, so 'self' already permits it. Leaving Caddy
|
|
1070
|
+
// stricter is safe — the keep-in-sync warning above guards against pages being left
|
|
1071
|
+
// UNCOVERED, not against Caddy being tighter than Express.
|
|
1036
1072
|
res.setHeader('Content-Security-Policy', "default-src 'self'; " +
|
|
1037
1073
|
"script-src 'self' 'unsafe-inline' https://cdn.tailwindcss.com; " +
|
|
1038
|
-
"style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; " +
|
|
1074
|
+
"style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://algovault.com; " +
|
|
1039
1075
|
"font-src 'self' https://fonts.gstatic.com data:; " +
|
|
1040
1076
|
"img-src 'self' data: https:; " +
|
|
1041
1077
|
"connect-src 'self' https://api.algovault.com https://plausible.algovault.com; " +
|
|
@@ -1044,6 +1080,45 @@ async function startHttp() {
|
|
|
1044
1080
|
});
|
|
1045
1081
|
// Rate limiting
|
|
1046
1082
|
app.use('/mcp', rateLimit({ windowMs: 60_000, max: 120, standardHeaders: true, legacyHeaders: false }));
|
|
1083
|
+
// ── Ops-only per-KEY burst guard (PRICING-FLAT-CALL-BILLING-AND-6MONTH-W1 CH4) ──
|
|
1084
|
+
//
|
|
1085
|
+
// NOT MARKETED and deliberately carries no TIER_CLAIM: this protects the upstream venues, it
|
|
1086
|
+
// is not part of the product's advertised ladder. Its job is narrow — stop a 10,000-call/day
|
|
1087
|
+
// Pro from spending its whole daily budget in sixty seconds and taking the venue rate limits
|
|
1088
|
+
// with it. The daily meter caps the DAY; nothing capped the MINUTE.
|
|
1089
|
+
//
|
|
1090
|
+
// WHY PER-KEY, GIVEN /mcp IS ALREADY 120/min. That limiter keys on IP, so it does not bind a
|
|
1091
|
+
// key driven from several hosts — which is exactly the scripted/agent shape this guards.
|
|
1092
|
+
//
|
|
1093
|
+
// CALIBRATION — measured, not guessed (CH1 follow-up query, request_log, 30d):
|
|
1094
|
+
// external per-(key,minute): p50 1 · p95 11 · p99 18 · MAX 22 (n = 10,930 minutes)
|
|
1095
|
+
// paid tiers only (90d): p50 1 · p95 8 · p99 9 · MAX 17 (n = 926 minutes)
|
|
1096
|
+
// The spec asked for "the measured p95 legitimate burst". p95 is 11 — and a REFUSAL threshold
|
|
1097
|
+
// set at p95 refuses 5% of legitimate minutes by construction. p95 is a typical-load
|
|
1098
|
+
// statistic, not a headroom one. The cap is therefore set from the observed MAX with real
|
|
1099
|
+
// headroom: 120/min is 5.5x the busiest legitimate minute ever recorded and 11x p95, while
|
|
1100
|
+
// still cutting a runaway from 10,000/min to 120. It also matches the existing per-IP number,
|
|
1101
|
+
// so a single key behind a single IP sees no new constraint at all.
|
|
1102
|
+
//
|
|
1103
|
+
// `internal` is exempt: the TG bot measured p95 13/min and MAX 33/min, and it enforces its own
|
|
1104
|
+
// per-user quota in its own SQLite (see getMonthlyQuota / getDailyCap).
|
|
1105
|
+
const MCP_PER_KEY_BURST_PER_MIN = 120;
|
|
1106
|
+
app.use('/mcp', rateLimit({
|
|
1107
|
+
windowMs: 60_000,
|
|
1108
|
+
max: MCP_PER_KEY_BURST_PER_MIN,
|
|
1109
|
+
standardHeaders: true,
|
|
1110
|
+
legacyHeaders: false,
|
|
1111
|
+
// Only callers presenting a key are governed here; keyless traffic is already covered by
|
|
1112
|
+
// the per-IP limiter above, and collapsing it all onto one bucket would throttle unrelated
|
|
1113
|
+
// callers behind a shared NAT as though they were one abuser.
|
|
1114
|
+
skip: (req) => {
|
|
1115
|
+
const key = bearerKeyOf(req);
|
|
1116
|
+
if (!key)
|
|
1117
|
+
return true; // keyless → per-IP limiter owns it
|
|
1118
|
+
return key === process.env.CQS_API_KEY; // internal/self → exempt
|
|
1119
|
+
},
|
|
1120
|
+
keyGenerator: (req) => bearerKeyOf(req) ?? ipKeyGenerator(req.ip ?? 'unknown'),
|
|
1121
|
+
}));
|
|
1047
1122
|
app.use('/analytics', rateLimit({ windowMs: 60_000, max: 30, standardHeaders: true, legacyHeaders: false }));
|
|
1048
1123
|
app.use('/webhooks', rateLimit({ windowMs: 60_000, max: 20, standardHeaders: true, legacyHeaders: false }));
|
|
1049
1124
|
// OPS-MCP-SESSION-RESILIENCE-W1: the remote MCP transport runs STATELESS by default
|
|
@@ -1134,7 +1209,11 @@ async function startHttp() {
|
|
|
1134
1209
|
const INTEGRATION_FRAMEWORKS = ['langchain', 'llamaindex', 'maf', 'crewai'];
|
|
1135
1210
|
// INTEGRATIONS-FULL-STACK-W1 C4 (2026-05-19): 5 MCP-client landing pages
|
|
1136
1211
|
// (Plain HTTP/curl stays inline-only per Q-PLAIN-HTTP=NO; not in allow-list).
|
|
1137
|
-
|
|
1212
|
+
// LANDING-MCP-CLIENT-REGISTRY-W1 (2026-08-05): +3 MCP-client pages. The other
|
|
1213
|
+
// 3 registry rows (plain-http, zai-api, deepseek) are hasDedicatedPage:false —
|
|
1214
|
+
// a transport, a server-side API and a model, none of which have a page.
|
|
1215
|
+
const INTEGRATION_MCP_CLIENTS = ['claude-desktop', 'claude-code', 'cursor', 'cline', 'smithery',
|
|
1216
|
+
'codex', 'kimi', 'glm-zcode'];
|
|
1138
1217
|
const ALL_INTEGRATION_SLUGS = [...INTEGRATION_EXCHANGES, ...INTEGRATION_FRAMEWORKS, ...INTEGRATION_MCP_CLIENTS];
|
|
1139
1218
|
const INTEGRATION_HTML = new Map();
|
|
1140
1219
|
{
|
|
@@ -1331,6 +1410,27 @@ async function startHttp() {
|
|
|
1331
1410
|
await processChargeRefunded(event);
|
|
1332
1411
|
break;
|
|
1333
1412
|
}
|
|
1413
|
+
case 'customer.subscription.updated': {
|
|
1414
|
+
// OPS-STRIPE-SUBSCRIPTION-TRUTH-W2 CH2 — the tier/interval change that never reached
|
|
1415
|
+
// the record. Subscribed on the live endpoint by CH1 (set-compared, 6 events).
|
|
1416
|
+
//
|
|
1417
|
+
// Idempotency BEFORE the side-effect, same shape as the two cases above: Stripe
|
|
1418
|
+
// delivers at-least-once and retries every non-2xx for up to 3 days.
|
|
1419
|
+
const isNewUpd = await (0, stripe_events_store_js_1.tryClaimEvent)({
|
|
1420
|
+
event_id: event.id,
|
|
1421
|
+
event_type: event.type,
|
|
1422
|
+
customer_email: null,
|
|
1423
|
+
metadata: { source: 'customer.subscription.updated' },
|
|
1424
|
+
});
|
|
1425
|
+
if (!isNewUpd) {
|
|
1426
|
+
console.log(`Stripe webhook: duplicate customer.subscription.updated (event ${event.id}) — already processed`);
|
|
1427
|
+
// 200, never 500 — a non-2xx makes Stripe retry harder against an event we have
|
|
1428
|
+
// already fully processed.
|
|
1429
|
+
return res.json({ received: true, status: 'duplicate' });
|
|
1430
|
+
}
|
|
1431
|
+
await (0, stripe_js_1.handleSubscriptionUpdated)(event);
|
|
1432
|
+
break;
|
|
1433
|
+
}
|
|
1334
1434
|
default:
|
|
1335
1435
|
console.log(`Stripe webhook: unhandled event ${event.type}`);
|
|
1336
1436
|
}
|
|
@@ -1341,6 +1441,62 @@ async function startHttp() {
|
|
|
1341
1441
|
res.status(400).json({ error: 'Webhook verification failed' });
|
|
1342
1442
|
}
|
|
1343
1443
|
});
|
|
1444
|
+
// ── Contact form (CONTACT-FORM-AND-SUPPORT-CLAIM-SWEEP-W1) ──
|
|
1445
|
+
//
|
|
1446
|
+
// Replaces a `mailto:` Enterprise CTA that was dead in two independent ways: Cloudflare
|
|
1447
|
+
// rewrites every `mailto:` into `/cdn-cgi/l/email-protection#…` (measured — ZERO plain mailto
|
|
1448
|
+
// survives to a browser on any page), and even fully decoded it needs an OS mail handler the
|
|
1449
|
+
// visitor may not have. This is the first lead-capture surface the product has.
|
|
1450
|
+
const contactLimiter = rateLimit({
|
|
1451
|
+
windowMs: 60 * 60 * 1000,
|
|
1452
|
+
max: 10,
|
|
1453
|
+
standardHeaders: true,
|
|
1454
|
+
legacyHeaders: false,
|
|
1455
|
+
message: 'Too many messages. Try again in an hour, or email admin@algovault.com.',
|
|
1456
|
+
});
|
|
1457
|
+
app.get('/contact', (req, res) => {
|
|
1458
|
+
const src = typeof req.query.src === 'string' ? req.query.src : null;
|
|
1459
|
+
const error = typeof req.query.error === 'string' ? req.query.error : null;
|
|
1460
|
+
res.type('html').send((0, contact_page_js_1.renderContactPage)({ error, src }));
|
|
1461
|
+
});
|
|
1462
|
+
// ORDER IS THE CONTRACT: validate → PERSIST → notify → record the notify outcome. A lead is
|
|
1463
|
+
// the scarcest thing this product captures and an email send is a network call that fails, so
|
|
1464
|
+
// a Resend outage must degrade to "stored, not yet notified" — never to a lost lead behind a
|
|
1465
|
+
// success page.
|
|
1466
|
+
// Thin shell: wires real dependencies into `handleContactSubmission`, which owns the ordering
|
|
1467
|
+
// contract and is unit-testable (CLAUDE.md — a handler closure in index.ts is not).
|
|
1468
|
+
app.post('/contact', contactLimiter, express.urlencoded({ extended: false, limit: '8kb' }), async (req, res) => {
|
|
1469
|
+
const body = (req.body ?? {});
|
|
1470
|
+
const [{ handleContactSubmission }, store, emailMod, tg] = await Promise.all([
|
|
1471
|
+
import('./lib/contact-submit.js'),
|
|
1472
|
+
import('./lib/contact-leads-store.js'),
|
|
1473
|
+
import('./lib/email.js'),
|
|
1474
|
+
import('./lib/telegram.js'),
|
|
1475
|
+
]);
|
|
1476
|
+
// Channel re-derived server-side; the form's hidden field is a hint, never trusted as sent.
|
|
1477
|
+
const classified = (0, attribution_sources_js_1.classifySource)({
|
|
1478
|
+
srcParam: typeof body.src === 'string' ? body.src : undefined,
|
|
1479
|
+
userAgent: req.headers['user-agent'],
|
|
1480
|
+
referer: req.headers.referer,
|
|
1481
|
+
origin: req.headers.origin,
|
|
1482
|
+
});
|
|
1483
|
+
const result = await handleContactSubmission(body, { src: classified.source ?? null, ipHash: (0, analytics_js_1.hashIp)((0, client_ip_js_1.clientIp)(req) || 'unknown') }, {
|
|
1484
|
+
validateEmail: email_validation_js_1.validateSignupEmail,
|
|
1485
|
+
insertLead: store.insertContactLead,
|
|
1486
|
+
markNotified: store.markContactLeadNotified,
|
|
1487
|
+
sendEmail: emailMod.sendContactLeadEmail,
|
|
1488
|
+
sendAlert: tg.sendAlert,
|
|
1489
|
+
});
|
|
1490
|
+
switch (result.kind) {
|
|
1491
|
+
case 'ok':
|
|
1492
|
+
case 'honeypot':
|
|
1493
|
+
return res.type('html').send((0, contact_page_js_1.renderContactConfirmation)());
|
|
1494
|
+
case 'invalid':
|
|
1495
|
+
return res.status(400).type('html').send((0, contact_page_js_1.renderContactPage)({ error: result.error }));
|
|
1496
|
+
default:
|
|
1497
|
+
return res.status(500).type('html').send((0, contact_page_js_1.renderContactPage)({ error: 'server_error' }));
|
|
1498
|
+
}
|
|
1499
|
+
});
|
|
1344
1500
|
// ── Signup (redirects to Stripe Checkout) ──
|
|
1345
1501
|
// ACTIVATION-PAYWALL-W1: forwards UTM query params (utm_source, utm_campaign)
|
|
1346
1502
|
// through to Stripe metadata so `checkout.session.completed` attribution
|
|
@@ -1411,12 +1567,33 @@ async function startHttp() {
|
|
|
1411
1567
|
}
|
|
1412
1568
|
try {
|
|
1413
1569
|
const baseUrl = `${req.protocol}://${req.get('host')}`;
|
|
1570
|
+
// PRICING-ANNUAL-AND-HOLD-PROMISE-W1: an explicit prepay token selects prepay. Anything
|
|
1571
|
+
// else — absent, misspelt, hostile — resolves to 'month', so a malformed query can only
|
|
1572
|
+
// ever bill the SMALLER amount. Never infer a prepay term from a partial match.
|
|
1573
|
+
//
|
|
1574
|
+
// PRICING-FLAT-CALL-BILLING-AND-6MONTH-W1 (R-C): `?interval=6month` replaces
|
|
1575
|
+
// `?interval=year`. The old token is REDIRECTED rather than silently downgraded to
|
|
1576
|
+
// monthly — external links to `?interval=year` exist (the npm README, dev.to, a GitHub
|
|
1577
|
+
// Discussion and an X thread all shipped it on 2026-08-06), and quietly billing those
|
|
1578
|
+
// callers $9.99/mo when they clicked an annual-prepay link would be the worse failure.
|
|
1579
|
+
// A 302 to the 6-month equivalent keeps the intent (prepay, discounted) and lets the
|
|
1580
|
+
// caller see what they are actually buying before confirming.
|
|
1581
|
+
if (req.query.interval === 'year') {
|
|
1582
|
+
const q = new URLSearchParams(req.query);
|
|
1583
|
+
q.set('interval', '6month');
|
|
1584
|
+
return res.redirect(302, `/signup?${q.toString()}`);
|
|
1585
|
+
}
|
|
1586
|
+
const interval = req.query.interval === '6month' ? '6month' : 'month';
|
|
1414
1587
|
const url = await (0, stripe_js_1.createCheckoutSession)(plan, baseUrl, {
|
|
1415
1588
|
utmSource,
|
|
1416
1589
|
utmCampaign,
|
|
1417
1590
|
clientReferenceId,
|
|
1418
1591
|
refCode,
|
|
1592
|
+
interval,
|
|
1419
1593
|
});
|
|
1594
|
+
// A configured plan with an unconfigured interval lands here too (e.g. annual requested
|
|
1595
|
+
// before the Price exists in Stripe) — same operator-actionable failure, not a silent
|
|
1596
|
+
// downgrade to a price the caller did not choose.
|
|
1420
1597
|
if (!url)
|
|
1421
1598
|
return res.status(500).send('Stripe not configured or missing price IDs');
|
|
1422
1599
|
// SUBSCRIBER-ATTRIBUTION-SPINE-W1 (C1): persist the click attribution so
|
|
@@ -1484,7 +1661,7 @@ async function startHttp() {
|
|
|
1484
1661
|
}
|
|
1485
1662
|
catch (err) {
|
|
1486
1663
|
console.error('Welcome page error:', err instanceof Error ? err.message : err);
|
|
1487
|
-
res.status(500).send('Failed to retrieve your API key. Please contact
|
|
1664
|
+
res.status(500).send('Failed to retrieve your API key. Please contact admin@algovault.com');
|
|
1488
1665
|
}
|
|
1489
1666
|
});
|
|
1490
1667
|
// ── /account self-service portal ──
|
|
@@ -1676,7 +1853,7 @@ async function startHttp() {
|
|
|
1676
1853
|
res.setHeader('Content-Type', 'text/html; charset=utf-8');
|
|
1677
1854
|
res.setHeader('Cache-Control', 'no-store');
|
|
1678
1855
|
if (!isValidCodeFormat(code) || sig !== notifyUnsubSig(code) || !(await resolveCode(code))) {
|
|
1679
|
-
return res.status(400).send('<!DOCTYPE html><meta charset="utf-8"><body style="font-family:-apple-system,sans-serif;max-width:480px;margin:60px auto;text-align:center;color:#1f2328"><h2>Invalid link</h2><p>This unsubscribe link is invalid or expired. Manage notifications from the Telegram bot (/notifications) or contact
|
|
1856
|
+
return res.status(400).send('<!DOCTYPE html><meta charset="utf-8"><body style="font-family:-apple-system,sans-serif;max-width:480px;margin:60px auto;text-align:center;color:#1f2328"><h2>Invalid link</h2><p>This unsubscribe link is invalid or expired. Manage notifications from the Telegram bot (/notifications) or contact admin@algovault.com.</p></body>');
|
|
1680
1857
|
}
|
|
1681
1858
|
await setNotifyOptOut(code, true);
|
|
1682
1859
|
return res.send('<!DOCTYPE html><meta charset="utf-8"><body style="font-family:-apple-system,sans-serif;max-width:480px;margin:60px auto;text-align:center;color:#1f2328"><h2>Notifications off</h2><p>You won't receive referral join/earnings notifications anymore. Changed your mind? Re-enable from the Telegram bot (<code>/notifications</code>).</p></body>');
|
|
@@ -3302,9 +3479,17 @@ async function startHttp() {
|
|
|
3302
3479
|
res.status(500).json({ error: 'Internal server error' });
|
|
3303
3480
|
}
|
|
3304
3481
|
}
|
|
3305
|
-
// Fire-and-forget: settle x402 payment after response is sent
|
|
3306
|
-
//
|
|
3307
|
-
|
|
3482
|
+
// Fire-and-forget: settle the x402 payment after the response is sent.
|
|
3483
|
+
//
|
|
3484
|
+
// PRICING-FLAT-CALL-BILLING-AND-6MONTH-W1 (R-A): the `getRequestVerdict() !== 'HOLD'`
|
|
3485
|
+
// guard is GONE. It meant the per-call rail was paid only when the model said "trade",
|
|
3486
|
+
// which is a structural incentive against the selectivity that IS the product — the
|
|
3487
|
+
// published hold rate is ~99%, so the rail was collecting on roughly 1 call in 100 while
|
|
3488
|
+
// serving all of them. A verdict is the product on every rail; HOLD is a verdict.
|
|
3489
|
+
//
|
|
3490
|
+
// An ERROR still never settles, and that is unchanged: this line only runs after a
|
|
3491
|
+
// successful response, and every failure path above returns before reaching it.
|
|
3492
|
+
if (pendingSettlement) {
|
|
3308
3493
|
(0, x402_js_1.settleX402Async)(pendingSettlement);
|
|
3309
3494
|
}
|
|
3310
3495
|
});
|
|
@@ -4483,31 +4668,26 @@ function getSignupPageHtml() {
|
|
|
4483
4668
|
<!-- END: AlgoVault canonical design loader -->
|
|
4484
4669
|
<style>
|
|
4485
4670
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
4486
|
-
|
|
4671
|
+
/* Sticky-footer shape (DESIGN-WELCOME-LAYOUT-AND-FOOTER-FLOW-W1). A centering flex ROW here
|
|
4672
|
+
makes the brand footer a flex ITEM beside the card. Fix the container, never the footer.
|
|
4673
|
+
Enforced by scripts/check-footer-body-flow.mjs, whose docblock carries the full rationale. */
|
|
4674
|
+
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #0f1117; color: #e1e4e8; display: flex; flex-direction: column; min-height: 100vh; }
|
|
4675
|
+
.page-main { flex: 1; display: flex; justify-content: center; align-items: center; width: 100%; padding: 24px; }
|
|
4487
4676
|
.container { max-width: 960px; width: 100%; }
|
|
4488
4677
|
h1 { font-size: 28px; margin-bottom: 8px; }
|
|
4489
4678
|
.subtitle { color: #8b949e; margin-bottom: 32px; font-size: 14px; }
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
.
|
|
4495
|
-
.plan .price { font-size: 36px; font-weight: 700; color: #58a6ff; margin: 12px 0; }
|
|
4496
|
-
.plan .price span { font-size: 16px; font-weight: 400; color: #8b949e; }
|
|
4497
|
-
.plan ul { list-style: none; margin: 16px 0 24px; }
|
|
4498
|
-
.plan ul li { padding: 4px 0; color: #c9d1d9; font-size: 14px; }
|
|
4499
|
-
.plan ul li::before { content: '\\2713'; color: #3fb950; margin-right: 8px; }
|
|
4500
|
-
.btn { display: inline-block; background: #238636; color: #fff; text-decoration: none; padding: 12px 28px; border-radius: 8px; font-size: 16px; font-weight: 600; transition: background 0.15s; }
|
|
4501
|
-
.btn:hover { background: #2ea043; }
|
|
4502
|
-
.btn.ent { background: #8957e5; }
|
|
4503
|
-
.btn.ent:hover { background: #a371f7; }
|
|
4504
|
-
.pop-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: #34D199; color: #0f1117; font-size: 11px; font-weight: 700; padding: 3px 12px; border-radius: 20px; letter-spacing: 0.5px; }
|
|
4679
|
+
/* PRICING-ANNUAL-AND-HOLD-PROMISE-W1: this block used to RESTATE the plan-card rules that
|
|
4680
|
+
signup-flow.ts also exports, with a comment on each side telling the next author to keep the
|
|
4681
|
+
two in sync by hand. Interpolating the constant is the generator-level fix — the annual price
|
|
4682
|
+
block and the Enterprise contact line could not otherwise render correctly on /signup. */
|
|
4683
|
+
${signup_flow_js_1.PLAN_CARDS_CSS}
|
|
4505
4684
|
</style>
|
|
4506
4685
|
</head>
|
|
4507
4686
|
<body>
|
|
4687
|
+
<main class="page-main">
|
|
4508
4688
|
<div class="container">
|
|
4509
4689
|
<h1>AlgoVault Subscriptions</h1>
|
|
4510
|
-
<div class="subtitle">Free tier includes all assets and all 11 timeframes — capped at
|
|
4690
|
+
<div class="subtitle">Free tier includes all assets and all 11 timeframes — capped at 200 calls/month and 100 per UTC day. Every verdict counts, HOLD included. Upgrade for higher limits and unlimited funding-arb results.</div>
|
|
4511
4691
|
<div style="display:flex;justify-content:center;gap:12px;margin-bottom:24px;flex-wrap:wrap">
|
|
4512
4692
|
${capabilities_js_1.EXCHANGES.map(e => '<span style="color:#8b949e;font-size:12px;font-weight:600">' + e.label + '</span>').join('<span style="color:#6e7681">·</span>')}
|
|
4513
4693
|
</div>
|
|
@@ -4516,11 +4696,13 @@ function getSignupPageHtml() {
|
|
|
4516
4696
|
<div style="background:#161b22;border:1px solid #30363d;border-radius:12px;padding:24px 28px;margin-top:20px;display:flex;flex-wrap:wrap;align-items:center;gap:16px;justify-content:space-between">
|
|
4517
4697
|
<div style="flex:1;min-width:260px">
|
|
4518
4698
|
<h2 style="font-size:18px;margin-bottom:6px;color:#e1e4e8">No subscription? Pay-per-call with x402</h2>
|
|
4519
|
-
<div style="color:#8b949e;font-size:14px;line-height:1.5">Agents can skip signup entirely — pay per call in USDC on Base. From $0.01/call · $0.02 standard. No Stripe, no API key
|
|
4699
|
+
<div style="color:#8b949e;font-size:14px;line-height:1.5">Agents can skip signup entirely — pay per call in USDC on Base. From $0.01/call · $0.02 standard. No Stripe, no API key.</div>
|
|
4520
4700
|
</div>
|
|
4521
4701
|
<a class="btn" href="https://algovault.com/docs.html#x402" style="background:#1f6feb;white-space:nowrap">Pay per call with x402 →</a>
|
|
4522
4702
|
</div>
|
|
4523
4703
|
</div>
|
|
4704
|
+
</main>
|
|
4705
|
+
${(0, footer_content_js_1.renderBrandFooter)('desktop')}
|
|
4524
4706
|
</body>
|
|
4525
4707
|
</html>`;
|
|
4526
4708
|
}
|