mcp-scraper 0.21.2 → 0.21.4
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 +1 -1
- package/dist/bin/api-server.cjs +1061 -308
- package/dist/bin/api-server.cjs.map +1 -1
- package/dist/bin/api-server.js +3 -3
- 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 +101 -34
- package/dist/bin/mcp-stdio-server.cjs.map +1 -1
- package/dist/bin/mcp-stdio-server.js +5 -5
- package/dist/bin/paa-harvest.cjs +22 -0
- package/dist/bin/paa-harvest.cjs.map +1 -1
- package/dist/bin/paa-harvest.js +3 -3
- package/dist/{chunk-ZJDANZTQ.js → chunk-E5J4HJBO.js} +3 -2
- package/dist/chunk-E5J4HJBO.js.map +1 -0
- package/dist/{chunk-DZBGULWW.js → chunk-ICT7DDHL.js} +399 -3
- package/dist/chunk-ICT7DDHL.js.map +1 -0
- package/dist/{chunk-2FF4GBQ4.js → chunk-JHI373VB.js} +49 -7
- package/dist/chunk-JHI373VB.js.map +1 -0
- package/dist/{chunk-GMZFQRH2.js → chunk-MTSBI7ZH.js} +23 -6
- package/dist/chunk-MTSBI7ZH.js.map +1 -0
- package/dist/{chunk-ZNNYPE2U.js → chunk-N4JHXPW6.js} +89 -27
- package/dist/chunk-N4JHXPW6.js.map +1 -0
- package/dist/{chunk-X3NIXHHG.js → chunk-PNBYYAEK.js} +3 -3
- package/dist/{chunk-JBME5WJR.js → chunk-SDHPQTFM.js} +2 -2
- package/dist/chunk-WQI7JIIN.js +7 -0
- package/dist/chunk-WQI7JIIN.js.map +1 -0
- package/dist/{db-EONGTNJM.js → db-WRILVOFY.js} +6 -2
- package/dist/{extract-bundle-HMCYUVBJ.js → extract-bundle-NFFVMUMT.js} +2 -2
- package/dist/index.cjs +22 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/{server-CHTX6YQA.js → server-OLOOFN5W.js} +499 -271
- package/dist/server-OLOOFN5W.js.map +1 -0
- package/dist/{site-extract-repository-5V5EEQ72.js → site-extract-repository-2QQSL2QC.js} +4 -4
- package/dist/{worker-GE5JMHE6.js → worker-RV2TYXE3.js} +15 -8
- package/dist/worker-RV2TYXE3.js.map +1 -0
- package/docs/mcp-tool-manifest.generated.json +90 -11
- package/docs/specs/oauth-mcp-spec.md +2 -2
- package/package.json +1 -1
- package/dist/chunk-2FF4GBQ4.js.map +0 -1
- package/dist/chunk-DZBGULWW.js.map +0 -1
- package/dist/chunk-GMZFQRH2.js.map +0 -1
- package/dist/chunk-NBF4F4UT.js +0 -7
- package/dist/chunk-NBF4F4UT.js.map +0 -1
- package/dist/chunk-ZJDANZTQ.js.map +0 -1
- package/dist/chunk-ZNNYPE2U.js.map +0 -1
- package/dist/server-CHTX6YQA.js.map +0 -1
- package/dist/worker-GE5JMHE6.js.map +0 -1
- /package/dist/{chunk-X3NIXHHG.js.map → chunk-PNBYYAEK.js.map} +0 -0
- /package/dist/{chunk-JBME5WJR.js.map → chunk-SDHPQTFM.js.map} +0 -0
- /package/dist/{db-EONGTNJM.js.map → db-WRILVOFY.js.map} +0 -0
- /package/dist/{extract-bundle-HMCYUVBJ.js.map → extract-bundle-NFFVMUMT.js.map} +0 -0
- /package/dist/{site-extract-repository-5V5EEQ72.js.map → site-extract-repository-2QQSL2QC.js.map} +0 -0
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
saveExtractPages,
|
|
11
11
|
setExtractJobTotal,
|
|
12
12
|
settleExtractJob
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-PNBYYAEK.js";
|
|
14
|
+
import "./chunk-JHI373VB.js";
|
|
15
15
|
import "./chunk-M2S27J6Z.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-ICT7DDHL.js";
|
|
17
17
|
export {
|
|
18
18
|
completeExtractJob,
|
|
19
19
|
countSuccessfulPages,
|
|
@@ -27,4 +27,4 @@ export {
|
|
|
27
27
|
setExtractJobTotal,
|
|
28
28
|
settleExtractJob
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=site-extract-repository-
|
|
30
|
+
//# sourceMappingURL=site-extract-repository-2QQSL2QC.js.map
|
|
@@ -3,19 +3,20 @@ import {
|
|
|
3
3
|
createHarvestAttemptRecorder,
|
|
4
4
|
harvestProblemResponse,
|
|
5
5
|
serializeHarvestProblem
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SDHPQTFM.js";
|
|
7
7
|
import {
|
|
8
8
|
harvest
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-E5J4HJBO.js";
|
|
10
10
|
import {
|
|
11
11
|
browserServiceApiKey,
|
|
12
12
|
runWithCostContext
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MTSBI7ZH.js";
|
|
14
14
|
import "./chunk-K443GQY5.js";
|
|
15
15
|
import "./chunk-XGIPATLV.js";
|
|
16
16
|
import {
|
|
17
|
-
MC_COSTS
|
|
18
|
-
|
|
17
|
+
MC_COSTS,
|
|
18
|
+
serpActualCostMc
|
|
19
|
+
} from "./chunk-JHI373VB.js";
|
|
19
20
|
import "./chunk-M2S27J6Z.js";
|
|
20
21
|
import {
|
|
21
22
|
claimPendingJob,
|
|
@@ -24,7 +25,7 @@ import {
|
|
|
24
25
|
debitMc,
|
|
25
26
|
failJob,
|
|
26
27
|
listHarvestAttempts
|
|
27
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-ICT7DDHL.js";
|
|
28
29
|
|
|
29
30
|
// src/api/webhook.ts
|
|
30
31
|
async function deliverWebhook(url, payload, retries = 3) {
|
|
@@ -62,8 +63,9 @@ async function processJob(job) {
|
|
|
62
63
|
running++;
|
|
63
64
|
try {
|
|
64
65
|
const opts = typeof job.options === "string" ? JSON.parse(job.options) : job.options;
|
|
66
|
+
const headlessSentOut = { value: null };
|
|
65
67
|
const result = await runWithCostContext(
|
|
66
|
-
{ op: opts.serpOnly ? "serp" : "paa", userId: Number(job.user_id) },
|
|
68
|
+
{ op: opts.serpOnly ? "serp" : "paa", userId: Number(job.user_id), headlessSentOut },
|
|
67
69
|
() => harvest({
|
|
68
70
|
...opts,
|
|
69
71
|
kernelApiKey: browserServiceApiKey(),
|
|
@@ -80,6 +82,11 @@ async function processJob(job) {
|
|
|
80
82
|
const diff = opts.billingHoldMc - actualCost;
|
|
81
83
|
if (diff > 0) await creditMc(job.user_id, diff, "paa_refund", "overestimate refund");
|
|
82
84
|
else if (diff < 0) await debitMc(job.user_id, -diff, "paa", opts.query ?? job.query);
|
|
85
|
+
} else if (opts.serpOnly && typeof opts.billingHoldMc === "number") {
|
|
86
|
+
const actualCost = serpActualCostMc(headlessSentOut.value);
|
|
87
|
+
const diff = opts.billingHoldMc - actualCost;
|
|
88
|
+
if (diff > 0) await creditMc(job.user_id, diff, "serp_refund", "headless-mode pricing settle");
|
|
89
|
+
else if (diff < 0) await debitMc(job.user_id, -diff, "serp", opts.query ?? job.query);
|
|
83
90
|
}
|
|
84
91
|
if (job.callback_url) {
|
|
85
92
|
await deliverWebhook(job.callback_url, { job_id: job.id, status: "done", result, attempts });
|
|
@@ -132,4 +139,4 @@ export {
|
|
|
132
139
|
startWorker,
|
|
133
140
|
tickOnce
|
|
134
141
|
};
|
|
135
|
-
//# sourceMappingURL=worker-
|
|
142
|
+
//# sourceMappingURL=worker-RV2TYXE3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/api/webhook.ts","../src/api/worker.ts"],"sourcesContent":["export async function deliverWebhook(url: string, payload: object, retries = 3): Promise<void> {\n for (let attempt = 1; attempt <= retries; attempt++) {\n try {\n const res = await fetch(url, {\n method: 'POST',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify(payload),\n signal: AbortSignal.timeout(10_000),\n })\n if (res.ok) return\n console.warn(`[webhook] attempt ${attempt} → ${res.status} from ${url}`)\n } catch (err) {\n console.warn(`[webhook] attempt ${attempt} failed:`, err instanceof Error ? err.message : err)\n }\n if (attempt < retries) await new Promise((r) => setTimeout(r, 1000 * attempt * 2))\n }\n console.error(`[webhook] gave up after ${retries} attempts for ${url}`)\n}\n","import { claimPendingJob, completeJob, failJob, creditMc, debitMc, listHarvestAttempts } from './db.js'\nimport { browserServiceApiKey } from '../lib/browser-service-env.js'\nimport { harvest } from '../harvest.js'\nimport { deliverWebhook } from './webhook.js'\nimport type { HarvestOptions } from '../types.js'\nimport { MC_COSTS, serpActualCostMc } from './rates.js'\nimport { classifyHarvestProblem, harvestProblemResponse, serializeHarvestProblem } from './harvest-problems.js'\nimport { createHarvestAttemptRecorder } from './harvest-attempt-events.js'\nimport { runWithCostContext } from './cost-context.js'\n\nexport type TickResult = {\n claimed: boolean\n jobId?: string\n completed?: boolean\n durationMs?: number\n}\nexport type DrainBudget = {\n maxJobs: number\n deadlineMs: number\n}\n\nconst MAX_CONCURRENT = 2\nlet running = 0\n\nfunction countPaaQuestions(result: unknown): number {\n if (!result || typeof result !== 'object') return 0\n const value = result as { totalQuestions?: unknown; flat?: unknown }\n if (typeof value.totalQuestions === 'number') return value.totalQuestions\n return Array.isArray(value.flat) ? value.flat.length : 0\n}\n\nfunction paaCostForQuestionCount(questionCount: number): number {\n return MC_COSTS.paa_base + Math.max(1, questionCount) * MC_COSTS.paa\n}\n\nasync function processJob(job: Awaited<ReturnType<typeof claimPendingJob>> & object) {\n running++\n try {\n const opts = typeof job.options === 'string' ? JSON.parse(job.options) as Partial<HarvestOptions> & { billingHoldMc?: number } : job.options as Partial<HarvestOptions> & { billingHoldMc?: number }\n const headlessSentOut: { value: boolean | null } = { value: null }\n const result = await runWithCostContext(\n { op: opts.serpOnly ? 'serp' : 'paa', userId: Number(job.user_id), headlessSentOut },\n () => harvest({\n ...opts,\n kernelApiKey: browserServiceApiKey(),\n headless: true,\n format: 'json',\n outputDir: '/tmp/paa-output-api',\n onAttemptEvent: createHarvestAttemptRecorder(job.id, job.user_id),\n }),\n )\n await completeJob(job.id, result)\n const attempts = await listHarvestAttempts(job.id, job.user_id)\n if (!opts.serpOnly && typeof opts.billingHoldMc === 'number') {\n const actualCost = paaCostForQuestionCount(countPaaQuestions(result))\n const diff = opts.billingHoldMc - actualCost\n if (diff > 0) await creditMc(job.user_id, diff, 'paa_refund', 'overestimate refund')\n else if (diff < 0) await debitMc(job.user_id, -diff, 'paa', opts.query ?? job.query)\n } else if (opts.serpOnly && typeof opts.billingHoldMc === 'number') {\n const actualCost = serpActualCostMc(headlessSentOut.value)\n const diff = opts.billingHoldMc - actualCost\n if (diff > 0) await creditMc(job.user_id, diff, 'serp_refund', 'headless-mode pricing settle')\n else if (diff < 0) await debitMc(job.user_id, -diff, 'serp', opts.query ?? job.query)\n }\n if (job.callback_url) {\n await deliverWebhook(job.callback_url, { job_id: job.id, status: 'done', result, attempts })\n }\n } catch (err) {\n const problem = classifyHarvestProblem(err)\n await failJob(job.id, serializeHarvestProblem(problem))\n const attempts = await listHarvestAttempts(job.id, job.user_id)\n try {\n const opts = typeof job.options === 'string' ? JSON.parse(job.options) as { billingHoldMc?: number } : job.options as { billingHoldMc?: number }\n if (typeof opts.billingHoldMc === 'number' && opts.billingHoldMc > 0) {\n await creditMc(job.user_id, opts.billingHoldMc, 'refund', 'failed call')\n }\n } catch {}\n if (job.callback_url) {\n await deliverWebhook(job.callback_url, { job_id: job.id, status: 'failed', ...harvestProblemResponse(problem), attempts })\n }\n } finally {\n running--\n }\n}\n\nexport async function tickOnce(): Promise<TickResult> {\n const job = await claimPendingJob()\n if (!job) return { claimed: false }\n const startedAt = Date.now()\n await processJob(job as NonNullable<typeof job>)\n return { claimed: true, jobId: (job as { id: string }).id, completed: true, durationMs: Date.now() - startedAt }\n}\n\nexport async function drainQueue(budget: DrainBudget): Promise<TickResult[]> {\n const results: TickResult[] = []\n for (let i = 0; i < budget.maxJobs; i++) {\n if (Date.now() >= budget.deadlineMs) break\n const r = await tickOnce()\n results.push(r)\n if (!r.claimed) break\n }\n return results\n}\n\nexport function startWorker(): void {\n setInterval(async () => {\n if (running >= MAX_CONCURRENT) return\n const job = await claimPendingJob()\n if (job) void processJob(job as NonNullable<typeof job>)\n }, 2000)\n console.log(`[worker] started — polling every 2s, max ${MAX_CONCURRENT} concurrent`)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,eAAsB,eAAe,KAAa,SAAiB,UAAU,GAAkB;AAC7F,WAAS,UAAU,GAAG,WAAW,SAAS,WAAW;AACnD,QAAI;AACF,YAAM,MAAM,MAAM,MAAM,KAAK;AAAA,QAC3B,QAAQ;AAAA,QACR,SAAS,EAAE,gBAAgB,mBAAmB;AAAA,QAC9C,MAAM,KAAK,UAAU,OAAO;AAAA,QAC5B,QAAQ,YAAY,QAAQ,GAAM;AAAA,MACpC,CAAC;AACD,UAAI,IAAI,GAAI;AACZ,cAAQ,KAAK,qBAAqB,OAAO,WAAM,IAAI,MAAM,SAAS,GAAG,EAAE;AAAA,IACzE,SAAS,KAAK;AACZ,cAAQ,KAAK,qBAAqB,OAAO,YAAY,eAAe,QAAQ,IAAI,UAAU,GAAG;AAAA,IAC/F;AACA,QAAI,UAAU,QAAS,OAAM,IAAI,QAAQ,CAAC,MAAM,WAAW,GAAG,MAAO,UAAU,CAAC,CAAC;AAAA,EACnF;AACA,UAAQ,MAAM,2BAA2B,OAAO,iBAAiB,GAAG,EAAE;AACxE;;;ACIA,IAAM,iBAAiB;AACvB,IAAI,UAAU;AAEd,SAAS,kBAAkB,QAAyB;AAClD,MAAI,CAAC,UAAU,OAAO,WAAW,SAAU,QAAO;AAClD,QAAM,QAAQ;AACd,MAAI,OAAO,MAAM,mBAAmB,SAAU,QAAO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UAAM,IAAI,MAAM,SAAS;AACzB,YAAQ,KAAK,CAAC;AACd,QAAI,CAAC,EAAE,QAAS;AAAA,EAClB;AACA,SAAO;AACT;AAEO,SAAS,cAAoB;AAClC,cAAY,YAAY;AACtB,QAAI,WAAW,eAAgB;AAC/B,UAAM,MAAM,MAAM,gBAAgB;AAClC,QAAI,IAAK,MAAK,WAAW,GAA8B;AAAA,EACzD,GAAG,GAAI;AACP,UAAQ,IAAI,iDAA4C,cAAc,aAAa;AACrF;","names":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-07-
|
|
2
|
+
"generatedAt": "2026-07-14T23:07:56.595Z",
|
|
3
3
|
"generatedFrom": "dist/bin/mcp-stdio-server.js",
|
|
4
4
|
"serverInfo": {
|
|
5
5
|
"name": "mcp-scraper",
|
|
6
|
-
"version": "0.21.
|
|
6
|
+
"version": "0.21.4"
|
|
7
7
|
},
|
|
8
8
|
"counts": {
|
|
9
9
|
"unified_stdio": 159
|
|
@@ -4264,7 +4264,7 @@
|
|
|
4264
4264
|
{
|
|
4265
4265
|
"name": "capture_serp_page_snapshots",
|
|
4266
4266
|
"title": "SERP Intelligence Page Snapshots",
|
|
4267
|
-
"description": "Capture public ranking pages as SERP Intelligence page snapshots — persistent page evidence linked to a captured SERP. Provide urls
|
|
4267
|
+
"description": "Capture public ranking pages as SERP Intelligence page snapshots — persistent page evidence linked to a captured SERP. Provide exactly one of urls or targets; use targets to preserve source metadata. Private IPs, localhost, file, and internal URLs are rejected. Costs 1 Credit per attempted URL.",
|
|
4268
4268
|
"inputSchema": {
|
|
4269
4269
|
"type": "object",
|
|
4270
4270
|
"properties": {
|
|
@@ -4276,7 +4276,7 @@
|
|
|
4276
4276
|
},
|
|
4277
4277
|
"minItems": 1,
|
|
4278
4278
|
"maxItems": 25,
|
|
4279
|
-
"description": "Public HTTP/HTTPS URLs to capture. Do not pass localhost, private IPs, file URLs, or internal admin URLs."
|
|
4279
|
+
"description": "Public HTTP/HTTPS URLs to capture. Provide exactly one of urls or targets. Do not pass localhost, private IPs, file URLs, or internal admin URLs."
|
|
4280
4280
|
},
|
|
4281
4281
|
"targets": {
|
|
4282
4282
|
"type": "array",
|
|
@@ -4313,7 +4313,7 @@
|
|
|
4313
4313
|
},
|
|
4314
4314
|
"minItems": 1,
|
|
4315
4315
|
"maxItems": 25,
|
|
4316
|
-
"description": "Structured targets.
|
|
4316
|
+
"description": "Structured targets. Provide exactly one of targets or urls; use targets when source kind or position should be preserved."
|
|
4317
4317
|
},
|
|
4318
4318
|
"maxConcurrency": {
|
|
4319
4319
|
"type": "integer",
|
|
@@ -4335,9 +4335,6 @@
|
|
|
4335
4335
|
"description": "Include sanitized browser/proxy diagnostics."
|
|
4336
4336
|
}
|
|
4337
4337
|
},
|
|
4338
|
-
"required": [
|
|
4339
|
-
"urls"
|
|
4340
|
-
],
|
|
4341
4338
|
"additionalProperties": false,
|
|
4342
4339
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
4343
4340
|
},
|
|
@@ -4355,10 +4352,18 @@
|
|
|
4355
4352
|
"type": "integer",
|
|
4356
4353
|
"minimum": 0
|
|
4357
4354
|
},
|
|
4355
|
+
"capturedCount": {
|
|
4356
|
+
"type": "integer",
|
|
4357
|
+
"minimum": 0
|
|
4358
|
+
},
|
|
4358
4359
|
"failedCount": {
|
|
4359
4360
|
"type": "integer",
|
|
4360
4361
|
"minimum": 0
|
|
4361
4362
|
},
|
|
4363
|
+
"skippedCount": {
|
|
4364
|
+
"type": "integer",
|
|
4365
|
+
"minimum": 0
|
|
4366
|
+
},
|
|
4362
4367
|
"captures": {
|
|
4363
4368
|
"type": "array",
|
|
4364
4369
|
"items": {
|
|
@@ -4366,6 +4371,13 @@
|
|
|
4366
4371
|
"additionalProperties": {}
|
|
4367
4372
|
}
|
|
4368
4373
|
},
|
|
4374
|
+
"attempts": {
|
|
4375
|
+
"type": "array",
|
|
4376
|
+
"items": {
|
|
4377
|
+
"type": "object",
|
|
4378
|
+
"additionalProperties": {}
|
|
4379
|
+
}
|
|
4380
|
+
},
|
|
4369
4381
|
"resolvedInputs": {
|
|
4370
4382
|
"type": "object",
|
|
4371
4383
|
"additionalProperties": {}
|
|
@@ -4390,8 +4402,11 @@
|
|
|
4390
4402
|
"schemaVersion",
|
|
4391
4403
|
"status",
|
|
4392
4404
|
"count",
|
|
4405
|
+
"capturedCount",
|
|
4393
4406
|
"failedCount",
|
|
4407
|
+
"skippedCount",
|
|
4394
4408
|
"captures",
|
|
4409
|
+
"attempts",
|
|
4395
4410
|
"resolvedInputs",
|
|
4396
4411
|
"diagnostics",
|
|
4397
4412
|
"providerPayload"
|
|
@@ -4413,7 +4428,7 @@
|
|
|
4413
4428
|
{
|
|
4414
4429
|
"name": "capture_serp_snapshot",
|
|
4415
4430
|
"title": "SERP Intelligence Snapshot",
|
|
4416
|
-
"description": "Capture a structured SERP Intelligence snapshot of a Google query — the persistent evidence format used by rank-tracking and comparison pipelines. Split query from location; leave proxyMode unset.",
|
|
4431
|
+
"description": "Capture a structured SERP Intelligence snapshot of a Google query — the persistent evidence format used by rank-tracking and comparison pipelines. Split query from location; leave proxyMode unset. Costs 4 Credits when headless or 14 if anti-bot escalation requires headful mode; the 14-Credit hold is settled to the mode used. Optional page snapshots add 1 Credit per attempted URL.",
|
|
4417
4432
|
"inputSchema": {
|
|
4418
4433
|
"type": "object",
|
|
4419
4434
|
"properties": {
|
|
@@ -4477,14 +4492,14 @@
|
|
|
4477
4492
|
"includePageSnapshots": {
|
|
4478
4493
|
"type": "boolean",
|
|
4479
4494
|
"default": false,
|
|
4480
|
-
"description": "Also capture ranking-page snapshots for selected SERP URLs."
|
|
4495
|
+
"description": "Also capture ranking-page snapshots for selected SERP URLs. Each attempted snapshot adds 1 Credit."
|
|
4481
4496
|
},
|
|
4482
4497
|
"pageSnapshotLimit": {
|
|
4483
4498
|
"type": "integer",
|
|
4484
4499
|
"minimum": 0,
|
|
4485
4500
|
"maximum": 10,
|
|
4486
4501
|
"default": 0,
|
|
4487
|
-
"description": "Maximum ranking-page snapshots when includePageSnapshots is true."
|
|
4502
|
+
"description": "Maximum ranking-page snapshots when includePageSnapshots is true. This capacity is held up front and unused capacity is refunded."
|
|
4488
4503
|
}
|
|
4489
4504
|
},
|
|
4490
4505
|
"required": [
|
|
@@ -4526,6 +4541,22 @@
|
|
|
4526
4541
|
}
|
|
4527
4542
|
]
|
|
4528
4543
|
},
|
|
4544
|
+
"organicResultCount": {
|
|
4545
|
+
"type": "integer",
|
|
4546
|
+
"minimum": 0
|
|
4547
|
+
},
|
|
4548
|
+
"localPackResultCount": {
|
|
4549
|
+
"type": "integer",
|
|
4550
|
+
"minimum": 0
|
|
4551
|
+
},
|
|
4552
|
+
"pageSnapshotCount": {
|
|
4553
|
+
"type": "integer",
|
|
4554
|
+
"minimum": 0
|
|
4555
|
+
},
|
|
4556
|
+
"pageSnapshotFailedCount": {
|
|
4557
|
+
"type": "integer",
|
|
4558
|
+
"minimum": 0
|
|
4559
|
+
},
|
|
4529
4560
|
"snapshotId": {
|
|
4530
4561
|
"$ref": "#/properties/query"
|
|
4531
4562
|
},
|
|
@@ -4540,6 +4571,48 @@
|
|
|
4540
4571
|
"additionalProperties": {}
|
|
4541
4572
|
}
|
|
4542
4573
|
},
|
|
4574
|
+
"attempts": {
|
|
4575
|
+
"type": "array",
|
|
4576
|
+
"items": {
|
|
4577
|
+
"type": "object",
|
|
4578
|
+
"additionalProperties": {}
|
|
4579
|
+
}
|
|
4580
|
+
},
|
|
4581
|
+
"billing": {
|
|
4582
|
+
"anyOf": [
|
|
4583
|
+
{
|
|
4584
|
+
"type": "object",
|
|
4585
|
+
"properties": {
|
|
4586
|
+
"creditsUsed": {
|
|
4587
|
+
"anyOf": [
|
|
4588
|
+
{
|
|
4589
|
+
"type": "number",
|
|
4590
|
+
"minimum": 0
|
|
4591
|
+
},
|
|
4592
|
+
{
|
|
4593
|
+
"type": "null"
|
|
4594
|
+
}
|
|
4595
|
+
]
|
|
4596
|
+
},
|
|
4597
|
+
"requestId": {
|
|
4598
|
+
"$ref": "#/properties/query"
|
|
4599
|
+
},
|
|
4600
|
+
"jobId": {
|
|
4601
|
+
"$ref": "#/properties/query"
|
|
4602
|
+
}
|
|
4603
|
+
},
|
|
4604
|
+
"required": [
|
|
4605
|
+
"creditsUsed",
|
|
4606
|
+
"requestId",
|
|
4607
|
+
"jobId"
|
|
4608
|
+
],
|
|
4609
|
+
"additionalProperties": false
|
|
4610
|
+
},
|
|
4611
|
+
{
|
|
4612
|
+
"type": "null"
|
|
4613
|
+
}
|
|
4614
|
+
]
|
|
4615
|
+
},
|
|
4543
4616
|
"diagnostics": {
|
|
4544
4617
|
"anyOf": [
|
|
4545
4618
|
{
|
|
@@ -4563,9 +4636,15 @@
|
|
|
4563
4636
|
"location",
|
|
4564
4637
|
"capturedAt",
|
|
4565
4638
|
"resultCount",
|
|
4639
|
+
"organicResultCount",
|
|
4640
|
+
"localPackResultCount",
|
|
4641
|
+
"pageSnapshotCount",
|
|
4642
|
+
"pageSnapshotFailedCount",
|
|
4566
4643
|
"snapshotId",
|
|
4567
4644
|
"resolvedInputs",
|
|
4568
4645
|
"artifacts",
|
|
4646
|
+
"attempts",
|
|
4647
|
+
"billing",
|
|
4569
4648
|
"diagnostics",
|
|
4570
4649
|
"providerPayload"
|
|
4571
4650
|
],
|
|
@@ -77,7 +77,7 @@ export async function resolveOAuthUser(identity: OAuthIdentity): Promise<User |
|
|
|
77
77
|
Resolution order (each step returns on hit):
|
|
78
78
|
1. `getUserByOauthSubject(identity.subject)` — fast path.
|
|
79
79
|
2. If `identity.email`: `getUserByEmail(email)` → if found, `linkOauthSubject(user.id, identity.subject)` and return (links existing dashboard accounts to their Google identity by verified email — WorkOS only emits verified emails).
|
|
80
|
-
3. Auto-provision: `createUser({ email, name: null })` (existing helper; generates `api_key`), then `
|
|
80
|
+
3. Auto-provision: `createUser({ email, name: null })` (existing helper; generates `api_key`), then `linkOauthSubject`. Signup grants are retired; OAuth and dashboard accounts both choose a paid plan before metered tool use.
|
|
81
81
|
4. No email claim and no subject match → return `null` (401; we never create anonymous accounts).
|
|
82
82
|
|
|
83
83
|
## 4. DB changes — `src/api/db.ts`
|
|
@@ -178,7 +178,7 @@ Self-mint tokens with `jose.generateKeyPair('RS256')` + a local JWKS served via
|
|
|
178
178
|
|
|
179
179
|
### `tests/unit/oauth-resolve-user.test.ts`
|
|
180
180
|
|
|
181
|
-
Mock the db helpers. Cases: subject fast-path; email-link path (asserts `linkOauthSubject` called once); auto-provision path (asserts `createUser` + `
|
|
181
|
+
Mock the db helpers. Cases: subject fast-path; email-link path (asserts `linkOauthSubject` called once); auto-provision path (asserts `createUser` + `linkOauthSubject` and no credit grant); no-email no-match → null.
|
|
182
182
|
|
|
183
183
|
### `tests/unit/oauth-metadata.test.ts`
|
|
184
184
|
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/api/rates.ts"],"sourcesContent":["export const MC_COSTS = {\n serp: 100,\n paa: 300,\n paa_base: 5_500,\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\n// Billing conversion is intentionally explicit rather than derived from a\n// Stripe plan. Plan grant changes must not silently reprice vendor-backed work.\nexport const BILLING_MC_PER_USD_NUMERATOR = 2_000_000\nexport const BILLING_MC_PER_USD_DENOMINATOR = 3\nexport const BILLING_BASIS_POINTS = 10_000\nexport const USD_NANOS = 1_000_000_000\n\nexport const SCHEDULED_RUN_BASE_CREDITS = 75\nexport const SCHEDULED_RUN_BASE_MC = SCHEDULED_RUN_BASE_CREDITS * MC_PER_CREDIT\nexport const SCHEDULED_AGENT_LLM_MARKUP_BPS = 15_000\nexport const SCHEDULED_AGENT_LLM_MARKUP = SCHEDULED_AGENT_LLM_MARKUP_BPS / BILLING_BASIS_POINTS\nexport const SCHEDULED_RUN_DEFAULT_MAX_CREDITS = 5_000\n\nexport function vendorCostUsdToMc(costUsd: number, markupBps: number): number {\n if (!Number.isFinite(costUsd) || costUsd < 0) throw new Error('costUsd must be a finite non-negative number')\n if (!Number.isInteger(markupBps) || markupBps < 0) throw new Error('markupBps must be a non-negative integer')\n\n const rawCostNanos = BigInt(Math.round(costUsd * USD_NANOS))\n const numerator =\n rawCostNanos *\n BigInt(markupBps) *\n BigInt(BILLING_MC_PER_USD_NUMERATOR)\n const denominator =\n BigInt(USD_NANOS) *\n BigInt(BILLING_BASIS_POINTS) *\n BigInt(BILLING_MC_PER_USD_DENOMINATOR)\n const mc = numerator === 0n ? 0n : (numerator + denominator - 1n) / denominator\n if (mc > BigInt(Number.MAX_SAFE_INTEGER)) throw new Error('calculated mc exceeds the safe integer range')\n return Number(mc)\n}\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 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 SCHEDULED_RUN: 'scheduled_run',\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,gBAAmB;AAAA,EACnB,gBAAgB;AAAA,EAChB,oBAAoB;AAAA,EACpB,mBAAoB;AAAA,EACpB,YAAqB;AAAA,EACrB,WAAqB;AAAA,EACrB,WAAqB;AACvB;AAIO,IAAM,oBAAoB,SAAS,iBAAiB;AAEpD,SAAS,oBAAoB,UAA0B;AAC5D,SAAO,KAAK,MAAM,WAAW,iBAAiB;AAChD;AAEO,IAAM,8BAA8B;AAEpC,IAAM,gBAAgB;AAItB,IAAM,+BAA+B;AACrC,IAAM,iCAAiC;AACvC,IAAM,uBAAuB;AAC7B,IAAM,YAAY;AAElB,IAAM,6BAA6B;AACnC,IAAM,wBAAwB,6BAA6B;AAC3D,IAAM,iCAAiC;AACvC,IAAM,6B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