@orchyn/mcp 1.17.3 → 1.17.4

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.
@@ -11,7 +11,7 @@ import { OrchynError } from "./orchyn.js";
11
11
  import { formatPaywallError, runVideoAnalysis, validatePostUrl } from "./video.js";
12
12
  import { ORCHYN_UI_TEMPLATE } from "./ui-template.js";
13
13
  /** Current MCP server version — bumped on every deploy for traceability. */
14
- export const MCP_SERVER_VERSION = "1.17.3";
14
+ export const MCP_SERVER_VERSION = "1.17.4";
15
15
  /** MCP Apps extension identifier */
16
16
  const UI_EXTENSION = "io.modelcontextprotocol/ui";
17
17
  /** MIME type for MCP Apps HTML resources */
@@ -195,13 +195,15 @@ body{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;background:var(--
195
195
  tool=params.get("tool")||"";
196
196
  if(!tool){
197
197
  var path=window.location.pathname;
198
- var match=path.match(/\/ui:\/\/orchyn\/([a-z_]+)/i);
199
- if(match)tool=match[1];
198
+ var idx=path.indexOf("ui://orchyn/");
199
+ if(idx>=0){var rest=path.substring(idx+12);var end=rest.length;for(var ci=0;ci<rest.length;ci++){var ch=rest.charCodeAt(ci);if(ch===63||ch===35||ch===47){end=ci;break;}}tool=rest.substring(0,end);}
200
+
200
201
  }
201
202
  if(!tool){
202
203
  var hash=window.location.hash;
203
- var m2=hash.match(/\/ui:\/\/orchyn\/([a-z_]+)/i);
204
- if(m2)tool=m2[1];
204
+ var idx2=hash.indexOf("ui://orchyn/");
205
+ if(idx2>=0){var rest2=hash.substring(idx2+12);var end2=rest2.length;for(var ci2=0;ci2<rest2.length;ci2++){var ch2=rest2.charCodeAt(ci2);if(ch2===63||ch2===35||ch2===47){end2=ci2;break;}}tool=rest2.substring(0,end2);}
206
+
205
207
  }
206
208
  var label=TOOL_NAMES[tool]||"Interactive View";
207
209
  var desc=TOOL_DESCS[tool]||"Results will appear here as soon as a tool returns.";
@@ -333,7 +335,7 @@ body{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;background:var(--
333
335
  var bodyText=p.caption||p.text||"";
334
336
  if(video){
335
337
  mediaHtml='<video controls preload="metadata" playsinline poster="'+esc(thumb)+'" style="width:100%;height:'+vh+';object-fit:cover;display:block;background:#000">'
336
- +'Your browser doesn\'t support video playback.</video>';
338
+ +'Your browser does not support video playback.</video>';
337
339
  }else if(images.length>1){
338
340
  // Carousel / multi-image gallery — horizontally scrollable strip.
339
341
  var strip=images.map(function(u,i){
@@ -451,9 +453,9 @@ body{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;background:var(--
451
453
  if(c&&c.type==="text"&&typeof c.text==="string"){textBlock=c.text;break;}
452
454
  }
453
455
  if(typeof textBlock==="string"&&textBlock!==""){
454
- // Split "<html>\n\n{json}" — if there's a JSON object after the HTML,
456
+ // Split "<html> {json}" — if there's a JSON object after the HTML,
455
457
  // parse it; otherwise show the text itself.
456
- var m=/^[\s]*<[^>]+>[\s\S]*?\n\n(\{.*\})[\s]*$/m.exec(textBlock);
458
+ var m=new RegExp("^[\\s]*<[^>]+>[\\s\\S]*?\\n\\n(\\{.*\\})[\\s]*$","m").exec(textBlock);
457
459
  if(m){try{var parsed=JSON.parse(m[1]);if(parsed&&typeof parsed==="object")return parsed;}catch(e){}}
458
460
  // Single-line HTML (common): keep the whole block as text fallback.
459
461
  if(textBlock.indexOf("<")===0){return { _html: textBlock };}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchyn/mcp",
3
- "version": "1.17.3",
3
+ "version": "1.17.4",
4
4
  "description": "MCP server for orchyn - fetch, discover and understand TikTok/Instagram/YouTube/X/LinkedIn posts with AI (media metadata, niche discovery, hook & viral analysis)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -34,6 +34,7 @@
34
34
  ],
35
35
  "license": "MIT",
36
36
  "dependencies": {
37
+ "@modelcontextprotocol/ext-apps": "^1.7.5",
37
38
  "@modelcontextprotocol/sdk": "^1.16.0",
38
39
  "zod": "^3.24.0"
39
40
  },