mcp-scraper 0.66.4 → 0.66.5
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 +6 -0
- package/README.md +1 -1
- package/dist/bin/api-server.cjs +42 -10
- package/dist/bin/api-server.js +1 -1
- package/dist/bin/mcp-scraper-cli.cjs +1 -1
- package/dist/bin/mcp-scraper-cli.js +1 -1
- package/dist/bin/mcp-scraper-install.cjs +2 -2
- package/dist/bin/mcp-scraper-install.js +2 -2
- package/dist/bin/mcp-stdio-server.cjs +11 -6
- package/dist/bin/mcp-stdio-server.js +3 -3
- package/dist/{chunk-UPN4W4SV.js → chunk-OJFWURGD.js} +10 -5
- package/dist/{chunk-EGNT3AY2.js → chunk-RSFMR7O7.js} +1 -1
- package/dist/{chunk-2XVDLF6H.js → chunk-TCOP5BT7.js} +1 -1
- package/dist/{server-YATQ3WHT.js → server-LESUYFDI.js} +34 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable changes to MCP Scraper are documented here. The format is based on [
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.66.5] - 2026-08-25
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Local Sourcebook submissions now distinguish accepted processing from publication, tell MCP clients to keep checking until the run is terminal, and return a plain-language completion message with the exact live listing URL.
|
|
12
|
+
|
|
7
13
|
## [0.66.4] - 2026-08-25
|
|
8
14
|
|
|
9
15
|
### Added
|
package/README.md
CHANGED
|
@@ -159,7 +159,7 @@ Build the branded one-click bundle:
|
|
|
159
159
|
npm run build:mcpb
|
|
160
160
|
```
|
|
161
161
|
|
|
162
|
-
The generated bundle is written to `build/mcpb/mcp-scraper-<version>.mcpb` and copied to `public/downloads/` for the hosted download. The current public bundle is `https://mcpscraper.dev/downloads/mcp-scraper.mcpb` (`0.66.
|
|
162
|
+
The generated bundle is written to `build/mcpb/mcp-scraper-<version>.mcpb` and copied to `public/downloads/` for the hosted download. The current public bundle is `https://mcpscraper.dev/downloads/mcp-scraper.mcpb` (`0.66.5`, SHA-256 `958313b3c6a41b73a725bac75770f5d429d6a4969966f3051c86d51087f76993`). Install it by opening or dragging it into Claude Desktop. Claude displays the `MCP Scraper` install card, icon, API-key configuration field, and manually curated current-release message from the bundle manifest.
|
|
163
163
|
|
|
164
164
|
The MCPB install exposes every tool — web-intelligence plus all `browser_*` tools — through the one `mcp-scraper` server.
|
|
165
165
|
|
package/dist/bin/api-server.cjs
CHANGED
|
@@ -33148,12 +33148,39 @@ function localSourcebookPublicUrls(category, state, slug4) {
|
|
|
33148
33148
|
};
|
|
33149
33149
|
}
|
|
33150
33150
|
function localSourcebookPublicationLinks(submission) {
|
|
33151
|
+
const isLive = submission.publishedRevision !== null && submission.status !== "rejected" && submission.status !== "unpublished";
|
|
33151
33152
|
return {
|
|
33152
33153
|
...localSourcebookPublicUrls(submission.category, submission.state, submission.slug),
|
|
33153
33154
|
publicationStatus: submission.status,
|
|
33154
|
-
isLive
|
|
33155
|
+
isLive
|
|
33155
33156
|
};
|
|
33156
33157
|
}
|
|
33158
|
+
function localSourcebookPublicationMessage(submission) {
|
|
33159
|
+
const { profileUrl } = localSourcebookPublicUrls(submission.category, submission.state, submission.slug);
|
|
33160
|
+
if (submission.status === "published" && submission.publishedRevision !== null) {
|
|
33161
|
+
return `Your Local Sourcebook listing is live: ${profileUrl}`;
|
|
33162
|
+
}
|
|
33163
|
+
if (submission.status === "failed") {
|
|
33164
|
+
if (submission.publishedRevision !== null) {
|
|
33165
|
+
return `We couldn't refresh this Local Sourcebook listing, but the previous version is still live: ${profileUrl}`;
|
|
33166
|
+
}
|
|
33167
|
+
return "We couldn't publish this Local Sourcebook listing because evidence collection failed. Review the reported issue before trying again.";
|
|
33168
|
+
}
|
|
33169
|
+
if (submission.status === "rejected") {
|
|
33170
|
+
return "This Local Sourcebook listing was rejected and is not live.";
|
|
33171
|
+
}
|
|
33172
|
+
if (submission.status === "unpublished") {
|
|
33173
|
+
return "This Local Sourcebook listing has been unpublished and is not live.";
|
|
33174
|
+
}
|
|
33175
|
+
if (submission.publishedRevision !== null) {
|
|
33176
|
+
return `We are collecting and compiling refreshed evidence. The current Local Sourcebook listing remains live: ${profileUrl}`;
|
|
33177
|
+
}
|
|
33178
|
+
return "Submission received. We are collecting and compiling evidence, so this Local Sourcebook listing is not live yet. Check the submission status again in about 10 seconds.";
|
|
33179
|
+
}
|
|
33180
|
+
function localSourcebookStatusCheck(submission) {
|
|
33181
|
+
const required = submission.status === "queued" || submission.status === "enriching" || submission.status === "needs_review";
|
|
33182
|
+
return required ? { required: true, submissionId: submission.id, pollAfterSeconds: 10 } : { required: false, submissionId: submission.id };
|
|
33183
|
+
}
|
|
33157
33184
|
var DEFAULT_ROOT_DOMAIN, CATEGORY_PUBLIC_SLUGS;
|
|
33158
33185
|
var init_local_sourcebook_public_urls = __esm({
|
|
33159
33186
|
"src/api/local-sourcebook-public-urls.ts"() {
|
|
@@ -45265,7 +45292,7 @@ var init_local_sourcebook_routes = __esm({
|
|
|
45265
45292
|
persisted = true;
|
|
45266
45293
|
await persistLocalSourcebookTags(submission.id, Number(user.id), validation.normalizedTags, parsed.data.tagDecisions);
|
|
45267
45294
|
const dispatched = await dispatchLocalSourcebookAcquisition(submission.id).catch(() => false);
|
|
45268
|
-
return c.json({ ok: true, valid: true, submission, publicUrls: localSourcebookPublicationLinks(submission), normalizedTags: validation.normalizedTags, acquisition: { queued: true, dispatched }, acquisitionPlan: acquisitionPlan(identity.websiteUrl), billing: publicListingWriteBilling(billing) }, 202);
|
|
45295
|
+
return c.json({ ok: true, valid: true, message: localSourcebookPublicationMessage(submission), statusCheck: localSourcebookStatusCheck(submission), submission, publicUrls: localSourcebookPublicationLinks(submission), normalizedTags: validation.normalizedTags, acquisition: { queued: true, dispatched }, acquisitionPlan: acquisitionPlan(identity.websiteUrl), billing: publicListingWriteBilling(billing) }, 202);
|
|
45269
45296
|
} catch (error) {
|
|
45270
45297
|
if (billing && !persisted) await refundListingWrite(billing, "Local Sourcebook creation failed before persistence.").catch(() => null);
|
|
45271
45298
|
const message = error instanceof Error ? error.message : String(error);
|
|
@@ -45314,7 +45341,7 @@ var init_local_sourcebook_routes = __esm({
|
|
|
45314
45341
|
});
|
|
45315
45342
|
persisted = true;
|
|
45316
45343
|
const dispatched = await dispatchLocalSourcebookAcquisition(submission.id).catch(() => false);
|
|
45317
|
-
return c.json({ ok: true, submission, publicUrls: localSourcebookPublicationLinks(submission), acquisition: { queued: true, dispatched }, acquisitionPlan: acquisitionPlan(input.websiteUrl), billing: publicListingWriteBilling(billing) }, 202);
|
|
45344
|
+
return c.json({ ok: true, message: localSourcebookPublicationMessage(submission), statusCheck: localSourcebookStatusCheck(submission), submission, publicUrls: localSourcebookPublicationLinks(submission), acquisition: { queued: true, dispatched }, acquisitionPlan: acquisitionPlan(input.websiteUrl), billing: publicListingWriteBilling(billing) }, 202);
|
|
45318
45345
|
} catch (error) {
|
|
45319
45346
|
if (billing && !persisted) await refundListingWrite(billing, "Local Sourcebook creation failed before persistence.").catch(() => null);
|
|
45320
45347
|
return c.json({ error: "submission_conflict", message: error instanceof Error ? error.message : String(error) }, 409);
|
|
@@ -45324,7 +45351,7 @@ var init_local_sourcebook_routes = __esm({
|
|
|
45324
45351
|
const userId = Number(c.get("user").id);
|
|
45325
45352
|
const submission = await getLocalSourcebookSubmission(c.req.param("id"), userId);
|
|
45326
45353
|
if (!submission) return c.json({ error: "not_found" }, 404);
|
|
45327
|
-
return c.json({ ok: true, submission, publicUrls: localSourcebookPublicationLinks(submission), draft: await getLocalSourcebookDraft(submission.id, userId) });
|
|
45354
|
+
return c.json({ ok: true, message: localSourcebookPublicationMessage(submission), statusCheck: localSourcebookStatusCheck(submission), submission, publicUrls: localSourcebookPublicationLinks(submission), draft: await getLocalSourcebookDraft(submission.id, userId) });
|
|
45328
45355
|
});
|
|
45329
45356
|
localSourcebookApp.on(["PATCH", "POST"], "/submissions/:id/draft", createApiKeyAuth(), (c) => c.json({
|
|
45330
45357
|
error: "evidence_refresh_required",
|
|
@@ -45359,7 +45386,7 @@ var init_local_sourcebook_routes = __esm({
|
|
|
45359
45386
|
return c.json({ error: "not_found" }, 404);
|
|
45360
45387
|
}
|
|
45361
45388
|
const dispatched = await dispatchLocalSourcebookAcquisition(submission.id).catch(() => false);
|
|
45362
|
-
return c.json({ ok: true, submission, publicUrls: localSourcebookPublicationLinks(submission), acquisition: { queued: true, dispatched }, acquisitionPlan: acquisitionPlan(submission.websiteUrl), billing: publicListingWriteBilling(billing) }, 202);
|
|
45389
|
+
return c.json({ ok: true, message: localSourcebookPublicationMessage(submission), statusCheck: localSourcebookStatusCheck(submission), submission, publicUrls: localSourcebookPublicationLinks(submission), acquisition: { queued: true, dispatched }, acquisitionPlan: acquisitionPlan(submission.websiteUrl), billing: publicListingWriteBilling(billing) }, 202);
|
|
45363
45390
|
} catch (error) {
|
|
45364
45391
|
if (billing) await refundListingWrite(billing, "Local Sourcebook refresh failed before persistence.").catch(() => null);
|
|
45365
45392
|
return c.json({ error: "moderated_listing", message: error instanceof Error ? error.message : String(error) }, 409);
|
|
@@ -49679,7 +49706,7 @@ var PACKAGE_VERSION;
|
|
|
49679
49706
|
var init_version = __esm({
|
|
49680
49707
|
"src/version.ts"() {
|
|
49681
49708
|
"use strict";
|
|
49682
|
-
PACKAGE_VERSION = "0.66.
|
|
49709
|
+
PACKAGE_VERSION = "0.66.5";
|
|
49683
49710
|
}
|
|
49684
49711
|
});
|
|
49685
49712
|
|
|
@@ -49910,11 +49937,16 @@ Multi-step orchestrations \u2014 prefer these over hand-chaining primitives when
|
|
|
49910
49937
|
- A new capture costs 10 Credits total and includes broad website, exact Maps place, maximum-accessible review,
|
|
49911
49938
|
service-area, staff, and genuine-media acquisition. When compilation succeeds, that exact system-authored evidence revision
|
|
49912
49939
|
publishes automatically. Never supply owner-authored services, reviews, images, or other public claims.
|
|
49940
|
+
- An accepted capture is still processing, not complete. While its returned \`statusCheck.required\` is true,
|
|
49941
|
+
wait the suggested interval and call **local_sourcebook_submission_status** again before giving the user a
|
|
49942
|
+
final completion answer. When it publishes, say that the listing is live and include the exact clickable
|
|
49943
|
+
\`publicUrls.profileUrl\`; when it fails, report the returned failure message and cause.
|
|
49913
49944
|
- Read progress and the compiled record with **local_sourcebook_submission_status**. Use
|
|
49914
49945
|
**local_sourcebook_refresh** only when the owner intentionally wants to pay 2 Credits for a new acquisition pass.
|
|
49915
49946
|
Contract, tag, preparation, validation, and status tools are free; idempotent retries are not charged twice.
|
|
49916
|
-
- Capture and status responses return \`
|
|
49917
|
-
|
|
49947
|
+
- Capture and status responses return a plain-language \`message\`, a \`statusCheck\`, and exact public URLs. Do not
|
|
49948
|
+
describe a queued or enriching listing as complete, and do not report a listing as live without including its
|
|
49949
|
+
clickable \`publicUrls.profileUrl\`.
|
|
49918
49950
|
- The last published revision remains public during refresh. Administrators can reject or unpublish an
|
|
49919
49951
|
exceptional record, but routine subscriber publication does not require administrator review.
|
|
49920
49952
|
|
|
@@ -56210,14 +56242,14 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
|
|
|
56210
56242
|
}, async (input) => executor.validateLocalSourcebookWrite(input));
|
|
56211
56243
|
server.registerTool("local-sourcebook-capture", {
|
|
56212
56244
|
title: "Capture Governed Local Sourcebook Listing",
|
|
56213
|
-
description: "Strict owner-scoped LocalBusiness write path after list, contract, prepare, and validate. Creating a listing costs 10 Credits total, including website, exact-place, review, service-area, staff, genuine-media, and structured-data compilation; preparation and validation are free, and idempotent retries are not charged twice. Capture registers canonical tags and the accepted Schema.org LocalBusiness subtype,
|
|
56245
|
+
description: "Strict owner-scoped LocalBusiness write path after list, contract, prepare, and validate. Creating a listing costs 10 Credits total, including website, exact-place, review, service-area, staff, genuine-media, and structured-data compilation; preparation and validation are free, and idempotent retries are not charged twice. Capture registers canonical tags and the accepted Schema.org LocalBusiness subtype, then queues acquisition; an accepted capture is not yet live. Poll local_sourcebook_submission_status using statusCheck until it is terminal. When published, tell the user the returned message and exact publicUrls.profileUrl. MCP Scraper generates the final JSON-LD from source-backed evidence and publishes a successful system-compiled revision automatically; owner-authored public claims and arbitrary JSON-LD are not accepted.",
|
|
56214
56246
|
inputSchema: LocalSourcebookCaptureInputSchema,
|
|
56215
56247
|
outputSchema: recordOutputSchema("local-sourcebook-capture", LocalSourcebookOutputSchema),
|
|
56216
56248
|
annotations: liveWebToolAnnotations("Capture Governed Local Sourcebook Listing")
|
|
56217
56249
|
}, async (input) => executor.localSourcebookCapture(input));
|
|
56218
56250
|
server.registerTool("local_sourcebook_submission_status", {
|
|
56219
56251
|
title: "Local Sourcebook Submission Status",
|
|
56220
|
-
description: "Read the caller\u2019s listing draft, enrichment coverage, revision number, publication state, and
|
|
56252
|
+
description: "Read the caller\u2019s listing draft, enrichment coverage, revision number, publication state, and LocalSourcebook.com profile and reviews URLs. While statusCheck.required is true, wait the returned interval and check again before giving the user a final completion answer. When published, present the returned message and exact clickable publicUrls.profileUrl. When failed, present the failure message and read acquisitionError before retrying, since a refresh repeats the same acquisition. Coverage counters are written only on success, so zeroed counters on a failed listing do not mean the crawl never ran.",
|
|
56221
56253
|
inputSchema: LocalSourcebookSubmissionStatusInputSchema,
|
|
56222
56254
|
outputSchema: recordOutputSchema("local_sourcebook_submission_status", LocalSourcebookOutputSchema),
|
|
56223
56255
|
annotations: localPlanningToolAnnotations("Local Sourcebook Submission Status")
|
package/dist/bin/api-server.js
CHANGED
|
@@ -17,7 +17,7 @@ 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-
|
|
20
|
+
import("../server-LESUYFDI.js"),
|
|
21
21
|
import("../worker-UTBUWEXQ.js"),
|
|
22
22
|
import("../db-4RVZ3NYZ.js")
|
|
23
23
|
]);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
// release-message.json
|
|
5
5
|
var release_message_default = {
|
|
6
|
-
message: "
|
|
6
|
+
message: "Local Sourcebook submissions now clearly distinguish processing from publication and return the exact live listing URL when complete."
|
|
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.
|
|
115
|
+
var PACKAGE_VERSION = "0.66.5";
|
|
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-
|
|
4
|
+
} from "../chunk-TCOP5BT7.js";
|
|
5
5
|
import {
|
|
6
6
|
PACKAGE_VERSION
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-RSFMR7O7.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;
|
|
@@ -1232,7 +1232,7 @@ render();
|
|
|
1232
1232
|
}
|
|
1233
1233
|
|
|
1234
1234
|
// src/version.ts
|
|
1235
|
-
var PACKAGE_VERSION = "0.66.
|
|
1235
|
+
var PACKAGE_VERSION = "0.66.5";
|
|
1236
1236
|
|
|
1237
1237
|
// src/mcp/input-field-descriptions.ts
|
|
1238
1238
|
var import_zod = require("zod");
|
|
@@ -8378,11 +8378,16 @@ Multi-step orchestrations \u2014 prefer these over hand-chaining primitives when
|
|
|
8378
8378
|
- A new capture costs 10 Credits total and includes broad website, exact Maps place, maximum-accessible review,
|
|
8379
8379
|
service-area, staff, and genuine-media acquisition. When compilation succeeds, that exact system-authored evidence revision
|
|
8380
8380
|
publishes automatically. Never supply owner-authored services, reviews, images, or other public claims.
|
|
8381
|
+
- An accepted capture is still processing, not complete. While its returned \`statusCheck.required\` is true,
|
|
8382
|
+
wait the suggested interval and call **local_sourcebook_submission_status** again before giving the user a
|
|
8383
|
+
final completion answer. When it publishes, say that the listing is live and include the exact clickable
|
|
8384
|
+
\`publicUrls.profileUrl\`; when it fails, report the returned failure message and cause.
|
|
8381
8385
|
- Read progress and the compiled record with **local_sourcebook_submission_status**. Use
|
|
8382
8386
|
**local_sourcebook_refresh** only when the owner intentionally wants to pay 2 Credits for a new acquisition pass.
|
|
8383
8387
|
Contract, tag, preparation, validation, and status tools are free; idempotent retries are not charged twice.
|
|
8384
|
-
- Capture and status responses return \`
|
|
8385
|
-
|
|
8388
|
+
- Capture and status responses return a plain-language \`message\`, a \`statusCheck\`, and exact public URLs. Do not
|
|
8389
|
+
describe a queued or enriching listing as complete, and do not report a listing as live without including its
|
|
8390
|
+
clickable \`publicUrls.profileUrl\`.
|
|
8386
8391
|
- The last published revision remains public during refresh. Administrators can reject or unpublish an
|
|
8387
8392
|
exceptional record, but routine subscriber publication does not require administrator review.
|
|
8388
8393
|
|
|
@@ -14231,14 +14236,14 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
|
|
|
14231
14236
|
}, async (input) => executor.validateLocalSourcebookWrite(input));
|
|
14232
14237
|
server.registerTool("local-sourcebook-capture", {
|
|
14233
14238
|
title: "Capture Governed Local Sourcebook Listing",
|
|
14234
|
-
description: "Strict owner-scoped LocalBusiness write path after list, contract, prepare, and validate. Creating a listing costs 10 Credits total, including website, exact-place, review, service-area, staff, genuine-media, and structured-data compilation; preparation and validation are free, and idempotent retries are not charged twice. Capture registers canonical tags and the accepted Schema.org LocalBusiness subtype,
|
|
14239
|
+
description: "Strict owner-scoped LocalBusiness write path after list, contract, prepare, and validate. Creating a listing costs 10 Credits total, including website, exact-place, review, service-area, staff, genuine-media, and structured-data compilation; preparation and validation are free, and idempotent retries are not charged twice. Capture registers canonical tags and the accepted Schema.org LocalBusiness subtype, then queues acquisition; an accepted capture is not yet live. Poll local_sourcebook_submission_status using statusCheck until it is terminal. When published, tell the user the returned message and exact publicUrls.profileUrl. MCP Scraper generates the final JSON-LD from source-backed evidence and publishes a successful system-compiled revision automatically; owner-authored public claims and arbitrary JSON-LD are not accepted.",
|
|
14235
14240
|
inputSchema: LocalSourcebookCaptureInputSchema,
|
|
14236
14241
|
outputSchema: recordOutputSchema("local-sourcebook-capture", LocalSourcebookOutputSchema),
|
|
14237
14242
|
annotations: liveWebToolAnnotations("Capture Governed Local Sourcebook Listing")
|
|
14238
14243
|
}, async (input) => executor.localSourcebookCapture(input));
|
|
14239
14244
|
server.registerTool("local_sourcebook_submission_status", {
|
|
14240
14245
|
title: "Local Sourcebook Submission Status",
|
|
14241
|
-
description: "Read the caller\u2019s listing draft, enrichment coverage, revision number, publication state, and
|
|
14246
|
+
description: "Read the caller\u2019s listing draft, enrichment coverage, revision number, publication state, and LocalSourcebook.com profile and reviews URLs. While statusCheck.required is true, wait the returned interval and check again before giving the user a final completion answer. When published, present the returned message and exact clickable publicUrls.profileUrl. When failed, present the failure message and read acquisitionError before retrying, since a refresh repeats the same acquisition. Coverage counters are written only on success, so zeroed counters on a failed listing do not mean the crawl never ran.",
|
|
14242
14247
|
inputSchema: LocalSourcebookSubmissionStatusInputSchema,
|
|
14243
14248
|
outputSchema: recordOutputSchema("local_sourcebook_submission_status", LocalSourcebookOutputSchema),
|
|
14244
14249
|
annotations: localPlanningToolAnnotations("Local Sourcebook Submission Status")
|
|
@@ -18660,7 +18665,7 @@ var HostedMemoryMcpToolExecutor = class {
|
|
|
18660
18665
|
|
|
18661
18666
|
// release-message.json
|
|
18662
18667
|
var release_message_default = {
|
|
18663
|
-
message: "
|
|
18668
|
+
message: "Local Sourcebook submissions now clearly distinguish processing from publication and return the exact live listing URL when complete."
|
|
18664
18669
|
};
|
|
18665
18670
|
|
|
18666
18671
|
// src/install-terminal.ts
|
|
@@ -13,18 +13,18 @@ import {
|
|
|
13
13
|
registerScheduledResultsMcpTools,
|
|
14
14
|
registerSerpIntelligenceCaptureTools,
|
|
15
15
|
resolveDeploymentProfile
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-OJFWURGD.js";
|
|
17
17
|
import "../chunk-PGJQDMC2.js";
|
|
18
18
|
import "../chunk-3EYALCYK.js";
|
|
19
19
|
import "../chunk-3TKKJQB4.js";
|
|
20
20
|
import {
|
|
21
21
|
renderInstallTerminal
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-TCOP5BT7.js";
|
|
23
23
|
import "../chunk-VXLU74YZ.js";
|
|
24
24
|
import "../chunk-GGZEC22A.js";
|
|
25
25
|
import {
|
|
26
26
|
PACKAGE_VERSION
|
|
27
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-RSFMR7O7.js";
|
|
28
28
|
import "../chunk-DNM65UCK.js";
|
|
29
29
|
import "../chunk-AYJHI2FK.js";
|
|
30
30
|
import "../chunk-55B3T5L2.js";
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from "./chunk-VXLU74YZ.js";
|
|
26
26
|
import {
|
|
27
27
|
PACKAGE_VERSION
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-RSFMR7O7.js";
|
|
29
29
|
import {
|
|
30
30
|
createPrivateArtifact,
|
|
31
31
|
privateArtifactOwnerId,
|
|
@@ -550,11 +550,16 @@ Multi-step orchestrations \u2014 prefer these over hand-chaining primitives when
|
|
|
550
550
|
- A new capture costs 10 Credits total and includes broad website, exact Maps place, maximum-accessible review,
|
|
551
551
|
service-area, staff, and genuine-media acquisition. When compilation succeeds, that exact system-authored evidence revision
|
|
552
552
|
publishes automatically. Never supply owner-authored services, reviews, images, or other public claims.
|
|
553
|
+
- An accepted capture is still processing, not complete. While its returned \`statusCheck.required\` is true,
|
|
554
|
+
wait the suggested interval and call **local_sourcebook_submission_status** again before giving the user a
|
|
555
|
+
final completion answer. When it publishes, say that the listing is live and include the exact clickable
|
|
556
|
+
\`publicUrls.profileUrl\`; when it fails, report the returned failure message and cause.
|
|
553
557
|
- Read progress and the compiled record with **local_sourcebook_submission_status**. Use
|
|
554
558
|
**local_sourcebook_refresh** only when the owner intentionally wants to pay 2 Credits for a new acquisition pass.
|
|
555
559
|
Contract, tag, preparation, validation, and status tools are free; idempotent retries are not charged twice.
|
|
556
|
-
- Capture and status responses return \`
|
|
557
|
-
|
|
560
|
+
- Capture and status responses return a plain-language \`message\`, a \`statusCheck\`, and exact public URLs. Do not
|
|
561
|
+
describe a queued or enriching listing as complete, and do not report a listing as live without including its
|
|
562
|
+
clickable \`publicUrls.profileUrl\`.
|
|
558
563
|
- The last published revision remains public during refresh. Administrators can reject or unpublish an
|
|
559
564
|
exceptional record, but routine subscriber publication does not require administrator review.
|
|
560
565
|
|
|
@@ -11740,14 +11745,14 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
|
|
|
11740
11745
|
}, async (input) => executor.validateLocalSourcebookWrite(input));
|
|
11741
11746
|
server.registerTool("local-sourcebook-capture", {
|
|
11742
11747
|
title: "Capture Governed Local Sourcebook Listing",
|
|
11743
|
-
description: "Strict owner-scoped LocalBusiness write path after list, contract, prepare, and validate. Creating a listing costs 10 Credits total, including website, exact-place, review, service-area, staff, genuine-media, and structured-data compilation; preparation and validation are free, and idempotent retries are not charged twice. Capture registers canonical tags and the accepted Schema.org LocalBusiness subtype,
|
|
11748
|
+
description: "Strict owner-scoped LocalBusiness write path after list, contract, prepare, and validate. Creating a listing costs 10 Credits total, including website, exact-place, review, service-area, staff, genuine-media, and structured-data compilation; preparation and validation are free, and idempotent retries are not charged twice. Capture registers canonical tags and the accepted Schema.org LocalBusiness subtype, then queues acquisition; an accepted capture is not yet live. Poll local_sourcebook_submission_status using statusCheck until it is terminal. When published, tell the user the returned message and exact publicUrls.profileUrl. MCP Scraper generates the final JSON-LD from source-backed evidence and publishes a successful system-compiled revision automatically; owner-authored public claims and arbitrary JSON-LD are not accepted.",
|
|
11744
11749
|
inputSchema: LocalSourcebookCaptureInputSchema,
|
|
11745
11750
|
outputSchema: recordOutputSchema("local-sourcebook-capture", LocalSourcebookOutputSchema),
|
|
11746
11751
|
annotations: liveWebToolAnnotations("Capture Governed Local Sourcebook Listing")
|
|
11747
11752
|
}, async (input) => executor.localSourcebookCapture(input));
|
|
11748
11753
|
server.registerTool("local_sourcebook_submission_status", {
|
|
11749
11754
|
title: "Local Sourcebook Submission Status",
|
|
11750
|
-
description: "Read the caller\u2019s listing draft, enrichment coverage, revision number, publication state, and
|
|
11755
|
+
description: "Read the caller\u2019s listing draft, enrichment coverage, revision number, publication state, and LocalSourcebook.com profile and reviews URLs. While statusCheck.required is true, wait the returned interval and check again before giving the user a final completion answer. When published, present the returned message and exact clickable publicUrls.profileUrl. When failed, present the failure message and read acquisitionError before retrying, since a refresh repeats the same acquisition. Coverage counters are written only on success, so zeroed counters on a failed listing do not mean the crawl never ran.",
|
|
11751
11756
|
inputSchema: LocalSourcebookSubmissionStatusInputSchema,
|
|
11752
11757
|
outputSchema: recordOutputSchema("local_sourcebook_submission_status", LocalSourcebookOutputSchema),
|
|
11753
11758
|
annotations: localPlanningToolAnnotations("Local Sourcebook Submission Status")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// release-message.json
|
|
2
2
|
var release_message_default = {
|
|
3
|
-
message: "
|
|
3
|
+
message: "Local Sourcebook submissions now clearly distinguish processing from publication and return the exact live listing URL when complete."
|
|
4
4
|
};
|
|
5
5
|
|
|
6
6
|
// src/install-terminal.ts
|
|
@@ -199,7 +199,7 @@ import {
|
|
|
199
199
|
resolveDeploymentProfile,
|
|
200
200
|
resolveLocalSourcebookSchemaType,
|
|
201
201
|
transcribeMediaUrl
|
|
202
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-OJFWURGD.js";
|
|
203
203
|
import {
|
|
204
204
|
auditImageUrls,
|
|
205
205
|
auditImages,
|
|
@@ -256,7 +256,7 @@ import {
|
|
|
256
256
|
} from "./chunk-GGZEC22A.js";
|
|
257
257
|
import {
|
|
258
258
|
PACKAGE_VERSION
|
|
259
|
-
} from "./chunk-
|
|
259
|
+
} from "./chunk-RSFMR7O7.js";
|
|
260
260
|
import {
|
|
261
261
|
SITE_EXTRACT_ARTIFACT_PREFIX,
|
|
262
262
|
abandonExtractSettlement,
|
|
@@ -13665,12 +13665,39 @@ function localSourcebookPublicUrls(category, state, slug4) {
|
|
|
13665
13665
|
};
|
|
13666
13666
|
}
|
|
13667
13667
|
function localSourcebookPublicationLinks(submission) {
|
|
13668
|
+
const isLive = submission.publishedRevision !== null && submission.status !== "rejected" && submission.status !== "unpublished";
|
|
13668
13669
|
return {
|
|
13669
13670
|
...localSourcebookPublicUrls(submission.category, submission.state, submission.slug),
|
|
13670
13671
|
publicationStatus: submission.status,
|
|
13671
|
-
isLive
|
|
13672
|
+
isLive
|
|
13672
13673
|
};
|
|
13673
13674
|
}
|
|
13675
|
+
function localSourcebookPublicationMessage(submission) {
|
|
13676
|
+
const { profileUrl } = localSourcebookPublicUrls(submission.category, submission.state, submission.slug);
|
|
13677
|
+
if (submission.status === "published" && submission.publishedRevision !== null) {
|
|
13678
|
+
return `Your Local Sourcebook listing is live: ${profileUrl}`;
|
|
13679
|
+
}
|
|
13680
|
+
if (submission.status === "failed") {
|
|
13681
|
+
if (submission.publishedRevision !== null) {
|
|
13682
|
+
return `We couldn't refresh this Local Sourcebook listing, but the previous version is still live: ${profileUrl}`;
|
|
13683
|
+
}
|
|
13684
|
+
return "We couldn't publish this Local Sourcebook listing because evidence collection failed. Review the reported issue before trying again.";
|
|
13685
|
+
}
|
|
13686
|
+
if (submission.status === "rejected") {
|
|
13687
|
+
return "This Local Sourcebook listing was rejected and is not live.";
|
|
13688
|
+
}
|
|
13689
|
+
if (submission.status === "unpublished") {
|
|
13690
|
+
return "This Local Sourcebook listing has been unpublished and is not live.";
|
|
13691
|
+
}
|
|
13692
|
+
if (submission.publishedRevision !== null) {
|
|
13693
|
+
return `We are collecting and compiling refreshed evidence. The current Local Sourcebook listing remains live: ${profileUrl}`;
|
|
13694
|
+
}
|
|
13695
|
+
return "Submission received. We are collecting and compiling evidence, so this Local Sourcebook listing is not live yet. Check the submission status again in about 10 seconds.";
|
|
13696
|
+
}
|
|
13697
|
+
function localSourcebookStatusCheck(submission) {
|
|
13698
|
+
const required = submission.status === "queued" || submission.status === "enriching" || submission.status === "needs_review";
|
|
13699
|
+
return required ? { required: true, submissionId: submission.id, pollAfterSeconds: 10 } : { required: false, submissionId: submission.id };
|
|
13700
|
+
}
|
|
13674
13701
|
|
|
13675
13702
|
// src/api/local-sourcebook-compiler.ts
|
|
13676
13703
|
var CATEGORY_LABELS = {
|
|
@@ -24864,7 +24891,7 @@ localSourcebookApp.post("/capture", createApiKeyAuth(), async (c) => {
|
|
|
24864
24891
|
persisted = true;
|
|
24865
24892
|
await persistLocalSourcebookTags(submission.id, Number(user.id), validation.normalizedTags, parsed.data.tagDecisions);
|
|
24866
24893
|
const dispatched = await dispatchLocalSourcebookAcquisition(submission.id).catch(() => false);
|
|
24867
|
-
return c.json({ ok: true, valid: true, submission, publicUrls: localSourcebookPublicationLinks(submission), normalizedTags: validation.normalizedTags, acquisition: { queued: true, dispatched }, acquisitionPlan: acquisitionPlan(identity.websiteUrl), billing: publicListingWriteBilling(billing) }, 202);
|
|
24894
|
+
return c.json({ ok: true, valid: true, message: localSourcebookPublicationMessage(submission), statusCheck: localSourcebookStatusCheck(submission), submission, publicUrls: localSourcebookPublicationLinks(submission), normalizedTags: validation.normalizedTags, acquisition: { queued: true, dispatched }, acquisitionPlan: acquisitionPlan(identity.websiteUrl), billing: publicListingWriteBilling(billing) }, 202);
|
|
24868
24895
|
} catch (error) {
|
|
24869
24896
|
if (billing && !persisted) await refundListingWrite(billing, "Local Sourcebook creation failed before persistence.").catch(() => null);
|
|
24870
24897
|
const message = error instanceof Error ? error.message : String(error);
|
|
@@ -24913,7 +24940,7 @@ localSourcebookApp.post("/submissions", createApiKeyAuth(), async (c) => {
|
|
|
24913
24940
|
});
|
|
24914
24941
|
persisted = true;
|
|
24915
24942
|
const dispatched = await dispatchLocalSourcebookAcquisition(submission.id).catch(() => false);
|
|
24916
|
-
return c.json({ ok: true, submission, publicUrls: localSourcebookPublicationLinks(submission), acquisition: { queued: true, dispatched }, acquisitionPlan: acquisitionPlan(input.websiteUrl), billing: publicListingWriteBilling(billing) }, 202);
|
|
24943
|
+
return c.json({ ok: true, message: localSourcebookPublicationMessage(submission), statusCheck: localSourcebookStatusCheck(submission), submission, publicUrls: localSourcebookPublicationLinks(submission), acquisition: { queued: true, dispatched }, acquisitionPlan: acquisitionPlan(input.websiteUrl), billing: publicListingWriteBilling(billing) }, 202);
|
|
24917
24944
|
} catch (error) {
|
|
24918
24945
|
if (billing && !persisted) await refundListingWrite(billing, "Local Sourcebook creation failed before persistence.").catch(() => null);
|
|
24919
24946
|
return c.json({ error: "submission_conflict", message: error instanceof Error ? error.message : String(error) }, 409);
|
|
@@ -24923,7 +24950,7 @@ localSourcebookApp.get("/submissions/:id", createApiKeyAuth(), async (c) => {
|
|
|
24923
24950
|
const userId = Number(c.get("user").id);
|
|
24924
24951
|
const submission = await getLocalSourcebookSubmission(c.req.param("id"), userId);
|
|
24925
24952
|
if (!submission) return c.json({ error: "not_found" }, 404);
|
|
24926
|
-
return c.json({ ok: true, submission, publicUrls: localSourcebookPublicationLinks(submission), draft: await getLocalSourcebookDraft(submission.id, userId) });
|
|
24953
|
+
return c.json({ ok: true, message: localSourcebookPublicationMessage(submission), statusCheck: localSourcebookStatusCheck(submission), submission, publicUrls: localSourcebookPublicationLinks(submission), draft: await getLocalSourcebookDraft(submission.id, userId) });
|
|
24927
24954
|
});
|
|
24928
24955
|
localSourcebookApp.on(["PATCH", "POST"], "/submissions/:id/draft", createApiKeyAuth(), (c) => c.json({
|
|
24929
24956
|
error: "evidence_refresh_required",
|
|
@@ -24958,7 +24985,7 @@ localSourcebookApp.post("/submissions/:id/refresh", createApiKeyAuth(), async (c
|
|
|
24958
24985
|
return c.json({ error: "not_found" }, 404);
|
|
24959
24986
|
}
|
|
24960
24987
|
const dispatched = await dispatchLocalSourcebookAcquisition(submission.id).catch(() => false);
|
|
24961
|
-
return c.json({ ok: true, submission, publicUrls: localSourcebookPublicationLinks(submission), acquisition: { queued: true, dispatched }, acquisitionPlan: acquisitionPlan(submission.websiteUrl), billing: publicListingWriteBilling(billing) }, 202);
|
|
24988
|
+
return c.json({ ok: true, message: localSourcebookPublicationMessage(submission), statusCheck: localSourcebookStatusCheck(submission), submission, publicUrls: localSourcebookPublicationLinks(submission), acquisition: { queued: true, dispatched }, acquisitionPlan: acquisitionPlan(submission.websiteUrl), billing: publicListingWriteBilling(billing) }, 202);
|
|
24962
24989
|
} catch (error) {
|
|
24963
24990
|
if (billing) await refundListingWrite(billing, "Local Sourcebook refresh failed before persistence.").catch(() => null);
|
|
24964
24991
|
return c.json({ error: "moderated_listing", message: error instanceof Error ? error.message : String(error) }, 409);
|