@morphllm/morphsdk 0.2.116 → 0.2.117

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.
Files changed (31) hide show
  1. package/dist/{chunk-SITZC3U6.js → chunk-5IVVJMMX.js} +2 -2
  2. package/dist/{chunk-62OVBE6G.js → chunk-C3LJORIT.js} +2 -2
  3. package/dist/{chunk-QOEZARHG.js → chunk-EAT5W3SH.js} +2 -2
  4. package/dist/{chunk-25APYVON.js → chunk-PR44LEQQ.js} +2 -2
  5. package/dist/{chunk-Q6Y4R236.js → chunk-YTYCHRQ2.js} +7 -9
  6. package/dist/{chunk-Q6Y4R236.js.map → chunk-YTYCHRQ2.js.map} +1 -1
  7. package/dist/{chunk-4IOC2D5Y.js → chunk-ZYPLV3HP.js} +2 -2
  8. package/dist/client.cjs +6 -8
  9. package/dist/client.cjs.map +1 -1
  10. package/dist/client.js +3 -3
  11. package/dist/index.cjs +6 -8
  12. package/dist/index.cjs.map +1 -1
  13. package/dist/index.js +3 -3
  14. package/dist/tools/browser/anthropic.js +3 -3
  15. package/dist/tools/browser/core.cjs +6 -8
  16. package/dist/tools/browser/core.cjs.map +1 -1
  17. package/dist/tools/browser/core.js +2 -2
  18. package/dist/tools/browser/index.cjs +6 -8
  19. package/dist/tools/browser/index.cjs.map +1 -1
  20. package/dist/tools/browser/index.js +5 -5
  21. package/dist/tools/browser/live.cjs +6 -8
  22. package/dist/tools/browser/live.cjs.map +1 -1
  23. package/dist/tools/browser/live.js +1 -1
  24. package/dist/tools/browser/openai.js +3 -3
  25. package/dist/tools/browser/vercel.js +3 -3
  26. package/package.json +1 -1
  27. /package/dist/{chunk-SITZC3U6.js.map → chunk-5IVVJMMX.js.map} +0 -0
  28. /package/dist/{chunk-62OVBE6G.js.map → chunk-C3LJORIT.js.map} +0 -0
  29. /package/dist/{chunk-QOEZARHG.js.map → chunk-EAT5W3SH.js.map} +0 -0
  30. /package/dist/{chunk-25APYVON.js.map → chunk-PR44LEQQ.js.map} +0 -0
  31. /package/dist/{chunk-4IOC2D5Y.js.map → chunk-ZYPLV3HP.js.map} +0 -0
@@ -158,13 +158,14 @@ function buildLiveUrl(debugUrl, options = {}) {
158
158
  }
159
159
  return url.toString();
160
160
  }
161
+ function cdpToHttps(wsUrl) {
162
+ return wsUrl.replace(/^wss:\/\//, "https://").replace(/^ws:\/\//, "http://");
163
+ }
161
164
  function normalizeLiveUrl(debugUrl) {
162
165
  const trimmed = debugUrl.trim();
163
- if (!trimmed) {
164
- return trimmed;
165
- }
166
+ if (!trimmed) return trimmed;
166
167
  if (trimmed.startsWith("wss://") || trimmed.startsWith("ws://")) {
167
- return `https://live.browser-use.com?wss=${encodeURIComponent(trimmed)}`;
168
+ return `https://live.browser-use.com?wss=${encodeURIComponent(cdpToHttps(trimmed))}`;
168
169
  }
169
170
  let url;
170
171
  try {
@@ -172,12 +173,9 @@ function normalizeLiveUrl(debugUrl) {
172
173
  } catch {
173
174
  return trimmed;
174
175
  }
175
- if (url.protocol === "wss:" || url.protocol === "ws:") {
176
- return `https://live.browser-use.com?wss=${encodeURIComponent(trimmed)}`;
177
- }
178
176
  const wssParam = url.searchParams.get("wss");
179
177
  if (wssParam && (wssParam.startsWith("wss://") || wssParam.startsWith("ws://"))) {
180
- url.searchParams.set("wss", wssParam);
178
+ url.searchParams.set("wss", cdpToHttps(wssParam));
181
179
  }
182
180
  return url.toString();
183
181
  }