mcp-scraper 0.3.8 → 0.3.9

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.
Files changed (32) hide show
  1. package/dist/bin/api-server.cjs +8 -3
  2. package/dist/bin/api-server.cjs.map +1 -1
  3. package/dist/bin/api-server.js +1 -1
  4. package/dist/bin/browser-agent-stdio-server.cjs +5 -8
  5. package/dist/bin/browser-agent-stdio-server.cjs.map +1 -1
  6. package/dist/bin/browser-agent-stdio-server.js +2 -2
  7. package/dist/bin/mcp-scraper-cli.cjs +1 -1
  8. package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
  9. package/dist/bin/mcp-scraper-cli.js +1 -1
  10. package/dist/bin/mcp-scraper-combined-stdio-server.cjs +5 -8
  11. package/dist/bin/mcp-scraper-combined-stdio-server.cjs.map +1 -1
  12. package/dist/bin/mcp-scraper-combined-stdio-server.js +3 -3
  13. package/dist/bin/mcp-scraper-install.cjs +1 -1
  14. package/dist/bin/mcp-scraper-install.cjs.map +1 -1
  15. package/dist/bin/mcp-scraper-install.js +1 -1
  16. package/dist/bin/mcp-stdio-server.cjs +1 -1
  17. package/dist/bin/mcp-stdio-server.cjs.map +1 -1
  18. package/dist/bin/mcp-stdio-server.js +2 -2
  19. package/dist/chunk-7VNTN4Q7.js +7 -0
  20. package/dist/chunk-7VNTN4Q7.js.map +1 -0
  21. package/dist/{chunk-VQFVA6RH.js → chunk-BRUVQRJK.js} +6 -9
  22. package/dist/chunk-BRUVQRJK.js.map +1 -0
  23. package/dist/{chunk-FU3WERZ7.js → chunk-KDKQ5Y7V.js} +2 -2
  24. package/dist/{server-7CGBJWJY.js → server-ZSHE4R5Z.js} +10 -5
  25. package/dist/{server-7CGBJWJY.js.map → server-ZSHE4R5Z.js.map} +1 -1
  26. package/docs/mcp-tool-craft-lint.generated.md +1 -1
  27. package/docs/mcp-tool-manifest.generated.json +1 -1
  28. package/package.json +1 -1
  29. package/dist/chunk-7I6PA2UQ.js +0 -7
  30. package/dist/chunk-7I6PA2UQ.js.map +0 -1
  31. package/dist/chunk-VQFVA6RH.js.map +0 -1
  32. /package/dist/{chunk-FU3WERZ7.js.map → chunk-KDKQ5Y7V.js.map} +0 -0
@@ -21921,7 +21921,7 @@ var PACKAGE_VERSION;
21921
21921
  var init_version = __esm({
21922
21922
  "src/version.ts"() {
21923
21923
  "use strict";
21924
- PACKAGE_VERSION = "0.3.8";
21924
+ PACKAGE_VERSION = "0.3.9";
21925
21925
  }
21926
21926
  });
21927
21927
 
@@ -24649,12 +24649,14 @@ async function createSession(opts = {}) {
24649
24649
  const resolvedProfileName = opts.profileName ?? browserServiceProfileName();
24650
24650
  const resolvedSaveProfileChanges = opts.saveProfileChanges ?? browserServiceProfileSaveChanges();
24651
24651
  const disableDefaultProxy = opts.disableDefaultProxy ?? !resolvedProxyId;
24652
+ const startUrl = opts.startUrl?.trim();
24652
24653
  if (resolvedProfileName && resolvedSaveProfileChanges === true) {
24653
24654
  await ensureProfile(k, resolvedProfileName);
24654
24655
  }
24655
- const browser = await k.browsers.create({
24656
+ const createPayload = {
24656
24657
  stealth: opts.stealth ?? true,
24657
24658
  timeout_seconds: opts.timeoutSeconds ?? DEFAULT_TIMEOUT_SECONDS,
24659
+ ...startUrl ? { start_url: startUrl } : {},
24658
24660
  ...resolvedProxyId ? { proxy_id: resolvedProxyId } : {},
24659
24661
  ...resolvedProfileName ? {
24660
24662
  profile: {
@@ -24662,7 +24664,8 @@ async function createSession(opts = {}) {
24662
24664
  ...typeof resolvedSaveProfileChanges === "boolean" ? { save_changes: resolvedSaveProfileChanges } : {}
24663
24665
  }
24664
24666
  } : {}
24665
- });
24667
+ };
24668
+ const browser = await k.browsers.create(createPayload);
24666
24669
  const runtimeSessionId = browser.session_id;
24667
24670
  if (disableDefaultProxy) {
24668
24671
  try {
@@ -25049,6 +25052,7 @@ function buildBrowserAgentRoutes() {
25049
25052
  }
25050
25053
  const body = await c.req.json().catch(() => ({}));
25051
25054
  const timeoutSeconds = typeof body.timeout_seconds === "number" ? body.timeout_seconds : void 0;
25055
+ const startUrl = typeof body.url === "string" ? body.url : void 0;
25052
25056
  const gate = await acquireConcurrencyGate(user, "browser_agent_session", {
25053
25057
  ttlSeconds: browserSessionLockTtlSeconds(timeoutSeconds),
25054
25058
  metadata: { label: typeof body.label === "string" ? body.label : null }
@@ -25061,6 +25065,7 @@ function buildBrowserAgentRoutes() {
25061
25065
  proxyId: typeof body.proxy_id === "string" ? body.proxy_id : void 0,
25062
25066
  profileName: typeof body.profile === "string" ? body.profile : void 0,
25063
25067
  saveProfileChanges: typeof body.save_profile_changes === "boolean" ? body.save_profile_changes : void 0,
25068
+ startUrl,
25064
25069
  disableDefaultProxy: typeof body.disable_default_proxy === "boolean" ? body.disable_default_proxy : void 0,
25065
25070
  viewport: body.viewport && typeof body.viewport === "object" ? body.viewport : void 0
25066
25071
  });