mcp-scraper 0.4.14 → 0.6.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/dist/bin/api-server.cjs +393 -29
- package/dist/bin/api-server.cjs.map +1 -1
- package/dist/bin/api-server.js +2 -2
- package/dist/bin/mcp-scraper-cli.cjs +1 -1
- package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
- package/dist/bin/mcp-scraper-cli.js +1 -1
- package/dist/bin/mcp-scraper-install.cjs +1 -1
- package/dist/bin/mcp-scraper-install.cjs.map +1 -1
- package/dist/bin/mcp-scraper-install.js +1 -1
- package/dist/bin/mcp-stdio-server.cjs +588 -11
- package/dist/bin/mcp-stdio-server.cjs.map +1 -1
- package/dist/bin/mcp-stdio-server.js +3 -2
- package/dist/bin/mcp-stdio-server.js.map +1 -1
- package/dist/{chunk-XZ2GPRCM.js → chunk-3K5GT6VG.js} +326 -12
- package/dist/chunk-3K5GT6VG.js.map +1 -0
- package/dist/{chunk-SIPXEFTR.js → chunk-APJO2XV5.js} +6 -6
- package/dist/chunk-APJO2XV5.js.map +1 -0
- package/dist/{chunk-VQV7MB2S.js → chunk-BL7BBSYF.js} +2 -2
- package/dist/chunk-F2BXETDX.js +7 -0
- package/dist/chunk-F2BXETDX.js.map +1 -0
- package/dist/{server-TGORO4AJ.js → server-WHM446IZ.js} +70 -18
- package/dist/server-WHM446IZ.js.map +1 -0
- package/dist/{site-extract-repository-6X2C7RLF.js → site-extract-repository-U476J44K.js} +3 -3
- package/dist/{worker-WCSKUAOT.js → worker-KJZ3ZN2N.js} +2 -2
- package/package.json +2 -2
- package/dist/chunk-OL65BO4S.js +0 -7
- package/dist/chunk-OL65BO4S.js.map +0 -1
- package/dist/chunk-SIPXEFTR.js.map +0 -1
- package/dist/chunk-XZ2GPRCM.js.map +0 -1
- package/dist/server-TGORO4AJ.js.map +0 -1
- /package/dist/{chunk-VQV7MB2S.js.map → chunk-BL7BBSYF.js.map} +0 -0
- /package/dist/{site-extract-repository-6X2C7RLF.js.map → site-extract-repository-U476J44K.js.map} +0 -0
- /package/dist/{worker-WCSKUAOT.js.map → worker-KJZ3ZN2N.js.map} +0 -0
|
@@ -22,11 +22,11 @@ var MC_COSTS = {
|
|
|
22
22
|
browser_minute: 12e3,
|
|
23
23
|
reddit_thread: 3e3,
|
|
24
24
|
reddit_comment: 200,
|
|
25
|
-
video_analysis:
|
|
25
|
+
video_analysis: 666700,
|
|
26
26
|
trustpilot_reviews: 500,
|
|
27
27
|
trustpilot_review: 100,
|
|
28
28
|
g2_reviews: 500,
|
|
29
|
-
g2_review:
|
|
29
|
+
g2_review: 200,
|
|
30
30
|
diff_page: 100
|
|
31
31
|
};
|
|
32
32
|
var MC_PER_BROWSER_MS = MC_COSTS.browser_minute / 6e4;
|
|
@@ -34,7 +34,7 @@ function browserActiveCostMc(activeMs) {
|
|
|
34
34
|
return Math.round(activeMs * MC_PER_BROWSER_MS);
|
|
35
35
|
}
|
|
36
36
|
var BROWSER_OPEN_MIN_BALANCE_MC = 1e3;
|
|
37
|
-
var MC_PER_CREDIT =
|
|
37
|
+
var MC_PER_CREDIT = 100;
|
|
38
38
|
var CREDIT_COST_CATALOG = [
|
|
39
39
|
{
|
|
40
40
|
key: "serp",
|
|
@@ -254,8 +254,8 @@ var CREDIT_COST_CATALOG = [
|
|
|
254
254
|
var CONCURRENCY_PRICE_ID = "price_1Ta1NRS8aAcsk3TGwsRnYbix";
|
|
255
255
|
var SUBSCRIPTION_TIERS = {
|
|
256
256
|
"price_1TmiHRS8aAcsk3TGwmSNfNIa": { tier: "starter", label: "Starter", price_id: "price_1TmiHRS8aAcsk3TGwmSNfNIa", monthly_usd: 12, credits_mc: 8e6, concurrency: 3, intro_coupon: "mcp-starter-1dollar-intro-12" },
|
|
257
|
-
"
|
|
258
|
-
"
|
|
257
|
+
"price_1TrgihS8aAcsk3TG5cglrq4D": { tier: "growth", label: "Growth", price_id: "price_1TrgihS8aAcsk3TG5cglrq4D", monthly_usd: 40, credits_mc: 26666700, concurrency: 10, intro_coupon: null },
|
|
258
|
+
"price_1TrgihS8aAcsk3TG4HnG4gbY": { tier: "scale", label: "Scale", price_id: "price_1TrgihS8aAcsk3TG4HnG4gbY", monthly_usd: 100, credits_mc: 8e7, concurrency: 20, intro_coupon: null }
|
|
259
259
|
};
|
|
260
260
|
var SUBSCRIPTION_TIER_BY_KEY = Object.fromEntries(
|
|
261
261
|
Object.values(SUBSCRIPTION_TIERS).map((t) => [t.tier, t])
|
|
@@ -401,4 +401,4 @@ export {
|
|
|
401
401
|
MEDIA_TRANSCRIBE_HOLD_MC,
|
|
402
402
|
MC_PER_USD
|
|
403
403
|
};
|
|
404
|
-
//# sourceMappingURL=chunk-
|
|
404
|
+
//# sourceMappingURL=chunk-APJO2XV5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/api/rates.ts"],"sourcesContent":["export const MC_COSTS = {\n serp: 100,\n paa: 200,\n paa_base: 1_000,\n page_scrape: 100,\n url_map: 500,\n yt_channel: 200,\n yt_transcription: 200,\n fb_ad: 200,\n maps_search: 500,\n maps_place: 6_000,\n maps_review: 100,\n fb_search: 600,\n fb_transcribe: 33_300,\n google_ads_search: 600,\n google_ads_intel: 200,\n google_ads_transcribe: 33_300,\n instagram_profile: 400,\n instagram_media: 400,\n instagram_transcribe: 33_300,\n browser_minute: 12_000,\n reddit_thread: 3_000,\n reddit_comment: 200,\n video_analysis: 666_700,\n trustpilot_reviews: 500,\n trustpilot_review: 100,\n g2_reviews: 500,\n g2_review: 200,\n diff_page: 100,\n} as const\n\nexport type McCostKey = keyof typeof MC_COSTS\n\nexport const MC_PER_BROWSER_MS = MC_COSTS.browser_minute / 60_000\n\nexport function browserActiveCostMc(activeMs: number): number {\n return Math.round(activeMs * MC_PER_BROWSER_MS)\n}\n\nexport const BROWSER_OPEN_MIN_BALANCE_MC = 1_000\n\nexport const MC_PER_CREDIT = 100\n\nexport const CREDIT_COST_CATALOG: Array<{\n key: McCostKey\n label: string\n aliases: string[]\n credits: number\n unit: string\n notes?: string\n}> = [\n {\n key: 'serp',\n label: 'SERP search',\n aliases: ['search_serp', 'serp', 'google search', 'organic results'],\n credits: mcToCredits(MC_COSTS.serp),\n unit: 'per search',\n notes: 'Returns AI Overview, PAA snippet, videos, forums, and local pack.',\n },\n {\n key: 'paa',\n label: 'PAA harvest',\n aliases: ['harvest_paa', 'paa', 'people also ask', 'questions'],\n credits: mcToCredits(MC_COSTS.paa),\n unit: `per question (+${mcToCredits(MC_COSTS.paa_base)} credit base)`,\n notes: `Full SERP feature extraction. Billed ${mcToCredits(MC_COSTS.paa_base)} credit base + ${mcToCredits(MC_COSTS.paa)} per question actually returned (unused estimate refunded).`,\n },\n {\n key: 'page_scrape',\n label: 'Page crawl / extract',\n aliases: ['extract_url', 'extract_site', 'page scrape', 'url scrape', 'single page', 'site crawl'],\n credits: mcToCredits(MC_COSTS.page_scrape),\n unit: 'per page',\n notes: 'Applies to both single-URL extraction and per-page site crawls.',\n },\n {\n key: 'url_map',\n label: 'Site URL mapping',\n aliases: ['map_site_urls', 'url map', 'site map', 'crawl urls'],\n credits: mcToCredits(MC_COSTS.url_map),\n unit: 'per mapping operation',\n notes: 'Flat rate for the full /map-urls call regardless of URL count discovered.',\n },\n {\n key: 'yt_channel',\n label: 'YouTube search / channel harvest',\n aliases: ['youtube_harvest', 'youtube search', 'youtube channel', 'yt_channel'],\n credits: mcToCredits(MC_COSTS.yt_channel),\n unit: 'per call',\n },\n {\n key: 'yt_transcription',\n label: 'YouTube transcription',\n aliases: ['youtube_transcribe', 'youtube transcript', 'transcription', 'yt_transcription'],\n credits: mcToCredits(MC_COSTS.yt_transcription),\n unit: 'per minute',\n notes: 'A 5-minute hold is taken, then reconciled to actual video duration.',\n },\n {\n key: 'fb_ad',\n label: 'Facebook search / ad lookup',\n aliases: ['facebook_page_intel', 'facebook_ad_search', 'facebook_ad', 'facebook ads', 'fb ads'],\n credits: mcToCredits(MC_COSTS.fb_ad),\n unit: 'per call',\n },\n {\n key: 'maps_search',\n label: 'Maps business search',\n aliases: ['maps_search', 'google maps search', 'gmb search', 'gbp search', 'business profiles'],\n credits: mcToCredits(MC_COSTS.maps_search),\n unit: 'per search',\n notes: 'Returns up to 50 Google Maps business/profile candidates. Use maps_place_intel to hydrate selected businesses.',\n },\n {\n key: 'maps_place',\n label: 'Maps business lookup',\n aliases: ['maps_place_intel', 'google maps', 'maps place', 'place intel'],\n credits: mcToCredits(MC_COSTS.maps_place),\n unit: 'per business',\n notes: 'Base lookup. Reviews billed separately per card at maps_review rate.',\n },\n {\n key: 'maps_review',\n label: 'Maps review',\n aliases: ['maps_reviews', 'google reviews', 'review cards', 'reviews'],\n credits: mcToCredits(MC_COSTS.maps_review),\n unit: 'per review card',\n notes: 'Charged after extraction when includeReviews is true.',\n },\n {\n key: 'fb_search',\n label: 'Facebook ad library search',\n aliases: ['facebook_search', 'fb_search', 'fb ad search'],\n credits: mcToCredits(MC_COSTS.fb_search),\n unit: 'per search',\n notes: 'Browser automation to search Facebook Ads Library by keyword.',\n },\n {\n key: 'google_ads_search',\n label: 'Google Ads Transparency search',\n aliases: ['google_ads_search', 'google ads search', 'ads transparency search'],\n credits: mcToCredits(MC_COSTS.google_ads_search),\n unit: 'per search',\n notes: 'Browser automation to find advertisers in Google Ads Transparency Center by domain or name.',\n },\n {\n key: 'google_ads_intel',\n label: 'Google Ads Transparency advertiser intel',\n aliases: ['google_ads_page_intel', 'google ads intel', 'ads transparency intel'],\n credits: mcToCredits(MC_COSTS.google_ads_intel),\n unit: 'per call',\n notes: 'Lists and hydrates an advertiser\\'s creatives with image URLs and video references.',\n },\n {\n key: 'google_ads_transcribe',\n label: 'Google ad video transcription',\n aliases: ['google_ads_transcribe', 'google ad transcript'],\n credits: mcToCredits(MC_COSTS.google_ads_transcribe),\n unit: 'per minute (typical)',\n notes: 'A hold is taken, then reconciled to the real transcription cost for the actual audio duration.',\n },\n {\n key: 'fb_transcribe',\n label: 'Facebook video / ad transcription',\n aliases: ['facebook_transcribe', 'facebook_video_transcribe', 'fb_transcribe', 'fb ad transcript'],\n credits: mcToCredits(MC_COSTS.fb_transcribe),\n unit: 'per minute (typical)',\n notes: 'A hold is taken, then reconciled to the real transcription cost for the actual audio duration.',\n },\n {\n key: 'instagram_profile',\n label: 'Instagram profile content discovery',\n aliases: ['instagram_profile_content', 'instagram profile', 'instagram content list', 'ig profile'],\n credits: mcToCredits(MC_COSTS.instagram_profile),\n unit: 'per profile scan',\n notes: 'Browser extraction of public Instagram profile grid links. Complete history may require a logged-in profile.',\n },\n {\n key: 'instagram_media',\n label: 'Instagram media download',\n aliases: ['instagram_media_download', 'instagram reel download', 'instagram post download', 'ig media'],\n credits: mcToCredits(MC_COSTS.instagram_media),\n unit: 'per post or reel',\n notes: 'Extracts post text, image URLs, and reel audio/video tracks, with local downloads when the server can write files.',\n },\n {\n key: 'instagram_transcribe',\n label: 'Instagram media transcription',\n aliases: ['instagram transcript', 'instagram reel transcript', 'ig transcribe'],\n credits: mcToCredits(MC_COSTS.instagram_transcribe),\n unit: 'per minute (typical)',\n notes: 'Whisper transcription of selected Instagram audio/video media via fal.ai. A hold is taken, then reconciled to the real transcription cost for the actual audio duration.',\n },\n {\n key: 'browser_minute',\n label: 'Interactive browser session',\n aliases: ['browser_open', 'browser agent', 'browser_agent', 'live browser', 'browse', 'browser control', 'interactive browser'],\n credits: mcToCredits(MC_COSTS.browser_minute),\n unit: 'per minute of use',\n notes: 'Metered per minute of use for the whole time the browser session is open. Close the session to stop the meter; abandoned sessions are auto-closed after a short idle window.',\n },\n {\n key: 'reddit_thread',\n label: 'Reddit thread base lookup',\n aliases: ['reddit', 'reddit_thread', 'reddit comments', 'subreddit', 'reddit post'],\n credits: mcToCredits(MC_COSTS.reddit_thread),\n unit: 'per thread',\n notes: 'Base lookup for the post itself. Comments billed separately per comment at reddit_comment rate. Refunded if the thread cannot be retrieved.',\n },\n {\n key: 'reddit_comment',\n label: 'Reddit comment',\n aliases: ['reddit_comment', 'reddit comments'],\n credits: mcToCredits(MC_COSTS.reddit_comment),\n unit: 'per comment',\n notes: 'Charged per comment actually extracted, billed down automatically if the balance runs out mid-thread.',\n },\n {\n key: 'video_analysis',\n label: 'Video breakdown (frame-by-frame + transcript)',\n aliases: ['video_frame_analysis', 'video breakdown', 'video analysis', 'analyze video'],\n credits: mcToCredits(MC_COSTS.video_analysis),\n unit: 'per 120 frames (max 480)',\n notes: 'Full multi-lens video breakdown: samples frames across a video (up to 30 minutes), analyzes each with vision AI, transcribes the audio, then produces summary, pacing/energy, words-per-minute, topic outline, key points, hook analysis, visual style, and a how-to-replicate recipe with a quality-control pass. $1 per 120 frames requested (max 480 = $4); billed down automatically if the video cannot use the requested frames, and refunded fully if the run fails.',\n },\n {\n key: 'trustpilot_reviews',\n label: 'Trustpilot review harvest',\n aliases: ['trustpilot_reviews', 'trustpilot', 'trustpilot reviews'],\n credits: mcToCredits(MC_COSTS.trustpilot_reviews),\n unit: 'per call',\n notes: 'Base lookup. Reviews billed separately per card at trustpilot_review rate. Refunded if no reviews are found.',\n },\n {\n key: 'trustpilot_review',\n label: 'Trustpilot review card',\n aliases: ['trustpilot_review', 'trustpilot card'],\n credits: mcToCredits(MC_COSTS.trustpilot_review),\n unit: 'per review card',\n notes: 'Charged per review actually extracted, billed down automatically if the balance runs out mid-page.',\n },\n {\n key: 'g2_reviews',\n label: 'G2 review harvest',\n aliases: ['g2_reviews', 'g2', 'g2 reviews'],\n credits: mcToCredits(MC_COSTS.g2_reviews),\n unit: 'per call',\n notes: 'Base lookup. Reviews billed separately per card at g2_review rate. Refunded if no reviews are found.',\n },\n {\n key: 'g2_review',\n label: 'G2 review card',\n aliases: ['g2_review', 'g2 card'],\n credits: mcToCredits(MC_COSTS.g2_review),\n unit: 'per review card',\n notes: 'Charged per review actually extracted (each card carries up to 3 Q&A sections), billed down automatically if the balance runs out mid-page.',\n },\n {\n key: 'diff_page',\n label: 'Page change check',\n aliases: ['diff_page', 'page diff', 'change detection'],\n credits: mcToCredits(MC_COSTS.diff_page),\n unit: 'per check',\n notes: 'Same cost as a single page extract — one scrape is performed per check, then compared against your last stored snapshot for that URL.',\n },\n]\n\nexport const CONCURRENCY_PRICE_ID = 'price_1Ta1NRS8aAcsk3TGwsRnYbix'\n\nexport interface SubscriptionTier { tier: string; label: string; price_id: string; monthly_usd: number; credits_mc: number; concurrency: number; intro_coupon: string | null }\n\nexport const SUBSCRIPTION_TIERS: Record<string, SubscriptionTier> = {\n 'price_1TmiHRS8aAcsk3TGwmSNfNIa': { tier: 'starter', label: 'Starter', price_id: 'price_1TmiHRS8aAcsk3TGwmSNfNIa', monthly_usd: 12, credits_mc: 8_000_000, concurrency: 3, intro_coupon: 'mcp-starter-1dollar-intro-12' },\n 'price_1TrgihS8aAcsk3TG5cglrq4D': { tier: 'growth', label: 'Growth', price_id: 'price_1TrgihS8aAcsk3TG5cglrq4D', monthly_usd: 40, credits_mc: 26_666_700, concurrency: 10, intro_coupon: null },\n 'price_1TrgihS8aAcsk3TG4HnG4gbY': { tier: 'scale', label: 'Scale', price_id: 'price_1TrgihS8aAcsk3TG4HnG4gbY', monthly_usd: 100, credits_mc: 80_000_000, concurrency: 20, intro_coupon: null },\n}\n\nexport const SUBSCRIPTION_TIER_BY_KEY: Record<string, SubscriptionTier> = Object.fromEntries(\n Object.values(SUBSCRIPTION_TIERS).map(t => [t.tier, t]),\n)\nexport const CONCURRENCY_SLOT_PRICE_USD = 5\nexport const CONCURRENCY_SLOT_PRICE_CURRENCY = 'usd'\nexport const CONCURRENCY_SLOT_PRICE_INTERVAL = 'month'\nexport const CONCURRENCY_SLOT_PRICE_LABEL = '$5/month'\nexport const CONCURRENCY_SLOT_TERMINAL_COMMAND = 'npx -y -p mcp-scraper@latest mcp-scraper-cli billing concurrency checkout'\n\nexport function concurrencySlotBillingInfo() {\n const billingUrl = process.env.CONCURRENCY_BILLING_URL ?? 'https://mcpscraper.dev/billing'\n return {\n product: 'Extra concurrency slot',\n price_label: CONCURRENCY_SLOT_PRICE_LABEL,\n unit_amount_usd: CONCURRENCY_SLOT_PRICE_USD,\n currency: CONCURRENCY_SLOT_PRICE_CURRENCY,\n interval: CONCURRENCY_SLOT_PRICE_INTERVAL,\n billing_url: billingUrl,\n terminal_command: CONCURRENCY_SLOT_TERMINAL_COMMAND,\n terminal_command_with_api_key_env: `MCP_SCRAPER_API_KEY=sk_live_your_key ${CONCURRENCY_SLOT_TERMINAL_COMMAND}`,\n }\n}\n\nexport const FREE_SIGNUP_MC = 100_000\nexport const FREE_MONTHLY_REFRESH_MC = 250_000\n\nexport const BALANCE_PRICE_IDS: Record<string, number> = {\n 'price_1TZx6rS8aAcsk3TGNMc1Vgpo': 11_000_000,\n 'price_1TZx6sS8aAcsk3TGxgqB7khO': 27_500_000,\n 'price_1TZx6tS8aAcsk3TG8PnJqHlG': 60_500_000,\n 'price_1TZx6tS8aAcsk3TGNgRMpy0e': 121_000_000,\n}\n\nexport const BALANCE_PACK_LABELS: Record<string, string> = {\n 'price_1TZx6rS8aAcsk3TGNMc1Vgpo': '$10',\n 'price_1TZx6sS8aAcsk3TGxgqB7khO': '$25',\n 'price_1TZx6tS8aAcsk3TG8PnJqHlG': '$50',\n 'price_1TZx6tS8aAcsk3TGNgRMpy0e': '$100',\n}\n\nexport function mcToCredits(mc: number): number {\n return mc / MC_PER_CREDIT\n}\n\nexport function insufficientBalanceResponse(balanceMc: number, requiredMc: number) {\n const topupUrl = process.env.TOPUP_URL ?? 'https://mcpscraper.dev/billing'\n const balanceCredits = mcToCredits(balanceMc)\n const requiredCredits = mcToCredits(requiredMc)\n return {\n error: 'insufficient_balance',\n error_code: 'insufficient_balance' as const,\n message: `Insufficient credits. Balance: ${balanceCredits} credits. This call requires ${requiredCredits} credits. Top up at ${topupUrl}`,\n balance_credits: balanceCredits,\n required_credits: requiredCredits,\n topup_url: topupUrl,\n }\n}\n\nexport interface MemoryPlan {\n plan: 'pro' | 'team'\n label: string\n price_id: string\n interval: 'month' | 'year'\n monthly_usd: number\n quota_bytes: number\n}\n\nexport const MEMORY_FREE_QUOTA_BYTES = 0.01e9 * 1\n\nexport const MEMORY_PLANS: Record<string, MemoryPlan> = {\n 'price_1TnMSTS8aAcsk3TGBgiwuvqL': { plan: 'pro', label: 'Pro', price_id: 'price_1TnMSTS8aAcsk3TGBgiwuvqL', interval: 'month', monthly_usd: 19, quota_bytes: 5e9 },\n 'price_1TnMSTS8aAcsk3TGWBVU2agY': { plan: 'pro', label: 'Pro', price_id: 'price_1TnMSTS8aAcsk3TGWBVU2agY', interval: 'year', monthly_usd: 19, quota_bytes: 5e9 },\n}\n\nexport const MEMORY_PLAN_QUOTA: Record<string, number> = { free: MEMORY_FREE_QUOTA_BYTES, pro: 5e9, team: 50e9 }\n\nexport const MEMORY_MARGIN_MULTIPLE = 3\nexport const MEMORY_FREE_COST_CAP_USD = 1.0\nexport const MEMORY_PRO_COST_BUDGET_USD = 19 / MEMORY_MARGIN_MULTIPLE\n\nexport interface SchedulingPlan {\n price_id: string\n label: string\n interval: 'month'\n monthly_usd: number\n quota_per_period: number\n}\n\nexport const SCHEDULING_PLANS: Record<string, SchedulingPlan> = {\n 'price_1ToXcHS8aAcsk3TGf3cW7zHx': { price_id: 'price_1ToXcHS8aAcsk3TGf3cW7zHx', label: 'Scheduled Actions', interval: 'month', monthly_usd: 10, quota_per_period: 1000 },\n}\n\nexport const LedgerOperation = {\n TOPUP: 'topup',\n SUBSCRIPTION: 'subscription',\n SIGNUP_GRANT: 'signup_grant',\n MONTHLY_REFRESH: 'monthly_free_refresh',\n PAA: 'paa',\n PAA_REFUND: 'paa_refund',\n SERP: 'serp',\n REFUND: 'refund',\n TRANSCRIPTION: 'transcription',\n TRANSCRIPTION_HOLD: 'transcription_hold',\n TRANSCRIPTION_REFUND: 'transcription_refund',\n YT_CHANNEL: 'yt_channel',\n FB_AD: 'fb_ad',\n MAPS_SEARCH: 'maps_search',\n MAPS_PLACE: 'maps_place',\n MAPS_REVIEW: 'maps_review',\n MAPS_REVIEW_REFUND: 'maps_review_refund',\n EXTRACT_SITE: 'extract_site',\n EXTRACT_SITE_REFUND: 'extract_site_refund',\n EXTRACT_URL: 'page_scrape',\n URL_MAP: 'url_map',\n EXTRACT_SITE_HOLD: 'extract_site_hold',\n YT_CHANNEL_REFUND: 'yt_channel_refund',\n FB_AD_REFUND: 'fb_ad_refund',\n URL_MAP_REFUND: 'url_map_refund',\n FB_SEARCH: 'fb_search',\n FB_TRANSCRIBE: 'fb_transcribe',\n FB_SEARCH_REFUND: 'fb_search_refund',\n FB_TRANSCRIBE_REFUND: 'fb_transcribe_refund',\n GOOGLE_ADS_SEARCH: 'google_ads_search',\n GOOGLE_ADS_SEARCH_REFUND: 'google_ads_search_refund',\n GOOGLE_ADS_INTEL: 'google_ads_intel',\n GOOGLE_ADS_INTEL_REFUND: 'google_ads_intel_refund',\n GOOGLE_ADS_TRANSCRIBE: 'google_ads_transcribe',\n GOOGLE_ADS_TRANSCRIBE_REFUND: 'google_ads_transcribe_refund',\n INSTAGRAM_PROFILE: 'instagram_profile',\n INSTAGRAM_PROFILE_REFUND: 'instagram_profile_refund',\n INSTAGRAM_MEDIA: 'instagram_media',\n INSTAGRAM_MEDIA_REFUND:'instagram_media_refund',\n INSTAGRAM_TRANSCRIBE: 'instagram_transcribe',\n INSTAGRAM_TRANSCRIBE_REFUND: 'instagram_transcribe_refund',\n BROWSER_SESSION: 'browser_session',\n REDDIT_THREAD: 'reddit_thread',\n REDDIT_THREAD_REFUND: 'reddit_thread_refund',\n REDDIT_COMMENT: 'reddit_comment',\n REDDIT_COMMENT_REFUND: 'reddit_comment_refund',\n VIDEO_ANALYSIS: 'video_analysis',\n VIDEO_ANALYSIS_REFUND: 'video_analysis_refund',\n VIDEO_ANALYSIS_ADJUST: 'video_analysis_adjust',\n VIDEO_ANALYSIS_LLM: 'video_analysis_llm',\n MEMORY_AI: 'memory_ai',\n MEMORY_AI_REFUND: 'memory_ai_refund',\n TRUSTPILOT_REVIEWS: 'trustpilot_reviews',\n TRUSTPILOT_REVIEWS_REFUND: 'trustpilot_reviews_refund',\n TRUSTPILOT_REVIEW: 'trustpilot_review',\n TRUSTPILOT_REVIEW_REFUND: 'trustpilot_review_refund',\n G2_REVIEWS: 'g2_reviews',\n G2_REVIEWS_REFUND: 'g2_reviews_refund',\n G2_REVIEW: 'g2_review',\n G2_REVIEW_REFUND: 'g2_review_refund',\n DIFF_PAGE: 'diff_page',\n DIFF_PAGE_REFUND: 'diff_page_refund',\n SITE_AUDIT_LLM: 'site_audit_llm',\n} as const\n\nexport type LedgerOperation = typeof LedgerOperation[keyof typeof LedgerOperation]\n\nexport const MEMORY_AI_MARGIN_MULTIPLE = 3\nexport const SITE_AUDIT_LLM_MARGIN_MULTIPLE = 1.5\nexport const VIDEO_ANALYSIS_LLM_MARGIN_MULTIPLE = 1.5\nexport const MEDIA_TRANSCRIBE_MARGIN_MULTIPLE = 3\nexport const MEDIA_TRANSCRIBE_HOLD_MC = MC_COSTS.fb_transcribe * 3\n\nexport const MC_PER_USD =\n SUBSCRIPTION_TIERS['price_1TmiHRS8aAcsk3TGwmSNfNIa'].credits_mc /\n SUBSCRIPTION_TIERS['price_1TmiHRS8aAcsk3TGwmSNfNIa'].monthly_usd\n"],"mappings":";AAAO,IAAM,WAAW;AAAA,EACtB,MAAmB;AAAA,EACnB,KAAmB;AAAA,EACnB,UAAiB;AAAA,EACjB,aAAmB;AAAA,EACnB,SAAmB;AAAA,EACnB,YAAmB;AAAA,EACnB,kBAAmB;AAAA,EACnB,OAAmB;AAAA,EACnB,aAAmB;AAAA,EACnB,YAAiB;AAAA,EACjB,aAAmB;AAAA,EACnB,WAAmB;AAAA,EACnB,eAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,kBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,mBAAmB;AAAA,EACnB,iBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB,gBAAgB;AAAA,EAChB,eAAiB;AAAA,EACjB,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|
6
6
|
} from "./chunk-M2S27J6Z.js";
|
|
@@ -127,4 +127,4 @@ export {
|
|
|
127
127
|
failExtractJob,
|
|
128
128
|
settleExtractJob
|
|
129
129
|
};
|
|
130
|
-
//# sourceMappingURL=chunk-
|
|
130
|
+
//# sourceMappingURL=chunk-BL7BBSYF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/version.ts"],"sourcesContent":["export const PACKAGE_VERSION = '0.6.0'\n"],"mappings":";AAAO,IAAM,kBAAkB;","names":[]}
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
registerSerpIntelligenceCaptureTools,
|
|
34
34
|
sanitizeAttempts,
|
|
35
35
|
sanitizeHarvestResult
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-3K5GT6VG.js";
|
|
37
37
|
import {
|
|
38
38
|
auditImages,
|
|
39
39
|
getBlobStore
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
RawMapsOverviewSchema,
|
|
68
68
|
RawMapsReviewStatsSchema
|
|
69
69
|
} from "./chunk-XGIPATLV.js";
|
|
70
|
-
import "./chunk-
|
|
70
|
+
import "./chunk-F2BXETDX.js";
|
|
71
71
|
import {
|
|
72
72
|
completeExtractJob,
|
|
73
73
|
countSuccessfulPages,
|
|
@@ -78,7 +78,7 @@ import {
|
|
|
78
78
|
saveExtractPages,
|
|
79
79
|
setExtractJobTotal,
|
|
80
80
|
settleExtractJob
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-BL7BBSYF.js";
|
|
82
82
|
import {
|
|
83
83
|
BROWSER_OPEN_MIN_BALANCE_MC,
|
|
84
84
|
CONCURRENCY_PRICE_ID,
|
|
@@ -101,7 +101,7 @@ import {
|
|
|
101
101
|
browserActiveCostMc,
|
|
102
102
|
concurrencySlotBillingInfo,
|
|
103
103
|
insufficientBalanceResponse
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-APJO2XV5.js";
|
|
105
105
|
import {
|
|
106
106
|
CaptchaError,
|
|
107
107
|
RECAPTCHA_INSTRUCTIONS,
|
|
@@ -12042,9 +12042,6 @@ async function memoryCall(toolName, args, userMemoryKey) {
|
|
|
12042
12042
|
return { ok: false, error: err?.message ?? "memory call failed" };
|
|
12043
12043
|
}
|
|
12044
12044
|
}
|
|
12045
|
-
function personalVault(user) {
|
|
12046
|
-
return `mcp-${user.id}`;
|
|
12047
|
-
}
|
|
12048
12045
|
function memoryIdentity(user) {
|
|
12049
12046
|
return user.email;
|
|
12050
12047
|
}
|
|
@@ -15437,7 +15434,7 @@ serpIntelligenceApp.post("/capture", async (c) => {
|
|
|
15437
15434
|
kernelApiKey: browserServiceApiKey(),
|
|
15438
15435
|
kernelProxyId: browserServiceProxyId(),
|
|
15439
15436
|
signal: c.req.raw.signal,
|
|
15440
|
-
billing: { creditsUsed: cost /
|
|
15437
|
+
billing: { creditsUsed: cost / MC_PER_CREDIT }
|
|
15441
15438
|
});
|
|
15442
15439
|
await logRequestEvent({
|
|
15443
15440
|
userId: user.id,
|
|
@@ -15592,6 +15589,15 @@ import { listSharedWithMeTool } from "mcpscraper-memory-tools/tools/vaults/list-
|
|
|
15592
15589
|
import { listVaultsTool } from "mcpscraper-memory-tools/tools/vaults/list-vaults";
|
|
15593
15590
|
import { videoAnalyzeStatusTool } from "mcpscraper-memory-tools/tools/video/status";
|
|
15594
15591
|
import { listWebhooksTool } from "mcpscraper-memory-tools/tools/webhooks/list-webhooks";
|
|
15592
|
+
import { getVaultContractTool } from "mcpscraper-memory-tools/tools/vaults/get-vault-contract";
|
|
15593
|
+
import { routeMemoryTool } from "mcpscraper-memory-tools/tools/vaults/route-memory";
|
|
15594
|
+
import { listTagsTool } from "mcpscraper-memory-tools/tools/tags/list-tags";
|
|
15595
|
+
import { resolveTagsTool } from "mcpscraper-memory-tools/tools/tags/resolve-tags";
|
|
15596
|
+
import { noteBacklinksTool } from "mcpscraper-memory-tools/tools/graph/memory-backlinks";
|
|
15597
|
+
import { graphUniverseTool } from "mcpscraper-memory-tools/tools/graph/memory-graph-universe";
|
|
15598
|
+
import { graphPathTool } from "mcpscraper-memory-tools/tools/graph/memory-graph-path";
|
|
15599
|
+
import { prepareMemoryWriteTool } from "mcpscraper-memory-tools/tools/capture/prepare-memory-write";
|
|
15600
|
+
import { validateMemoryWriteTool } from "mcpscraper-memory-tools/tools/capture/validate-memory-write";
|
|
15595
15601
|
var registered = false;
|
|
15596
15602
|
function registerReadCutovers() {
|
|
15597
15603
|
if (registered) return;
|
|
@@ -15684,6 +15690,42 @@ function registerReadCutovers() {
|
|
|
15684
15690
|
const result = await listWebhooksTool.execute({ ...input, apiKey }, {});
|
|
15685
15691
|
return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
|
|
15686
15692
|
});
|
|
15693
|
+
registerCutover("getVaultContractTool", async (input, apiKey) => {
|
|
15694
|
+
const result = await getVaultContractTool.execute({ ...input, apiKey }, {});
|
|
15695
|
+
return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
|
|
15696
|
+
});
|
|
15697
|
+
registerCutover("routeMemoryTool", async (input, apiKey) => {
|
|
15698
|
+
const result = await routeMemoryTool.execute({ ...input, apiKey }, {});
|
|
15699
|
+
return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
|
|
15700
|
+
});
|
|
15701
|
+
registerCutover("listTagsTool", async (input, apiKey) => {
|
|
15702
|
+
const result = await listTagsTool.execute({ ...input, apiKey }, {});
|
|
15703
|
+
return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
|
|
15704
|
+
});
|
|
15705
|
+
registerCutover("resolveTagsTool", async (input, apiKey) => {
|
|
15706
|
+
const result = await resolveTagsTool.execute({ ...input, apiKey }, {});
|
|
15707
|
+
return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
|
|
15708
|
+
});
|
|
15709
|
+
registerCutover("noteBacklinksTool", async (input, apiKey) => {
|
|
15710
|
+
const result = await noteBacklinksTool.execute({ ...input, apiKey }, {});
|
|
15711
|
+
return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
|
|
15712
|
+
});
|
|
15713
|
+
registerCutover("graphUniverseTool", async (input, apiKey) => {
|
|
15714
|
+
const result = await graphUniverseTool.execute({ ...input, apiKey }, {});
|
|
15715
|
+
return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
|
|
15716
|
+
});
|
|
15717
|
+
registerCutover("graphPathTool", async (input, apiKey) => {
|
|
15718
|
+
const result = await graphPathTool.execute({ ...input, apiKey }, {});
|
|
15719
|
+
return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
|
|
15720
|
+
});
|
|
15721
|
+
registerCutover("prepareMemoryWriteTool", async (input, apiKey) => {
|
|
15722
|
+
const result = await prepareMemoryWriteTool.execute({ ...input, apiKey }, {});
|
|
15723
|
+
return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
|
|
15724
|
+
});
|
|
15725
|
+
registerCutover("validateMemoryWriteTool", async (input, apiKey) => {
|
|
15726
|
+
const result = await validateMemoryWriteTool.execute({ ...input, apiKey }, {});
|
|
15727
|
+
return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
|
|
15728
|
+
});
|
|
15687
15729
|
}
|
|
15688
15730
|
|
|
15689
15731
|
// src/mcp/memory-cutover/writes.ts
|
|
@@ -15721,6 +15763,8 @@ import { dropTableTool } from "mcpscraper-memory-tools/tools/tables/table-drop";
|
|
|
15721
15763
|
import { insertTableRowsTool } from "mcpscraper-memory-tools/tools/tables/table-insert-rows";
|
|
15722
15764
|
import { addVaultTool } from "mcpscraper-memory-tools/tools/vaults/add-vault";
|
|
15723
15765
|
import { deleteVaultTool } from "mcpscraper-memory-tools/tools/vaults/delete-vault";
|
|
15766
|
+
import { memoryCaptureTool } from "mcpscraper-memory-tools/tools/capture/memory-capture";
|
|
15767
|
+
import { upsertTagTool } from "mcpscraper-memory-tools/tools/tags/upsert-tag";
|
|
15724
15768
|
var registered2 = false;
|
|
15725
15769
|
function registerWriteCutovers() {
|
|
15726
15770
|
if (registered2) return;
|
|
@@ -15861,6 +15905,14 @@ function registerWriteCutovers() {
|
|
|
15861
15905
|
const result = await deleteVaultTool.execute({ ...input, apiKey }, {});
|
|
15862
15906
|
return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
|
|
15863
15907
|
});
|
|
15908
|
+
registerCutover("memoryCaptureTool", async (input, apiKey) => {
|
|
15909
|
+
const result = await memoryCaptureTool.execute({ ...input, apiKey }, {});
|
|
15910
|
+
return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
|
|
15911
|
+
});
|
|
15912
|
+
registerCutover("upsertTagTool", async (input, apiKey) => {
|
|
15913
|
+
const result = await upsertTagTool.execute({ ...input, apiKey }, {});
|
|
15914
|
+
return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
|
|
15915
|
+
});
|
|
15864
15916
|
}
|
|
15865
15917
|
|
|
15866
15918
|
// src/mcp/memory-cutover/billing.ts
|
|
@@ -19988,7 +20040,7 @@ async function depositScrapeToVault(user, opts) {
|
|
|
19988
20040
|
const clipped = content.length > MAX_DEPOSIT_CHARS ? content.slice(0, MAX_DEPOSIT_CHARS) : content;
|
|
19989
20041
|
const { key, error } = await getOrCreateUserMemoryKey(user);
|
|
19990
20042
|
if (!key) return { deposited: false, error: error ?? "memory unavailable" };
|
|
19991
|
-
const vault = opts.vault?.trim() ||
|
|
20043
|
+
const vault = opts.vault?.trim() || "Library";
|
|
19992
20044
|
const title = (opts.title?.trim() || opts.source).slice(0, 200);
|
|
19993
20045
|
const res = await memoryCall(
|
|
19994
20046
|
"libraryIngestTool",
|
|
@@ -19996,7 +20048,7 @@ async function depositScrapeToVault(user, opts) {
|
|
|
19996
20048
|
key
|
|
19997
20049
|
);
|
|
19998
20050
|
if (!res.ok) return { deposited: false, vault, error: res.error ?? "ingest failed" };
|
|
19999
|
-
return { deposited: true, vault, noteId: res.noteId, path: res.path, chunks: res.
|
|
20051
|
+
return { deposited: true, vault, noteId: res.noteId, path: res.path, chunks: res.indexed };
|
|
20000
20052
|
} catch (err) {
|
|
20001
20053
|
return { deposited: false, error: err?.message ?? "deposit failed" };
|
|
20002
20054
|
}
|
|
@@ -20597,7 +20649,7 @@ app.get("/me", async (c) => {
|
|
|
20597
20649
|
api_key: user.key_active ? user.api_key : null,
|
|
20598
20650
|
created_at: user.created_at,
|
|
20599
20651
|
balance_mc: user.balance_mc,
|
|
20600
|
-
balance_credits: user.balance_mc /
|
|
20652
|
+
balance_credits: user.balance_mc / MC_PER_CREDIT,
|
|
20601
20653
|
extra_concurrency_slots: user.extra_concurrency_slots,
|
|
20602
20654
|
concurrency_limit: concurrencyLimitForUser(user),
|
|
20603
20655
|
has_concurrency_sub: !!user.concurrency_stripe_sub_id,
|
|
@@ -21759,7 +21811,7 @@ app.post("/billing/subscribe/terminal-checkout", auth2, async (c) => {
|
|
|
21759
21811
|
tier: tier.tier,
|
|
21760
21812
|
label: tier.label,
|
|
21761
21813
|
monthly_usd: tier.monthly_usd,
|
|
21762
|
-
credits_per_month: tier.credits_mc /
|
|
21814
|
+
credits_per_month: tier.credits_mc / MC_PER_CREDIT,
|
|
21763
21815
|
concurrency: tier.concurrency,
|
|
21764
21816
|
intro: tier.intro_coupon ? "$1 first month" : null,
|
|
21765
21817
|
next_step: "Open checkout_url in a browser to complete payment."
|
|
@@ -21789,7 +21841,7 @@ app.get("/billing/balance", auth2, async (c) => {
|
|
|
21789
21841
|
const freeCredits = await getFreeCreditBreakdown(user.id);
|
|
21790
21842
|
return c.json({
|
|
21791
21843
|
balance_mc: balanceMc,
|
|
21792
|
-
balance_credits: balanceMc /
|
|
21844
|
+
balance_credits: balanceMc / MC_PER_CREDIT,
|
|
21793
21845
|
free_credits: freeCredits,
|
|
21794
21846
|
ledger
|
|
21795
21847
|
});
|
|
@@ -21811,7 +21863,7 @@ app.post("/billing/credits", auth2, async (c) => {
|
|
|
21811
21863
|
})) : void 0;
|
|
21812
21864
|
return c.json({
|
|
21813
21865
|
balance_mc: balanceMc,
|
|
21814
|
-
balance_credits: balanceMc /
|
|
21866
|
+
balance_credits: balanceMc / MC_PER_CREDIT,
|
|
21815
21867
|
item: body.item ?? null,
|
|
21816
21868
|
matched_cost: matchedCost ? (({ aliases, ...cost }) => cost)(matchedCost) : null,
|
|
21817
21869
|
costs,
|
|
@@ -21829,7 +21881,7 @@ app.get("/cron/tick", async (c) => {
|
|
|
21829
21881
|
if (!process.env.CRON_SECRET || secret2 !== `Bearer ${process.env.CRON_SECRET}`) {
|
|
21830
21882
|
return c.json({ error: "Unauthorized" }, 401);
|
|
21831
21883
|
}
|
|
21832
|
-
const { drainQueue } = await import("./worker-
|
|
21884
|
+
const { drainQueue } = await import("./worker-KJZ3ZN2N.js");
|
|
21833
21885
|
const budget = { maxJobs: 10, deadlineMs: Date.now() + 28e4 };
|
|
21834
21886
|
const workflowDispatchResult = await dispatchDueWorkflowSchedules(`${new URL(c.req.url).protocol}//${new URL(c.req.url).host}`);
|
|
21835
21887
|
const [results, sweepResult, reapResult, expiredResult, blobCleanup] = await Promise.all([
|
|
@@ -21847,7 +21899,7 @@ app.post("/api/internal/extract-refinalize/:id", async (c) => {
|
|
|
21847
21899
|
return c.json({ error: "Unauthorized" }, 401);
|
|
21848
21900
|
}
|
|
21849
21901
|
const jobId = c.req.param("id");
|
|
21850
|
-
const { getExtractJob: getExtractJob2, completeExtractJob: completeExtractJob2 } = await import("./site-extract-repository-
|
|
21902
|
+
const { getExtractJob: getExtractJob2, completeExtractJob: completeExtractJob2 } = await import("./site-extract-repository-U476J44K.js");
|
|
21851
21903
|
const { assembleExtractArtifacts } = await import("./extract-bundle-COS56ZDO.js");
|
|
21852
21904
|
const job = await getExtractJob2(jobId);
|
|
21853
21905
|
if (!job) return c.json({ error: "job not found" }, 404);
|
|
@@ -21855,7 +21907,7 @@ app.post("/api/internal/extract-refinalize/:id", async (c) => {
|
|
|
21855
21907
|
await completeExtractJob2(jobId, stored);
|
|
21856
21908
|
let settlement = "already_settled_or_refunded";
|
|
21857
21909
|
if (job.billedMc == null && job.userId != null) {
|
|
21858
|
-
const { settleExtractJob: settleExtractJob2, countSuccessfulPages: countSuccessfulPages2 } = await import("./site-extract-repository-
|
|
21910
|
+
const { settleExtractJob: settleExtractJob2, countSuccessfulPages: countSuccessfulPages2 } = await import("./site-extract-repository-U476J44K.js");
|
|
21859
21911
|
const heldMc = Number(job.options.heldMc ?? 0);
|
|
21860
21912
|
const successful = await countSuccessfulPages2(jobId);
|
|
21861
21913
|
const usedMc = Math.min(successful * MC_COSTS.page_scrape, heldMc);
|
|
@@ -22019,4 +22071,4 @@ app.get("/blog/:slug/", (c) => {
|
|
|
22019
22071
|
export {
|
|
22020
22072
|
app
|
|
22021
22073
|
};
|
|
22022
|
-
//# sourceMappingURL=server-
|
|
22074
|
+
//# sourceMappingURL=server-WHM446IZ.js.map
|