mcp-scraper 0.97.1 → 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 -2442
- 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-5X5CQAKO.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-GS657HXG.js +0 -1
- package/dist/chunk-24YDQ3EO.js +0 -5
- package/dist/chunk-2L7CHN5N.js +0 -4
- package/dist/chunk-3F7AFM53.js +0 -1
- package/dist/chunk-4AEW53RU.js +0 -954
- package/dist/chunk-4HZXATHB.js +0 -27
- package/dist/chunk-4YZ74SJ6.js +0 -1
- package/dist/chunk-4ZVO6GX4.js +0 -1
- package/dist/chunk-55ZANTHL.js +0 -3
- package/dist/chunk-5RQWFYXY.js +0 -930
- package/dist/chunk-5TQINRZN.js +0 -12
- package/dist/chunk-5UQAL7HV.js +0 -41
- package/dist/chunk-6D25Q5BR.js +0 -21728
- package/dist/chunk-6N5EC7ZO.js +0 -1
- package/dist/chunk-7POHNTVW.js +0 -1
- package/dist/chunk-7SR7MEU5.js +0 -62
- 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-C3JWX6KM.js +0 -10
- package/dist/chunk-C7MGJUTU.js +0 -1
- package/dist/chunk-CNSVZTTT.js +0 -13
- package/dist/chunk-EYGA6LOU.js +0 -1
- package/dist/chunk-F3M7INSN.js +0 -41
- package/dist/chunk-FLAWC5PF.js +0 -5
- package/dist/chunk-FM7BX2LU.js +0 -159
- package/dist/chunk-HCK6PLM3.js +0 -3
- package/dist/chunk-HNNYXMSI.js +0 -1
- package/dist/chunk-IFPION5D.js +0 -121
- package/dist/chunk-IPQOBOFY.js +0 -1
- package/dist/chunk-J7XDXIB6.js +0 -163
- package/dist/chunk-JHDD6R3O.js +0 -8
- package/dist/chunk-JMZIDHYQ.js +0 -2
- package/dist/chunk-K3VDGJNK.js +0 -1
- package/dist/chunk-KBZY2OGP.js +0 -11
- package/dist/chunk-KJQXUZ4Y.js +0 -4
- package/dist/chunk-KXJCGV3H.js +0 -1
- package/dist/chunk-NALXKTUU.js +0 -1
- package/dist/chunk-NNOX3FYG.js +0 -198
- package/dist/chunk-NQFTETVC.js +0 -189
- package/dist/chunk-OILOHQNL.js +0 -2
- package/dist/chunk-OLYPLX5C.js +0 -1
- package/dist/chunk-P6CDR3RM.js +0 -1
- package/dist/chunk-PKQHHCO4.js +0 -20
- package/dist/chunk-QCBCOEH5.js +0 -1
- 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-SJNSTO3C.js +0 -42
- package/dist/chunk-TZYITYL4.js +0 -2
- package/dist/chunk-UIOSADPB.js +0 -1718
- package/dist/chunk-UNEJYZ4T.js +0 -102
- package/dist/chunk-UUJYICAJ.js +0 -1
- package/dist/chunk-VVSHZV5S.js +0 -73
- package/dist/chunk-WNUXMPVX.js +0 -1
- package/dist/chunk-XNTAHMPA.js +0 -218
- package/dist/chunk-ZDECILF6.js +0 -16
- package/dist/chunk-ZNPGM3XE.js +0 -4
- package/dist/compatibility-UPPKZ4KY.js +0 -1
- package/dist/contracts-GUXGFCVV.js +0 -1
- package/dist/core-schema-Y47YFKH2.js +0 -899
- package/dist/direct-completion-ZVPPEBDU.js +0 -1
- package/dist/dispatch-GRMMPKQD.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/jobs-NRZHGQ7I.js +0 -1
- 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-2VKW7SGH.js +0 -1
- package/dist/reconciliation-QC6SILLR.js +0 -1
- package/dist/report-artifact-offload-PQNFDNPL.js +0 -1
- package/dist/repository-CYXVMYAI.js +0 -1
- package/dist/repository-UKDA4IWP.js +0 -1
- package/dist/server-EYMJROPX.js +0 -5544
- package/dist/settlement-47EUTSGX.js +0 -1
- package/dist/vendor-errors-647LSH6H.js +0 -1
- package/dist/worker-AWJF7UYR.js +0 -1
- package/public/.well-known/xray-install.json +0 -183
- package/public/agent-install.md +0 -200
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface PublicClientOptions {
|
|
2
|
+
apiKey?: string;
|
|
3
|
+
baseUrl?: string;
|
|
4
|
+
fetchImpl?: typeof fetch;
|
|
5
|
+
}
|
|
6
|
+
export interface RpcMessage {
|
|
7
|
+
jsonrpc?: string;
|
|
8
|
+
id?: string | number | null;
|
|
9
|
+
method?: string;
|
|
10
|
+
params?: Record<string, unknown>;
|
|
11
|
+
result?: unknown;
|
|
12
|
+
error?: unknown;
|
|
13
|
+
}
|
|
14
|
+
export interface ToolResult {
|
|
15
|
+
content: Array<{
|
|
16
|
+
type: string;
|
|
17
|
+
text?: string;
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
}>;
|
|
20
|
+
structuredContent?: Record<string, unknown>;
|
|
21
|
+
isError?: boolean;
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
}
|
|
24
|
+
/** Authenticated protocol transport. It never retries a possibly billable call. */
|
|
25
|
+
export declare class McpScraperClient {
|
|
26
|
+
#private;
|
|
27
|
+
readonly endpoint: string;
|
|
28
|
+
private readonly fetchImpl;
|
|
29
|
+
private protocolVersion?;
|
|
30
|
+
private nextId;
|
|
31
|
+
constructor(options?: PublicClientOptions);
|
|
32
|
+
relay(message: RpcMessage, onNotification?: (message: RpcMessage) => void, signal?: AbortSignal): Promise<RpcMessage | null>;
|
|
33
|
+
request<T = unknown>(method: string, params?: Record<string, unknown>): Promise<T>;
|
|
34
|
+
callTool(name: string, args?: Record<string, unknown>): Promise<ToolResult>;
|
|
35
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-scraper",
|
|
3
|
-
"
|
|
4
|
-
"description": "MCP server for MCP Scraper web intelligence tools",
|
|
3
|
+
"description": "Authenticated public client for hosted MCP Scraper tools and REST APIs",
|
|
5
4
|
"type": "module",
|
|
6
5
|
"main": "./dist/index.cjs",
|
|
7
6
|
"module": "./dist/index.js",
|
|
@@ -27,56 +26,17 @@
|
|
|
27
26
|
"engines": {
|
|
28
27
|
"node": ">=20.18.1"
|
|
29
28
|
},
|
|
29
|
+
"version": "0.98.0",
|
|
30
30
|
"license": "ISC",
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"@anthropic-ai/sdk": "^0.96.0",
|
|
33
|
-
"@fal-ai/client": "^1.10.1",
|
|
34
|
-
"@hono/node-server": "^2.0.2",
|
|
35
|
-
"@libsql/client": "^0.17.3",
|
|
36
|
-
"@modelcontextprotocol/client": "^2.0.0",
|
|
37
|
-
"@modelcontextprotocol/node": "^2.0.0",
|
|
38
|
-
"@modelcontextprotocol/server": "^2.0.0",
|
|
39
|
-
"@neondatabase/serverless": "^1.1.0",
|
|
40
|
-
"@resvg/resvg-js": "^2.6.2",
|
|
41
|
-
"@vercel/blob": "^2.4.1",
|
|
42
|
-
"@vercel/functions": "^3.9.5",
|
|
43
|
-
"cheerio": "1.2.0",
|
|
44
|
-
"commander": "^12.0.0",
|
|
45
|
-
"diff": "^9.0.0",
|
|
46
|
-
"exceljs": "4.4.0",
|
|
47
|
-
"hono": "4.13.0",
|
|
48
|
-
"https-proxy-agent": "^7.0.6",
|
|
49
|
-
"ipaddr.js": "^1.9.1",
|
|
50
|
-
"jose": "^6.2.3",
|
|
51
|
-
"marked": "^18.0.7",
|
|
52
|
-
"mcpscraper-memory-tools": "2.0.0",
|
|
53
|
-
"p-limit": "^7.3.0",
|
|
54
|
-
"papaparse": "^5.4.0",
|
|
55
|
-
"pg": "^8.23.0",
|
|
56
|
-
"playwright": "^1.44.0",
|
|
57
|
-
"playwright-extra": "^4.3.6",
|
|
58
|
-
"puppeteer-extra-plugin-stealth": "^2.11.2",
|
|
59
|
-
"resend": "^6.12.3",
|
|
60
|
-
"satori": "^0.26.0",
|
|
61
|
-
"stripe": "^22.1.1",
|
|
62
|
-
"turndown": "^7.2.4",
|
|
63
|
-
"twilio": "^5.13.1",
|
|
64
|
-
"yauzl": "^3.4.0",
|
|
65
|
-
"yazl": "^3.3.1",
|
|
66
|
-
"youtube-transcript": "^1.3.1",
|
|
67
|
-
"zod": "4.4.3"
|
|
68
|
-
},
|
|
69
31
|
"files": [
|
|
70
|
-
"dist
|
|
71
|
-
"dist/*.cjs",
|
|
72
|
-
"dist/*.d.ts",
|
|
73
|
-
"dist/*.d.cts",
|
|
74
|
-
"dist/bin/*.js",
|
|
75
|
-
"dist/editorial-reading-room/assets",
|
|
76
|
-
"public/agent-install.md",
|
|
77
|
-
"public/.well-known/xray-install.json",
|
|
32
|
+
"dist",
|
|
78
33
|
"README.md",
|
|
79
|
-
"CHANGELOG.md"
|
|
80
|
-
|
|
81
|
-
|
|
34
|
+
"CHANGELOG.md"
|
|
35
|
+
],
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"commander": "^12.0.0"
|
|
38
|
+
},
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public"
|
|
41
|
+
}
|
|
82
42
|
}
|
package/THIRD_PARTY_NOTICES.html
DELETED
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en"><meta charset="utf-8"><title>Third-party notices</title><body><h1>Browser control library</h1><p>This distribution bundles the browser control library with build-time minification and literal-name encoding. Its license follows.</p><pre> Apache License
|
|
3
|
-
Version 2.0, January 2004
|
|
4
|
-
http://www.apache.org/licenses/
|
|
5
|
-
|
|
6
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
-
|
|
8
|
-
1. Definitions.
|
|
9
|
-
|
|
10
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
-
|
|
13
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
-
the copyright owner that is granting the License.
|
|
15
|
-
|
|
16
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
-
other entities that control, are controlled by, or are under common
|
|
18
|
-
control with that entity. For the purposes of this definition,
|
|
19
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
-
direction or management of such entity, whether by contract or
|
|
21
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
-
|
|
24
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
-
exercising permissions granted by this License.
|
|
26
|
-
|
|
27
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
-
including but not limited to software source code, documentation
|
|
29
|
-
source, and configuration files.
|
|
30
|
-
|
|
31
|
-
"Object" form shall mean any form resulting from mechanical
|
|
32
|
-
transformation or translation of a Source form, including but
|
|
33
|
-
not limited to compiled object code, generated documentation,
|
|
34
|
-
and conversions to other media types.
|
|
35
|
-
|
|
36
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
-
Object form, made available under the License, as indicated by a
|
|
38
|
-
copyright notice that is included in or attached to the work
|
|
39
|
-
(an example is provided in the Appendix below).
|
|
40
|
-
|
|
41
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
-
form, that is based on (or derived from) the Work and for which the
|
|
43
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
-
of this License, Derivative Works shall not include works that remain
|
|
46
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
-
the Work and Derivative Works thereof.
|
|
48
|
-
|
|
49
|
-
"Contribution" shall mean any work of authorship, including
|
|
50
|
-
the original version of the Work and any modifications or additions
|
|
51
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
-
means any form of electronic, verbal, or written communication sent
|
|
56
|
-
to the Licensor or its representatives, including but not limited to
|
|
57
|
-
communication on electronic mailing lists, source code control systems,
|
|
58
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
-
excluding communication that is conspicuously marked or otherwise
|
|
61
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
-
|
|
63
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
-
subsequently incorporated within the Work.
|
|
66
|
-
|
|
67
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
-
Work and such Derivative Works in Source or Object form.
|
|
73
|
-
|
|
74
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
-
(except as stated in this section) patent license to make, have made,
|
|
78
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
-
where such license applies only to those patent claims licensable
|
|
80
|
-
by such Contributor that are necessarily infringed by their
|
|
81
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
-
institute patent litigation against any entity (including a
|
|
84
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
-
or contributory patent infringement, then any patent licenses
|
|
87
|
-
granted to You under this License for that Work shall terminate
|
|
88
|
-
as of the date such litigation is filed.
|
|
89
|
-
|
|
90
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
-
modifications, and in Source or Object form, provided that You
|
|
93
|
-
meet the following conditions:
|
|
94
|
-
|
|
95
|
-
(a) You must give any other recipients of the Work or
|
|
96
|
-
Derivative Works a copy of this License; and
|
|
97
|
-
|
|
98
|
-
(b) You must cause any modified files to carry prominent notices
|
|
99
|
-
stating that You changed the files; and
|
|
100
|
-
|
|
101
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
-
that You distribute, all copyright, patent, trademark, and
|
|
103
|
-
attribution notices from the Source form of the Work,
|
|
104
|
-
excluding those notices that do not pertain to any part of
|
|
105
|
-
the Derivative Works; and
|
|
106
|
-
|
|
107
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
-
distribution, then any Derivative Works that You distribute must
|
|
109
|
-
include a readable copy of the attribution notices contained
|
|
110
|
-
within such NOTICE file, excluding those notices that do not
|
|
111
|
-
pertain to any part of the Derivative Works, in at least one
|
|
112
|
-
of the following places: within a NOTICE text file distributed
|
|
113
|
-
as part of the Derivative Works; within the Source form or
|
|
114
|
-
documentation, if provided along with the Derivative Works; or,
|
|
115
|
-
within a display generated by the Derivative Works, if and
|
|
116
|
-
wherever such third-party notices normally appear. The contents
|
|
117
|
-
of the NOTICE file are for informational purposes only and
|
|
118
|
-
do not modify the License. You may add Your own attribution
|
|
119
|
-
notices within Derivative Works that You distribute, alongside
|
|
120
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
-
that such additional attribution notices cannot be construed
|
|
122
|
-
as modifying the License.
|
|
123
|
-
|
|
124
|
-
You may add Your own copyright statement to Your modifications and
|
|
125
|
-
may provide additional or different license terms and conditions
|
|
126
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
-
the conditions stated in this License.
|
|
130
|
-
|
|
131
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
-
this License, without any additional terms or conditions.
|
|
135
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
-
the terms of any separate license agreement you may have executed
|
|
137
|
-
with Licensor regarding such Contributions.
|
|
138
|
-
|
|
139
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
-
except as required for reasonable and customary use in describing the
|
|
142
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
-
|
|
144
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
-
implied, including, without limitation, any warranties or conditions
|
|
149
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
-
appropriateness of using or redistributing the Work and assume any
|
|
152
|
-
risks associated with Your exercise of permissions under this License.
|
|
153
|
-
|
|
154
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
-
unless required by applicable law (such as deliberate and grossly
|
|
157
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
-
liable to You for damages, including any direct, indirect, special,
|
|
159
|
-
incidental, or consequential damages of any character arising as a
|
|
160
|
-
result of this License or out of the use or inability to use the
|
|
161
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
-
other commercial damages or losses), even if such Contributor
|
|
164
|
-
has been advised of the possibility of such damages.
|
|
165
|
-
|
|
166
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
-
or other liability obligations and/or rights consistent with this
|
|
170
|
-
License. However, in accepting such obligations, You may act only
|
|
171
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
-
defend, and hold each Contributor harmless for any liability
|
|
174
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
-
of your accepting any such warranty or additional liability.
|
|
176
|
-
|
|
177
|
-
END OF TERMS AND CONDITIONS
|
|
178
|
-
|
|
179
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
-
|
|
181
|
-
To apply the Apache License to your work, attach the following
|
|
182
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
-
replaced with your own identifying information. (Don't include
|
|
184
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
-
comment syntax for the file format. We also recommend that a
|
|
186
|
-
file or class name and description of purpose be included on the
|
|
187
|
-
same "printed page" as the copyright notice for easier
|
|
188
|
-
identification within third-party archives.
|
|
189
|
-
|
|
190
|
-
Copyright 2026 Kernel
|
|
191
|
-
|
|
192
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
-
you may not use this file except in compliance with the License.
|
|
194
|
-
You may obtain a copy of the License at
|
|
195
|
-
|
|
196
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
-
|
|
198
|
-
Unless required by applicable law or agreed to in writing, software
|
|
199
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
-
See the License for the specific language governing permissions and
|
|
202
|
-
limitations under the License.
|
|
203
|
-
</pre></body></html>
|
package/dist/actions-5X5CQAKO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as a,f as b,g as c,h as d,i as e,j as f,k as g,l as h}from"./chunk-5UQAL7HV.js";import"./chunk-FM7BX2LU.js";import"./chunk-NALXKTUU.js";import"./chunk-XNTAHMPA.js";import"./chunk-RDHGQ2WZ.js";import"./chunk-4YZ74SJ6.js";import"./chunk-JHDD6R3O.js";import"./chunk-SEZETSB3.js";import"./chunk-SDQW7IJN.js";import"./chunk-VVSHZV5S.js";import"./chunk-4ZVO6GX4.js";import"./chunk-WNUXMPVX.js";import"./chunk-EYGA6LOU.js";import"./chunk-OILOHQNL.js";export{d as GMAIL_ATTACHMENT_REF_TTL_MS,c as GMAIL_INLINE_BODY_BYTES,b as GMAIL_MAIN_CONTRACT_HASH,a as GMAIL_MAIN_CONTRACT_VERSION,h as GmailService,e as GmailServiceError,g as normalizeGmailMessage,f as parseGmailAddresses};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m}from"./chunk-RDHGQ2WZ.js";import"./chunk-SEZETSB3.js";import"./chunk-SDQW7IJN.js";import"./chunk-OILOHQNL.js";export{a as CONNECTED_DATA_ARTIFACT_PREFIX,b as CONNECTED_DATA_ARTIFACT_TTL_MS,c as CONNECTED_DATA_DOWNLOAD_TTL_MS,m as cleanupExpiredConnectedDataArtifacts,f as connectedDataArtifactExpiresAt,g as connectedDataArtifactIsExpired,e as connectedDataArtifactOwnerId,d as connectedDataArtifactPolicy,h as createConnectedDataArtifact,i as createConnectedDataBinaryArtifact,l as readConnectedDataArtifactBytes,k as readConnectedDataArtifactWindow,j as renewConnectedDataArtifactDownload};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e,f}from"./chunk-55ZANTHL.js";import"./chunk-SEZETSB3.js";import"./chunk-SDQW7IJN.js";import"./chunk-B3JRL45T.js";import"./chunk-OILOHQNL.js";export{a as MAPS_MEDIA_ARTIFACT_PREFIX,b as MAPS_MEDIA_ARTIFACT_TTL_MS,d as mapsMediaArtifactOwnerId,c as mapsMediaArtifactPolicy,f as packageMapsMedia,e as readOwnedMapsMediaArtifactBuffer};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"./chunk-KXJCGV3H.js";import"./chunk-SEZETSB3.js";import"./chunk-SDQW7IJN.js";import"./chunk-OILOHQNL.js";export{a as SITE_EXTRACT_ARTIFACT_PREFIX,b as SITE_EXTRACT_ARTIFACT_TTL_MS,c as SITE_EXTRACT_DOWNLOAD_TTL_MS,o as cleanupExpiredSiteExtractArtifacts,f as createSiteExtractBundleArtifact,g as createSiteExtractBundleArtifactStream,i as createSiteExtractContentChunkArtifact,h as createSiteExtractImageArtifact,l as readOwnedSiteExtractArtifactBuffer,m as readOwnedSiteExtractContentChunk,n as readOwnedSiteExtractImageArtifact,k as readSiteExtractArtifactBuffer,j as renewSiteExtractArtifactDownload,e as siteExtractArtifactOwnerId,d as siteExtractArtifactPolicy};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j}from"./chunk-3F7AFM53.js";import"./chunk-SEZETSB3.js";import"./chunk-SDQW7IJN.js";import"./chunk-OILOHQNL.js";export{c as DIRECTORY_ARTIFACT_DOWNLOAD_TTL_MS,a as DIRECTORY_ARTIFACT_PREFIX,b as DIRECTORY_ARTIFACT_TTL_MS,d as DIRECTORY_CSV_CONTENT_TYPE,j as cleanupExpiredDirectoryArtifacts,g as createDirectoryCsvArtifact,f as directoryArtifactOwnerId,e as directoryArtifactPolicy,i as readDirectoryArtifactWindow,h as renewDirectoryArtifactDownload};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as a,o as b,p as c,q as d,r as e,s as f,t as g}from"./chunk-SDQW7IJN.js";export{g as cleanupPrivateBlobObjects,b as consumePrivateBlob,c as getPrivateBlob,a as metadataBlobId,d as putPrivateBlobFile,e as putPrivateBlobMetadata,f as signPrivateBlob};
|
package/dist/bundle-GS657HXG.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as b,k as c}from"./chunk-F3M7INSN.js";import"./chunk-JMZIDHYQ.js";import{F as a}from"./chunk-NQFTETVC.js";import"./chunk-KXJCGV3H.js";import"./chunk-C3JWX6KM.js";import"./chunk-CNSVZTTT.js";import"./chunk-SEZETSB3.js";import"./chunk-SDQW7IJN.js";import"./chunk-K3VDGJNK.js";import"./chunk-7SR7MEU5.js";import"./chunk-ANQ4JJVI.js";import"./chunk-PKQHHCO4.js";import"./chunk-4ZVO6GX4.js";import"./chunk-C7MGJUTU.js";import"./chunk-WNUXMPVX.js";import"./chunk-OLYPLX5C.js";import"./chunk-B3JRL45T.js";import"./chunk-OILOHQNL.js";import"./chunk-HNNYXMSI.js";export{b as MAX_ANALYZED_LINK_EDGES,a as SITE_EXTRACT_PAGE_CHUNK,c as assembleExtractArtifacts};
|
package/dist/chunk-24YDQ3EO.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{a as S}from"./chunk-OLYPLX5C.js";import{a as P}from"./chunk-B3JRL45T.js";import{createHash as N}from"crypto";var k="3.0.0",x="analytics_setup_site",U="Install X-Ray",C="Install X-Ray and tell me what drives customers",m=`Call ${x} with { "startUrl": "<site URL>", "goal": "${C}" }; on every later call, reuse the returned setupId and revision.`,_=JSON.stringify({mcpServers:{"mcp-scraper":{command:"npx",args:["-y","--package","mcp-scraper@latest","mcp-scraper"],env:{MCP_SCRAPER_API_KEY:"${env:MCP_SCRAPER_API_KEY}"}}}},null,2),H=JSON.stringify({mcpServers:{"mcp-scraper":{url:"https://mcpscraper.dev/mcp"}}},null,2),I={schema:"https://mcpscraper.dev/schemas/xray-install-contract-v1.json",protocolVersion:k,product:"Thorbit X-Ray",triggerPhrases:[U,"Install X-Ray on this site and tell me what drives customers"],canonicalUrls:{markdown:"https://mcpscraper.dev/agent-install.md",json:"https://mcpscraper.dev/.well-known/xray-install.json",hostedMcp:"https://mcpscraper.dev/mcp"},facade:{tool:x,initialCall:{startUrl:"<site URL>",goal:C},continuationRule:"Treat setupId plus revision as the durable continuation handle. Reuse both after approval, runtime publication, verification, retry, or return."},topologies:{local_stdio:{label:"Local npm MCP process",authority:"The client starts MCP Scraper locally. After the one-time Pixel insertion, X-Ray setup publishes only owner-confirmed runtime configuration.",secretHandling:"Set MCP_SCRAPER_API_KEY in the local environment or client secret field. Never paste it into chat or commit it."},hosted_remote:{label:"Hosted authenticated MCP",authority:"The hosted MCP inspects approved public pages and publishes owner-confirmed X-Ray runtime configuration. It cannot read or write a caller-local path.",secretHandling:"Use the MCP OAuth/connection flow. Never put a credential in a URL, prompt, or config shown in chat."}},hosts:[{id:"codex",label:"Codex",supportedTopologies:["local_stdio","hosted_remote"],mcpConfigMode:"toml",workspaceRead:!0,workspaceWrite:!0,restartRequired:!0,exactConfig:`[mcp_servers.mcp-scraper]
|
|
2
|
-
command = "npx"
|
|
3
|
-
args = ["-y", "--package", "mcp-scraper@latest", "mcp-scraper"]
|
|
4
|
-
env_vars = ["MCP_SCRAPER_API_KEY"]`,continuation:m,rollback:"Remove the mcp_servers.mcp-scraper table, then restart Codex. Pixel removal is a separate owner-controlled site action."},{id:"claude-code",label:"Claude Code",supportedTopologies:["local_stdio","hosted_remote"],mcpConfigMode:"command",workspaceRead:!0,workspaceWrite:!0,restartRequired:!0,exactConfig:'claude mcp add mcp-scraper --scope user --env MCP_SCRAPER_API_KEY="$MCP_SCRAPER_API_KEY" -- npx -y --package mcp-scraper@latest mcp-scraper',continuation:m,rollback:"Run: claude mcp remove mcp-scraper -s user. Pixel removal is a separate owner-controlled site action."},{id:"claude-desktop",label:"Claude Desktop",supportedTopologies:["local_stdio"],mcpConfigMode:"desktop_extension",workspaceRead:!1,workspaceWrite:!1,restartRequired:!0,exactConfig:"Install https://mcpscraper.dev/downloads/mcp-scraper.mcpb and enter the API key only in Claude Desktop's protected configuration field.",continuation:m,rollback:"Remove the MCP Scraper extension in Claude Desktop. Pixel removal is a separate owner-controlled site action."},{id:"cursor",label:"Cursor",supportedTopologies:["local_stdio","hosted_remote"],mcpConfigMode:"json",workspaceRead:!0,workspaceWrite:!0,restartRequired:!0,exactConfig:_,continuation:m,rollback:"Remove mcp-scraper from .cursor/mcp.json (or the user MCP settings), then restart Cursor."},{id:"windsurf",label:"Windsurf",supportedTopologies:["local_stdio"],mcpConfigMode:"json",workspaceRead:!0,workspaceWrite:!0,restartRequired:!0,exactConfig:_,continuation:m,rollback:"Remove mcp-scraper from the Windsurf MCP configuration, then restart Windsurf."},{id:"cline",label:"Cline",supportedTopologies:["local_stdio"],mcpConfigMode:"json",workspaceRead:!0,workspaceWrite:!0,restartRequired:!0,exactConfig:_,continuation:m,rollback:"Remove mcp-scraper from Cline MCP Servers, then restart the extension host."},{id:"user-action-only",label:"User-action-only MCP host",supportedTopologies:["hosted_remote"],mcpConfigMode:"handoff_only",workspaceRead:!1,workspaceWrite:!1,restartRequired:!1,exactConfig:H,continuation:m,rollback:"Disconnect MCP Scraper from the host. Pixel removal remains an owner-controlled site action."}],tagBootstrap:{requirement:"one_global_pixel_once",ongoingConfiguration:"xray_runtime_manifest",sourceAccessRequiredAfterInstall:!1,supportedInsertionPaths:["manual","tag_manager","cms_plugin","coding_host"]},workflow:["Resolve Thorbit X-Ray entitlement and the target site without consuming MCP Scraper Credits.","Inspect the whole approved public site; enumerate distinct renderers, routes, and Pixel coverage.","Infer the business model and customer outcome, then propose one privacy-safe measurement plan.","If the Pixel is absent, return the canonical one-time tag and exact uncovered surfaces; do not claim ongoing control there.","Publish an approved measurement revision as a digest-bound runtime manifest; source or repository access is not required.","For SaaS, verify the measurement foundation: global tag coverage, ad-source capture, lifecycle events, currency and timezone, consent, and observed outcome events.","Optionally publish a structured post-purchase survey after approved disclosure evidence; reported influence remains separate from deterministic touches.","Compare observed attribution with customer-reported influence only with explicit weights totaling 1,000,000 micros and a named methodology version.","Keep view-through reporting unavailable until event-level provider evidence can join to an eligible X-Ray subject; aggregate impressions never qualify.","Verify route coverage, consent, PageViews, manifest convergence, bounded rule matches, and persisted definition/version evidence.","Require a separate exact-revision approval before any canary or real-visitor experiment activation.","Return first customer-journey answers when sufficient, or exact evidence-readiness thresholds when not.","On \u201Cimprove\u201D, propose one highest-value uncovered outcome, require approval when needed, and reverify."],safetyRules:["Never invent or hand-author tracking code; use the canonical product-authored Pixel snippet returned by analytics_setup_site.","Never ask for or print API keys, OAuth tokens, signed URLs, cookies, or other credentials.","Never call ad platforms directly or silently activate events, definitions, funnels, or delivery destinations.","Never treat a CTA click as a customer, sale, or revenue event without verified outcome evidence.","Never claim full-domain installation while an in-scope route or renderer is missing, excluded without approval, or unverifiable.","Never treat event-name presence as verification; require persisted definition ID and version evidence.","Never accept survey invitation tokens or exchange codes through MCP inputs or prompts.","Never treat customer-reported influence as identity, CRM mutation authority, ad-activation evidence, or a deterministic touch."],terminalStates:["complete","tag_required","input_required","approval_required","runtime_convergence_required","not_ready","error"]};function E(t){return Array.isArray(t)?`[${t.map(E).join(",")}]`:t&&typeof t=="object"?`{${Object.entries(t).sort(([e],[r])=>e.localeCompare(r)).map(([e,r])=>`${JSON.stringify(e)}:${E(r)}`).join(",")}}`:JSON.stringify(t)}function j(){return E(I)}var O=`sha256:${N("sha256").update(j(),"utf8").digest("hex")}`,L={...I,protocolDigest:O};function de(t){let e=L.hosts.find(r=>r.id===t);if(!e)throw new Error(`Unknown X-Ray host: ${t}`);return e}function me(){return["# Install X-Ray","",`Protocol: ${k} (${O})`,"",`Use ${x} as the single conversational setup facade. Ask for the target site URL if it is missing, then call it with the goal \u201C${C}\u201D.`,"","Continue the same setup with its setupId and revision. Confirm one global Pixel across all public rendering surfaces; present one measurement plan; publish it as a digest-bound runtime manifest after exact-revision approval; verify manifest and rule versions; then return first customer-journey answers or explicit readiness thresholds. For SaaS, verify the provider-neutral measurement foundation. Browser events never prove paid revenue. GitHub or repository access is not required after the tag is installed.","","Do not request pasted credentials, invent tracking code, silently activate measurement, call ad platforms directly, or claim customers/revenue from CTA clicks."].join(`
|
|
5
|
-
`)}function fe(t=L){return JSON.parse(JSON.stringify(t))}var q=20,D=20,W=10,z=20,w=280,Y=/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/gi,F=[".png",".jpg",".jpeg",".gif",".svg",".webp",".ico","@2x","sentry","wix.com","wixpress","example.","godaddy","squarespace","schema.org","u003e","core-js"],G=/\b(?:website|site|web)\s+(?:by|built|design(?:ed)?|develop(?:ed)?|powered)\b|\b(?:developer|webmaster)\b/i,J=/(?:^|\/)(?:about|bio|contact|contact-us|meet|our-team|people|profile|staff|team)(?:\/|$)/i,V={"facebook.com":"facebook","fb.com":"facebook","instagram.com":"instagram","linkedin.com":"linkedin","twitter.com":"twitter","x.com":"x","youtube.com":"youtube","youtu.be":"youtube","tiktok.com":"tiktok","pinterest.com":"pinterest"},K=/(?:\/shar(?:e|er)|\/intent\/|\/dialog\/|\/plugins\/|\/share\?|\/developers?\/|platform\.)/i;function R(t){return(t??"").replace(/\s+/g," ").trim()}function b(t,e){try{let r=new URL(t,e);return!["http:","https:"].includes(r.protocol)||r.username||r.password?null:r}catch{return null}}function g(t){let e=t;try{e=decodeURIComponent(t)}catch{}let r=e.split("?")[0].trim().toLowerCase().replace(/[),.;:]+$/,"");return r.length>254||r.split("@").length!==2||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9.-]+\.[a-z]{2,}$/i.test(r)||F.some(n=>r.includes(n))?null:r}function f(t){let e=t.closest("p,li,address,section,article,div").first();return R(e.length?e.text():t.text()).slice(0,w)}function X(t,e,r,n){let s=g(e);!s||G.test(n)||t.has(s)||t.set(s,{value:s,sourceUrl:r,context:R(n).slice(0,w),sourceType:"first_party_page"})}function B(t){t.hash="";for(let e of[...t.searchParams.keys()])/^(?:utm_|fbclid|gclid)/i.test(e)&&t.searchParams.delete(e);return t.href}function Z(t){let e=t.toLowerCase().replace(/^www\./,"");return Object.entries(V).find(([n])=>e===n||e.endsWith(`.${n}`))?.[1]??null}function Q(t,e){let r=b(e);if(!r)throw new Error("pageUrl must be a public HTTP(S) URL");let{$:n}=S(t),s=new Map,p=new Map,o=new Map,c=new Map;return n('a[href^="mailto:" i]').each((u,a)=>{let i=n(a);X(s,(i.attr("href")??"").slice(7),r.href,f(i))}),n("body").find("*").addBack().contents().filter((u,a)=>a.type==="text").each((u,a)=>{let i=n(a.parent??a),l=String(a.data??"");for(let d of l.match(Y)??[])X(s,d,r.href,f(i))}),n("a[href]").each((u,a)=>{let i=n(a),l=b(i.attr("href")??"",r.href);if(!l)return;let d=R(`${i.text()} ${f(i)}`).slice(0,w),T=Z(l.hostname);if(T&&!K.test(`${l.pathname}${l.search}`)){let v=B(l);p.has(v)||p.set(v,{url:v,network:T,sourceUrl:r.href,context:d});return}if(l.origin!==r.origin||!J.test(l.pathname))return;l.hash="";let y=l.href;c.has(y)||c.set(y,{url:y,sourceUrl:r.href,context:d})}),n("form").each((u,a)=>{let i=n(a),l=b(i.attr("action")||r.href,r.href);if(!l||l.origin!==r.origin)return;l.hash="";let d=l.href;o.has(d)||o.set(d,{url:d,sourceUrl:r.href,context:f(i)})}),{emails:[...s.values()].slice(0,q),socialProfiles:[...p.values()].slice(0,D),contactForms:[...o.values()].slice(0,W),candidatePageUrls:[...c.values()].slice(0,z)}}var ee=new Set(["admin","contact","customerservice","hello","help","info","inquiries","mail","office","reception","sales","service","support","team"]),te=/(?:^|\/)(?:about|bio|contact|contact-us|meet|our-team|people|profile|staff|team)(?:\/|$)/i,re=/\b(?:our team|meet the team|staff|agents?|brokers?|realtors?|people)\b/i,oe=/\b(?:brokerage|company|corporate|front desk|main office|office|organization|reception)\b/i;function M(t){return t.toLowerCase().replace(/[^a-z0-9]+/g," ").trim().split(/\s+/).filter(Boolean)}function A(t,e){try{let r=new URL(t,e);return!["http:","https:"].includes(r.protocol)||r.username||r.password?null:r}catch{return null}}function ne(t,e){let r=t.value.split("@")[0].toLowerCase().replace(/[^a-z0-9]+/g," "),n=M(e.name).filter(a=>a.length>1),s=A(t.sourceUrl)?.pathname.toLowerCase()??"",p=`${t.context} ${s}`.toLowerCase(),o=ee.has(r.replace(/\s+/g,"")),c=n.filter(a=>new RegExp(`(?:^|[^a-z0-9])${a}(?:$|[^a-z0-9])`,"i").test(`${r} ${p}`)).length,u=e.entityType==="person"&&n.length>=2&&c>=Math.min(2,n.length)&&(r.includes(n[0])||s.includes(n.join("-"))||s.includes(n.join("/")));return!o&&u?{scope:"person",reasons:["named_person_page_context"]}:o||oe.test(p)?{scope:"office",reasons:o?["generic_mailbox_prefix"]:["organization_page_context"]}:re.test(p)?{scope:"team",reasons:["team_page_context"]}:e.entityType==="business"&&M(e.organization||e.name).filter(i=>i.length>2).some(i=>p.includes(i))?{scope:"team",reasons:["business_context"]}:{scope:"unknown",reasons:["public_occurrence_without_identity_evidence"]}}function ve(t,e){let r=t.map(o=>({...o,...ne(o,e)})),n=e.entityType==="person"?["person","team"]:["person","team","office"],s=["provided","first_party_page","structured_data","serp_snippet"],p=["person","team","office"];return r.filter(o=>n.includes(o.scope)).sort((o,c)=>s.indexOf(o.sourceType)-s.indexOf(c.sourceType)||p.indexOf(o.scope)-p.indexOf(c.scope))[0]??null}function _e(t,e,r){if(!Number.isInteger(r)||r<1||r>4)throw new Error("maxPages must be an integer from 1 to 4");let n=A(t);if(!n)return[];n.hash="";let s=new Set([n.href]),p=e.map(o=>typeof o=="string"?o:o.url).map(o=>A(o,n.href)).filter(o=>!!(o&&o.origin===n.origin&&te.test(o.pathname)));for(let o of p)o.hash="",s.add(o.href);for(let o of["/contact","/contact-us"])s.add(new URL(o,n.origin).href);return[...s].slice(0,r)}var se=/[A-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[A-Z0-9.-]+\.[A-Z]{2,}/gi,ie=/\b(?:website|site|web)\s+(?:by|built|design(?:ed)?|develop(?:ed)?|powered)\b|\b(?:developer|webmaster)\b/i,ae=280,ce=10;function h(t){return t.toLowerCase().replace(/^www\./,"").replace(/\.$/,"")}function le(t){let e=h(t);return e==="localhost"||e.endsWith(".localhost")||e.endsWith(".local")||!e.includes(".")&&!e.includes(":")}function $(t){try{let e=new URL(t.trim());return!["http:","https:"].includes(e.protocol)||e.username||e.password||le(e.hostname)||P(e.hostname)?null:e}catch{return null}}function pe(t,e){return`${t} ${e??""}`.replace(/\s+/g," ").trim().slice(0,ae)}function we(t){let e=$(t);return e?(e.hostname=h(e.hostname),`email for ${e.protocol}//${e.host}/`):null}function Re({websiteUrl:t,results:e}){let r=$(t);if(!r)return[];let n=h(r.hostname),s=new Map,p=e.map((o,c)=>({result:o,index:c})).sort((o,c)=>{let u=Number.isFinite(o.result.position)?o.result.position:Number.MAX_SAFE_INTEGER,a=Number.isFinite(c.result.position)?c.result.position:Number.MAX_SAFE_INTEGER;return u-a||o.index-c.index});for(let{result:o}of p){let c=`${o.title} ${o.snippet??""}`,u=pe(o.title,o.snippet);for(let a of c.match(se)??[]){let i=g(a);!i||ie.test(c)||h(i.slice(i.lastIndexOf("@")+1))!==n||s.has(i)||s.set(i,{value:i,sourceUrl:o.url,sourceTitle:o.title,sourcePosition:o.position,context:u,sourceType:"serp_snippet"})}}return[...s.values()].slice(0,ce)}export{Q as a,ne as b,ve as c,_e as d,we as e,Re as f,k as g,x as h,C as i,O as j,L as k,de as l,me as m,fe as n};
|
package/dist/chunk-2L7CHN5N.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{A as _,B as x,C as b,D as C,E as d,g as w}from"./chunk-SJNSTO3C.js";import{d as g,i as h,t as u}from"./chunk-ANQ4JJVI.js";import{c}from"./chunk-FLAWC5PF.js";import{a as f}from"./chunk-WNUXMPVX.js";import{c as y,d as l}from"./chunk-HNNYXMSI.js";var s=e=>`paa-execution:${e}`;async function I(e,t){if(e.options.executionProtocol!==1||e.options.directCompletionProtocol!==1||e.options.executionOwner!=="direct"||e.options.serpOnly===!0||!t)return null;let r=await u(s(e.id),e.user_id,"harvest_paa",e.id);if(!r||r.flags.intentVersion!==1||r.flags.purpose!=="paa-direct")return null;let i=r.flags,n=i.hold,o=i.options,p={intentVersion:1,purpose:"paa-direct",userId:i.userId,jobId:i.jobId,options:o,callbackUrl:i.callbackUrl,requestFingerprint:i.requestFingerprint,hold:n};if(i.userId!==e.user_id||i.jobId!==e.id||!o||n?.userId!==e.user_id||n.key!==`paa-harvest:${e.id}:hold`||n.operation!=="paa"||!Number.isSafeInteger(n.amountMc)||n.amountMc<=0||n.description!==`PAA harvest: ${o.query}`.slice(0,500)||e.options.executionRunId!==s(e.id)||e.options.billingDebitKey!==n.key||e.options.billingHoldMc!==n.amountMc||e.query!==o.query||e.callback_url!==i.callbackUrl||e.options.requestFingerprint!==i.requestFingerprint||e.options.paaLeaseToken!==t||l(Object.fromEntries(Object.keys(o).map(m=>[m,e.options[m]])))!==l(o)||r.fingerprint!==y(l(p)))throw Error("Direct completion intent conflicts");return{profile:"direct",recordToken:t,jobId:e.id,userId:e.user_id,tool:"harvest_paa",requestFingerprint:String(i.requestFingerprint),options:o,callbackUrl:e.callback_url,hold:n,refundOperation:"paa_refund",sourceSurface:"paa_harvest",deadlineAt:0}}async function a(e,t,r){r&&(await h(r).catch(()=>{}),t&&await x(t,r).catch(()=>{}));let i=await c(e.id,e.user_id)??e;return _(i,i.options.holdState==="settled"?"settled":t?"held":"unconfirmed")}async function N(e){let t;try{return t=await I(e.job,e.recordToken)??void 0,!t||e.claim.runId!==s(e.job.id)||e.claim.userId!==e.job.user_id?a(e.job):(await b(t,e.claim,e.result,e.amountMc,e.status,e.publicError??null,e.httpStatus??200,e.requiresPhysical??!0),await d(t,e.claim,!1))}catch{return a(e.job,t,e.claim)}}async function E(e){let t=await c(typeof e=="string"?e:e.id,typeof e=="string"?void 0:e.user_id);if(!t||t.options.directCompletionProtocol!==1)return null;let r,i=null;try{let n=await u(s(t.id),t.user_id,"harvest_paa",t.id);return!t.options.syncCapturedAt&&n?.phase==="claimed"?null:(r=await I(t,String(t.options.paaLeaseToken??""))??void 0,r?n?.phase==="published"&&t.options.executionState==="finalized"&&t.options.holdState==="settled"?C(t,!0):!t.options.syncCapturedAt||(i=await g(s(t.id),t.user_id),!i)?a(t,r):(await w(t,i),await d(r,i,!0,!0)):a(t))}catch{return a(t,r,i??void 0)}}async function R(e,t){return(await E(e))?.status===200}async function q(e=25){let t=(await f().execute({sql:`SELECT j.id,j.user_id FROM jobs j JOIN operation_runs r ON r.id='paa-execution:'||j.id AND r.user_id=j.user_id JOIN operation_executions x ON x.run_id=r.id
|
|
2
|
-
WHERE json_extract(j.options,'$.directCompletionProtocol')=1 AND json_extract(j.options,'$.syncCapturedAt') IS NOT NULL
|
|
3
|
-
AND (x.phase='unknown' OR (x.phase='effects_started' AND x.expires_at_ms<=CAST(strftime('%s','now') AS INTEGER)*1000))
|
|
4
|
-
ORDER BY j.created_at LIMIT ?`,args:[Math.max(1,Math.min(100,Math.floor(e)))]})).rows,r=0,i=0;for(let n of t){let o=await c(String(n.id),Number(n.user_id));if(o)try{(await E(o))?.status===200?r++:i++}catch{i++}}return{checked:t.length,finalized:r,pending:i}}export{N as a,E as b,R as c,q as d};
|
package/dist/chunk-3F7AFM53.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as u,h as p,i as T}from"./chunk-SEZETSB3.js";import{i as d}from"./chunk-SDQW7IJN.js";var c="directory-workflows/",w=10080*60*1e3,y=900*1e3,A="text/csv; charset=utf-8";function E(){return process.env.DIRECTORY_ARTIFACT_READ_WRITE_TOKEN?.trim()||process.env.PRIVATE_ARTIFACT_READ_WRITE_TOKEN?.trim()||process.env.CONNECTED_DATA_READ_WRITE_TOKEN?.trim()||process.env.CONNECTED_DATA_BLOB_READ_WRITE_TOKEN?.trim()||null}function C(){return process.env.VERCEL==="1"||process.env.NODE_ENV==="production"}function a(){return{prefix:c,artifactTtlMs:w,downloadTtlMs:y,token:E()}}function I(t){return`${t.trim().replace(/\.csv$/i,"")||"directory-workflow"}.csv`}function R(t){return d(t,c)}async function b(t){if(!Number.isSafeInteger(t.rowCount)||t.rowCount<0)throw new Error("directory artifact rowCount must be a non-negative safe integer");return{...await u({policy:a(),ownerId:t.ownerId,artifactKey:`${t.jobId}.csv`,createdAt:t.createdAt,filename:I(t.filename),contentType:A,content:t.csv}),contentType:A,rowCount:t.rowCount}}async function P(t){return p({policy:a(),artifactId:t.artifactId,ownerId:t.ownerId})}async function O(t,e,r){return T({policy:a(),artifactId:t,offset:e,maxBytes:r})}async function x(t={}){let e=t.now??new Date,r=E();if(!r)return{deleted:0,store:C()?"none":"local"};if(!t.force&&!(e.getUTCHours()===3&&e.getUTCMinutes()===19))return{deleted:0,store:"private-vercel-blob",skipped:!0};let _=e.getTime()-w,{list:v,del:m}=await import("@vercel/blob"),s,f=0;for(let l=0;l<20;l+=1){let n=await v({prefix:c,token:r,limit:1e3,cursor:s}),o=n.blobs.filter(i=>new Date(i.uploadedAt).getTime()<=_);if(o.length>0&&(await m(o.map(i=>i.pathname),{token:r}),f+=o.length),!n.hasMore||!n.cursor)break;s=n.cursor}return{deleted:f,store:"private-vercel-blob"}}export{c as a,w as b,y as c,A as d,a as e,R as f,b as g,P as h,O as i,x as j};
|