@mcp-use/cli 2.6.0-canary.9 → 2.6.1-canary.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/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- // ../../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/esm_shims.js
3
+ // ../../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/esm_shims.js
4
4
  import path from "path";
5
5
  import { fileURLToPath } from "url";
6
6
  var getFilename = () => fileURLToPath(import.meta.url);
@@ -357,9 +357,9 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
357
357
 
358
358
  // ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js
359
359
  var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
360
- var GENERATOR = Symbol("GENERATOR");
361
- var STYLER = Symbol("STYLER");
362
- var IS_EMPTY = Symbol("IS_EMPTY");
360
+ var GENERATOR = /* @__PURE__ */ Symbol("GENERATOR");
361
+ var STYLER = /* @__PURE__ */ Symbol("STYLER");
362
+ var IS_EMPTY = /* @__PURE__ */ Symbol("IS_EMPTY");
363
363
  var levelMapping = [
364
364
  "ansi",
365
365
  "ansi",
@@ -715,7 +715,7 @@ import { promisify as promisify6 } from "util";
715
715
  import process7 from "process";
716
716
  import { execFile as execFile6 } from "child_process";
717
717
 
718
- // ../../node_modules/.pnpm/default-browser-id@5.0.0/node_modules/default-browser-id/index.js
718
+ // ../../node_modules/.pnpm/default-browser-id@5.0.1/node_modules/default-browser-id/index.js
719
719
  import { promisify as promisify3 } from "util";
720
720
  import process5 from "process";
721
721
  import { execFile as execFile3 } from "child_process";
@@ -726,7 +726,11 @@ async function defaultBrowserId() {
726
726
  }
727
727
  const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]);
728
728
  const match = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
729
- return match?.groups.id ?? "com.apple.Safari";
729
+ const browserId = match?.groups.id ?? "com.apple.Safari";
730
+ if (browserId === "com.apple.safari") {
731
+ return "com.apple.Safari";
732
+ }
733
+ return browserId;
730
734
  }
731
735
 
732
736
  // ../../node_modules/.pnpm/run-applescript@7.1.0/node_modules/run-applescript/index.js
@@ -825,7 +829,7 @@ var isInSsh = Boolean(process8.env.SSH_CONNECTION || process8.env.SSH_CLIENT ||
825
829
  var is_in_ssh_default = isInSsh;
826
830
 
827
831
  // ../../node_modules/.pnpm/open@11.0.0/node_modules/open/index.js
828
- var fallbackAttemptSymbol = Symbol("fallbackAttempt");
832
+ var fallbackAttemptSymbol = /* @__PURE__ */ Symbol("fallbackAttempt");
829
833
  var __dirname2 = import.meta.url ? path2.dirname(fileURLToPath2(import.meta.url)) : "";
830
834
  var localXdgOpenPath = path2.join(__dirname2, "xdg-open");
831
835
  var { platform, arch } = process9;
@@ -1665,7 +1669,7 @@ async function whoamiCommand() {
1665
1669
  console.log(source_default.white("User ID: ") + source_default.gray(authInfo.user_id));
1666
1670
  const apiKey = await getApiKey();
1667
1671
  if (apiKey) {
1668
- const masked = apiKey.substring(0, 8) + "..." + apiKey.substring(apiKey.length - 4);
1672
+ const masked = apiKey.substring(0, 6) + "...";
1669
1673
  console.log(source_default.white("API Key: ") + source_default.gray(masked));
1670
1674
  }
1671
1675
  } catch (error) {
@@ -1753,7 +1757,17 @@ async function getGitInfo(cwd = process.cwd()) {
1753
1757
  };
1754
1758
  }
1755
1759
  function isGitHubUrl(url) {
1756
- return url.includes("github.com");
1760
+ try {
1761
+ const parsedUrl = new URL(url);
1762
+ return parsedUrl.hostname === "github.com" || parsedUrl.hostname === "www.github.com";
1763
+ } catch {
1764
+ const sshMatch = url.match(/^git@([^:/]+)[:/]/);
1765
+ if (sshMatch) {
1766
+ const host = sshMatch[1];
1767
+ return host === "github.com" || host === "www.github.com";
1768
+ }
1769
+ }
1770
+ return false;
1757
1771
  }
1758
1772
 
1759
1773
  // src/commands/deploy.ts
@@ -2239,7 +2253,7 @@ async function deployCommand(options) {
2239
2253
  // src/commands/client.ts
2240
2254
  import { Command } from "commander";
2241
2255
  import { createInterface } from "readline";
2242
- import { MCPClient } from "mcp-use";
2256
+ import { MCPClient } from "mcp-use/client";
2243
2257
 
2244
2258
  // src/utils/session-storage.ts
2245
2259
  import { homedir } from "os";
@@ -3214,6 +3228,7 @@ function createClientCommand() {
3214
3228
  }
3215
3229
 
3216
3230
  // src/index.ts
3231
+ import { toJSONSchema } from "zod";
3217
3232
  var program = new Command2();
3218
3233
  var packageContent = readFileSync(
3219
3234
  path5.join(__dirname, "../package.json"),
@@ -3557,11 +3572,31 @@ export default PostHog;
3557
3572
  try {
3558
3573
  const mod = await metadataServer.ssrLoadModule(entryPath);
3559
3574
  if (mod.widgetMetadata) {
3575
+ const schemaField = mod.widgetMetadata.props || mod.widgetMetadata.inputs;
3576
+ let inputsValue = schemaField || {};
3577
+ if (schemaField && typeof schemaField === "object" && "~standard" in schemaField) {
3578
+ try {
3579
+ inputsValue = toJSONSchema(schemaField);
3580
+ } catch (conversionError) {
3581
+ console.warn(
3582
+ source_default.yellow(
3583
+ ` \u26A0 Could not convert schema for ${widgetName}, using raw schema`
3584
+ )
3585
+ );
3586
+ }
3587
+ }
3588
+ const {
3589
+ props: _rawProps,
3590
+ inputs: _rawInputs,
3591
+ ...restMetadata
3592
+ } = mod.widgetMetadata;
3560
3593
  widgetMetadata = {
3561
- ...mod.widgetMetadata,
3594
+ ...restMetadata,
3562
3595
  title: mod.widgetMetadata.title || widgetName,
3563
3596
  description: mod.widgetMetadata.description,
3564
- inputs: mod.widgetMetadata.inputs?.shape || {}
3597
+ // Store the converted JSON Schema (props field is used by production mount)
3598
+ props: inputsValue,
3599
+ inputs: inputsValue
3565
3600
  };
3566
3601
  }
3567
3602
  await new Promise((resolve) => setTimeout(resolve, 50));