@orchyn/mcp 1.7.4 → 1.8.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.
- package/dist/shared/tools.js +11 -1
- package/package.json +1 -1
package/dist/shared/tools.js
CHANGED
|
@@ -17,7 +17,17 @@ function toToolResult(proxy) {
|
|
|
17
17
|
data: String(c.data ?? ""),
|
|
18
18
|
mimeType: String(c.mimeType ?? "image/jpeg"),
|
|
19
19
|
}));
|
|
20
|
-
|
|
20
|
+
// The Rust backend embeds HTML cards directly in the text block
|
|
21
|
+
// (type:"text", text:"<div>...</div>\n\n{json}"). We extract the HTML
|
|
22
|
+
// prefix from the first text contentBlock and prepend it.
|
|
23
|
+
const textBlock = proxy.contentBlocks.find((c) => c.type === "text");
|
|
24
|
+
const rawText = textBlock ? String(textBlock.text ?? "") : "";
|
|
25
|
+
const htmlPrefix = rawText.startsWith("<")
|
|
26
|
+
? rawText.substring(0, rawText.indexOf("\n\n{")).trimEnd()
|
|
27
|
+
: "";
|
|
28
|
+
const structured = proxy.structured;
|
|
29
|
+
const textJson = JSON.stringify(structured ?? {}, null, 2);
|
|
30
|
+
const text = htmlPrefix ? `${htmlPrefix}\n\n${textJson}` : textJson;
|
|
21
31
|
return { content: [...images, { type: "text", text }] };
|
|
22
32
|
}
|
|
23
33
|
function toolError(prefix, err) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orchyn/mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "MCP server for orchyn - fetch, discover and understand TikTok/Instagram/YouTube/X posts with AI (media metadata, niche discovery, hook & viral analysis)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|