mcp-scraper 0.66.6 → 0.66.7

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 (34) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/README.md +1 -1
  3. package/dist/bin/api-server.cjs +889 -597
  4. package/dist/bin/api-server.js +3 -3
  5. package/dist/bin/mcp-scraper-cli.cjs +1 -1
  6. package/dist/bin/mcp-scraper-cli.js +1 -1
  7. package/dist/bin/mcp-scraper-install.cjs +2 -2
  8. package/dist/bin/mcp-scraper-install.js +2 -2
  9. package/dist/bin/mcp-stdio-server.cjs +102 -16
  10. package/dist/bin/mcp-stdio-server.js +6 -6
  11. package/dist/bin/paa-harvest.cjs +14 -1
  12. package/dist/bin/paa-harvest.js +3 -3
  13. package/dist/{chunk-NLEAYKOC.js → chunk-7KB5QTHP.js} +1 -1
  14. package/dist/{chunk-K7Y27ND3.js → chunk-CGOMGGOF.js} +2 -2
  15. package/dist/{chunk-DBWWIK7O.js → chunk-EVOBJYBE.js} +1 -1
  16. package/dist/{chunk-3EYALCYK.js → chunk-F434YJPV.js} +1 -1
  17. package/dist/{chunk-PMCT2YQM.js → chunk-HBZENASD.js} +1 -1
  18. package/dist/{chunk-KXRWY7DZ.js → chunk-HWGQVP3Q.js} +1 -1
  19. package/dist/{chunk-55B3T5L2.js → chunk-HZDJ5UZ4.js} +68 -1
  20. package/dist/{chunk-ABYBPODM.js → chunk-JZPSG4NR.js} +1 -1
  21. package/dist/{chunk-CETDPNMZ.js → chunk-LVXRWJJJ.js} +1 -1
  22. package/dist/{chunk-KPE52NPT.js → chunk-O7ZC5Y3Z.js} +1 -1
  23. package/dist/{chunk-3TKKJQB4.js → chunk-U2UHJWFW.js} +1 -1
  24. package/dist/{chunk-VMWVEKZT.js → chunk-Z5QQEWXA.js} +50 -17
  25. package/dist/{db-4RVZ3NYZ.js → db-MNNNIWVS.js} +1 -1
  26. package/dist/{extract-bundle-EA5URLXN.js → extract-bundle-RW7CVIRF.js} +3 -3
  27. package/dist/index.cjs +14 -1
  28. package/dist/index.js +3 -3
  29. package/dist/{lead-list-enrichment-repository-IBXNWM6H.js → lead-list-enrichment-repository-PZYE6TDP.js} +2 -2
  30. package/dist/{location-data-repository-WHHQUCUI.js → location-data-repository-EPCNGMOM.js} +2 -2
  31. package/dist/{server-5WPS3LZD.js → server-KSVJ4X4V.js} +633 -444
  32. package/dist/{site-extract-repository-NTM4MDQN.js → site-extract-repository-CZ7SVT3Z.js} +2 -2
  33. package/dist/{worker-UTBUWEXQ.js → worker-IBLGV272.js} +5 -5
  34. package/package.json +1 -1
@@ -17,9 +17,9 @@ loadDotEnv();
17
17
  async function main() {
18
18
  const [{ serve }, { app }, { startWorker }, { migrate }] = await Promise.all([
19
19
  import("@hono/node-server"),
20
- import("../server-5WPS3LZD.js"),
21
- import("../worker-UTBUWEXQ.js"),
22
- import("../db-4RVZ3NYZ.js")
20
+ import("../server-KSVJ4X4V.js"),
21
+ import("../worker-IBLGV272.js"),
22
+ import("../db-MNNNIWVS.js")
23
23
  ]);
24
24
  const PORT = parseInt(process.env.PORT ?? "3001");
25
25
  try {
@@ -30,7 +30,7 @@ var import_promises5 = require("fs/promises");
30
30
  var import_node_path3 = require("path");
31
31
 
32
32
  // src/version.ts
33
- var PACKAGE_VERSION = "0.66.6";
33
+ var PACKAGE_VERSION = "0.66.7";
34
34
 
35
35
  // src/cli/agent-config.ts
36
36
  function apiKeyValue(options) {
@@ -13,7 +13,7 @@ import "../chunk-VXLU74YZ.js";
13
13
  import "../chunk-GGZEC22A.js";
14
14
  import {
15
15
  PACKAGE_VERSION
16
- } from "../chunk-NLEAYKOC.js";
16
+ } from "../chunk-7KB5QTHP.js";
17
17
 
18
18
  // src/cli/human-cli.ts
19
19
  import { Command } from "commander";
@@ -3,7 +3,7 @@
3
3
 
4
4
  // release-message.json
5
5
  var release_message_default = {
6
- message: "Search Console bulk URL Inspection now returns one ordered partial-result receipt without the former one-minute cutoff."
6
+ message: "Transparent Commons now verifies featured-image readiness before publishing, and replacement integration connections keep their paid period."
7
7
  };
8
8
 
9
9
  // src/install-terminal.ts
@@ -112,7 +112,7 @@ function renderInstallTerminal(options) {
112
112
  }
113
113
 
114
114
  // src/version.ts
115
- var PACKAGE_VERSION = "0.66.6";
115
+ var PACKAGE_VERSION = "0.66.7";
116
116
 
117
117
  // bin/mcp-scraper-install.ts
118
118
  var noColor = process.argv.includes("--no-color") || process.env.NO_COLOR !== void 0 || process.env.FORCE_COLOR === "0" || !process.stdout.isTTY;
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  renderInstallTerminal
4
- } from "../chunk-KPE52NPT.js";
4
+ } from "../chunk-O7ZC5Y3Z.js";
5
5
  import {
6
6
  PACKAGE_VERSION
7
- } from "../chunk-NLEAYKOC.js";
7
+ } from "../chunk-7KB5QTHP.js";
8
8
 
