mcp-scraper 0.38.2 → 0.40.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/package.json +5 -6
- package/dist/bin/api-server.cjs +0 -58752
- package/dist/bin/api-server.cjs.map +0 -1
- package/dist/bin/api-server.d.cts +0 -1
- package/dist/bin/api-server.d.ts +0 -1
- package/dist/bin/api-server.js +0 -38
- package/dist/bin/api-server.js.map +0 -1
- package/dist/bin/mcp-scraper-cli.cjs +0 -2671
- package/dist/bin/mcp-scraper-cli.cjs.map +0 -1
- package/dist/bin/mcp-scraper-cli.d.cts +0 -1
- package/dist/bin/mcp-scraper-cli.d.ts +0 -1
- package/dist/bin/mcp-scraper-cli.js +0 -742
- package/dist/bin/mcp-scraper-cli.js.map +0 -1
- package/dist/bin/mcp-scraper-install.cjs +0 -129
- package/dist/bin/mcp-scraper-install.cjs.map +0 -1
- package/dist/bin/mcp-scraper-install.d.cts +0 -1
- package/dist/bin/mcp-scraper-install.d.ts +0 -1
- package/dist/bin/mcp-scraper-install.js +0 -27
- package/dist/bin/mcp-scraper-install.js.map +0 -1
- package/dist/bin/mcp-stdio-server.cjs +0 -12264
- package/dist/bin/mcp-stdio-server.cjs.map +0 -1
- package/dist/bin/mcp-stdio-server.d.cts +0 -1
- package/dist/bin/mcp-stdio-server.d.ts +0 -1
- package/dist/bin/mcp-stdio-server.js +0 -135
- package/dist/bin/mcp-stdio-server.js.map +0 -1
- package/dist/bin/paa-harvest.cjs +0 -3808
- package/dist/bin/paa-harvest.cjs.map +0 -1
- package/dist/bin/paa-harvest.d.cts +0 -1
- package/dist/bin/paa-harvest.d.ts +0 -1
- package/dist/bin/paa-harvest.js +0 -44
- package/dist/bin/paa-harvest.js.map +0 -1
- package/dist/chunk-345BQXZH.js +0 -712
- package/dist/chunk-345BQXZH.js.map +0 -1
- package/dist/chunk-44HZLHDV.js +0 -52
- package/dist/chunk-44HZLHDV.js.map +0 -1
- package/dist/chunk-AZRPG43B.js +0 -617
- package/dist/chunk-AZRPG43B.js.map +0 -1
- package/dist/chunk-CB5C3BPB.js +0 -135
- package/dist/chunk-CB5C3BPB.js.map +0 -1
- package/dist/chunk-EGJKUB4Q.js +0 -276
- package/dist/chunk-EGJKUB4Q.js.map +0 -1
- package/dist/chunk-FQI5PFE7.js +0 -1866
- package/dist/chunk-FQI5PFE7.js.map +0 -1
- package/dist/chunk-FRYT3ID4.js +0 -684
- package/dist/chunk-FRYT3ID4.js.map +0 -1
- package/dist/chunk-G3P3ZDB4.js +0 -69
- package/dist/chunk-G3P3ZDB4.js.map +0 -1
- package/dist/chunk-K443GQY5.js +0 -24
- package/dist/chunk-K443GQY5.js.map +0 -1
- package/dist/chunk-N7KUTTCC.js +0 -3007
- package/dist/chunk-N7KUTTCC.js.map +0 -1
- package/dist/chunk-NGM237OO.js +0 -3410
- package/dist/chunk-NGM237OO.js.map +0 -1
- package/dist/chunk-NKCCGADE.js +0 -11285
- package/dist/chunk-NKCCGADE.js.map +0 -1
- package/dist/chunk-NNW3O6ZD.js +0 -108
- package/dist/chunk-NNW3O6ZD.js.map +0 -1
- package/dist/chunk-QZXKQB7Y.js +0 -414
- package/dist/chunk-QZXKQB7Y.js.map +0 -1
- package/dist/chunk-SFRMFGQ6.js +0 -158
- package/dist/chunk-SFRMFGQ6.js.map +0 -1
- package/dist/chunk-YCI2PNCS.js +0 -499
- package/dist/chunk-YCI2PNCS.js.map +0 -1
- package/dist/chunk-YODBNTTN.js +0 -7
- package/dist/chunk-YODBNTTN.js.map +0 -1
- package/dist/db-C5KVCOYT.js +0 -239
- package/dist/db-C5KVCOYT.js.map +0 -1
- package/dist/extract-bundle-KUBX6N6Z.js +0 -568
- package/dist/extract-bundle-KUBX6N6Z.js.map +0 -1
- package/dist/index.cjs +0 -4160
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -413
- package/dist/index.d.ts +0 -413
- package/dist/index.js +0 -338
- package/dist/index.js.map +0 -1
- package/dist/location-data-repository-TTWF3OTM.js +0 -35
- package/dist/location-data-repository-TTWF3OTM.js.map +0 -1
- package/dist/server-5EX6XBIA.js +0 -33596
- package/dist/server-5EX6XBIA.js.map +0 -1
- package/dist/site-extract-repository-XSPJTCIL.js +0 -62
- package/dist/site-extract-repository-XSPJTCIL.js.map +0 -1
- package/dist/worker-XCPU4YSN.js +0 -142
- package/dist/worker-XCPU4YSN.js.map +0 -1
- package/docs/adr/0001-in-page-graphql-interception-for-anti-bot-scraping.md +0 -58
- package/docs/adr/0002-hybrid-smart-rag-vault-retrieval.md +0 -62
- package/docs/adr/0003-waive-unrecoverable-scheduled-model-cost.md +0 -22
- package/docs/adr/README.md +0 -13
- package/docs/final-tooling-spec.md +0 -206
- package/docs/hosted-location-data.md +0 -108
- package/docs/kernel-proxy-future-enhancements.md +0 -80
- package/docs/mcp-tool-craft-lint.generated.md +0 -183
- package/docs/mcp-tool-design-guide.md +0 -225
- package/docs/mcp-tool-manifest.generated.json +0 -22871
- package/docs/mcp-tool-quality-spec.md +0 -240
- package/docs/oauth-legal-review.md +0 -38
- package/docs/seo-crawl-report-spec.md +0 -287
- package/docs/specs/api-forge-spec.md +0 -234
- package/docs/specs/connected-services-control-plane-decoupling-spec.md +0 -1044
- package/docs/specs/deferred-work-spec.md +0 -86
- package/docs/specs/google-drive-bulk-access-and-mcp-schema-passthrough-spec.md +0 -1689
- package/docs/specs/kernel-stealth-captcha-test-matrix.md +0 -278
- package/docs/specs/main-mcp-integration-ownership-spec.md +0 -1164
- package/docs/specs/mcp-tool-definition-quality-audit-spec.md +0 -1602
- package/docs/specs/meta-ad-creative-media-resolution-spec.md +0 -31
- package/docs/specs/multimodal-image-memory-architecture-spec.md +0 -1022
- package/docs/specs/oauth-mcp-spec.md +0 -213
- package/docs/specs/query-fanout-transport-contract-fix.md +0 -45
- package/docs/specs/relationship-workspace-ai-behavior-plan.md +0 -26
- package/docs/specs/unified-credit-and-scheduled-execution-billing-spec.md +0 -995
- package/docs/tool-catalog-spec.md +0 -388
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
# Deferred Work Spec
|
|
2
|
-
|
|
3
|
-
Items deliberately deferred from the June 2026 release train (0.1.7 → 0.1.9), specified to execution detail. Each section is independently shippable. Ordered by recommended priority.
|
|
4
|
-
|
|
5
|
-
## 1. Ops: finish the vendor env var rename (no release needed)
|
|
6
|
-
|
|
7
|
-
Code already reads `BROWSER_SERVICE_API_KEY` / `BROWSER_SERVICE_PROXY_ID` first and falls back to `KERNEL_API_KEY` / `KERNEL_PROXY_ID` (`src/lib/browser-service-env.ts`). Remaining steps are pure ops:
|
|
8
|
-
|
|
9
|
-
1. Local: add to `.env`: `BROWSER_SERVICE_API_KEY=<same value as KERNEL_API_KEY>` and `BROWSER_SERVICE_PROXY_ID=<same as KERNEL_PROXY_ID>`.
|
|
10
|
-
2. Vercel: `vercel env add BROWSER_SERVICE_API_KEY production` (paste value), same for `BROWSER_SERVICE_PROXY_ID`; redeploy (`vercel --prod --yes`).
|
|
11
|
-
3. Verify: `curl -s https://mcpscraper.dev/me -H "x-api-key: $KEY"` still 200 and a `harvest_paa` smoke call succeeds.
|
|
12
|
-
4. Only after a full green release cycle: remove `KERNEL_API_KEY`/`KERNEL_PROXY_ID` from Vercel and `.env`, then delete the fallback reads in `src/lib/browser-service-env.ts:2` and `:7` and the `?? process.env.KERNEL_API_KEY` in `src/api/env.ts:35`.
|
|
13
|
-
5. Update live test requirements at the same time as step 4: `tests/live/mcp/mcp-stdio-protocol.live.test.ts:23` and `tests/live/mcp/mcp-http-protocol.live.test.ts:9` — change `requireLiveEnv([... 'KERNEL_API_KEY'])` to `'BROWSER_SERVICE_API_KEY'`.
|
|
14
|
-
|
|
15
|
-
## 2. Ops: repair the git remote
|
|
16
|
-
|
|
17
|
-
`git push` fails with "Repository not found"; release commits 0.1.6–0.1.9 exist only locally (single point of failure on this machine).
|
|
18
|
-
|
|
19
|
-
1. Decide: fix the existing `origin` URL (`git remote -v`, then `git remote set-url origin <correct-url>`) or create a fresh private repo (`gh repo create vilovieta/mcp-scraper --private --source=. --push`).
|
|
20
|
-
2. Push `main` and verify all four release commits land.
|
|
21
|
-
3. Update the `release-workflow` memory note once pushes work.
|
|
22
|
-
|
|
23
|
-
## 3. Hosted deep-harvest progress (deferred from task #7)
|
|
24
|
-
|
|
25
|
-
**Problem:** `harvest_paa` calls budgeted up to 280 s return nothing until completion. The hosted transport runs stateless JSON mode (`enableJsonResponse: true`, `mcp-routes.ts`), which cannot stream `notifications/progress`.
|
|
26
|
-
|
|
27
|
-
**Design — poll-based progress via the existing async REST API (works on BOTH transports):**
|
|
28
|
-
|
|
29
|
-
1. `src/mcp/http-mcp-tool-executor.ts` — new private method `callWithPolling(input, onProgress)`:
|
|
30
|
-
- `POST /harvest` (existing async endpoint, returns `202 { job_id }`).
|
|
31
|
-
- Poll `GET /jobs/{job_id}` every 5 s up to the existing tiered budget from `harvestTimeoutBudget`.
|
|
32
|
-
- Each poll, derive progress from the job's `attempts` array (already returned): `onProgress({ progress: attempts.at(-1)?.question_count ?? 0, total: input.maxQuestions })`.
|
|
33
|
-
- On `status: 'done'` return the result in the existing `CallToolResult` shape; on `failed`/`cancelled` return the structured error (shape already produced by `harvestProblemResponse`).
|
|
34
|
-
2. `src/mcp/paa-mcp-server.ts` — the `harvest_paa` handler gains the SDK's progress plumbing: the third callback argument `extra` exposes `sendNotification` and `_meta.progressToken`; when a token is present, forward `onProgress` events as `notifications/progress { progressToken, progress, total }`.
|
|
35
|
-
3. stdio transport: works as-is (long-lived connection).
|
|
36
|
-
4. Hosted transport: flip `mcp-routes.ts` to streaming mode — `enableJsonResponse: false` — so responses go out as SSE and interleaved progress notifications are legal. Keep `sessionIdGenerator: undefined` (still stateless per-request). Verify Vercel function streaming passes SSE through `api/index.ts`'s `streamResponse` (it already streams body chunks).
|
|
37
|
-
5. Gate: only use polling mode when `maxQuestions > 50`; smaller calls keep the current single-shot `/harvest/sync` path.
|
|
38
|
-
6. Tests: unit — fake fetch sequencing 202 → running → done, assert progress callbacks; live — stdio harvest with `maxQuestions: 60` asserting ≥1 progress notification received by the harness (add `onNotification` capture to `tests/live/harness/mcp-protocol-client.ts`).
|
|
39
|
-
|
|
40
|
-
**Estimated blast radius:** executor, server builder, mcp-routes, harness, 2 test files. No REST API changes.
|
|
41
|
-
|
|
42
|
-
## 4. Full OAuth 2.1 on hosted /mcp (deferred from task #9)
|
|
43
|
-
|
|
44
|
-
**Superseded by `docs/specs/oauth-mcp-spec.md`** — decision locked (WorkOS AuthKit, Clerk as documented alternate, self-hosted out of scope), full implementation spec with files, functions, env vars, tests, and rollout phases. The decision matrix below is retained for historical context.
|
|
45
|
-
|
|
46
|
-
Shipped already: `WWW-Authenticate: Bearer` on 401 (`mcp-routes.ts:mcpAuthError`). Remaining work requires a **product decision** before any code: which authorization server?
|
|
47
|
-
|
|
48
|
-
| Option | Effort | Notes |
|
|
49
|
-
|---|---|---|
|
|
50
|
-
| WorkOS / Auth0 in front | Low | Fastest path to claude.ai connector compatibility; monthly cost |
|
|
51
|
-
| Self-rolled AS on Turso (authorization codes + PKCE tables) | High | No vendor; significant security surface — not recommended |
|
|
52
|
-
| Stay API-key only | Zero | Forecloses web-connector onboarding; revisit when demand exists |
|
|
53
|
-
|
|
54
|
-
When a decision lands, the implementation is:
|
|
55
|
-
|
|
56
|
-
1. `GET /.well-known/oauth-protected-resource` (RFC 9728) served from `server.ts`: `{ resource: "https://mcpscraper.dev/mcp", authorization_servers: ["<AS issuer>"], bearer_methods_supported: ["header"] }`. Add a `vercel.json` rewrite for the path.
|
|
57
|
-
2. `src/mcp/mcp-routes.ts` `requireMcpCallerKey`: accept a Bearer JWT in addition to API keys — validate signature against the AS JWKS (cache keys 1 h), require `aud` containing `https://mcpscraper.dev/mcp` (RFC 8707 resource binding), map the token's subject to a user row via a new `users.oauth_subject` column (migration in `db.ts`).
|
|
58
|
-
3. Keep `x-api-key` working forever (NPX clients, REST customers).
|
|
59
|
-
4. Tests: unit for token validation paths (expired/wrong-aud/garbage); live test gated on AS test-client credentials in env.
|
|
60
|
-
|
|
61
|
-
## 5. outputSchema for the capture tools (deliberately excluded)
|
|
62
|
-
|
|
63
|
-
`capture_serp_snapshot` / `capture_serp_page_snapshots` return raw passthrough of the SERP Intelligence product payload, which is still evolving with Phoenix. Adding `outputSchema` now would either freeze that payload or break on every product iteration. Revisit when the Phoenix capture contract stabilizes; at that point: schema in `mcp-tool-schemas.ts`, a formatter (currently none — executor result passes straight through), and registration updates in `mcp-routes.ts:registerSerpIntelligenceCaptureTools`.
|
|
64
|
-
|
|
65
|
-
## 6. Maintenance follow-ups (small, batch into any release)
|
|
66
|
-
|
|
67
|
-
1. `public/skill.md` / `public/codex-skill.md` (REST-mode skill files): regenerate the `maxQuestions` guidance to say cap 200 (currently 1–150 in the parsing table) — `public/skill.md` PAA Harvest Mode STEP 1 table row `maxQuestions`.
|
|
68
|
-
2. `src/cli.ts:21` still names the flag `--kernel-api-key` (help text already neutral). Renaming the flag breaks invocations; add an alias `--browser-api-key` and hide the old one when commander supports it.
|
|
69
|
-
3. `tests/live/harness/mcp-protocol-client.ts` `close()` uses `setTimeout(resolve, 3_000)` without unref — harmless in vitest, but unref it if the harness ever runs outside vitest.
|
|
70
|
-
4. Internal naming (`BrowserDriver` kernel fields, DB columns `kernel_session_id`, `src/api/kernel-fetch.ts`, `src/kernel-proxy-resolver.ts`) intentionally unchanged — outbound sanitizers cover the boundary. Do NOT rename DB columns without a migration plan; the sanitizers make it unnecessary.
|
|
71
|
-
|
|
72
|
-
## 7. API Forge
|
|
73
|
-
|
|
74
|
-
Specified separately in `docs/specs/api-forge-spec.md`. Recommended to schedule after §1 and §2 (ops hygiene first), before §3/§4 (it produces revenue surface; progress/OAuth polish can follow demand).
|
|
75
|
-
|
|
76
|
-
## 8. SEO CLI growth workflows
|
|
77
|
-
|
|
78
|
-
Specified separately in `docs/specs/seo-cli-growth-roadmap-spec.md`, with buildable sub-specs for agent wiring, workflow reports, agent-ready SEO packets, local competitive audits, and scheduled workflow APIs:
|
|
79
|
-
|
|
80
|
-
- `docs/specs/cli-agent-wiring-spec.md`
|
|
81
|
-
- `docs/specs/seo-workflow-runner-and-reports-spec.md`
|
|
82
|
-
- `docs/specs/agent-ready-seo-packet-spec.md`
|
|
83
|
-
- `docs/specs/local-competitive-audit-spec.md`
|
|
84
|
-
- `docs/specs/scheduled-workflows-api-spec.md`
|
|
85
|
-
|
|
86
|
-
Recommended priority: ship agent wiring and local workflow reports first, then the agent packet and local competitive audit workflows, then hosted schedules/API once report artifacts are durable.
|