@mcp-use/cli 4.2.1 → 4.3.0-canary.1

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/index.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-RJXPUWMH.js";import"./chunk-F6ENE4MX.js";import"./chunk-WOT6VMZA.js";export{a as main};
1
+ import{a}from"./chunk-JZSBLFWR.js";import"./chunk-F6ENE4MX.js";import"./chunk-WOT6VMZA.js";export{a as main};
@@ -1 +1 @@
1
- import{b as i,c as r,e as o,f as s,j as t}from"../chunk-KCR2VHMS.js";import"../chunk-OMRWADFK.js";import{a as e}from"../chunk-QV3QCNJZ.js";import"../chunk-WOT6VMZA.js";export{s as buildDevViewsManifest,i as discoverViews,o as isViewEntryPath,t as mcpUseViewsPlugin,e as syncMcpEnvDeclaration,r as virtualViewId};
1
+ import{a as i,c as r,d as o,f as t,g as s,k as n}from"../chunk-M4QQDJBS.js";import"../chunk-OMRWADFK.js";import{a as e}from"../chunk-QV3QCNJZ.js";import"../chunk-WOT6VMZA.js";export{s as buildDevViewsManifest,r as discoverViews,t as isViewEntryPath,n as mcpUseViewsPlugin,i as readViewConfig,e as syncMcpEnvDeclaration,o as virtualViewId};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mcp-use/cli",
3
3
  "type": "module",
4
- "version": "4.2.1",
4
+ "version": "4.3.0-canary.1",
5
5
  "description": "Prebuilt CLI, development server, and build pipeline for mcp-use",
6
6
  "author": "mcp-use, Inc.",
7
7
  "license": "MIT",
@@ -54,8 +54,8 @@
54
54
  "vite": "8.0.16"
55
55
  },
56
56
  "peerDependencies": {
57
- "@mcp-use/client": "^2.0.1 || ^2.1.0 || ^2.1.1 || ^2.1.2 || ^2.1.3 || ^2.1.4 || ^2.1.5 || ^2.2.0 || ^2.2.1 || ^2.2.2 || ^2.2.3 || ^2.2.4 || ^2.2.5 || ^2.3.0 || ^2.3.1 || ^2.3.2 || ^2.3.3 || ^2.3.4 || ^2.3.5 || ^2.4.0",
58
- "@mcp-use/inspector": "^20.3.8 || ^20.3.9 || ^20.3.10 || ^20.3.11 || ^20.3.12 || ^20.3.13 || ^20.3.14 || ^20.3.15"
57
+ "@mcp-use/client": "^2.0.1 || ^2.1.0 || ^2.1.1 || ^2.1.2 || ^2.1.3 || ^2.1.4 || ^2.1.5 || ^2.2.0 || ^2.2.1 || ^2.2.2 || ^2.2.3 || ^2.2.4 || ^2.2.5 || ^2.3.0 || ^2.3.1 || ^2.3.2 || ^2.3.3 || ^2.3.4 || ^2.3.5 || ^2.4.0 || ^2.4.1-canary.0",
58
+ "@mcp-use/inspector": "^20.3.8 || ^20.3.9 || ^20.3.10 || ^20.3.11 || ^20.3.12 || ^20.3.13 || ^20.3.14 || ^20.3.15 || ^20.3.16-canary.0"
59
59
  },
60
60
  "peerDependenciesMeta": {
61
61
  "@mcp-use/client": {
@@ -66,8 +66,8 @@
66
66
  }
67
67
  },
68
68
  "devDependencies": {
69
- "@modelcontextprotocol/client": "2.0.0",
70
- "@modelcontextprotocol/server": "2.0.0",
69
+ "@modelcontextprotocol/client": "2.3.1",
70
+ "@modelcontextprotocol/server": "2.3.1",
71
71
  "@types/node": "^22.20.0",
72
72
  "@types/react": "^19.2.17",
73
73
  "@types/react-dom": "^19.2.3",
@@ -78,7 +78,7 @@
78
78
  "typescript": "^5.9.3",
79
79
  "vitest": "^4.1.11",
80
80
  "zod": "^4.4.3",
81
- "@mcp-use/client": "2.4.0",
81
+ "@mcp-use/client": "2.4.1-canary.0",
82
82
  "@mcp-use/tunnel": "0.2.1"
83
83
  },
