mcp-scraper 0.55.0 → 0.57.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.
Files changed (37) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +2 -2
  3. package/dist/bin/api-server.cjs +615 -172
  4. package/dist/bin/api-server.cjs.map +1 -1
  5. package/dist/bin/api-server.js +2 -2
  6. package/dist/bin/mcp-scraper-cli.cjs +1 -1
  7. package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
  8. package/dist/bin/mcp-scraper-cli.js +1 -1
  9. package/dist/bin/mcp-scraper-install.cjs +2 -2
  10. package/dist/bin/mcp-scraper-install.cjs.map +1 -1
  11. package/dist/bin/mcp-scraper-install.js +2 -2
  12. package/dist/bin/mcp-stdio-server.cjs +49 -4
  13. package/dist/bin/mcp-stdio-server.cjs.map +1 -1
  14. package/dist/bin/mcp-stdio-server.js +4 -4
  15. package/dist/{chunk-2FL5FXMV.js → chunk-5XYBKE3X.js} +2 -2
  16. package/dist/{chunk-PGI2QPFE.js → chunk-HU4R6BP2.js} +2 -2
  17. package/dist/{chunk-PGI2QPFE.js.map → chunk-HU4R6BP2.js.map} +1 -1
  18. package/dist/chunk-QQ6ZBYZZ.js +7 -0
  19. package/dist/chunk-QQ6ZBYZZ.js.map +1 -0
  20. package/dist/{chunk-N4LT53JX.js → chunk-R6CO77BN.js} +3 -3
  21. package/dist/{chunk-N4LT53JX.js.map → chunk-R6CO77BN.js.map} +1 -1
  22. package/dist/{chunk-WYLIDW4S.js → chunk-ULAJAZQF.js} +50 -5
  23. package/dist/chunk-ULAJAZQF.js.map +1 -0
  24. package/dist/{extract-bundle-3CRG7FAN.js → extract-bundle-H7JEELY7.js} +3 -3
  25. package/dist/{server-WKBCZ2TH.js → server-NBGZJX4P.js} +474 -86
  26. package/dist/server-NBGZJX4P.js.map +1 -0
  27. package/dist/{site-extract-repository-QSRPXNMI.js → site-extract-repository-CFMSWAVL.js} +3 -3
  28. package/dist/{worker-W5C6SKZT.js → worker-S2WXELUC.js} +2 -2
  29. package/package.json +1 -1
  30. package/dist/chunk-V2QWNGEK.js +0 -7
  31. package/dist/chunk-V2QWNGEK.js.map +0 -1
  32. package/dist/chunk-WYLIDW4S.js.map +0 -1
  33. package/dist/server-WKBCZ2TH.js.map +0 -1
  34. /package/dist/{chunk-2FL5FXMV.js.map → chunk-5XYBKE3X.js.map} +0 -0
  35. /package/dist/{extract-bundle-3CRG7FAN.js.map → extract-bundle-H7JEELY7.js.map} +0 -0
  36. /package/dist/{site-extract-repository-QSRPXNMI.js.map → site-extract-repository-CFMSWAVL.js.map} +0 -0
  37. /package/dist/{worker-W5C6SKZT.js.map → worker-S2WXELUC.js.map} +0 -0
@@ -21,14 +21,14 @@ import {
21
21
  } from "./chunk-AK2NNIYA.js";