9
9
  // bin/mcp-scraper-install.ts
10
10
  var noColor = process.argv.includes("--no-color") || process.env.NO_COLOR !== void 0 || process.env.FORCE_COLOR === "0" || !process.stdout.isTTY;
@@ -96,7 +96,20 @@ var PUBLIC_ERROR_CODES = [
96
96
  "site_export_not_found",
97
97
  "site_export_format_unavailable",
98
98
  "site_export_read_failed",
99
- "site_export_image_not_found"
99
+ "site_export_image_not_found",
100
+ "image_url_invalid",
101
+ "image_url_not_https",
102
+ "image_host_unresolvable",
103
+ "image_host_blocked",
104
+ "image_redirect_invalid",
105
+ "image_source_unavailable",
106
+ "image_too_large",
107
+ "image_redirect_limit",
108
+ "image_base64_invalid",
109
+ "image_source_missing",
110
+ "image_format_unsupported",
111
+ "image_storage_unconfigured",
112
+ "featured_image_unhostable"
100
113
  ];
101
114
  var PUBLIC_ERROR_TYPES = [
102
115
  "request_aborted",
@@ -191,6 +204,20 @@ function publicErrorType(code) {
191
204
  case "site_export_read_failed":
192
205
  case "site_export_image_not_found":
193
206
  return "extraction";
207
+ case "image_url_invalid":
208
+ case "image_url_not_https":
209
+ case "image_host_unresolvable":
210
+ case "image_host_blocked":
211
+ case "image_redirect_invalid":
212
+ case "image_source_unavailable":
213
+ case "image_too_large":
214
+ case "image_redirect_limit":
215
+ case "image_base64_invalid":
216
+ case "image_source_missing":
217
+ case "image_format_unsupported":
218
+ case "image_storage_unconfigured":
219
+ case "featured_image_unhostable":
220
+ return "invalid_request";
194
221
  case "insufficient_balance":
195
222
  return "billing";
196
223
  case "vendor_unavailable":
@@ -264,6 +291,32 @@ function publicErrorMessage(code) {
264
291
  return "The stored site export could not be read or did not pass its integrity check.";
265
292
  case "site_export_image_not_found":
266
293
  return "The requested site-export image was not found, expired, or does not belong to this account.";
294
+ case "image_url_invalid":
295
+ return "The image source is not a valid URL. Use a stable public HTTPS URL or inline image bytes.";
296
+ case "image_url_not_https":
297
+ return "Commons image sources must use a public HTTPS URL or inline image bytes.";
298
+ case "image_host_unresolvable":
299
+ return "The image host could not be resolved. Use a different stable public URL or inline image bytes.";
300
+ case "image_host_blocked":
301
+ return "The image source resolves to a network address Commons cannot fetch safely.";
302
+ case "image_redirect_invalid":
303
+ return "The image source redirected to an invalid or unsafe destination.";
304
+ case "image_source_unavailable":
305
+ return "The image source could not be fetched. Host a different stable public URL or provide inline image bytes.";
306
+ case "image_too_large":
307
+ return "The image exceeds the Commons image size limit.";
308
+ case "image_redirect_limit":
309
+ return "The image source exceeded the Commons redirect limit.";
310
+ case "image_base64_invalid":
311
+ return "The supplied inline image bytes are invalid.";
312
+ case "image_source_missing":
313
+ return "Provide either a stable public image URL or inline image bytes.";
314
+ case "image_format_unsupported":
315
+ return "Commons accepts JPEG, PNG, GIF, or WebP image bytes.";
316
+ case "image_storage_unconfigured":
317
+ return "Commons image storage is temporarily unavailable.";
318
+ case "featured_image_unhostable":
319
+ return "The required featured image could not be hosted for Commons publication.";
267
320
  default:
268
321
  return PUBLIC_SERVICE_UNAVAILABLE_MESSAGE;
269
322
  }
@@ -1233,7 +1286,7 @@ render();
1233
1286
  }
1234
1287
 
1235
1288
  // src/version.ts
1236
- var PACKAGE_VERSION = "0.66.6";
1289
+ var PACKAGE_VERSION = "0.66.7";
1237
1290
 
1238
1291
  // src/mcp/input-field-descriptions.ts
1239
1292
  var import_zod = require("zod");
@@ -8217,11 +8270,20 @@ seam is noted so you can chain them.
8217
8270
  - Plan a new or edited entity -> **commons_prepare_entity**. This is the Commons equivalent of
8218
8271
  prepare-memory-write: it returns the live entity profile contract, duplicate candidates, tag reuse/review/create
8219
8272
  guidance, recommended sections, optional sections, and heading guidance before any write occurs.
8220
- - Validate a composed entity without writing -> **commons_validate_entity**. Use it after composing and before submit
8221
- to catch missing featured images, missing source/body evidence, duplicate candidates, and
8222
- unsupported placeholder sections.
8273
+ - Host a featured image -> **commons_host_image**. The normal write sequence is **commons_prepare_entity ->
8274
+ compose the payload -> commons_host_image -> commons_validate_entity -> commons_submit_entity**. Put the
8275
+ permanent returned URL in featuredImage.url. Use imageBase64 for available attachment bytes within the request
8276
+ bound, or a stable direct public HTTPS image URL; never use a caller-local path, opaque chat attachment reference,
8277
+ HTML page, private URL, or temporary/signed URL.
8278
+ - Validate a composed entity without writing -> **commons_validate_entity**. Use it after image hosting and before
8279
+ submit. Validation does not fetch or store image bytes; an external/unregistered featured image is reported in
8280
+ imageDiagnostics as not publishable until commons_host_image returns its permanent Commons URL. Validation also
8281
+ catches missing source/body evidence, duplicate candidates, and unsupported placeholder sections.
8223
8282
  - Create or edit a public wiki entity -> **commons_submit_entity**. This is a governed proposal write,
8224
- not direct rendered HTML editing. Normal workflow is prepare -> validate -> submit. Pick the closest entity type
8283
+ not direct rendered HTML editing. Submit retains defensive auto-hosting for a stable direct public HTTPS image,
8284
+ but image ingress failure returns an actionable tool error: host different bytes or a different stable source,
8285
+ replace featuredImage.url, validate again, and retry the same intended write with the same idempotency key.
8286
+ Pick the closest entity type
8225
8287
  first: SoftwareApplication, Organization, Person, Event, Place, Taxon, ScienceConcept, MathConcept, TechArticle,
8226
8288
  Trail, or PublicArticle.
8227
8289
  Creating a new entity costs 10 Credits; editing an existing entity costs 2 Credits. Preparation, validation,
@@ -10119,7 +10181,7 @@ var CommonsGetEntityLinksetInputSchema = {
10119
10181
  idOrSlug: import_zod8.z.string().trim().min(1).max(180).describe("Transparent Commons TPW-Q entity id or /wiki/ slug whose governed RFC 9264 linkset should be read.")
10120
10182
  };
10121
10183
  var CommonsFeaturedImageInputSchema = import_zod8.z.object({
10122
- url: import_zod8.z.string().url().describe("Required public image URL for a publishable entity. Use extract_url includeFeaturedImage or preserved media when available."),
10184
+ url: import_zod8.z.string().url().describe("For a publish-ready entity, use the permanent URL returned by commons_host_image. Submit can auto-host a stable direct public HTTPS image URL as a compatibility fallback, but validation reports any unregistered external URL as not ready. Do not use a chat attachment reference, caller-local path, temporary or signed URL, private URL, or HTML page URL."),
10123
10185
  alt: import_zod8.z.string().trim().max(500).optional(),
10124
10186
  caption: import_zod8.z.string().trim().max(1e3).optional(),
10125
10187
  sourceUrl: import_zod8.z.string().url().optional(),
@@ -10211,14 +10273,14 @@ var CommonsPrepareEntityInputSchema = {
10211
10273
  maxCandidates: import_zod8.z.number().int().min(1).max(20).default(8).describe("Maximum duplicate candidates to return.")
10212
10274
  };
10213
10275
  var CommonsSubmitEntityInputSchema = {
10214
- idempotencyKey: import_zod8.z.string().trim().min(8).max(200).describe("Required unique opaque ID for this intended Commons write. Reuse only when retrying the same write after a timeout; use a new value for each intentional create or edit."),
10276
+ idempotencyKey: import_zod8.z.string().trim().min(8).max(200).describe("Required unique opaque ID for this intended Commons write. Reuse it when retrying the same intended write after a timeout or after correcting a pre-persistence image-ingress failure; use a new value for each intentional create or edit."),
10215
10277
  title: import_zod8.z.string().trim().min(3).max(180).describe("Public page title. This is also used for duplicate slug/entity checks when slug is omitted."),
10216
10278
  description: import_zod8.z.string().trim().min(8).max(600).describe("Short article summary and schema.org description."),
10217
10279
  slug: import_zod8.z.string().trim().max(180).optional().describe("Optional URL slug. Omit to derive one from title."),
10218
10280
  entityId: import_zod8.z.string().trim().max(80).optional().describe("Existing Transparent Public Wiki entity id when proposing an edit. New entities normally omit this and receive a TPW-Q id."),
10219
10281
  entityType: import_zod8.z.string().trim().max(120).default("PublicArticle").describe("Backend Wikidata-style type. Prefer precise entity classes such as SoftwareApplication, Organization, Person, Event, Place, Taxon, ScienceConcept, MathConcept, TechArticle, or PublicArticle; the public article structure should match the selected type."),
10220
10282
  disambiguationName: import_zod8.z.string().trim().max(240).optional().describe("Clarifying name used when the concept could be confused with another entity."),
10221
- featuredImage: CommonsFeaturedImageInputSchema.optional().describe("Required for auto-published public entities. The image is also added to the media manifest if absent."),
10283
+ featuredImage: CommonsFeaturedImageInputSchema.optional().describe("Required for auto-published public entities. First call commons_host_image and place its returned permanent URL here; validation does not fetch external images and reports unregistered URLs as not publishable. Submit retains a compatibility fallback that auto-hosts a stable direct public HTTPS image URL. The image is also added to the media manifest if absent."),
10222
10284
  source: CommonsSourceInputSchema.optional().describe("Source provenance. Store original URL, source byline, and origin canonical here; canonical does not replace rights review."),
10223
10285
  tags: import_zod8.z.array(import_zod8.z.string().trim().min(1).max(80)).max(24).optional().describe("Standardized topic tags. Use existing/searchable concepts when possible."),
10224
10286
  keywords: import_zod8.z.array(import_zod8.z.string().trim().min(1).max(120)).max(50).optional().describe("SEO and retrieval keywords."),
@@ -10280,8 +10342,8 @@ var CommonsGetEntityLedgerInputSchema = {
10280
10342
  idOrSlug: import_zod8.z.string().trim().min(1).max(180).describe("Published entity id or /wiki/ slug whose contribution ledger should be read.")
10281
10343
  };
10282
10344
  var CommonsHostImageInputSchema = {
10283
- sourceUrl: import_zod8.z.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."),
10284
- imageBase64: import_zod8.z.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."),
10345
+ sourceUrl: import_zod8.z.string().url().optional().describe("Stable direct public HTTPS URL whose response is the image bytes to host. Do not pass an HTML webpage, chat attachment reference, caller-local path, temporary or signed URL, or private/authenticated URL."),
10346
+ imageBase64: import_zod8.z.string().min(16).optional().describe("Base64 image bytes for an image you already hold, including forwarded chat attachment bytes. Prefer this over a temporary attachment URL when the serialized request remains under about 3 MB; larger files require a stable direct public HTTPS source URL."),
10285
10347
  alt: import_zod8.z.string().trim().max(500).optional().describe("Alt text describing the image for readers who cannot see it."),
10286
10348
  license: import_zod8.z.string().trim().max(240).optional().describe("License or usage terms of the original image, preserved with the hosted copy."),
10287
10349
  attribution: import_zod8.z.string().trim().max(500).optional().describe("Credit line for the original photographer, publication, or archive.")
@@ -10313,6 +10375,30 @@ var CommonsGenericOutputSchema = {
10313
10375
  error: import_zod8.z.string().optional(),
10314
10376
  message: import_zod8.z.string().optional()
10315
10377
  };
10378
+ var CommonsFeaturedImageDiagnosticsOutputSchema = import_zod8.z.object({
10379
+ state: import_zod8.z.enum(["missing", "external_unhosted", "commons_hosted"]).describe("Storage-readiness state for the candidate featured image."),
10380
+ url: import_zod8.z.string().url().nullable().describe("Normalized candidate featured-image URL, or null when none was supplied."),
10381
+ commonsImageId: import_zod8.z.string().nullable().describe("Registered Commons image ID when metadata proves the image is hosted, otherwise null."),
10382
+ readyForPublish: import_zod8.z.boolean().describe("Whether Commons storage metadata proves this featured image is ready to publish."),
10383
+ submitWillAttemptAutoHost: import_zod8.z.boolean().describe("Whether submit will use its compatibility fallback to try hosting this external image."),
10384
+ requiredAction: import_zod8.z.string().nullable().describe("Action the caller must take before submit, or null when the image is ready.")
10385
+ }).describe("Featured-image storage readiness determined without fetching or storing external bytes.");
10386
+ var CommonsValidateEntityOutputSchema = {
10387
+ ok: import_zod8.z.boolean(),
10388
+ data: import_zod8.z.object({
10389
+ ok: import_zod8.z.literal(true),
10390
+ valid: import_zod8.z.boolean(),
10391
+ publishable: import_zod8.z.boolean(),
10392
+ autoPublishEligible: import_zod8.z.boolean(),
10393
+ errors: import_zod8.z.array(import_zod8.z.string()),
10394
+ warnings: import_zod8.z.array(import_zod8.z.string()),
10395
+ imageDiagnostics: import_zod8.z.object({
10396
+ featuredImage: CommonsFeaturedImageDiagnosticsOutputSchema
10397
+ }).describe("Read-only image readiness and recovery guidance for this payload.")
10398
+ }).passthrough().optional(),
10399
+ error: import_zod8.z.string().optional(),
10400
+ message: import_zod8.z.string().optional()
10401
+ };
10316
10402
  var DirectoryWorkflowStatusInputSchema = {
10317
10403
  jobId: import_zod8.z.string().trim().min(1).describe("The jobId returned by directory_workflow. Poll until status is complete, partial, empty, or failed.")
10318
10404
  };
@@ -14019,9 +14105,9 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
14019
14105
  }, async (input) => executor.commonsPrepareEntity(input));
14020
14106
  server.registerTool("commons_validate_entity", {
14021
14107
  title: "Transparent Commons Validate Entity",
14022
- description: "Validate a proposed Transparent Commons entity payload without writing. Checks publishable basics, featured image, source/body evidence, existing-entity conflict state, heading profile alignment, and unsupported placeholder sections. Call this after composing the page and before commons_submit_entity.",
14108
+ description: "Read-only validation for a proposed Transparent Commons entity payload. Call it after commons_prepare_entity, composing the page, and commons_host_image. It does not fetch or store image bytes: an external or otherwise unregistered featured image remains not publishable until commons_host_image returns the permanent Commons URL. Inspect imageDiagnostics for readiness and the required action before commons_submit_entity. Also checks source/body evidence, existing-entity conflict state, heading profile alignment, and unsupported placeholder sections.",
14023
14109
  inputSchema: CommonsValidateEntityInputSchema,
14024
- outputSchema: recordOutputSchema("commons_validate_entity", CommonsGenericOutputSchema),
14110
+ outputSchema: recordOutputSchema("commons_validate_entity", CommonsValidateEntityOutputSchema),
14025
14111
  annotations: {
14026
14112
  title: "Transparent Commons Validate Entity",
14027
14113
  readOnlyHint: true,
@@ -14032,7 +14118,7 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
14032
14118
  }, async (input) => executor.commonsValidateEntity(input));
14033
14119
  server.registerTool("commons_submit_entity", {
14034
14120
  title: "Transparent Commons Governed Entity Write",
14035
- 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. commons_prepare_entity returns the entity profile contract and section guidance to compose against. 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.",
14121
+ description: "Charged governed write that creates or proposes an edit to a Transparent Commons public wiki entity. A new entity costs 10 Credits; an edit costs 2 Credits. Preparation, image hosting, and validation are free, and idempotent retries are not charged twice. Normal workflow is commons_prepare_entity, compose the page, commons_host_image, commons_validate_entity, then submit with the returned permanent featuredImage.url. Submit retains a compatibility fallback that auto-hosts a stable direct public HTTPS image URL; if image ingress fails, it returns an actionable image tool error so you can host different bytes or a different stable source, replace the URL, validate again, and retry the same intended write with the same idempotencyKey. This never edits rendered HTML directly. Transparent Commons is an open wiki: any account may edit any entity, and every applied edit is recorded on the public contribution ledger. Publishing requires a ready 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.",
14036
14122
  inputSchema: CommonsSubmitEntityInputSchema,
14037
14123
  outputSchema: recordOutputSchema("commons_submit_entity", CommonsGenericOutputSchema),
14038
14124
  annotations: {
@@ -14058,7 +14144,7 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
14058
14144
  }, async (input) => executor.commonsGetEntityLedger(input));
14059
14145
  server.registerTool("commons_host_image", {
14060
14146
  title: "Host a Transparent Commons Image",
14061
- description: "Host an image from a public https URL or base64 bytes, returning a permanent Commons URL. Commons never serves a third-party image URL \u2014 commons_submit_entity hosts external images automatically, so use this only to host one before or independently of a write. JPEG, PNG, GIF, WebP up to 10 MB; SVG rejected. Identical bytes are stored once.",
14147
+ description: "Normal prerequisite for any featured image whose URL was not already returned by commons_host_image. Host image bytes from imageBase64 when you already have an attachment and the serialized request stays under about 3 MB, or from a stable direct public HTTPS image URL; do not pass a webpage, caller-local path, private URL, or temporary/signed attachment URL. Returns the permanent Commons URL to place in featuredImage.url before commons_validate_entity and commons_submit_entity. Submit can still auto-host a stable public source as a compatibility fallback. JPEG, PNG, GIF, and WebP are accepted up to 10 MB; SVG is rejected. Identical bytes are stored once.",
14062
14148
  inputSchema: CommonsHostImageInputSchema,
14063
14149
  outputSchema: recordOutputSchema("commons_host_image", CommonsGenericOutputSchema),
14064
14150
  annotations: {
@@ -18666,7 +18752,7 @@ var HostedMemoryMcpToolExecutor = class {
18666
18752
 
18667
18753
  // release-message.json
18668
18754
  var release_message_default = {
18669
- message: "Search Console bulk URL Inspection now returns one ordered partial-result receipt without the former one-minute cutoff."
18755
+ message: "Transparent Commons now verifies featured-image readiness before publishing, and replacement integration connections keep their paid period."
18670
18756
  };
18671
18757
 
18672
18758
  // src/install-terminal.ts
@@ -13,21 +13,21 @@ import {
13
13
  registerScheduledResultsMcpTools,
14
14
  registerSerpIntelligenceCaptureTools,
15
15
  resolveDeploymentProfile
16
- } from "../chunk-VMWVEKZT.js";
16
+ } from "../chunk-Z5QQEWXA.js";
17
17
  import "../chunk-PGJQDMC2.js";
18
- import "../chunk-3EYALCYK.js";
19
- import "../chunk-3TKKJQB4.js";
18
+ import "../chunk-F434YJPV.js";
19
+ import "../chunk-U2UHJWFW.js";
20
20
  import {
21
21
  renderInstallTerminal
22
- } from "../chunk-KPE52NPT.js";
22
+ } from "../chunk-O7ZC5Y3Z.js";
23
23
  import "../chunk-VXLU74YZ.js";
24
24
  import "../chunk-GGZEC22A.js";
25
25
  import {
26
26
  PACKAGE_VERSION
27
- } from "../chunk-NLEAYKOC.js";
27
+ } from "../chunk-7KB5QTHP.js";
28
28
  import "../chunk-DNM65UCK.js";
29
29
  import "../chunk-AYJHI2FK.js";
30
- import "../chunk-55B3T5L2.js";
30
+ import "../chunk-HZDJ5UZ4.js";
31
31
 
32
32
  // bin/mcp-stdio-server.ts
33
33
  import { readFileSync } from "fs";
@@ -300,7 +300,20 @@ var PUBLIC_ERROR_CODES = [
300
300
  "site_export_not_found",
301
301
  "site_export_format_unavailable",
302
302
  "site_export_read_failed",
303
- "site_export_image_not_found"
303
+ "site_export_image_not_found",
304
+ "image_url_invalid",
305
+ "image_url_not_https",
306
+ "image_host_unresolvable",
307
+ "image_host_blocked",
308
+ "image_redirect_invalid",
309
+ "image_source_unavailable",
310
+ "image_too_large",
311
+ "image_redirect_limit",
312
+ "image_base64_invalid",
313
+ "image_source_missing",
314
+ "image_format_unsupported",
315
+ "image_storage_unconfigured",
316
+ "featured_image_unhostable"
304
317
  ];
305
318
  var PUBLIC_ERROR_TYPES = [
306
319
  "request_aborted",
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  harvest
4
- } from "../chunk-K7Y27ND3.js";
4
+ } from "../chunk-CGOMGGOF.js";
5
5
  import {
6
6
  browserServiceApiKey
7
- } from "../chunk-3TKKJQB4.js";
7
+ } from "../chunk-U2UHJWFW.js";
8
8
  import "../chunk-77LQV73B.js";
9
- import "../chunk-55B3T5L2.js";
9
+ import "../chunk-HZDJ5UZ4.js";
10
10
 
11
11
  // src/cli.ts
12
12
  import { Command } from "commander";
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var PACKAGE_VERSION = "0.66.6";
2
+ var PACKAGE_VERSION = "0.66.7";
3
3
 
4
4
  export {
5
5
  PACKAGE_VERSION
@@ -6,7 +6,7 @@ import {
6
6
  currentCostContext,
7
7
  recordKernelSession,
8
8
  runWithCostContext
9
- } from "./chunk-3TKKJQB4.js";
9
+ } from "./chunk-U2UHJWFW.js";
10
10
  import {
11
11
  DEFAULT_PROXY_MODE,
12
12
  HarvestOptionsSchema,
@@ -21,7 +21,7 @@ import {
21
21
  RECAPTCHA_INSTRUCTIONS,
22
22
  RequestAbortedError,
23
23
  sanitizeVendorName
24
- } from "./chunk-55B3T5L2.js";
24
+ } from "./chunk-HZDJ5UZ4.js";
25
25
 
26
26
  // src/driver/BrowserDriver.ts
27
27
  import { chromium } from "playwright-extra";
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  buildPublicErrorEnvelope,
10
10
  getDb
11
- } from "./chunk-55B3T5L2.js";
11
+ } from "./chunk-HZDJ5UZ4.js";
12
12
 
13
13
  // src/lib/media-extractor.ts
14
14
  import { createWriteStream, mkdirSync, rmSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  publicErrorMessage,
3
3
  sanitizeVendorName
4
- } from "./chunk-55B3T5L2.js";
4
+ } from "./chunk-HZDJ5UZ4.js";
5
5
 
6
6
  // src/api/outbound-sanitize.ts
7
7
  var KEY_RENAMES = {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-RJ7JVYKU.js";
4
4
  import {
5
5
  getDb
6
- } from "./chunk-55B3T5L2.js";
6
+ } from "./chunk-HZDJ5UZ4.js";
7
7
 
8
8
  // src/api/location-data-repository.ts
9
9
  import { createHash, randomUUID } from "crypto";
@@ -15,7 +15,7 @@ import {
15
15
  sanitizeVendorName,
16
16
  serializePublicErrorEnvelope,
17
17
  settleDebitMcIdempotent
18
- } from "./chunk-55B3T5L2.js";
18
+ } from "./chunk-HZDJ5UZ4.js";
19
19
 
