mcp-scraper 0.97.0 → 0.98.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/CHANGELOG.md +5 -2425
- package/README.md +16 -412
- package/dist/bin/api-server.js +3 -2
- package/dist/bin/mcp-scraper-cli.js +33 -27
- package/dist/bin/mcp-scraper-core.js +9 -1
- package/dist/bin/mcp-scraper-install.js +17 -2
- package/dist/bin/mcp-stdio-server.js +9 -1
- package/dist/bin/paa-harvest.js +8 -1
- package/dist/index.cjs +5 -21830
- package/dist/index.d.ts +14 -607
- package/dist/index.js +5 -39
- package/dist/transport.d.ts +35 -0
- package/package.json +11 -51
- package/THIRD_PARTY_NOTICES.html +0 -203
- package/dist/actions-NCZNPYEY.js +0 -1
- package/dist/artifacts-4ZDNP2JW.js +0 -1
- package/dist/artifacts-N62OPIT5.js +0 -1
- package/dist/artifacts-PSADD5OC.js +0 -1
- package/dist/artifacts-RUR3OHAK.js +0 -1
- package/dist/blob-store-GIH26EDO.js +0 -1
- package/dist/bundle-XR6XKYJM.js +0 -1
- package/dist/chunk-24YDQ3EO.js +0 -5
- package/dist/chunk-3F7AFM53.js +0 -1
- package/dist/chunk-4HZXATHB.js +0 -27
- package/dist/chunk-4P3LZNVA.js +0 -954
- package/dist/chunk-4ZVO6GX4.js +0 -1
- package/dist/chunk-55ZANTHL.js +0 -3
- package/dist/chunk-63VWBMYR.js +0 -3
- package/dist/chunk-6FAMBNHY.js +0 -1
- package/dist/chunk-6N5EC7ZO.js +0 -1
- package/dist/chunk-7POHNTVW.js +0 -1
- package/dist/chunk-7SR7MEU5.js +0 -62
- package/dist/chunk-A4UASMEQ.js +0 -1
- package/dist/chunk-AMYPXA2F.js +0 -930
- package/dist/chunk-ANQ4JJVI.js +0 -71
- package/dist/chunk-B3JRL45T.js +0 -1
- package/dist/chunk-B4ZKPLSP.js +0 -1
- package/dist/chunk-B5Y26E3A.js +0 -1
- package/dist/chunk-C7MGJUTU.js +0 -1
- package/dist/chunk-CNSVZTTT.js +0 -13
- package/dist/chunk-EYGA6LOU.js +0 -1
- package/dist/chunk-GLCR4KJI.js +0 -21722
- package/dist/chunk-HCK6PLM3.js +0 -3
- package/dist/chunk-HNNYXMSI.js +0 -1
- package/dist/chunk-IFPION5D.js +0 -121
- package/dist/chunk-JMZIDHYQ.js +0 -2
- package/dist/chunk-JNPM3U3L.js +0 -189
- package/dist/chunk-K3VDGJNK.js +0 -1
- package/dist/chunk-KJQXUZ4Y.js +0 -4
- package/dist/chunk-KXJCGV3H.js +0 -1
- package/dist/chunk-M5QHXNFZ.js +0 -10
- package/dist/chunk-MVMWPKRC.js +0 -2
- package/dist/chunk-NALXKTUU.js +0 -1
- package/dist/chunk-ND4WIBXT.js +0 -16
- package/dist/chunk-NNOX3FYG.js +0 -198
- package/dist/chunk-NULRGHJ4.js +0 -41
- package/dist/chunk-OILOHQNL.js +0 -2
- package/dist/chunk-OLYPLX5C.js +0 -1
- package/dist/chunk-OOB3RKWD.js +0 -4
- package/dist/chunk-OSKCHEVM.js +0 -218
- package/dist/chunk-PD7BI7TR.js +0 -12
- package/dist/chunk-PKQHHCO4.js +0 -20
- package/dist/chunk-PQRT4T2G.js +0 -159
- package/dist/chunk-QER2ELZP.js +0 -1
- package/dist/chunk-RDHGQ2WZ.js +0 -1
- package/dist/chunk-SDQW7IJN.js +0 -1
- package/dist/chunk-SEZETSB3.js +0 -1
- package/dist/chunk-U3NV72AL.js +0 -8
- package/dist/chunk-U4WIJZCX.js +0 -1
- package/dist/chunk-UIOSADPB.js +0 -1718
- package/dist/chunk-UNEJYZ4T.js +0 -102
- package/dist/chunk-VVSHZV5S.js +0 -73
- package/dist/chunk-WHVK6FUB.js +0 -11
- package/dist/chunk-WNUXMPVX.js +0 -1
- package/dist/chunk-XYUJTIPE.js +0 -203
- package/dist/chunk-YJPFEL2E.js +0 -1
- package/dist/chunk-Z4EHBBL4.js +0 -41
- package/dist/contracts-GUXGFCVV.js +0 -1
- package/dist/core-schema-Y47YFKH2.js +0 -899
- package/dist/dispatch-ILBBKOSW.js +0 -1
- package/dist/editorial-reading-room/assets/app.js +0 -433
- package/dist/editorial-reading-room/assets/index.html +0 -139
- package/dist/editorial-reading-room/assets/styles.css +0 -1091
- package/dist/index.d.cts +0 -607
- package/dist/media-artifacts-67CJWI7O.js +0 -1
- package/dist/metering-YHZ46GV4.js +0 -1
- package/dist/migrations-3AKEC5QE.js +0 -1
- package/dist/queue-VOGXQDPR.js +0 -1
- package/dist/reconciliation-OXBG7JA2.js +0 -1
- package/dist/report-artifact-offload-6OOY2PTM.js +0 -1
- package/dist/repository-CYXVMYAI.js +0 -1
- package/dist/repository-UKDA4IWP.js +0 -1
- package/dist/server-6HUBN3OR.js +0 -5547
- package/dist/settlement-3PS32LQO.js +0 -1
- package/dist/worker-NXRU3TT3.js +0 -1
- package/public/.well-known/xray-install.json +0 -183
- package/public/agent-install.md +0 -200
package/dist/chunk-ANQ4JJVI.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import{a as A}from"./chunk-PKQHHCO4.js";import{c as w}from"./chunk-4ZVO6GX4.js";import{a as u}from"./chunk-WNUXMPVX.js";import{b as E,c as f,d as S,e as m,f as l}from"./chunk-HNNYXMSI.js";import{randomUUID as D}from"crypto";var a="(CAST(strftime('%s', 'now') AS INTEGER) * 1000)",N=e=>{if(!Number.isSafeInteger(e)||e<1e3||e>36e5)throw Error("Execution lease must be between one second and one hour")};async function d(e,t,n){return(await e.execute({sql:`SELECT e.*, r.status AS run_status, r.tool, r.job_id, ${a} AS now_ms FROM operation_executions e
|
|
2
|
-
JOIN operation_runs r ON r.id = e.run_id WHERE e.run_id = ? AND r.user_id = ?`,args:[t,n]})).rows[0]}async function R(e,t,n,r,o=u(),s){N(r),s&&l({userId:t,tool:s.tool,jobId:s.jobId},s);let i=await d(o,e,t);return i?(i.phase==="claimed"&&Number(i.expires_at_ms)<=Number(i.now_ms)&&(await o.execute({sql:`UPDATE operation_executions SET claim_token = ?, expires_at_ms = ${a} + ?
|
|
3
|
-
WHERE run_id = ? AND phase = 'claimed' AND expires_at_ms <= ${a}
|
|
4
|
-
AND EXISTS (SELECT 1 FROM operation_runs WHERE id = ? AND user_id = ? AND status = 'running' AND (? = 1 OR json_extract(normalized_flags_json,'$._storeGateRequired') IS NOT 1)${s?" AND tool = ? AND job_id = ?":""})
|
|
5
|
-
${s?`AND (${s.sql})`:""}`,args:[n,r,e,e,t,s?1:0,...s?[s.tool,s.jobId,...s.args]:[]]}),i=await d(o,e,t)),i?.phase==="effects_started"&&Number(i.expires_at_ms)<=Number(i.now_ms)&&(await o.batch([{sql:`UPDATE operation_executions SET phase = 'unknown' WHERE run_id = ?
|
|
6
|
-
AND phase = 'effects_started' AND expires_at_ms <= ${a}
|
|
7
|
-
AND EXISTS (SELECT 1 FROM operation_runs WHERE id = ? AND user_id = ?)`,args:[e,e,t]},{sql:`UPDATE operation_runs SET status = 'unknown', failure_class = 'execution_expired_after_effects',
|
|
8
|
-
ended_at = datetime('now'), updated_at = datetime('now') WHERE id = ? AND user_id = ? AND status = 'running'
|
|
9
|
-
AND EXISTS (SELECT 1 FROM operation_executions WHERE run_id = ? AND phase = 'unknown')`,args:[e,t,e]}],"write"),i=await d(o,e,t)),i?.phase==="published"&&i.run_status===i.result_status?{kind:"replay",runId:e,result:{json:String(i.result_json),status:i.result_status}}:i?.phase==="unknown"||i?.run_status!=="running"?{kind:"unknown",runId:e}:i.phase==="claimed"&&i.claim_token===n&&Number(i.expires_at_ms)>Number(i.now_ms)?{kind:"claimed",claim:{runId:e,userId:t,token:n}}:{kind:"pending",runId:e}):{kind:"unknown",runId:e}}async function I(e,t){return t&&l({userId:e.userId,tool:t.tool,jobId:t.jobId},t),(await u().execute({sql:`UPDATE operation_executions SET phase = 'effects_started' WHERE run_id = ? AND claim_token = ?
|
|
10
|
-
AND phase = 'claimed' AND expires_at_ms > ${a}
|
|
11
|
-
AND EXISTS (SELECT 1 FROM operation_runs WHERE id = ? AND user_id = ? AND status = 'running' AND (? = 1 OR json_extract(normalized_flags_json,'$._storeGateRequired') IS NOT 1)${t?" AND tool = ? AND job_id = ?":""})
|
|
12
|
-
${t?`AND (${t.sql})`:""}`,args:[e.runId,e.token,e.runId,e.userId,t?1:0,...t?[t.tool,t.jobId,...t.args]:[]]})).rowsAffected===1}async function j(e,t){return N(t),(await u().execute({sql:`UPDATE operation_executions SET expires_at_ms = ${a} + ? WHERE run_id = ? AND claim_token = ?
|
|
13
|
-
AND phase IN ('claimed', 'effects_started') AND expires_at_ms > ${a}
|
|
14
|
-
AND EXISTS (SELECT 1 FROM operation_runs WHERE id = ? AND user_id = ? AND status = 'running')`,args:[t,e.runId,e.token,e.runId,e.userId]})).rowsAffected===1}async function q(e,t,n=3e5){if(N(n),!Number.isSafeInteger(t)||t<=0)throw Error("Authenticated recovery principal is required");let r=u(),o=D(),s;try{await r.batch([{sql:`UPDATE operation_executions SET phase = 'unknown', claim_token = ?, expires_at_ms = ${a} + ?
|
|
15
|
-
WHERE run_id = ? AND phase IN ('effects_started', 'unknown') AND expires_at_ms <= ${a}
|
|
16
|
-
AND EXISTS (SELECT 1 FROM operation_runs WHERE id = ? AND user_id = ? AND status IN ('running', 'unknown'))`,args:[o,n,e,e,t]},{sql:`UPDATE operation_runs SET status = 'unknown', failure_class = 'execution_expired_after_effects',
|
|
17
|
-
ended_at = datetime('now'), updated_at = datetime('now') WHERE id = ? AND user_id = ? AND status = 'running'
|
|
18
|
-
AND EXISTS (SELECT 1 FROM operation_executions WHERE run_id = ? AND phase = 'unknown' AND claim_token = ?)`,args:[e,t,e,o]}],"write")}catch(_){s=_}let i;try{i=await d(r,e,t)}catch(_){throw s??_}if(i?.phase==="unknown"&&i.run_status==="unknown"&&i.claim_token===o&&Number(i.expires_at_ms)>Number(i.now_ms))return{runId:e,userId:t,token:o};if(s)throw s;return null}async function x(e,t,n,r){r&&l({userId:e.userId,tool:r.tool,jobId:r.jobId},r);let o=n?"unknown":"effects_started",s=n?"unknown":"running";if(JSON.parse(t.json),Buffer.byteLength(t.json)>16*1024*1024)throw Error("Operation result exceeds 16 MiB");let i=u(),_;try{await i.batch([{sql:`UPDATE operation_executions SET phase = 'published', result_json = ?, result_status = ?
|
|
19
|
-
WHERE run_id = ? AND claim_token = ? AND phase = ? AND expires_at_ms > ${a}
|
|
20
|
-
AND EXISTS (SELECT 1 FROM operation_runs WHERE id = ? AND user_id = ? AND status = ?)
|
|
21
|
-
AND (? = 0 OR NOT EXISTS (
|
|
22
|
-
SELECT 1 FROM operation_debit_plans p JOIN billing_debits d ON d.idempotency_key = p.debit_key
|
|
23
|
-
WHERE p.run_id = operation_executions.run_id AND d.status IN ('applying', 'applied')
|
|
24
|
-
AND NOT EXISTS (SELECT 1 FROM billing_events b WHERE b.user_id = d.user_id
|
|
25
|
-
AND b.billing_class = 'wallet_hold_settlement' AND b.source_surface = p.source_surface
|
|
26
|
-
AND b.status = 'settled' AND (b.amount_mc = 0${r?" OR EXISTS(SELECT 1 FROM operation_final_settlements s WHERE s.run_id=p.run_id AND s.debit_key=p.debit_key AND s.user_id=d.user_id AND s.final_amount_mc=b.amount_mc AND s.refund_operation=p.refund_operation AND s.source_surface=p.source_surface)":""})
|
|
27
|
-
AND json_extract(b.metadata, '$.debitIdempotencyKey') = p.debit_key
|
|
28
|
-
AND json_extract(b.metadata, '$.refundOperation') = p.refund_operation)
|
|
29
|
-
))${r?` AND (${r.sql}) AND EXISTS(SELECT 1 FROM operation_runs g WHERE g.id=operation_executions.run_id AND g.tool=? AND g.job_id=?)`:""}`,args:[t.json,t.status,e.runId,e.token,o,e.runId,e.userId,s,n?1:0,...r?[...r.args,r.tool,r.jobId]:[]]},{sql:`UPDATE operation_runs SET status = ?, ended_at = datetime('now'), updated_at = datetime('now')
|
|
30
|
-
WHERE id = ? AND user_id = ? AND status = ?
|
|
31
|
-
AND EXISTS (SELECT 1 FROM operation_executions WHERE run_id = ? AND claim_token = ?
|
|
32
|
-
AND phase = 'published' AND result_json = ? AND result_status = ?)`,args:[t.status,e.runId,e.userId,s,e.runId,e.token,t.json,t.status]}],"write")}catch(c){_=c}let p=await d(i,e.runId,e.userId);if(p?.phase==="published"&&p.claim_token===e.token&&p.result_json===t.json&&p.result_status===t.status&&p.run_status===t.status)return!0;if(_)throw _;return!1}async function $(e,t){return x(e,t,!1)}async function H(e,t,n){if(t.status!=="unknown")throw Error("Recovery cannot publish a known execution outcome");return x(e,t,!0,n)}async function W(e){await u().execute({sql:`UPDATE operation_executions SET expires_at_ms = ${a}
|
|
33
|
-
WHERE run_id = ? AND claim_token = ? AND phase = 'claimed'
|
|
34
|
-
AND EXISTS (SELECT 1 FROM operation_runs WHERE id = ? AND user_id = ? AND status = 'running')`,args:[e.runId,e.token,e.runId,e.userId]})}async function F(e){let t=u();await A(t);let n;try{return(await t.execute({sql:`UPDATE operation_executions SET phase = 'claimed', expires_at_ms = ${a}
|
|
35
|
-
WHERE run_id = ? AND claim_token = ? AND phase = 'effects_started' AND expires_at_ms > ${a}
|
|
36
|
-
AND EXISTS (SELECT 1 FROM operation_runs root
|
|
37
|
-
WHERE root.id = operation_executions.run_id AND root.user_id = ? AND root.status = 'running'
|
|
38
|
-
AND root.job_id IS NOT NULL
|
|
39
|
-
AND NOT EXISTS (SELECT 1 FROM operation_runs child
|
|
40
|
-
LEFT JOIN operation_executions execution ON execution.run_id = child.id
|
|
41
|
-
WHERE child.user_id = root.user_id AND child.job_id = root.job_id AND child.id <> root.id
|
|
42
|
-
AND (child.status = 'unknown' OR execution.phase IN ('effects_started', 'unknown')
|
|
43
|
-
OR (child.status = 'running' AND execution.run_id IS NULL)))
|
|
44
|
-
AND NOT EXISTS (SELECT 1 FROM operation_physical_attempts physical
|
|
45
|
-
WHERE physical.user_id = root.user_id AND physical.state IN ('prepared', 'effects_started', 'unknown')
|
|
46
|
-
AND (physical.parent_run_id = root.id OR EXISTS (SELECT 1 FROM operation_runs parent
|
|
47
|
-
WHERE parent.id = physical.parent_run_id AND parent.user_id = root.user_id
|
|
48
|
-
AND parent.job_id = root.job_id))))`,args:[e.runId,e.token,e.userId]})).rowsAffected===1}catch(o){n=o}let r=await d(t,e.runId,e.userId).catch(()=>null);if(r?.phase==="claimed"&&r.run_status==="running"&&r.claim_token===e.token&&Number(r.expires_at_ms)<=Number(r.now_ms))return!0;throw n}async function L(e){await u().batch([{sql:`UPDATE operation_executions SET phase = 'unknown', expires_at_ms = ${a}
|
|
49
|
-
WHERE run_id = ? AND claim_token = ? AND phase IN ('effects_started', 'unknown') AND expires_at_ms > ${a}
|
|
50
|
-
AND EXISTS (SELECT 1 FROM operation_runs WHERE id = ? AND user_id = ? AND status IN ('running', 'unknown'))`,args:[e.runId,e.token,e.runId,e.userId]},{sql:`UPDATE operation_runs SET status = 'unknown', failure_class = 'execution_outcome_unavailable',
|
|
51
|
-
ended_at = datetime('now'), updated_at = datetime('now') WHERE id = ? AND user_id = ? AND status IN ('running', 'unknown')
|
|
52
|
-
AND EXISTS (SELECT 1 FROM operation_executions WHERE run_id = ? AND phase = 'unknown' AND claim_token = ?)`,args:[e.runId,e.userId,e.runId,e.token]}],"write")}async function P(e){let t=await d(u(),e.runId,e.userId);return t?.phase==="effects_started"&&t.run_status==="running"&&t.claim_token===e.token&&Number(t.expires_at_ms)>Number(t.now_ms)}function h(e){let t=m(e.tool,"tool"),n=m(e.ownerScope,"ownerScope"),r=e.idempotencyKey?.trim()||null,o=e.requestFingerprint?.trim()||null;if(r==null!=(o==null))throw Error("idempotencyKey and requestFingerprint must be supplied together");let s=r?f(`${n}\0${t}\0${r}`):null,i=e.id??D(),_=[i,e.userId??null,f(n),t,s,o,e.jobId??null,e.requestId??w()?.requestId??null,e.deploymentCommit??null,S(e.normalizedFlags),e.startedAt??new Date().toISOString()];return{id:i,scopeHash:s,requestFingerprint:o,statement:{sql:`INSERT${s?" OR IGNORE":""} INTO operation_runs
|
|
53
|
-
(id, user_id, owner_scope_hash, tool, idempotency_scope_hash, request_fingerprint,
|
|
54
|
-
job_id, request_id, deployment_commit, normalized_flags_json, started_at)
|
|
55
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,args:_}}}async function O(e,t){let n=(await e.execute({sql:t.scopeHash?"SELECT id, request_fingerprint FROM operation_runs WHERE idempotency_scope_hash = ?":"SELECT id, request_fingerprint FROM operation_runs WHERE id = ?",args:[t.scopeHash??t.id]})).rows[0];if(!n)throw Error("Operation run insert did not produce an idempotency receipt");if(t.scopeHash&&String(n.request_fingerprint)!==t.requestFingerprint)throw new E;return{id:String(n.id),replayed:String(n.id)!==t.id}}async function M(e){let t=u(),n=h(e);return await t.execute(n.statement),n.scopeHash?O(t,n):{id:n.id,replayed:!1}}async function U(e,t,n,r){N(n),r&&l(e,r);let o=u(),s=h(r?{...e,normalizedFlags:{...e.normalizedFlags,_storeGateRequired:!0}}:e),i=r?{sql:s.statement.sql.replace("VALUES (","SELECT ").replace(/\)$/,"")+` WHERE (${r.sql})`,args:[...s.statement.args,...r.args]}:s.statement,_;try{await o.batch([i,{sql:`INSERT INTO operation_executions (run_id, claim_token, expires_at_ms, phase)
|
|
56
|
-
SELECT id, ?, ${a} + ?, 'claimed' FROM operation_runs
|
|
57
|
-
WHERE id = ? AND user_id = ? AND status = 'running' AND changes() = 1`,args:[t,n,s.id,e.userId]}],"write")}catch(c){_=c}let p;try{p=await O(o,s)}catch(c){if(c instanceof E)throw c;if(r&&!_)return{kind:"unknown",runId:s.id};throw _??c}return R(p.id,e.userId,t,n,o,r)}async function X(e){let t=u(),n=e.endedAt??new Date().toISOString(),r=e.failureClass==null?null:e.failureClass.slice(0,200);if((await t.execute({sql:`UPDATE operation_runs SET status = ?, failure_class = ?, ended_at = ?, updated_at = ?
|
|
58
|
-
WHERE id = ? AND status = 'running'
|
|
59
|
-
AND NOT EXISTS (SELECT 1 FROM operation_executions WHERE run_id = ?)`,args:[e.status,r,n,n,e.runId,e.runId]})).rowsAffected===1)return;let s=(await t.execute({sql:"SELECT status, failure_class FROM operation_runs WHERE id = ?",args:[e.runId]})).rows[0];if(!s)throw Error(`Unknown operation run: ${e.runId}`);if(s.status==="running")throw Error("Claimed operation runs require fenced result publication");let i=s.failure_class==null?null:String(s.failure_class);if(String(s.status)!==e.status||i!==r)throw Error(`Operation run ${e.runId} is already terminal as ${String(s.status)}`)}function v(e,t){if(!Number.isSafeInteger(e.userId)||e.userId<=0||!e.runId||!e.token||!t.tool||!t.jobId)throw Error("Invalid operation write fence");let n=t.recovery?"unknown":"effects_started",r=t.recovery?"unknown":"running";return{sql:`EXISTS (SELECT 1 FROM operation_executions x JOIN operation_runs r ON r.id=x.run_id
|
|
60
|
-
WHERE x.run_id=? AND x.claim_token=? AND x.phase=? AND x.expires_at_ms > ${a}
|
|
61
|
-
AND r.user_id=? AND r.status=? AND r.tool=? AND r.job_id=?)`,args:[e.runId,e.token,n,e.userId,r,t.tool,t.jobId]}}async function G(e,t,n){let o=(await u().execute({sql:`SELECT r.id,r.request_fingerprint,r.status,x.phase,x.result_json,x.result_status
|
|
62
|
-
FROM operation_runs r LEFT JOIN operation_executions x ON x.run_id=r.id
|
|
63
|
-
WHERE r.user_id=? AND r.idempotency_scope_hash=?`,args:[e,t]})).rows[0];if(!o)return null;if(String(o.request_fingerprint)!==n)throw new E;return o.phase!=="published"||o.status!==o.result_status?null:{runId:String(o.id),result:{json:String(o.result_json),status:o.result_status}}}async function z(e,t){return!!await d(u(),e,t)}async function J(e,t,n){return(await u().execute({sql:`SELECT 1 FROM operation_runs r JOIN operation_executions x ON x.run_id=r.id
|
|
64
|
-
WHERE r.job_id=? AND r.user_id=? AND r.tool=? AND (x.phase='unknown' OR r.status='unknown') LIMIT 1`,args:[e,t,n]})).rows.length>0}function V(e,t,n,r){if(![e,t].every(s=>/^[a-z_.]+$/.test(s))||!/^[a-z_]+$/.test(n))throw Error("Invalid operation group fence");if(r!=null&&(!r.trim()||r.length>512))throw Error("Invalid operation group exclusion");let o=r==null?"":`AND x.run_id <> '${r.replace(/'/g,"''")}'`;return`NOT EXISTS (SELECT 1 FROM operation_runs r JOIN operation_executions x ON x.run_id=r.id
|
|
65
|
-
WHERE r.job_id=${e} AND r.user_id=${t} AND r.tool='${n}'
|
|
66
|
-
AND x.phase IN ('claimed','effects_started') AND x.expires_at_ms > ${a} AND r.status='running' ${o})`}async function K(e,t){l({userId:e.userId,tool:t.tool,jobId:t.jobId},t);try{return await I(e,t)}catch(n){let r=await d(u(),e.runId,e.userId).catch(()=>null);if(r?.phase==="effects_started"&&r.claim_token===e.token&&r.run_status==="running"&&r.tool===t.tool&&r.job_id===t.jobId&&Number(r.expires_at_ms)>Number(r.now_ms))return!0;throw n}}async function B(e,t,n,r){if(!Number.isSafeInteger(t)||t<=0||!e||!n||!r)return null;let o=(await u().execute({sql:`SELECT r.id,r.status,r.normalized_flags_json,r.request_fingerprint,r.started_at,
|
|
67
|
-
e.phase,e.expires_at_ms,${a} AS now_ms FROM operation_runs r JOIN operation_executions e ON e.run_id=r.id
|
|
68
|
-
WHERE r.id=? AND r.user_id=? AND r.tool=? AND r.job_id=?
|
|
69
|
-
AND json_extract(r.normalized_flags_json,'$._storeGateRequired') IS 1`,args:[e,t,n,r]})).rows[0];return o?{runId:String(o.id),status:String(o.status),phase:String(o.phase),flags:JSON.parse(String(o.normalized_flags_json)),fingerprint:String(o.request_fingerprint),startedAt:String(o.started_at),expiresAtMs:Number(o.expires_at_ms),nowMs:Number(o.now_ms)}:null}function Q(e,t,n){if(![e,t].every(r=>/^[a-z_.]+$/.test(r))||!/^[a-z_]+$/.test(n))throw Error("Invalid unresolved operation fence");return`NOT EXISTS (SELECT 1 FROM operation_runs r JOIN operation_executions e ON e.run_id=r.id
|
|
70
|
-
WHERE r.job_id=${e} AND r.user_id=${t} AND r.tool='${n}'
|
|
71
|
-
AND (e.phase IN ('effects_started','unknown') OR r.status='unknown'))`}export{R as a,I as b,j as c,q as d,$ as e,H as f,W as g,F as h,L as i,P as j,M as k,U as l,X as m,v as n,G as o,z as p,J as q,V as r,K as s,B as t,Q as u};
|
package/dist/chunk-B3JRL45T.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isIP as c}from"net";import{lookup as d}from"dns/promises";import o from"ipaddr.js";function a(e){return e.startsWith("[")&&e.endsWith("]")?e.slice(1,-1):e}function i(e){let r=a(e);if(!c(r))return!1;try{let t=o.parse(r),s=n=>[["192.0.0.0",24],["192.0.2.0",24],["198.18.0.0",15],["198.51.100.0",24],["203.0.113.0",24]].some(([l,u])=>n.match(o.parse(l),u));if(t instanceof o.IPv6&&t.isIPv4MappedAddress()){let n=t.toIPv4Address();return n.range()!=="unicast"||s(n)}return t instanceof o.IPv4&&s(t)?!0:t.range()!=="unicast"}catch{return!0}}async function p(e){let r=a(e.toLowerCase());if(r==="localhost"||r.endsWith(".localhost")||r.endsWith(".local")||i(r))return!0;try{let t=await d(r,{all:!0,verbatim:!0});return t.length===0||t.some(s=>i(s.address))}catch{return!0}}async function I(e,r){let t;try{t=new URL(e.trim())}catch{return{error:`Invalid ${r.field}`}}return(r.requireHttps?["https:"]:["http:","https:"]).includes(t.protocol)?await p(t.hostname)?{error:`${r.field} must resolve to a public internet host`}:{parsed:t}:{error:r.requireHttps?`${r.field} must use https`:`${r.field} must use http or https`}}export{i as a,I as b};
|
package/dist/chunk-B4ZKPLSP.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function S(){return(process.env.BROWSER_SERVICE_API_KEY??process.env.\u004b\u0045\u0052\u004e\u0045\u004c_API_KEY)?.trim()||void 0}function i(){return(process.env.BROWSER_AGENT_PROFILE_NAME??process.env.BROWSER_SERVICE_PROFILE_NAME??process.env.\u004b\u0045\u0052\u004e\u0045\u004c_BROWSER_PROFILE_NAME??process.env.\u004b\u0045\u0052\u004e\u0045\u004c_PROFILE_NAME)?.trim()||void 0}function u(){let e=(process.env.BROWSER_AGENT_PROFILE_SAVE_CHANGES??process.env.BROWSER_SERVICE_PROFILE_SAVE_CHANGES??process.env.\u004b\u0045\u0052\u004e\u0045\u004c_BROWSER_PROFILE_SAVE_CHANGES??process.env.\u004b\u0045\u0052\u004e\u0045\u004c_PROFILE_SAVE_CHANGES)?.trim().toLowerCase();if(e){if(["1","true","yes","on"].includes(e))return!0;if(["0","false","no","off"].includes(e))return!1}}var A="none";function a(e){switch(e){case"day":return"qdr:d";case"week":return"qdr:w";case"month":return"qdr:m";case"year":return"qdr:y";default:return}}function M(e,r=!1,n="light",t=1,_=!1,E=!1){let o=r&&(_||E)?24e4:r&&n==="full"?t>=2?75e3:45e3:r?4e4:4e5,R=Math.min(o+5e3,795e3);return{serverMs:o,clientMs:R}}function s(e){return e.reason??new DOMException("The operation was aborted.","AbortError")}async function f(e,r){if(!r)return e;if(r.aborted)throw s(r);let n,t=new Promise((_,E)=>{n=()=>E(s(r)),r.addEventListener("abort",n,{once:!0})});e.catch(()=>{});try{return await Promise.race([e,t])}finally{n&&r.removeEventListener("abort",n)}}function O(e,r){let n=AbortSignal.timeout(e);return r?AbortSignal.any([r,n]):n}export{A as a,a as b,M as c,S as d,i as e,u as f,s as g,f as h,O as i};
|
package/dist/chunk-B5Y26E3A.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z as e}from"zod";import{z as t}from"zod";var o=t.enum(["hubspot","salesforce","highlevel","zoho","pipedrive","keap"]),m=t.object({provider:o,sourceRecordId:t.string().trim().min(1).max(240),occurredAt:t.string().datetime(),updatedAt:t.string().datetime(),contact:t.object({kind:t.enum(["provider_contact_id","verified_email_hmac","verified_phone_hmac"]),reference:t.string().trim().min(1).max(240)}).strict(),event:t.object({name:t.string().regex(/^[a-z][a-z0-9_]{1,79}$/),pipelineId:t.string().trim().min(1).max(240).nullable(),stageId:t.string().trim().min(1).max(240).nullable(),stageLabel:t.string().trim().min(1).max(240).nullable()}).strict(),revenue:t.object({minor:t.number().int().nonnegative(),currency:t.string().regex(/^[A-Z]{3}$/),provenance:t.enum(["provider_verified","mapped_provider_field"])}).strict().nullable(),tombstone:t.boolean()}).strict(),s=t.object({contractVersion:t.literal(1),provider:o,outcomes:t.array(m).max(500),cursor:t.string().max(2e3).nullable(),hasMore:t.boolean(),warnings:t.array(t.enum(["contact_association_missing","currency_missing","deleted_records_unavailable","effective_scope_narrowed","rate_limit_near","schema_drift"])).max(50)}).strict().superRefine((i,a)=>{i.outcomes.some(c=>c.provider!==i.provider)&&a.addIssue({code:t.ZodIssueCode.custom,message:"provider_mismatch"}),i.hasMore&&!i.cursor&&a.addIssue({code:t.ZodIssueCode.custom,message:"cursor_required_when_more"})});function _(i){return s.parse(i)}var r=e.enum(["hubspot","salesforce","highlevel","zoho","pipedrive","keap"]),n=e.enum(["hubspot","highlevel","zoho","keap"]),l=e.enum(["incremental_and_webhook","incremental_only","webhook_only","manual_backfill","unavailable"]),p=e.object({documented:e.boolean(),normalizedAdapter:e.boolean(),advertisedTools:e.array(e.string().trim().min(1).max(120)).max(100),grantedScopes:e.array(e.string().trim().min(1).max(160)).max(200),missingRequirements:e.array(e.string().trim().min(1).max(240)).max(100),tenantSchemaFingerprint:e.string().regex(/^[a-f0-9]{64}$/).nullable(),evaluatedAt:e.string().datetime()}).strict(),d=e.object({provider:r,mode:l,canSyncNow:e.boolean(),canProvisionFields:e.boolean(),canUpsertPerson:e.boolean(),canApplyPipelineEvent:e.boolean(),supportedObjects:e.array(e.string().trim().min(1).max(100)).max(100),evidence:p,caveats:e.array(e.string().trim().min(1).max(500)).max(100)}).strict(),P=d.extend({provider:n}).strict(),g=e.object({object:e.string().trim().min(1).max(100),internalName:e.string().trim().min(1).max(160),label:e.string().trim().min(1).max(160),type:e.enum(["string","number","datetime","url","boolean"]),writable:e.boolean(),required:e.boolean().optional()}).strict(),u=e.object({planId:e.string().regex(/^crmplan_[a-f0-9]{24}$/),provider:r,connectionId:e.string().trim().min(1).max(240),personObject:e.string().trim().min(1).max(100),existingMappings:e.record(e.string().max(160),e.string().max(160)),proposedFields:e.array(g).max(50),fallback:e.enum(["note","activity"]),permissionRequirements:e.array(e.string().trim().min(1).max(160)).max(50),schemaFingerprint:e.string().regex(/^[a-f0-9]{64}$/),requestFingerprint:e.string().regex(/^[a-f0-9]{64}$/),createdAt:e.string().datetime()}).strict(),I=u.extend({provider:n}).strict(),x=e.object({receiptId:e.string().regex(/^crmreceipt_[a-f0-9]{24}$/),planId:e.string().regex(/^crmplan_[a-f0-9]{24}$/),provider:r,connectionId:e.string().trim().min(1).max(240),status:e.enum(["approved","tested","failed"]),createdFields:e.array(e.object({object:e.string().trim().min(1).max(100),internalName:e.string().trim().min(1).max(160),providerFieldId:e.string().trim().min(1).max(240).optional()}).strict()).max(50),existingMappings:e.record(e.string().max(160),e.string().max(160)),cleanup:e.object({supported:e.boolean(),instructions:e.string().max(1e3)}).strict(),planFingerprint:e.string().regex(/^[a-f0-9]{64}$/),occurredAt:e.string().datetime(),errorCode:e.string().regex(/^[a-zA-Z0-9_:-]{1,120}$/).optional()}).strict(),j=x.extend({provider:n}).strict(),z=e.object({identityTier:e.literal("confirmed"),personId:e.string().trim().min(1).max(240),deterministicIdentity:e.object({kind:e.enum(["email","phone","crm_id","customer_id"]),value:e.string().trim().min(1).max(500)}).strict(),contact:e.object({email:e.string().email().max(320).optional(),phone:e.string().trim().min(3).max(50).optional(),firstName:e.string().trim().max(160).optional(),lastName:e.string().trim().max(160).optional()}).strict().optional(),firstTouch:e.string().max(1e3).optional(),lastNonDirectTouch:e.string().max(1e3).optional(),convertingTouch:e.string().max(1e3).optional(),landingPage:e.string().url().max(2e3).optional(),conversionPage:e.string().url().max(2e3).optional(),sessionCount:e.number().int().nonnegative(),eventCount:e.number().int().nonnegative(),campaignClickCoverage:e.string().max(240).optional(),consentReceiptRef:e.string().trim().min(1).max(240),detailedJourneyUrl:e.string().url().max(2e3)}).strict(),y=e.object({version:e.number().int().positive(),eventName:e.string().regex(/^[a-z][a-z0-9_]{1,79}$/),pipelineId:e.string().trim().min(1).max(240),stageId:e.string().trim().min(1).max(240),operation:e.enum(["create_or_update_deal","update_stage"]),valueSource:e.enum(["none","verified_revenue"]),activationEligible:e.boolean()}).strict(),$=e.object({eventId:e.string().trim().min(1).max(240),eventName:e.string().regex(/^[a-z][a-z0-9_]{1,79}$/),occurredAt:e.string().datetime(),verifiedRevenueMinor:e.number().int().nonnegative().optional(),currency:e.string().regex(/^[A-Z]{3}$/).optional()}).strict(),O=e.object({object:e.string().trim().min(1).max(100),sourceEventIdField:e.string().trim().min(1).max(160),occurredAtField:e.string().trim().min(1).max(160),personIdField:e.string().trim().max(160).optional(),dealIdField:e.string().trim().max(160).optional(),stageField:e.string().trim().max(160).optional(),valueField:e.string().trim().max(160).optional(),currencyField:e.string().trim().max(160).optional(),eventName:e.string().trim().min(2).max(80)}).strict(),b=e.object({syncId:e.string().regex(/^crmsync_[a-f0-9]{24}$/),siteId:e.string().uuid(),connectionId:e.string().trim().min(1).max(240),provider:r,state:e.enum(["queued","running","completed","degraded","cancelled","webhook_only"]),mode:e.enum(["initial","incremental","webhook"]),cursor:e.string().max(2e3).nullable(),lastStartedAt:e.string().datetime().nullable(),lastSuccessAt:e.string().datetime().nullable(),nextRunAt:e.string().datetime().nullable(),imported:e.number().int().nonnegative(),deduplicated:e.number().int().nonnegative(),rejected:e.number().int().nonnegative(),lastErrorCode:e.string().regex(/^[a-zA-Z0-9_:-]{1,120}$/).nullable(),requestFingerprint:e.string().regex(/^[a-f0-9]{64}$/)}).strict(),F=b.extend({provider:n}).strict(),R=e.object({code:e.string().regex(/^[a-zA-Z0-9_:-]{1,120}$/),retryable:e.boolean(),message:e.string().max(500)}).strict(),v=e.enum(["contact.email","contact.phone","contact.firstName","contact.lastName","attribution.firstTouch","attribution.lastNonDirectTouch","attribution.convertingTouch","attribution.landingPage","attribution.conversionPage","clickIds.gclid","clickIds.gbraid","clickIds.wbraid","events.selected","revenue.verified"]),f=e.object({policyId:e.string().regex(/^crmpolicy_[a-f0-9]{24}$/),siteId:e.string().uuid(),provider:r,connectionId:e.string().trim().min(1).max(240),kind:e.enum(["person_summary","pipeline_event"]),enabled:e.boolean(),version:e.number().int().positive(),provisioningReceiptId:e.string().regex(/^crmreceipt_[a-f0-9]{24}$/),schemaFingerprint:e.string().regex(/^[a-f0-9]{64}$/),mappingVersion:e.number().int().positive().nullable(),mapping:y.nullable(),allowedFields:e.array(v).max(20),selectedEvents:e.array(e.string().regex(/^[a-z][a-z0-9_]{1,79}$/)).max(100),purpose:e.enum(["necessary_form_fulfillment","site_analytics","advertising_measurement"]),updatedAt:e.string().datetime()}).strict(),k=f.extend({provider:n}).strict(),w=e.object({jobId:e.string().regex(/^crmjob_[a-f0-9]{24}$/),policyId:e.string().regex(/^crmpolicy_[a-f0-9]{24}$/),siteId:e.string().uuid(),personId:e.string().uuid(),kind:e.enum(["person_summary","pipeline_event"]),state:e.enum(["pending","running","retrying","delivered","dead_letter","cancelled"]),policyVersion:e.number().int().positive(),mappingVersion:e.number().int().positive().nullable(),attempts:e.number().int().nonnegative(),nextAttemptAt:e.string().datetime().nullable(),safeErrorCode:e.string().regex(/^[a-zA-Z0-9_:-]{1,120}$/).nullable(),requestFingerprint:e.string().regex(/^[a-f0-9]{64}$/)}).strict(),E=e.object({receiptId:e.string().trim().min(1).max(240),jobId:e.string().trim().min(1).max(240),status:e.enum(["accepted","rejected","failed","retrying"]),externalReceiptId:e.string().trim().min(1).max(240).optional(),safeErrorCode:e.string().regex(/^[a-zA-Z0-9_:-]{1,120}$/).optional(),occurredAt:e.string().datetime()}).strict();export{s as a,_ as b,n as c,d,P as e,g as f,u as g,I as h,x as i,j,z as k,y as l,$ as m,O as n,b as o,F as p,v as q,f as r,k as s,w as t,E as u};
|
package/dist/chunk-C7MGJUTU.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var k="Google returned a CAPTCHA. Run with --headless=false to re-warm the browser profile, then retry.",m="This operation is temporarily unavailable. Please retry later.",b=["request_aborted","captcha_exhausted","captcha_or_blocked","location_mismatch","proxy_tunnel_failed","proxy_unavailable","harvest_timeout","mcp_request_timeout","mcp_http_error","extraction_failed","concurrency_limit_exceeded","unauthorized","forbidden","invalid_request","rate_limited","upstream_rate_limited","insufficient_balance","service_unavailable","response_lost","vendor_unavailable","page_not_found","page_forbidden","page_rate_limited","page_server_error","page_http_error","bot_check_unresolved","page_too_large","page_unreachable","browser_session_interrupted","site_export_not_found","directory_job_not_found","site_export_format_unavailable","site_export_read_failed","site_export_image_not_found","image_url_invalid","image_url_not_https","image_host_unresolvable","image_host_blocked","image_redirect_invalid","image_source_unavailable","image_too_large","image_redirect_limit","image_base64_invalid","image_source_missing","image_source_ambiguous","image_source_type_invalid","image_artifact_not_found","image_page_too_large","page_image_not_found","page_image_candidates_unusable","image_format_unsupported","image_storage_unconfigured","featured_image_unhostable"],h=["request_aborted","captcha","location_mismatch","connection","timeout","extraction","concurrency_limit","unauthorized","forbidden","invalid_request","not_found","rate_limit","billing","service_unavailable"];function S(e){return e?JSON.stringify(e):null}function R(e){if(e==null)return null;try{let r=typeof e=="string"?JSON.parse(e):e;if(!r||typeof r!="object"||Array.isArray(r))return null;let t=r;if(typeof t.error_code!="string"||!p.has(t.error_code))return null;let a=C({errorCode:t.error_code,errorType:t.error_type,retryable:t.retryable,retryAfterSeconds:t.retry_after_seconds,chargeStatus:t.charge_status,details:t.details});if(typeof t.message=="string"){let n=g(t.message).trim().slice(0,1e3);n&&!/https?:\/\//i.test(n)&&(a.message=n)}return a}catch{return null}}var p=new Set(b),f=new Set(h),y=new Set(["active","limit","operation","upgrade_url","topup_url","upgrade_command","slots_per_pack","pack_price_usd","balance_credits","required_credits","retry_guidance","http_status"]),v=12,T=500;function o(e){return typeof e=="string"&&p.has(e)?e:"service_unavailable"}function x(e){if(!e||typeof e!="object"||Array.isArray(e))return;let r={};for(let[t,a]of Object.entries(e)){if(Object.keys(r).length>=v)break;if(y.has(t))if(typeof a=="string"){if((t==="upgrade_url"||t==="topup_url")&&!E(a))continue;let n=g(a).slice(0,T);n&&(r[t]=n)}else(typeof a=="number"&&Number.isFinite(a)||typeof a=="boolean"||a===null)&&(r[t]=a)}return Object.keys(r).length>0?r:void 0}function E(e){if(e.startsWith("/")&&!e.startsWith("//"))return!0;try{let r=new URL(e);return r.protocol==="https:"&&(r.hostname==="mcpscraper.dev"||r.hostname.endsWith(".mcpscraper.dev"))}catch{return!1}}function P(e){let r=o(e);switch(r){case"captcha_exhausted":case"captcha_or_blocked":return"captcha";case"proxy_tunnel_failed":case"proxy_unavailable":case"response_lost":return"connection";case"harvest_timeout":case"mcp_request_timeout":return"timeout";case"concurrency_limit_exceeded":return"concurrency_limit";case"rate_limited":case"upstream_rate_limited":return"rate_limit";case"extraction_failed":case"page_not_found":case"page_forbidden":case"page_rate_limited":case"page_server_error":case"page_http_error":case"bot_check_unresolved":case"page_too_large":case"page_unreachable":case"browser_session_interrupted":case"site_export_not_found":case"site_export_format_unavailable":case"site_export_read_failed":case"site_export_image_not_found":return"extraction";case"image_url_invalid":case"image_url_not_https":case"image_host_unresolvable":case"image_host_blocked":case"image_redirect_invalid":case"image_source_unavailable":case"image_too_large":case"image_redirect_limit":case"image_base64_invalid":case"image_source_missing":case"image_source_ambiguous":case"image_source_type_invalid":case"image_artifact_not_found":case"image_page_too_large":case"page_image_not_found":case"page_image_candidates_unusable":case"image_format_unsupported":case"image_storage_unconfigured":case"featured_image_unhostable":return"invalid_request";case"insufficient_balance":return"billing";case"vendor_unavailable":case"mcp_http_error":return"service_unavailable";case"directory_job_not_found":return"not_found";default:return r}}function w(e){switch(o(e)){case"request_aborted":return"The request was cancelled before it completed.";case"captcha_exhausted":case"captcha_or_blocked":return"The target site returned a verification challenge. Heavy traffic can temporarily increase these challenges; retry in a few minutes.";case"location_mismatch":return"The target site returned results for a different location. Please retry.";case"proxy_tunnel_failed":case"proxy_unavailable":return"The web request could not establish a working connection. Please retry later.";case"harvest_timeout":return"The request timed out before it completed. Please retry with a smaller request.";case"mcp_request_timeout":return"The MCP caller stopped waiting before a final response arrived. Durable work may still be running; continue with the returned Task or job handle instead of restarting it.";case"concurrency_limit_exceeded":return"The service is available, but this account has reached its parallel-operation limit. Wait for an active operation to finish or add capacity.";case"unauthorized":return"Authentication is required to perform this operation.";case"forbidden":return"This account does not have permission to perform this operation.";case"invalid_request":return"The request is invalid. Check the supplied inputs and try again.";case"rate_limited":return"This account is sending requests too quickly. Wait briefly and retry.";case"upstream_rate_limited":return"The connected provider is temporarily rate-limiting requests. Wait briefly and retry.";case"mcp_http_error":return"The API returned an unexpected HTTP response.";case"insufficient_balance":return"This account does not have enough Credits for the operation.";case"extraction_failed":return"The target could not be extracted. Check retryable before attempting it again.";case"directory_job_not_found":return"This directory job was not found for the current account.";case"response_lost":return"The connection was lost before the response arrived. The operation may have already completed and been billed on our side \u2014 check credits_info before retrying blind.";case"vendor_unavailable":return"MCP Scraper's internal browser services require MCP Scraper team attention. Servers or IPs are down until this is fixed \u2014 this is not caused by your request. Please retry in a few minutes.";case"page_not_found":return"The page could not be found. It may have been moved or deleted.";case"page_forbidden":return"The site refused the request.";case"page_rate_limited":return"The site is rate-limiting requests right now. Retrying after a short wait usually works.";case"page_server_error":return"The page's own server returned an error. This is on the target site's side, not something a retry here can fix.";case"page_http_error":return"The page returned an unexpected HTTP response.";case"bot_check_unresolved":return"This site has automated-traffic protection (a bot/CAPTCHA check) that could not be resolved in time. Some sites are simply not extractable this way.";case"page_too_large":return"The page is larger than we can safely process.";case"page_unreachable":return"The page did not respond in time, or the connection could not be completed.";case"browser_session_interrupted":return"The browser session closed before extraction completed. MCP Scraper will retry once with a fresh session; retry the request if this persists.";case"site_export_not_found":return"The site export or requested page was not found, expired, or does not belong to this account.";case"site_export_format_unavailable":return"That representation was not retained for this export page. Read the export manifest and request one of the formats marked available.";case"site_export_read_failed":return"The stored site export could not be read or did not pass its integrity check.";case"site_export_image_not_found":return"The requested site-export image was not found, expired, or does not belong to this account.";case"image_url_invalid":return"The image source is not a valid URL. Use a stable public HTTPS URL or inline image bytes.";case"image_url_not_https":return"Commons image sources must use a public HTTPS URL or inline image bytes.";case"image_host_unresolvable":return"The image host could not be resolved. Use a different stable public URL or inline image bytes.";case"image_host_blocked":return"The image source resolves to a network address Commons cannot fetch safely.";case"image_redirect_invalid":return"The image source redirected to an invalid or unsafe destination.";case"image_source_unavailable":return"The image source could not be fetched. Host a different stable public URL or provide inline image bytes.";case"image_too_large":return"The image exceeds the Commons image size limit.";case"image_redirect_limit":return"The image source exceeded the Commons redirect limit.";case"image_base64_invalid":return"The supplied inline image bytes are invalid.";case"image_source_missing":return"Provide exactly one of a public image or webpage URL, inline image bytes, or an owner-scoped image artifact.";case"image_source_ambiguous":return"Provide only one image source: sourceUrl, imageBase64, or artifactId.";case"image_source_type_invalid":return"Use sourceType only with inline image bytes or an owner-scoped image artifact.";case"image_artifact_not_found":return"The image artifact was not found, expired, or does not belong to this account.";case"image_page_too_large":return"The webpage is too large for bounded Commons image discovery.";case"page_image_not_found":return"The webpage did not expose a usable featured or content image.";case"page_image_candidates_unusable":return"The webpage exposed image candidates, but none returned supported public image bytes.";case"image_format_unsupported":return"Commons accepts JPEG, PNG, GIF, or WebP image bytes.";case"image_storage_unconfigured":return"Commons image storage is temporarily unavailable.";case"featured_image_unhostable":return"The required featured image could not be hosted for Commons publication.";default:return m}}function C(e){let r=o(e.errorCode),t=typeof e.retryAfterSeconds=="number"&&Number.isFinite(e.retryAfterSeconds)?Math.max(1,Math.min(86400,Math.trunc(e.retryAfterSeconds))):void 0,a=e.chargeStatus==="not_charged"||e.chargeStatus==="refund_pending"||e.chargeStatus==="refunded"||e.chargeStatus==="charged"?e.chargeStatus:void 0,n=typeof e.errorType=="string"&&f.has(e.errorType)?e.errorType:void 0,s=x(e.details);return{error_code:r,error_type:n??P(r),message:w(r),retryable:e.retryable===!0,...t?{retry_after_seconds:t}:{},...a?{charge_status:a}:{},...s?{details:s}:{}}}function g(e){return e.replace((new RegExp("https?:\\/\\/[^\\s]*(?:\u0062\u0072\u0069\u0067\u0068\u0074\u0064\u0061\u0074\u0061|on\u006b\u0065\u0072\u006e\u0065\u006c|\u006b\u0065\u0072\u006e\u0065\u006c\\.sh)[^\\s]*", "gi")),"the service").replace(/bright\s*data/gi,"the service").replace((new RegExp("\u0062\u0072\u0069\u0067\u0068\u0074\u0064\u0061\u0074\u0061", "gi")),"the service").replace((new RegExp("\u006b\u0065\u0072\u006e\u0065\u006c\\.sh\\s+sessions?", "gi")),"sessions").replace((new RegExp("\u006b\u0065\u0072\u006e\u0065\u006c\\.sh\\s+session", "gi")),"this session").replace((new RegExp("\u006b\u0065\u0072\u006e\u0065\u006c\\.sh", "gi")),"the service").replace((new RegExp("\u006b\u0065\u0072\u006e\u0065\u006c\\s+sessions?", "gi")),"sessions").replace((new RegExp("\u006b\u0065\u0072\u006e\u0065\u006c\\s+session", "gi")),"this session").replace(/\b(?:sub|cus|sess|proxy)_[A-Za-z0-9_-]+\b/g,"[redacted]").replace((new RegExp("\\b(?:\u004b\u0045\u0052\u004e\u0045\u004c|\u0042\u0052\u0049\u0047\u0048\u0054\u0044\u0041\u0054\u0041|\u0042\u0052\u0049\u0047\u0048\u0054_\u0044\u0041\u0054\u0041)_[A-Z0-9_]*API_KEY\\b", "g")),"BROWSER_SERVICE_API_KEY").replace((new RegExp("\\b\u006b\u0065\u0072\u006e\u0065\u006c\\b", "gi")),"the service").replace(/ +/g," ").trim()}var i=class extends Error{constructor(t){super(`CAPTCHA detected. ${t}`);this.instructions=t}instructions;name="CaptchaError"},c=class extends Error{constructor(t,a){super(t);this.cause=a}cause;name="ExtractionError"},u=class extends Error{constructor(t){super(`Google Maps search did not reach a complete result state (${t})`);this.pageState=t}pageState;name="MapsSearchIncompletePageError"},l=class extends Error{name="RequestAbortedError";constructor(r="Request aborted before harvest completed"){super(r)}},_=class extends Error{name="PaaInteractionInterruptedError"},d=class extends Error{name="LocationMismatchError";constructor(r="Google returned results for a different location than requested"){super(r)}};export{k as a,m as b,b as c,S as d,R as e,o as f,w as g,C as h,g as i,i as j,c as k,u as l,l as m,_ as n,d as o};
|
package/dist/chunk-CNSVZTTT.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{b as y}from"./chunk-B3JRL45T.js";var $=100*1024,L=new Set(["webp","avif","svg","svg+xml"]);function x(s){return s==null?null:s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(2)} MB`}var R=s=>s.replace(/&/g,"&").replace(/�?38;/g,"&").replace(/&/gi,"&").trim(),M=s=>s.replace(/^https?:\/\//i,"//").replace(/\/$/,""),E=(s,r)=>{if(s){let c=s.split(";")[0].trim().toLowerCase();if(c.startsWith("image/"))return c.replace("image/","")}return(r.split("?")[0].match(/\.([a-z0-9]+)$/i)?.[1]||"unknown").toLowerCase()};function T(s){let r=new Map;for(let c of s)for(let n of c.imageLinks||[]){let e=R(n);if(!/^https?:\/\//i.test(e)||/[{}]|%7[bd]/i.test(e))continue;let a=M(e),o=r.get(a);(!o||/^https:/i.test(e)&&/^http:/i.test(o))&&r.set(a,e)}return[...r.values()]}async function D(s,r){let c=new AbortController,n=setTimeout(()=>c.abort(),r),e=o=>({len:o.headers.get("content-length"),cr:o.headers.get("content-range"),ct:o.headers.get("content-type"),status:o.status}),a=async o=>{let g=s;for(let p=0;p<=5;p++){let m=await y(g,{field:"image URL"});if(m.error||!m.parsed)throw new Error(m.error??"Image URL was rejected");let u=await fetch(m.parsed.href,{method:o,...o==="GET"?{headers:{Range:"bytes=0-0"}}:{},redirect:"manual",signal:c.signal});if(u.status>=300&&u.status<400){let t=u.headers.get("location");if(!t)throw new Error(`HTTP ${u.status} redirect did not include Location`);g=new URL(t,m.parsed.href).href;continue}return u}throw new Error("Image request exceeded five redirects")};try{let o=null,g=null,p=null;try{let m=e(await a("HEAD"));p=m.status,g=m.ct,m.len&&(o=Number(m.len))}catch{}if(o==null){let m=await a("GET"),u=e(m);if(p=p??u.status,g=g??u.ct,u.cr&&u.cr.includes("/")){let t=u.cr.split("/")[1];t&&t!=="*"&&(o=Number(t))}else u.len&&(o=Number(u.len));try{await m.body?.cancel()}catch{}}return{url:s,status:p,bytes:Number.isFinite(o)?o:null,contentType:g}}catch(o){return{url:s,status:null,bytes:null,contentType:null,error:String(o.message||o)}}finally{clearTimeout(n)}}async function v(s,r,c){let n=new Array(s.length),e=0;return await Promise.all(Array.from({length:Math.min(r,s.length)},async()=>{for(;e<s.length;){let a=e++;n[a]=await c(s[a])}})),n}async function S(s,r={}){return A(T(s),r)}async function A(s,r={}){let c=r.concurrency??12,n=r.timeoutMs??12e3,e=r.max??5e3,a=T([{imageLinks:s}]).slice(0,e),g=(await v(a,c,t=>D(t,n))).map(t=>{let f=E(t.contentType,t.url);return{...t,size:x(t.bytes),format:f,over100kb:t.bytes!=null&&t.bytes>$,legacyFormat:f!=="unknown"&&!L.has(f)}}),p=g.filter(t=>t.bytes!=null),m=p.reduce((t,f)=>t+f.bytes,0),u={};for(let t of g)u[t.format]=(u[t.format]||0)+1;return{rows:g.sort((t,f)=>(f.bytes??0)-(t.bytes??0)),summary:{unique:g.length,sized:p.length,totalBytes:m,totalSize:x(m)??"0 B",avgSize:x(Math.round(m/(p.length||1)))??"0 B",over100kb:g.filter(t=>t.over100kb).length,legacyFormat:g.filter(t=>t.legacyFormat).length,formatCounts:u,...r.sampleTruncated?{sampleTruncated:!0,sampleCap:e}:{}}}}function _(s){let r=s.summary,c=Object.entries(r.formatCounts).sort((a,o)=>o[1]-a[1]).map(([a,o])=>`${a}:${o}`).join(" "),n=s.rows.filter(a=>a.over100kb).slice(0,15),e=["## Images",`**${r.unique} unique images** \xB7 ${r.totalSize} total \xB7 ${r.avgSize} avg \xB7 ${r.over100kb} over 100 KB \xB7 ${r.legacyFormat} legacy format`,`Formats: ${c}`];if(n.length){e.push("","| Size | Format | URL |","|------|--------|-----|");for(let a of n)e.push(`| ${a.size} | ${a.format} | ${a.url} |`)}return e.join(`
|
|
2
|
-
`)}function I(s){let r=s.replace(/^www\./,"").toLowerCase(),c=r.split(".");return c.length<=2?r:c.slice(-2).join(".")}function U(s,r,c){let n="";try{n=I(new URL(c).hostname)}catch{n=""}let e=s.filter(l=>l.internal),a=r.length,o=r.filter(l=>l.orphan).length,g=e.filter(l=>l.targetStatus!=null&&l.targetStatus>=400).length,p=r.reduce((l,h)=>l+h.inlinks,0),m=r.reduce((l,h)=>l+h.outlinksInternal+h.outlinksExternal,0),u={zero:0,oneToTwo:0,threeToTen:0,elevenPlus:0};for(let l of r)l.inlinks===0?u.zero++:l.inlinks<=2?u.oneToTwo++:l.inlinks<=10?u.threeToTen++:u.elevenPlus++;let t=[...r].sort((l,h)=>h.inlinks-l.inlinks).slice(0,20).map(l=>({url:l.url,inlinks:l.inlinks,outlinksInternal:l.outlinksInternal,outlinksExternal:l.outlinksExternal})),f=new Map,d=0;for(let l of s){let h;try{h=I(new URL(l.to).hostname)}catch{continue}if(!h||h===n)continue;d++;let k=f.get(h)??{links:0,nofollow:0,pages:new Set};k.links++,l.nofollow&&k.nofollow++,k.pages.add(l.from),f.set(h,k)}let i=[...f.entries()].map(([l,h])=>({domain:l,links:h.links,nofollow:h.nofollow,pages:h.pages.size})).sort((l,h)=>h.links-l.links),b=l=>Math.round(l*10)/10;return{summary:{internal:{totalLinks:e.length,pages:a,orphans:o,brokenInternal:g,avgInlinks:a?b(p/a):0,avgOutlinks:a?b(m/a):0,distribution:u,topByInlinks:t},external:{totalLinks:d,uniqueDomains:i.length,topDomains:i.slice(0,20)}},externalDomains:i}}function X(s){let r=s.summary;return["## Link analysis",`**Internal:** ${r.internal.totalLinks} links \xB7 ${r.internal.pages} pages \xB7 avg ${r.internal.avgInlinks} inlinks/page \xB7 ${r.internal.orphans} orphans \xB7 ${r.internal.brokenInternal} broken`,`**External:** ${r.external.totalLinks} links to ${r.external.uniqueDomains} domains`,"","### Inlink distribution",`- 0 inlinks (orphans): ${r.internal.distribution.zero}`,`- 1\u20132: ${r.internal.distribution.oneToTwo}`,`- 3\u201310: ${r.internal.distribution.threeToTen}`,`- 11+: ${r.internal.distribution.elevenPlus}`,"","### Top 20 internal pages by inlinks","| inlinks | out (int/ext) | URL |","|---|---|---|",...r.internal.topByInlinks.map(n=>`| ${n.inlinks} | ${n.outlinksInternal}/${n.outlinksExternal} | ${n.url} |`),"","### Top 20 external domains by links","| links | nofollow | from pages | domain |","|---|---|---|---|",...r.external.topDomains.map(n=>`| ${n.links} | ${n.nofollow} | ${n.pages} | ${n.domain} |`)].join(`
|
|
3
|
-
`)}function w(s,r){let c=new Map;for(let n of s){let e=r(n);if(e==null||e==="")continue;let a=String(e);c.has(a)||c.set(a,[]),c.get(a).push(n.url)}return[...c.values()].filter(n=>n.length>1).flat()}function B(s,r,c){let n=t=>({count:t.length,urls:t.slice(0,200)}),e=t=>s.filter(t).map(f=>f.url),a=t=>t.extractionStatus!=="failed",o=t=>a(t)&&t.status===200,g=new Set(s.filter(a).map(t=>t.url)),p=t=>{try{return new URL(t).pathname}catch{return""}},m={"title.missing":n(e(t=>o(t)&&!t.title)),"title.duplicate":n(w(s.filter(o),t=>t.title)),"title.tooLong":n(e(t=>(t.titleLength??0)>60||(t.titlePixels??0)>561)),"title.tooShort":n(e(t=>t.title!=null&&(t.titleLength??0)<30)),"title.sameAsH1":n(e(t=>!!t.title&&!!t.h1&&t.title.trim()===t.h1.trim())),"meta.missing":n(e(t=>o(t)&&!t.metaDescription)),"meta.duplicate":n(w(s.filter(o),t=>t.metaDescription)),"meta.tooLong":n(e(t=>(t.metaDescLength??0)>155)),"meta.tooShort":n(e(t=>t.metaDescription!=null&&(t.metaDescLength??0)<70)),"h1.missing":n(e(t=>o(t)&&!t.h1)),"h1.multiple":n(e(t=>!!t.h1_2)),"h1.duplicate":n(w(s.filter(o),t=>t.h1)),"h1.tooLong":n(e(t=>(t.h1?.length??0)>70)),"h2.missing":n(e(t=>o(t)&&t.h2Count===0)),"crawl.extractionFailed":n(e(t=>!a(t))),"indexability.nonIndexable":n(e(t=>a(t)&&!t.indexable)),"indexability.noindex":n(e(t=>t.indexabilityReason==="noindex")),"canonical.missing":n(e(t=>o(t)&&!t.canonicalUrl)),"canonical.canonicalised":n(e(t=>t.indexabilityReason==="canonicalised")),"response.broken4xx":n(e(t=>(t.status??0)>=400&&(t.status??0)<500)),"response.error5xx":n(e(t=>(t.status??0)>=500)),"response.redirect3xx":n(e(t=>(t.status??0)>=300&&(t.status??0)<400)),"response.noResponse":n(e(t=>t.status===null)),"content.thin":n(e(t=>o(t)&&t.wordCount>0&&t.wordCount<200)),"content.exactDuplicate":n(w(s.filter(t=>o(t)&&t.contentHash),t=>t.contentHash)),"images.missingAlt":n(e(t=>a(t)&&t.imagesMissingAlt>0)),"schema.missing":n(e(t=>o(t)&&t.schemaTypes.length===0)),"url.tooLong":n(e(t=>t.url.length>115)),"url.uppercase":n(e(t=>/[A-Z]/.test(p(t.url)))),"url.underscores":n(e(t=>p(t.url).includes("_"))),"links.orphan":n([...r.values()].filter(t=>t.orphan&&g.has(t.url)).map(t=>t.url))},u=c;if(!u){let t=d=>{try{let i=new URL(d);return i.hash="",(i.origin+i.pathname).replace(/\/+$/,"")+i.search}catch{return d.replace(/#.*$/,"").replace(/\/+$/,"")}},f=new Map(s.map(d=>[t(d.url),d.status]));u=new Set;for(let d of s)for(let i of d.outlinks??[]){if(!i.internal)continue;let b=f.get(t(i.href));b!=null&&b>=400&&u.add(d.url)}}return m["links.brokenInternal"]=n([...u]),m}function C(s,r,c,n){let e=r.length,a=r.filter(i=>i.extractionStatus!=="failed").length,o=e-a,g=i=>i.startsWith("response.broken")||i.startsWith("response.error")||i.startsWith("links.broken")?"\u{1F534}":i.startsWith("title.missing")||i.startsWith("h1.missing")||i.startsWith("indexability")||i.startsWith("canonical.missing")?"\u{1F7E0}":"\u{1F7E1}",p=Object.entries(c).filter(([,i])=>i.count>0).sort((i,b)=>b[1].count-i[1].count).map(([i,b])=>`| ${g(i)} | \`${i}\` | ${b.count} | ${b.urls.slice(0,3).join(" \xB7 ")}${b.urls.length>3?" \u2026":""} |`),m=[...n.values()].map(i=>i.crawlDepth).filter(i=>i!=null),u=m.length?Math.max(...m):0,t=new Set(r.filter(i=>i.extractionStatus!=="failed").map(i=>i.url)),f=[...n.values()].filter(i=>i.orphan&&t.has(i.url)).length,d=[...n.values()].sort((i,b)=>b.inlinks-i.inlinks).slice(0,5);return[`# SEO Crawl Report: ${s}`,`**${e} pages attempted** \xB7 ${a} extracted \xB7 ${o} failed \xB7 max crawl depth ${u} \xB7 ${f} orphan page(s)`,`
|
|
4
|
-
## Issues
|
|
5
|
-
| | Issue | Count | Examples |
|
|
6
|
-
|---|-------|-------|----------|
|
|
7
|
-
${p.join(`
|
|
8
|
-
`)||"| \u2705 | none | 0 | \u2014 |"}`,`
|
|
9
|
-
## Most-linked pages
|
|
10
|
-
${d.map(i=>`- ${i.inlinks} inlinks \xB7 depth ${i.crawlDepth??"\u2014"} \xB7 ${i.url}`).join(`
|
|
11
|
-
`)}`,`
|
|
12
|
-
_Thresholds: title 60ch/561px, meta 155ch, H1 70ch, thin <200 words, URL 115ch. Pixel widths are estimates._`].join(`
|
|
13
|
-
`)}export{S as a,A as b,_ as c,U as d,X as e,B as f,C as g};
|
package/dist/chunk-EYGA6LOU.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={schemaVersion:1,ratePolicy:{version:"serp-page-2026-09-24",effectiveDate:"2026-09-24T00:00:00.000Z"},costEvidence:{id:"serp-page-rate-basis-2026-09",status:"owner-approved"},operationCosts:{serp:{credits:20,unit:"per page (ordinary search)",label:"SERP search",notes:"search_serp light mode returns one page of organic positions, URLs, titles, and descriptions by default. Unfiltered one-page full mode returns available same-page SERP features. Either mode requests two pages only when pages:2 is explicit. Unfiltered light searches cost 20 credits per delivered page, or 35 credits per delivered page if the backup supplies the result. One-page full searches cost 35 credits. Setting recency to week or month applies Google's date filter through a managed browser and returns organic results only. It costs 35 credits for one page; filtered pages:2 follows Google's page-two control and costs 70 credits when both pages are delivered. Unfiltered searches use the managed browser only as the last backup. Unfiltered two-page full searches return organic results only for 40 credits, with rich features marked unsupported. If only page 1 is delivered, the search is marked partial and billed for one delivered page. A temporary 35-credit-per-requested-page hold is settled to the delivered rate. Location, language, device, and optional module fields do not change ordinary searches. Saved browser identity and capture_serp_snapshot searches retain their 60-credit base price; optional page snapshots add 1 credit per attempted URL."},paa:{credits:10,unit:"per question (+400 credit base)",label:"PAA harvest",notes:"Returns original-query PAA questions with answers and sources plus organic results and Google entity IDs. Optional same-page SERP modules are flag-controlled. Billed 400 credit base + 10 per question actually returned (unused estimate refunded)."},page_scrape:{credits:1,unit:"per page",label:"Page crawl / extract",notes:"Applies to both single-URL extraction and per-page site crawls."},listing_create:{credits:10,unit:"per new listing",label:"Directory or wiki listing creation",notes:"Fixed total price for a new Local Sourcebook directory listing or Transparent Commons wiki entity. Sourcebook acquisition is included."},listing_edit:{credits:2,unit:"per existing listing revision",label:"Directory or wiki listing edit",notes:"Fixed total price for refreshing an existing Local Sourcebook listing or revising an existing Transparent Commons entity."},url_map:{credits:5,unit:"per mapping operation",label:"Site URL mapping",notes:"Flat rate for the full /map-urls call regardless of URL count discovered."},yt_channel:{credits:2,unit:"per call",label:"YouTube search / channel harvest"},yt_transcription:{credits:200,unit:"base + 2/min of video",label:"YouTube transcription",notes:"Flat 200-credit base plus 2 credits per minute of video, reconciled to the real video length after transcription (e.g. a 10-minute video is about 220 credits)."},fb_ad:{credits:7,unit:"per call",label:"Facebook search / ad lookup"},maps_search:{credits:5,unit:"per search",label:"Maps business search",notes:"Returns up to 50 Google Maps business/profile candidates. Use maps_place_intel to hydrate selected businesses."},maps_place:{credits:60,unit:"per business",label:"Maps business lookup",notes:"Maps place runs reserve the 60-credit base plus the declared review maximum before browsing. Completed runs settle to the base plus unique saved reviews; stopped attempts are refunded."},maps_review:{credits:1,unit:"per review card",label:"Maps review",notes:"One credit per unique saved review on a completed Maps place run. The declared maximum is held before browsing; unused credits are refunded."},fb_search:{credits:8,unit:"per search",label:"Facebook ad library search",notes:"Browser automation to search Facebook Ads Library by keyword."},google_ads_search:{credits:6,unit:"per search",label:"Google Ads Transparency search",notes:"Browser automation to find advertisers in Google Ads Transparency Center by domain or name."},google_ads_intel:{credits:2,unit:"per call",label:"Google Ads Transparency advertiser intel",notes:"Lists and hydrates an advertiser's creatives with image URLs and video references."},google_ads_transcribe:{credits:200,unit:"base + 2/min of video",label:"Google ad video transcription",notes:"Flat 200-credit base plus 2 credits per minute of video, reconciled to the real video length after transcription (e.g. a 10-minute video is about 220 credits)."},fb_transcribe:{credits:200,unit:"base + 2/min of video",label:"Facebook video / ad transcription",notes:"Flat 200-credit base plus 2 credits per minute of video, reconciled to the real video length after transcription (e.g. a 10-minute video is about 220 credits)."},fb_reels_inventory:{credits:4,unit:"per profile scan",label:"Facebook Reel URL inventory",notes:"Collects canonical Reel URLs from a Facebook profile. Logged-out scans are capped at 60 URLs; saved browser profiles can request larger inventories."},tiktok_transcribe:{credits:200,unit:"base + 2/min of video",label:"TikTok video transcription",notes:"Transcribes a public TikTok video from its playback media. Flat 200-credit base plus 2 credits per minute, reconciled after transcription."},instagram_profile:{credits:4,unit:"per profile scan",label:"Instagram profile content discovery",notes:"Browser extraction of public Instagram profile grid links. Complete history may require a logged-in profile."},instagram_media:{credits:4,unit:"per post or reel",label:"Instagram media download",notes:"Extracts post text, image URLs, and reel audio/video tracks, with local downloads when the server can write files."},instagram_transcribe:{credits:200,unit:"base + 2/min of video",label:"Instagram media transcription",notes:"Whisper transcription of selected Instagram audio/video media. Flat 200-credit base plus 2 credits per minute of video, reconciled to the real video length after transcription (e.g. a 10-minute video is about 220 credits)."},browser_minute:{credits:120,unit:"per minute of use",label:"Interactive browser session",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."},reddit_thread:{credits:30,unit:"per thread",label:"Reddit thread base lookup",notes:"Base lookup for the post itself. Comments billed separately per comment at reddit_comment rate. Refunded if the thread cannot be retrieved."},reddit_comment:{credits:2,unit:"per comment",label:"Reddit comment",notes:"Charged per comment actually extracted, billed down automatically if the balance runs out mid-thread."},video_analysis:{credits:6667,unit:"per 120 frames (max 480)",label:"Video breakdown (frame-by-frame + transcript)",notes:"Full video breakdown: samples frames across a video up to 60 minutes, analyzes visuals and audio, then produces a summary, pacing, topic outline, key points, hook, style, and replication guidance. Reserves 6667 Credits per requested 120-frame tier, up to 480 frames. Unused frame tiers and failed-run frame charges are refunded. Incurred analysis-model usage is billed separately, including usage before a failure; terminal status checks settle the original run."},trustpilot_reviews:{credits:5,unit:"per call",label:"Trustpilot review harvest",notes:"Base lookup. Reviews billed separately per card at trustpilot_review rate. Refunded if no reviews are found."},trustpilot_review:{credits:1,unit:"per review card",label:"Trustpilot review card",notes:"Charged per review actually extracted, billed down automatically if the balance runs out mid-page."},g2_reviews:{credits:5,unit:"per call",label:"G2 review harvest",notes:"Base lookup. Reviews billed separately per card at g2_review rate. Refunded if no reviews are found."},g2_review:{credits:2,unit:"per review card",label:"G2 review card",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."},diff_page:{credits:1,unit:"per check",label:"Page change check",notes:"Same cost as a single page extract \u2014 one scrape is performed per check, then compared against your last stored snapshot for that URL."}},publicTiers:[{tier:"starter",label:"Starter",monthlyUsd:12,credits:8e4,concurrency:3},{tier:"growth",label:"Growth",monthlyUsd:40,credits:266667,concurrency:10},{tier:"scale",label:"Scale",monthlyUsd:100,credits:8e5,concurrency:20}],credits:{mcPerCredit:100,freeSignupCredits:0},inventory:{totalTools:347,scraperTools:233,memoryTools:114},concurrencyPack:{ratePolicyVersion:"2026-08-14.concurrency-pack-v1",monthlyUsd:5,currency:"usd",interval:"month",billingUnit:"pack",slotsPerPack:2},scaleCreditPack:{ratePolicyVersion:"2026-09-21.scale-credit-pack-v1",eligibleTier:"scale",incrementUsd:10,creditsPerIncrement:8e4,maxQuantity:100,currency:"usd",expiryMonths:3},addons:{memory:{monthlyUsd:19,quotaGb:5,freeQuotaGb:.01},connectedAccounts:{schemaVersion:2,ratePolicyVersion:"2026-08-03.connected-usage-v3",effectiveAt:"2026-08-03T00:00:00.000Z",entitlement:"paid_plan_add_on",connection:{billingMode:"flat_recurring_credits",amountCredits:15e3,interval:"month",unit:"active_connection",proration:"none"},usage:{billingMode:"credits",settlementMode:"authoritative_receipt",rounding:"aggregate_then_ceil_to_mc",functionRun:{credits:2,mc:200,unit:"per_function_run"},proxyRequest:{credits:2,mc:200,unit:"per_proxy_request"},compute:{creditsPerSecond:5,mcPerSecond:500,sourceUnit:"millisecond",unit:"per_compute_second",formula:"ceil(computeMilliseconds * mcPerSecond / 1000)"}}}}};export{e as a};
|