22
22
  import {
23
23
  PACKAGE_VERSION
24
- } from "./chunk-V2QWNGEK.js";
24
+ } from "./chunk-QQ6ZBYZZ.js";
25
25
  import {
26
26
  MC_PER_CREDIT,
27
27
  PAA_BASE_CREDITS,
28
28
  PAA_QUESTION_CREDITS,
29
29
  PAGE_SCRAPE_CREDITS,
30
30
  SERP_SEARCH_CREDITS
31
- } from "./chunk-N4LT53JX.js";
31
+ } from "./chunk-R6CO77BN.js";
32
32
  import {
33
33
  buildPublicErrorEnvelope,
34
34
  normalizePublicErrorCode,
@@ -374,7 +374,7 @@ seam is noted so you can chain them.
374
374
  prepare-memory-write: it returns the live entity profile contract, duplicate candidates, tag reuse/review/create
375
375
  guidance, recommended sections, optional sections, and heading guidance before any write occurs.
376
376
  - Validate a composed entity without writing -> **commons_validate_entity**. Use it after composing and before submit
377
- to catch missing featured images, missing source/body evidence, duplicate conflicts, revision problems, and
377
+ to catch missing featured images, missing source/body evidence, duplicate candidates, and
378
378
  unsupported placeholder sections.
379
379
  - Create or edit a public wiki entity -> **commons_submit_entity**. This is a governed proposal write,
380
380
  not direct rendered HTML editing. Normal workflow is prepare -> validate -> submit. Pick the closest entity type
@@ -382,6 +382,9 @@ seam is noted so you can chain them.
382
382
  Trail, or PublicArticle.
383
383
  Creating a new entity costs 10 Credits; editing an existing entity costs 2 Credits. Preparation, validation,
384
384
  search, and reads are free. Reusing the same idempotency key for a retry does not charge twice.
385
+ Commons is an open wiki. Any account may edit any entity, and every edit publishes immediately and is
386
+ tracked on the public contribution ledger with the actor, the changed fields, and a before/after snapshot.
387
+ Pass baseRevision on an edit so the ledger records whether it landed on top of a newer revision.
385
388
  The body must be a neutral encyclopedia projection, not a blog post or raw scrape dump. Use H2 for the
386
389
  entity's main sections and H3/H4/H5 for subtopics; every heading becomes a public page-menu item.
387
390
  Entity profiles are adaptive contracts, not empty templates. Use the prepare output as the guide, but omit
@@ -6376,6 +6379,16 @@ var CommonsValidateEntityInputSchema = {
6376
6379
  var CommonsGetEntityLedgerInputSchema = {
6377
6380
  idOrSlug: z5.string().trim().min(1).max(180).describe("Published entity id or /wiki/ slug whose contribution ledger should be read.")
6378
6381
  };
6382
+ var CommonsHostImageInputSchema = {
6383
+ sourceUrl: z5.string().url().optional().describe("Public https image URL to download and host. The wiki never serves a third-party URL directly, so pass the original source here rather than putting it on the entity."),
6384
+ imageBase64: z5.string().min(16).optional().describe("Base64 image bytes for an image you already hold. Use for images under about 3 MB; larger files should be published from a URL."),
6385
+ alt: z5.string().trim().max(500).optional().describe("Alt text describing the image for readers who cannot see it."),
6386
+ license: z5.string().trim().max(240).optional().describe("License or usage terms of the original image, preserved with the hosted copy."),
6387
+ attribution: z5.string().trim().max(500).optional().describe("Credit line for the original photographer, publication, or archive.")
6388
+ };
6389
+ var CommonsGetProposalInputSchema = {
6390
+ proposalId: z5.string().trim().min(1).max(120).describe("Proposal id returned by commons_submit_entity, in the form commons-proposal-<uuid>.")
6391
+ };
6379
6392
  var CommonsSaveFilterInputSchema = {
6380
6393
  name: z5.string().trim().min(2).max(80).describe("User-facing name for this MCP personalization filter. Reusing a name updates the saved filter."),
6381
6394
  description: z5.string().trim().max(500).optional().describe("Optional note explaining when this filter should be used."),
@@ -9833,7 +9846,7 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
9833
9846
  }, async (input) => executor.commonsValidateEntity(input));
9834
9847
  server.registerTool("commons_submit_entity", {
9835
9848
  title: "Transparent Commons Governed Entity Write",
9836
- description: "Create or propose an edit to a Transparent Commons public wiki entity through the governed MCP Scraper write plane. A new entity costs 10 Credits; an edit to an existing entity costs 2 Credits. Preparation and validation are free, and idempotent retries are not charged twice. This never edits rendered HTML directly. Normal workflow is commons_prepare_entity, compose, commons_validate_entity, then submit. Choose a precise entityType and write a neutral encyclopedia projection with the matching entity structure, not a blog article or raw scrape dump. Use H2 sections and H3/H4/H5 subitems; every heading appears in the public page menu. Omit unsupported sections instead of publishing empty/filler headings. It writes a proposal, records a contribution ledger entry when accepted, and auto-publishes only safe non-conflicting changes with a featured image and source/body evidence. Existing entity edits require baseRevision to auto-publish. Requires idempotencyKey.",
9849
+ description: "Create or propose an edit to a Transparent Commons public wiki entity through the governed MCP Scraper write plane. A new entity costs 10 Credits; an edit to an existing entity costs 2 Credits. Preparation and validation are free, and idempotent retries are not charged twice. This never edits rendered HTML directly. Normal workflow is commons_prepare_entity, compose, commons_validate_entity, then submit. Choose a precise entityType and write a neutral encyclopedia projection with the matching entity structure, not a blog article or raw scrape dump. Use H2 sections and H3/H4/H5 subitems; every heading appears in the public page menu. Omit unsupported sections instead of publishing empty/filler headings. Transparent Commons is an open wiki: any account may edit any entity, and every edit publishes and is recorded on the public contribution ledger. Publishing requires a featured image and body/source evidence. Pass baseRevision when editing so the ledger can show whether the edit was written on top of a newer revision. Requires idempotencyKey.",
9837
9850
  inputSchema: CommonsSubmitEntityInputSchema,
9838
9851
  outputSchema: recordOutputSchema("commons_submit_entity", CommonsGenericOutputSchema),
9839
9852
  annotations: {
@@ -9857,6 +9870,32 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
9857
9870
  openWorldHint: false
9858
9871
  }
9859
9872
  }, async (input) => executor.commonsGetEntityLedger(input));
9873
+ server.registerTool("commons_host_image", {
9874
+ title: "Host a Transparent Commons Image",
9875
+ description: "Download an image from a public https URL, or accept base64 bytes, and store it as a permanent Commons-hosted image. Returns the hosted URL to use on an entity. Commons never serves a third-party image URL: submitting an entity with an external image hosts it automatically, and this tool exists for hosting an image before or independently of a write. JPEG, PNG, GIF, and WebP up to 10 MB; SVG is rejected because the wiki serves images to the public web. Identical bytes are stored once and reused.",
9876
+ inputSchema: CommonsHostImageInputSchema,
9877
+ outputSchema: recordOutputSchema("commons_host_image", CommonsGenericOutputSchema),
9878
+ annotations: {
9879
+ title: "Host a Transparent Commons Image",
9880
+ readOnlyHint: false,
9881
+ destructiveHint: false,
9882
+ idempotentHint: true,
9883
+ openWorldHint: true
9884
+ }
9885
+ }, async (input) => executor.commonsHostImage(input));
9886
+ server.registerTool("commons_get_proposal", {
9887
+ title: "Transparent Commons Proposal Status",
9888
+ description: "Read one commons_submit_entity proposal owned by the calling account. Use it when submit returned a proposal that was held for review instead of published, to see the review reason and whether it has since been applied.",
9889
+ inputSchema: CommonsGetProposalInputSchema,
9890
+ outputSchema: recordOutputSchema("commons_get_proposal", CommonsGenericOutputSchema),
9891
+ annotations: {
9892
+ title: "Transparent Commons Proposal Status",
9893
+ readOnlyHint: true,
9894
+ destructiveHint: false,
9895
+ idempotentHint: true,
9896
+ openWorldHint: false
9897
+ }
9898
+ }, async (input) => executor.commonsGetProposal(input));
9860
9899
  server.registerTool("commons_save_filter", {
9861
9900
  title: "Transparent Commons Saved MCP Filter",
9862
9901
  description: "Save or update an account-scoped Commons search filter so one MCP can behave like many personalized reading rooms, trails, source scopes, categories, or tag bundles. Reusing a filter name updates it.",
@@ -10868,6 +10907,12 @@ var HttpMcpToolExecutor = class {
10868
10907
  commonsGetEntityLedger(input) {
10869
10908
  return this.getJson(`/commons/entities/${encodeURIComponent(input.idOrSlug)}/ledger`);
10870
10909
  }
10910
+ commonsGetProposal(input) {
10911
+ return this.getJson(`/commons/proposals/${encodeURIComponent(input.proposalId)}`);
10912
+ }
10913
+ commonsHostImage(input) {
10914
+ return this.call("/commons/images", input);
10915
+ }
10871
10916
  commonsSaveFilter(input) {
10872
10917
  return this.call("/commons/filters", input);
10873
10918
  }
@@ -15927,4 +15972,4 @@ export {
15927
15972
  ScheduledResultsMcpExecutor,
15928
15973
  registerScheduledResultsMcpTools
15929
15974
  };
15930
- //# sourceMappingURL=chunk-WYLIDW4S.js.map
15975
+ //# sourceMappingURL=chunk-ULAJAZQF.js.map