@atlascompiler/mcp 1.0.1 → 1.0.3
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/dist/{chunk-RTUIB2VO.js → chunk-YURB56AN.js} +14 -3
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -1
|
@@ -887,10 +887,21 @@ function createRemoteScrapeExecutor(context) {
|
|
|
887
887
|
await assertOkResponse(response);
|
|
888
888
|
const data = await response.json();
|
|
889
889
|
const root = data.data ?? data;
|
|
890
|
-
const title = root.title ?? args.url;
|
|
890
|
+
const title = data.metadata?.title ?? root.title ?? args.url;
|
|
891
|
+
const resolvedUrl = data.metadata?.canonicalUrl ?? root.url ?? args.url;
|
|
891
892
|
let markdown = root.markdown;
|
|
892
893
|
let text = root.text ?? (requestedFormats.includes("text") ? markdown : void 0);
|
|
893
|
-
const
|
|
894
|
+
const rawLinks = root.links ?? data.links;
|
|
895
|
+
const links = Array.isArray(rawLinks) ? rawLinks.map((item) => {
|
|
896
|
+
if (typeof item === "string") {
|
|
897
|
+
return { url: item, text: item };
|
|
898
|
+
}
|
|
899
|
+
if (item && typeof item === "object" && "url" in item) {
|
|
900
|
+
const obj = item;
|
|
901
|
+
return { url: obj.url, text: obj.text || obj.url };
|
|
902
|
+
}
|
|
903
|
+
return { url: String(item), text: String(item) };
|
|
904
|
+
}) : void 0;
|
|
894
905
|
const maxChars = args.max_output_chars ?? 3e4;
|
|
895
906
|
let truncated = false;
|
|
896
907
|
if (markdown && markdown.length > maxChars) {
|
|
@@ -911,7 +922,7 @@ function createRemoteScrapeExecutor(context) {
|
|
|
911
922
|
const wordCount = (markdown ?? text ?? "").split(/\s+/).filter(Boolean).length;
|
|
912
923
|
const readTimeSeconds = Math.max(1, Math.ceil(wordCount / 4));
|
|
913
924
|
return {
|
|
914
|
-
url:
|
|
925
|
+
url: resolvedUrl,
|
|
915
926
|
title,
|
|
916
927
|
markdown,
|
|
917
928
|
text,
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlascompiler/mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"mcpName": "com.atlas-compiler/atlas",
|
|
4
5
|
"description": "Official Model Context Protocol (MCP) server for Atlas - Deterministic Zero-LLM Web Compiler and Scraper for AI Agents",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"main": "./dist/index.js",
|