20
20
  // src/api/site-extract-content-store.ts
21
21
  import { createHash } from "crypto";
@@ -42,7 +42,20 @@ var PUBLIC_ERROR_CODES = [
42
42
  "site_export_not_found",
43
43
  "site_export_format_unavailable",
44
44
  "site_export_read_failed",
45
- "site_export_image_not_found"
45
+ "site_export_image_not_found",
46
+ "image_url_invalid",
47
+ "image_url_not_https",
48
+ "image_host_unresolvable",
49
+ "image_host_blocked",
50
+ "image_redirect_invalid",
51
+ "image_source_unavailable",
52
+ "image_too_large",
53
+ "image_redirect_limit",
54
+ "image_base64_invalid",
55
+ "image_source_missing",
56
+ "image_format_unsupported",
57
+ "image_storage_unconfigured",
58
+ "featured_image_unhostable"
46
59
  ];
47
60
  var PUBLIC_ERROR_TYPES = [
48
61
  "request_aborted",
@@ -164,6 +177,20 @@ function publicErrorType(code) {
164
177
  case "site_export_read_failed":
165
178
  case "site_export_image_not_found":
166
179
  return "extraction";
180
+ case "image_url_invalid":
181
+ case "image_url_not_https":
182
+ case "image_host_unresolvable":
183
+ case "image_host_blocked":
184
+ case "image_redirect_invalid":
185
+ case "image_source_unavailable":
186
+ case "image_too_large":
187
+ case "image_redirect_limit":
188
+ case "image_base64_invalid":
189
+ case "image_source_missing":
190
+ case "image_format_unsupported":
191
+ case "image_storage_unconfigured":
192
+ case "featured_image_unhostable":
193
+ return "invalid_request";
167
194
  case "insufficient_balance":
168
195
  return "billing";
169
196
  case "vendor_unavailable":
@@ -237,6 +264,32 @@ function publicErrorMessage(code) {
237
264
  return "The stored site export could not be read or did not pass its integrity check.";
238
265
  case "site_export_image_not_found":
239
266
  return "The requested site-export image was not found, expired, or does not belong to this account.";
267
+ case "image_url_invalid":
268
+ return "The image source is not a valid URL. Use a stable public HTTPS URL or inline image bytes.";
269
+ case "image_url_not_https":
270
+ return "Commons image sources must use a public HTTPS URL or inline image bytes.";
271
+ case "image_host_unresolvable":
272
+ return "The image host could not be resolved. Use a different stable public URL or inline image bytes.";
273
+ case "image_host_blocked":
274
+ return "The image source resolves to a network address Commons cannot fetch safely.";
275
+ case "image_redirect_invalid":
276
+ return "The image source redirected to an invalid or unsafe destination.";
277
+ case "image_source_unavailable":
278
+ return "The image source could not be fetched. Host a different stable public URL or provide inline image bytes.";
279
+ case "image_too_large":
280
+ return "The image exceeds the Commons image size limit.";
281
+ case "image_redirect_limit":
282
+ return "The image source exceeded the Commons redirect limit.";
283
+ case "image_base64_invalid":
284
+ return "The supplied inline image bytes are invalid.";
285
+ case "image_source_missing":
286
+ return "Provide either a stable public image URL or inline image bytes.";
287
+ case "image_format_unsupported":
288
+ return "Commons accepts JPEG, PNG, GIF, or WebP image bytes.";
289
+ case "image_storage_unconfigured":
290
+ return "Commons image storage is temporarily unavailable.";
291
+ case "featured_image_unhostable":
292
+ return "The required featured image could not be hosted for Commons publication.";
240
293
  default:
241
294
  return PUBLIC_SERVICE_UNAVAILABLE_MESSAGE;
242
295
  }
@@ -921,6 +974,20 @@ async function migrate(options = {}) {
921
974
  PRIMARY KEY (user_id, connection_id, period_start)
922
975
  )
923
976
  `);
977
+ await db.execute(`
978
+ CREATE TABLE IF NOT EXISTS connected_account_charge_transfers (
979
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
980
+ user_id INTEGER NOT NULL,
981
+ period_start TEXT NOT NULL,
982
+ from_connection_id TEXT NOT NULL,
983
+ to_connection_id TEXT NOT NULL,
984
+ provider_config_key TEXT NOT NULL,
985
+ transferred_at TEXT NOT NULL DEFAULT (datetime('now')),
986
+ UNIQUE (user_id, period_start, from_connection_id),
987
+ CHECK (from_connection_id <> to_connection_id)
988
+ )
989
+ `);
990
+ await db.execute(`CREATE INDEX IF NOT EXISTS connected_account_charge_transfers_destination ON connected_account_charge_transfers(user_id, period_start, to_connection_id, transferred_at DESC)`);
924
991
  await db.execute(`
925
992
  CREATE TABLE IF NOT EXISTS billing_credits (
926
993
  idempotency_key TEXT PRIMARY KEY,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getDb
3
- } from "./chunk-55B3T5L2.js";
3
+ } from "./chunk-HZDJ5UZ4.js";
4
4
 
5
5
  // src/api/lead-list-enrichment-repository.ts
6
6
  import { createHash, randomUUID } from "crypto";
@@ -10,7 +10,7 @@ import {
10
10
  finishHarvestAttempt,
11
11
  publicErrorMessage,
12
12
  startHarvestAttempt
13
- } from "./chunk-55B3T5L2.js";
13
+ } from "./chunk-HZDJ5UZ4.js";
14
14
 
15
15
  // src/api/harvest-problems.ts
16
16
  function errorMessage(err) {
@@ -1,6 +1,6 @@
1
1
  // release-message.json
2
2
  var release_message_default = {
3
- message: "Search Console bulk URL Inspection now returns one ordered partial-result receipt without the former one-minute cutoff."
3
+ message: "Transparent Commons now verifies featured-image readiness before publishing, and replacement integration connections keep their paid period."
4
4
  };
5
5
 
6
6
  // src/install-terminal.ts
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getDb
3
- } from "./chunk-55B3T5L2.js";
3
+ } from "./chunk-HZDJ5UZ4.js";
4
4
 
5
5
  // src/lib/browser-service-env.ts
6
6
  function browserServiceApiKey() {