@mcp-use/cli 2.6.0-canary.9 → 2.6.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.
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AA2PA;;GAEG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CA2FlD;AAED;;GAEG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CA8BnD;AAED;;GAEG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAiCnD"}
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AA2PA;;GAEG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CA2FlD;AAED;;GAEG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CA8BnD;AAED;;GAEG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAgCnD"}
package/dist/index.cjs CHANGED
@@ -23,7 +23,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
23
23
  mod
24
24
  ));
25
25
 
26
- // ../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_typescript@5.9.3_yaml@2.8.1/node_modules/tsup/assets/cjs_shims.js
26
+ // ../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/cjs_shims.js
27
27
  var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
28
28
  var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
29
29
 
@@ -377,9 +377,9 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
377
377
 
378
378
  // ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js
379
379
  var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
380
- var GENERATOR = Symbol("GENERATOR");
381
- var STYLER = Symbol("STYLER");
382
- var IS_EMPTY = Symbol("IS_EMPTY");
380
+ var GENERATOR = /* @__PURE__ */ Symbol("GENERATOR");
381
+ var STYLER = /* @__PURE__ */ Symbol("STYLER");
382
+ var IS_EMPTY = /* @__PURE__ */ Symbol("IS_EMPTY");
383
383
  var levelMapping = [
384
384
  "ansi",
385
385
  "ansi",
@@ -735,7 +735,7 @@ var import_node_util6 = require("util");
735
735
  var import_node_process6 = __toESM(require("process"), 1);
736
736
  var import_node_child_process6 = require("child_process");
737
737
 
738
- // ../../node_modules/.pnpm/default-browser-id@5.0.0/node_modules/default-browser-id/index.js
738
+ // ../../node_modules/.pnpm/default-browser-id@5.0.1/node_modules/default-browser-id/index.js
739
739
  var import_node_util3 = require("util");
740
740
  var import_node_process4 = __toESM(require("process"), 1);
741
741
  var import_node_child_process3 = require("child_process");
@@ -746,7 +746,11 @@ async function defaultBrowserId() {
746
746
  }
747
747
  const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]);
748
748
  const match = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
749
- return match?.groups.id ?? "com.apple.Safari";
749
+ const browserId = match?.groups.id ?? "com.apple.Safari";
750
+ if (browserId === "com.apple.safari") {
751
+ return "com.apple.Safari";
752
+ }
753
+ return browserId;
750
754
  }
751
755
 
752
756
  // ../../node_modules/.pnpm/run-applescript@7.1.0/node_modules/run-applescript/index.js
@@ -845,7 +849,7 @@ var isInSsh = Boolean(import_node_process7.default.env.SSH_CONNECTION || import_
845
849
  var is_in_ssh_default = isInSsh;
846
850
 
847
851
  // ../../node_modules/.pnpm/open@11.0.0/node_modules/open/index.js
848
- var fallbackAttemptSymbol = Symbol("fallbackAttempt");
852
+ var fallbackAttemptSymbol = /* @__PURE__ */ Symbol("fallbackAttempt");
849
853
  var __dirname2 = importMetaUrl ? import_node_path.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl)) : "";
850
854
  var localXdgOpenPath = import_node_path.default.join(__dirname2, "xdg-open");
851
855
  var { platform, arch } = import_node_process8.default;
@@ -1683,7 +1687,7 @@ async function whoamiCommand() {
1683
1687
  console.log(source_default.white("User ID: ") + source_default.gray(authInfo.user_id));
1684
1688
  const apiKey = await getApiKey();
1685
1689
  if (apiKey) {
1686
- const masked = apiKey.substring(0, 8) + "..." + apiKey.substring(apiKey.length - 4);
1690
+ const masked = apiKey.substring(0, 6) + "...";
1687
1691
  console.log(source_default.white("API Key: ") + source_default.gray(masked));
1688
1692
  }
1689
1693
  } catch (error) {
@@ -1771,7 +1775,17 @@ async function getGitInfo(cwd = process.cwd()) {
1771
1775
  };
1772
1776
  }
1773
1777
  function isGitHubUrl(url) {
1774
- return url.includes("github.com");
1778
+ try {
1779
+ const parsedUrl = new URL(url);
1780
+ return parsedUrl.hostname === "github.com" || parsedUrl.hostname === "www.github.com";
1781
+ } catch {
1782
+ const sshMatch = url.match(/^git@([^:/]+)[:/]/);
1783
+ if (sshMatch) {
1784
+ const host = sshMatch[1];
1785
+ return host === "github.com" || host === "www.github.com";
1786
+ }
1787
+ }
1788
+ return false;
1775
1789
  }
1776
1790
 
1777
1791
  // src/commands/deploy.ts
@@ -2257,7 +2271,7 @@ async function deployCommand(options) {
2257
2271
  // src/commands/client.ts
2258
2272
  var import_commander = require("commander");
2259
2273
  var import_node_readline = require("readline");
2260
- var import_mcp_use = require("mcp-use");
2274
+ var import_client = require("mcp-use/client");
2261
2275
 
2262
2276
  // src/utils/session-storage.ts
2263
2277
  var import_node_os5 = require("os");
@@ -2574,7 +2588,7 @@ async function getOrRestoreSession(sessionName) {
2574
2588
  return null;
2575
2589
  }
2576
2590
  try {
2577
- const client = new import_mcp_use.MCPClient();
2591
+ const client = new import_client.MCPClient();
2578
2592
  if (config.type === "http") {
2579
2593
  client.addServer(sessionName, {
2580
2594
  url: config.url,
@@ -2602,7 +2616,7 @@ async function getOrRestoreSession(sessionName) {
2602
2616
  async function connectCommand(urlOrCommand, options) {
2603
2617
  try {
2604
2618
  const sessionName = options.name || `session-${Date.now()}`;
2605
- const client = new import_mcp_use.MCPClient();
2619
+ const client = new import_client.MCPClient();
2606
2620
  let session;
2607
2621
  if (options.stdio) {
2608
2622
  const parts = urlOrCommand.split(" ");
@@ -3575,11 +3589,15 @@ export default PostHog;
3575
3589
  try {
3576
3590
  const mod = await metadataServer.ssrLoadModule(entryPath);
3577
3591
  if (mod.widgetMetadata) {
3592
+ const schemaField = mod.widgetMetadata.props || mod.widgetMetadata.inputs;
3578
3593
  widgetMetadata = {
3579
3594
  ...mod.widgetMetadata,
3580
3595
  title: mod.widgetMetadata.title || widgetName,
3581
3596
  description: mod.widgetMetadata.description,
3582
- inputs: mod.widgetMetadata.inputs?.shape || {}
3597
+ // Pass the full Zod schema object directly (don't extract .shape)
3598
+ // The SDK's normalizeObjectSchema() can handle both complete Zod schemas
3599
+ // and raw shapes, so we preserve the full schema here
3600
+ inputs: schemaField || {}
3583
3601
  };
3584
3602
  }
3585
3603
  await new Promise((resolve) => setTimeout(resolve, 50));