84
84
  "publishConfig": {
@@ -1,3 +1,12 @@
1
+ /** Frontend configuration captured in a generated view manifest. */
2
+ export interface ViewConfig {
3
+ /** Automatic size reporting. */
4
+ autoResize?: boolean;
5
+ /** Supported modes, including inline. */
6
+ displayModes?: readonly ("inline" | "fullscreen" | "pip")[];
7
+ /** Initial ChatGPT mode preference. */
8
+ preferredDisplayMode?: "inline" | "fullscreen";
9
+ }
1
10
  import type { Plugin } from "vite";
2
11
 
3
12
  /** A discovered browser view. */
@@ -17,6 +26,7 @@ export declare function buildDevViewsManifest(views: DiscoveredView[]): Record<
17
26
  string,
18
27
  {
19
28
  kind: "external";
29
+ viewConfig?: ViewConfig | undefined;
20
30
  entry: string;
21
31
  css: string[];
22
32
  scripts: string[];
@@ -45,3 +55,6 @@ export declare function syncMcpEnvDeclaration(
45
55
  root: string,
46
56
  entry: string
47
57
  ): Promise<"created" | "updated" | "unchanged" | "user-owned">;
58
+
59
+ /** Extract static frontend config without evaluating browser code. */
60
+ export declare function readViewConfig(path: string): ViewConfig | undefined;
@@ -1,4 +0,0 @@
1
- import{a as m,b as f,d as v}from"./chunk-OMRWADFK.js";import{existsSync as d,readdirSync as I}from"fs";import{isAbsolute as g,join as E,relative as w,resolve as a,sep as h}from"path";var D="views",o="virtual:mcp-use/views/",c=`\0${o}`;function u(e,t){let r=t??D;return g(r)?r:a(e,r)}function L(e,t){let r=u(e,t);if(!d(r))return[];let n=[];for(let i of I(r,{withFileTypes:!0})){if(!i.isDirectory())continue;let s=E(r,i.name,"view.tsx");d(s)&&n.push({name:i.name,entryPath:s})}return n.sort((i,s)=>i.name.localeCompare(s.name)),n}function U(e){return`${o}${e}`}function x(e){return`/@id/__x00__${o}${e}`}function A(e,t,r){let n=u(t,r),i=w(n,a(e));return i===""||!i.startsWith("..")&&!g(i)}function b(e,t,r){let n=u(t,r),i=w(n,a(e)).split(h).join("/");return/^[^/]+\/view\.tsx$/.test(i)}function M(e){let t={};for(let r of e)t[r.name]={kind:"external",entry:x(r.name),css:[],scripts:["/@vite/client"]};return t}async function O(e,t,r){let{createServer:n}=await import("vite");return n({root:e,configFile:r,envDir:!1,logLevel:"warn",cacheDir:t,resolve:{tsconfigPaths:!0,alias:m(e)},oxc:{jsx:{runtime:"automatic"}},plugins:[v(e)],server:{middlewareMode:!0,hmr:!1,ws:!1},ssr:{...f(e)}})}var l="virtual:mcp-use/tailwind.css",V=`\0${l}`,p="virtual:mcp-use/csp-runtime",_=`\0${p}`,R=["react","react-dom"],P={exclude:["mcp-use/react"],include:["react","react-dom","react-dom/client","mcp-use > @modelcontextprotocol/ext-apps","mcp-use > @modelcontextprotocol/server","zod"]};function j(e){return{name:"mcp-use-views",config(){return{resolve:{dedupe:R},optimizeDeps:P}},applyToEnvironment(t){return(e.environments??["client"]).includes(t.name)},resolveId(t){if(t===p)return _;if(t===l)return V;if(t.startsWith(o))return`\0${t}`},load(t){if(t===_)return["globalThis.__zod_globalConfig ??= {};","globalThis.__zod_globalConfig.jitless = true;",""].join(`
2
- `);if(t===V)return['@import "tailwindcss";',"@custom-variant dark (&:where(.dark, .dark *, [data-theme=dark], [data-theme=dark] *));"].join(`
3
- `);if(!t.startsWith(c))return;let r=t.slice(c.length),n=e.getViews().find(s=>s.name===r);if(n===void 0)return;let i=[];return i.push(`import ${JSON.stringify(p)};`),e.dev?.reactRefresh===!0&&i.push('import "@vitejs/plugin-react/preamble";'),e.tailwind!==!1&&i.push(`import ${JSON.stringify(l)};`),i.push('import { bootstrapView } from "mcp-use/react";',`import * as viewModule from ${JSON.stringify(n.entryPath)};`,"bootstrapView(viewModule);"),e.dev!==void 0&&i.push("if (import.meta.hot) {"," import.meta.hot.accept();","}"),i.push(""),i.join(`
4
- `)}}}export{u as a,L as b,U as c,A as d,b as e,M as f,O as g,R as h,P as i,j};
File without changes