@morphllm/morphsdk 0.2.63 → 0.2.65

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 (115) hide show
  1. package/dist/{chunk-PKPJWARB.js → chunk-5QIWYEHJ.js} +2 -2
  2. package/dist/{chunk-3WMLFUAR.js → chunk-BLKHVDYQ.js} +3 -3
  3. package/dist/{chunk-GJ573YH3.js → chunk-IQFKDBQD.js} +3 -3
  4. package/dist/{chunk-BHNJEBQJ.js → chunk-IUG2FHNN.js} +2 -2
  5. package/dist/{chunk-LVY5LPEX.js → chunk-IZISG7DL.js} +41 -4
  6. package/dist/chunk-IZISG7DL.js.map +1 -0
  7. package/dist/{chunk-GM5VR33N.js → chunk-NTCSWQEM.js} +3 -3
  8. package/dist/{chunk-T6677HCA.js → chunk-NTKQXKGM.js} +9 -9
  9. package/dist/chunk-PZ5AY32C.js +10 -0
  10. package/dist/{chunk-IXNSTNS7.js → chunk-QZNGKOCZ.js} +2 -2
  11. package/dist/{chunk-TTBXKDCT.js → chunk-S6FZAPJ7.js} +3 -3
  12. package/dist/{chunk-3SHLMXBV.js → chunk-SUBBMTMY.js} +2 -2
  13. package/dist/chunk-SUBBMTMY.js.map +1 -0
  14. package/dist/{chunk-563RLKFC.js → chunk-TPP2UGQP.js} +7 -21
  15. package/dist/chunk-TPP2UGQP.js.map +1 -0
  16. package/dist/{chunk-PNIQNTXR.js → chunk-V2IEG55Y.js} +3 -3
  17. package/dist/{chunk-JNOZPU44.js → chunk-ZO4PPFCZ.js} +2 -2
  18. package/dist/client.cjs +46 -36
  19. package/dist/client.cjs.map +1 -1
  20. package/dist/client.js +13 -13
  21. package/dist/git/client.js +1 -1
  22. package/dist/git/config.js +1 -1
  23. package/dist/git/index.js +1 -1
  24. package/dist/index.cjs +46 -36
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.js +14 -14
  27. package/dist/modelrouter/core.js +1 -1
  28. package/dist/modelrouter/index.js +1 -1
  29. package/dist/tools/browser/anthropic.cjs.map +1 -1
  30. package/dist/tools/browser/anthropic.js +2 -2
  31. package/dist/tools/browser/core.cjs +41 -3
  32. package/dist/tools/browser/core.cjs.map +1 -1
  33. package/dist/tools/browser/core.d.ts +38 -8
  34. package/dist/tools/browser/core.js +4 -2
  35. package/dist/tools/browser/index.cjs +41 -3
  36. package/dist/tools/browser/index.cjs.map +1 -1
  37. package/dist/tools/browser/index.d.ts +2 -2
  38. package/dist/tools/browser/index.js +4 -2
  39. package/dist/tools/browser/live.js +1 -1
  40. package/dist/tools/browser/openai.cjs.map +1 -1
  41. package/dist/tools/browser/openai.js +2 -2
  42. package/dist/tools/browser/prompts.js +1 -1
  43. package/dist/tools/browser/types.cjs.map +1 -1
  44. package/dist/tools/browser/types.d.ts +38 -1
  45. package/dist/tools/browser/vercel.cjs.map +1 -1
  46. package/dist/tools/browser/vercel.js +2 -2
  47. package/dist/tools/codebase_search/anthropic.js +1 -1
  48. package/dist/tools/codebase_search/core.js +1 -1
  49. package/dist/tools/codebase_search/index.js +1 -1
  50. package/dist/tools/codebase_search/openai.js +1 -1
  51. package/dist/tools/codebase_search/prompts.js +1 -1
  52. package/dist/tools/codebase_search/vercel.js +1 -1
  53. package/dist/tools/fastapply/anthropic.js +2 -2
  54. package/dist/tools/fastapply/core.js +1 -1
  55. package/dist/tools/fastapply/index.js +4 -4
  56. package/dist/tools/fastapply/openai.js +2 -2
  57. package/dist/tools/fastapply/prompts.js +1 -1
  58. package/dist/tools/fastapply/vercel.js +2 -2
  59. package/dist/tools/index.js +4 -4
  60. package/dist/tools/utils/resilience.js +1 -1
  61. package/dist/tools/warp_grep/agent/config.js +1 -1
  62. package/dist/tools/warp_grep/agent/formatter.js +1 -1
  63. package/dist/tools/warp_grep/agent/parser.js +1 -1
  64. package/dist/tools/warp_grep/agent/prompt.js +1 -1
  65. package/dist/tools/warp_grep/agent/runner.cjs +1 -1
  66. package/dist/tools/warp_grep/agent/runner.cjs.map +1 -1
  67. package/dist/tools/warp_grep/agent/runner.js +2 -2
  68. package/dist/tools/warp_grep/anthropic.cjs +7 -33
  69. package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
  70. package/dist/tools/warp_grep/anthropic.js +6 -6
  71. package/dist/tools/warp_grep/client.cjs +7 -33
  72. package/dist/tools/warp_grep/client.cjs.map +1 -1
  73. package/dist/tools/warp_grep/client.js +5 -5
  74. package/dist/tools/warp_grep/gemini.cjs +7 -33
  75. package/dist/tools/warp_grep/gemini.cjs.map +1 -1
  76. package/dist/tools/warp_grep/gemini.js +6 -6
  77. package/dist/tools/warp_grep/harness.cjs +6 -32
  78. package/dist/tools/warp_grep/harness.cjs.map +1 -1
  79. package/dist/tools/warp_grep/harness.js +3 -3
  80. package/dist/tools/warp_grep/index.cjs +7 -33
  81. package/dist/tools/warp_grep/index.cjs.map +1 -1
  82. package/dist/tools/warp_grep/index.js +9 -9
  83. package/dist/tools/warp_grep/openai.cjs +7 -33
  84. package/dist/tools/warp_grep/openai.cjs.map +1 -1
  85. package/dist/tools/warp_grep/openai.js +6 -6
  86. package/dist/tools/warp_grep/providers/local.cjs +6 -32
  87. package/dist/tools/warp_grep/providers/local.cjs.map +1 -1
  88. package/dist/tools/warp_grep/providers/local.js +3 -3
  89. package/dist/tools/warp_grep/providers/remote.js +1 -1
  90. package/dist/tools/warp_grep/utils/files.js +1 -1
  91. package/dist/tools/warp_grep/utils/paths.js +1 -1
  92. package/dist/tools/warp_grep/utils/ripgrep.cjs +6 -42
  93. package/dist/tools/warp_grep/utils/ripgrep.cjs.map +1 -1
  94. package/dist/tools/warp_grep/utils/ripgrep.js +2 -2
  95. package/dist/tools/warp_grep/vercel.cjs +7 -33
  96. package/dist/tools/warp_grep/vercel.cjs.map +1 -1
  97. package/dist/tools/warp_grep/vercel.js +6 -6
  98. package/package.json +2 -4
  99. package/dist/chunk-3SHLMXBV.js.map +0 -1
  100. package/dist/chunk-563RLKFC.js.map +0 -1
  101. package/dist/chunk-5FUTL2UF.js +0 -22
  102. package/dist/chunk-LVY5LPEX.js.map +0 -1
  103. package/dist/lib-GEPX5Y3T.js +0 -14
  104. package/dist/lib-GEPX5Y3T.js.map +0 -1
  105. /package/dist/{chunk-PKPJWARB.js.map → chunk-5QIWYEHJ.js.map} +0 -0
  106. /package/dist/{chunk-3WMLFUAR.js.map → chunk-BLKHVDYQ.js.map} +0 -0
  107. /package/dist/{chunk-GJ573YH3.js.map → chunk-IQFKDBQD.js.map} +0 -0
  108. /package/dist/{chunk-BHNJEBQJ.js.map → chunk-IUG2FHNN.js.map} +0 -0
  109. /package/dist/{chunk-GM5VR33N.js.map → chunk-NTCSWQEM.js.map} +0 -0
  110. /package/dist/{chunk-T6677HCA.js.map → chunk-NTKQXKGM.js.map} +0 -0
  111. /package/dist/{chunk-5FUTL2UF.js.map → chunk-PZ5AY32C.js.map} +0 -0
  112. /package/dist/{chunk-IXNSTNS7.js.map → chunk-QZNGKOCZ.js.map} +0 -0
  113. /package/dist/{chunk-TTBXKDCT.js.map → chunk-S6FZAPJ7.js.map} +0 -0
  114. /package/dist/{chunk-PNIQNTXR.js.map → chunk-V2IEG55Y.js.map} +0 -0
  115. /package/dist/{chunk-JNOZPU44.js.map → chunk-ZO4PPFCZ.js.map} +0 -0
package/dist/client.js CHANGED
@@ -1,39 +1,39 @@
1
1
  import {
2
2
  MorphClient
3
- } from "./chunk-T6677HCA.js";
4
- import "./chunk-GM5VR33N.js";
5
- import "./chunk-3WMLFUAR.js";
6
- import "./chunk-GJ573YH3.js";
3
+ } from "./chunk-NTKQXKGM.js";
4
+ import "./chunk-NTCSWQEM.js";
5
+ import "./chunk-BLKHVDYQ.js";
6
+ import "./chunk-IQFKDBQD.js";
7
7
  import "./chunk-KW7OEGZK.js";
8
- import "./chunk-TTBXKDCT.js";
9
- import "./chunk-3SHLMXBV.js";
8
+ import "./chunk-S6FZAPJ7.js";
9
+ import "./chunk-SUBBMTMY.js";
10
10
  import "./chunk-527P5X2E.js";
11
11
  import "./chunk-DCIUCDWJ.js";
12
12
  import "./chunk-APP75CBN.js";
13
13
  import "./chunk-5QRN3JNB.js";
14
14
  import "./chunk-Q5AHGIQO.js";
15
- import "./chunk-JNOZPU44.js";
15
+ import "./chunk-ZO4PPFCZ.js";
16
16
  import "./chunk-G2RSY56Q.js";
17
17
  import "./chunk-SMGZ6A64.js";
18
- import "./chunk-563RLKFC.js";
18
+ import "./chunk-TPP2UGQP.js";
19
19
  import "./chunk-XT5ZO6ES.js";
20
20
  import "./chunk-UBX7QYBD.js";
21
21
  import "./chunk-GJU7UOFL.js";
22
22
  import "./chunk-76DJEQEP.js";
23
23
  import "./chunk-WM77HRKO.js";
24
24
  import "./chunk-YQMPVJ2L.js";
25
- import "./chunk-BHNJEBQJ.js";
26
- import "./chunk-PKPJWARB.js";
27
- import "./chunk-IXNSTNS7.js";
25
+ import "./chunk-IUG2FHNN.js";
26
+ import "./chunk-5QIWYEHJ.js";
27
+ import "./chunk-QZNGKOCZ.js";
28
28
  import "./chunk-CKTA4AXM.js";
29
29
  import "./chunk-63WE2C5R.js";
30
- import "./chunk-LVY5LPEX.js";
30
+ import "./chunk-IZISG7DL.js";
31
31
  import "./chunk-SQN4DUQS.js";
32
32
  import "./chunk-GZMUGMOZ.js";
33
33
  import "./chunk-VJU3BRET.js";
34
34
  import "./chunk-CP4NZGRY.js";
35
35
  import "./chunk-4VWJFZVS.js";
36
- import "./chunk-5FUTL2UF.js";
36
+ import "./chunk-PZ5AY32C.js";
37
37
  export {
38
38
  MorphClient
39
39
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MorphGit
3
3
  } from "../chunk-VJU3BRET.js";
4
- import "../chunk-5FUTL2UF.js";
4
+ import "../chunk-PZ5AY32C.js";
5
5
  export {
6
6
  MorphGit
7
7
  };
@@ -1,4 +1,4 @@
1
- import "../chunk-5FUTL2UF.js";
1
+ import "../chunk-PZ5AY32C.js";
2
2
 
3
3
  // git/config.ts
4
4
  var DEFAULT_PROXY_URL = "https://repos.morphllm.com";
package/dist/git/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  MorphGit
7
7
  } from "../chunk-VJU3BRET.js";
8
- import "../chunk-5FUTL2UF.js";
8
+ import "../chunk-PZ5AY32C.js";
9
9
  export {
10
10
  MorphGit,
11
11
  default2 as git,
package/dist/index.cjs CHANGED
@@ -5,9 +5,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __commonJS = (cb, mod) => function __require() {
9
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
- };
11
8
  var __export = (target, all) => {
12
9
  for (var name in all)
13
10
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -30,15 +27,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
27
  ));
31
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
29
 
33
- // node_modules/@vscode/ripgrep/lib/index.js
34
- var require_lib = __commonJS({
35
- "node_modules/@vscode/ripgrep/lib/index.js"(exports2, module2) {
36
- "use strict";
37
- var path5 = require("path");
38
- module2.exports.rgPath = path5.join(__dirname, `../bin/rg${process.platform === "win32" ? ".exe" : ""}`);
39
- }
40
- });
41
-
42
30
  // index.ts
43
31
  var index_exports = {};
44
32
  __export(index_exports, {
@@ -616,6 +604,12 @@ var BrowserClient = class {
616
604
  async getErrors(recordingId) {
617
605
  return getErrors(recordingId, this.config);
618
606
  }
607
+ /**
608
+ * Get animated WebP preview of recording
609
+ */
610
+ async getWebp(recordingId, options) {
611
+ return getWebp(recordingId, this.config, options);
612
+ }
619
613
  /**
620
614
  * Check if browser worker service is healthy
621
615
  */
@@ -722,9 +716,13 @@ async function getRecording(recordingId, config = {}) {
722
716
  if (debug) console.error(`[Browser] getRecording error: ${response.status} - ${errorText}`);
723
717
  throw new Error(`HTTP ${response.status}: ${errorText}`);
724
718
  }
725
- const recording = await response.json();
726
- if (debug) console.log(`[Browser] Recording status: ${recording.status}`);
727
- return recording;
719
+ const data = await response.json();
720
+ if (debug) console.log(`[Browser] Recording status: ${data.status}`);
721
+ return {
722
+ ...data,
723
+ getWebp: (options) => getWebp(recordingId, config, options),
724
+ getErrors: () => getErrors(recordingId, config)
725
+ };
728
726
  }
729
727
  async function waitForRecording(recordingId, config = {}, options = {}) {
730
728
  const timeout = options.timeout ?? 6e4;
@@ -943,6 +941,32 @@ function wrapTaskResponseWithSchema(result, config, schema) {
943
941
  };
944
942
  return wrapped;
945
943
  }
944
+ async function getWebp(recordingId, config = {}, options = {}) {
945
+ const apiUrl = config.apiUrl || DEFAULT_CONFIG2.apiUrl;
946
+ const debug = config.debug || false;
947
+ if (!config.apiKey) {
948
+ throw new Error("API key required for getWebp");
949
+ }
950
+ const params = new URLSearchParams();
951
+ if (options.max_duration !== void 0) params.set("max_duration", String(options.max_duration));
952
+ if (options.fps !== void 0) params.set("fps", String(options.fps));
953
+ if (options.width !== void 0) params.set("width", String(options.width));
954
+ if (options.quality !== void 0) params.set("quality", String(options.quality));
955
+ const url = `${apiUrl}/recordings/${recordingId}/webp${params.toString() ? "?" + params.toString() : ""}`;
956
+ if (debug) console.log(`[Browser] getWebp: ${url}`);
957
+ const response = await fetch(url, {
958
+ method: "GET",
959
+ headers: { "Authorization": `Bearer ${config.apiKey}` }
960
+ });
961
+ if (!response.ok) {
962
+ const errorText = await response.text().catch(() => response.statusText);
963
+ if (debug) console.error(`[Browser] getWebp error: ${response.status} - ${errorText}`);
964
+ throw new Error(`HTTP ${response.status}: ${errorText}`);
965
+ }
966
+ const result = await response.json();
967
+ if (debug) console.log(`[Browser] WebP ready: ${result.webp_url} (cached: ${result.cached})`);
968
+ return result;
969
+ }
946
970
  async function checkHealth(config = {}) {
947
971
  const apiUrl = config.apiUrl || DEFAULT_CONFIG2.apiUrl;
948
972
  try {
@@ -1854,7 +1878,7 @@ async function runWarpGrep(config) {
1854
1878
  messages.push({ role: "assistant", content: assistantContent });
1855
1879
  const toolCalls = parser.parse(assistantContent);
1856
1880
  if (toolCalls.length === 0) {
1857
- errors.push({ message: "No tool calls produced by the model. Your MCP is likely out of date! Update it by running: npm cache clean --force && npx -y @morphllm/morphmcp@latest" });
1881
+ errors.push({ message: "No tool calls produced by the model. Your MCP is likely out of date! Update it by running: rm -rf ~/.npm/_npx && npm cache clean --force && npx -y @morphllm/morphmcp@latest" });
1858
1882
  terminationReason = "terminated";
1859
1883
  break;
1860
1884
  }
@@ -1957,20 +1981,9 @@ var import_path5 = __toESM(require("path"), 1);
1957
1981
 
1958
1982
  // tools/warp_grep/utils/ripgrep.ts
1959
1983
  var import_child_process = require("child_process");
1984
+ var import_ripgrep = require("@vscode/ripgrep");
1960
1985
  var resolvedRgPath = null;
1961
1986
  var rgPathChecked = false;
1962
- var bundledRgPath = null;
1963
- async function getBundledRgPath() {
1964
- if (bundledRgPath !== null) return bundledRgPath;
1965
- try {
1966
- const module2 = await Promise.resolve().then(() => __toESM(require_lib(), 1));
1967
- bundledRgPath = module2.rgPath;
1968
- return bundledRgPath;
1969
- } catch {
1970
- bundledRgPath = "";
1971
- return null;
1972
- }
1973
- }
1974
1987
  function spawnRg(rgBinary, args, opts) {
1975
1988
  return new Promise((resolve2) => {
1976
1989
  const child = (0, import_child_process.spawn)(rgBinary, args, {
@@ -2001,14 +2014,11 @@ async function runRipgrep(args, opts) {
2001
2014
  return spawnRg(resolvedRgPath, args, opts);
2002
2015
  }
2003
2016
  if (!rgPathChecked) {
2004
- const bundledPath = await getBundledRgPath();
2005
- if (bundledPath) {
2006
- const result = await spawnRg(bundledPath, args, opts);
2007
- if (!isBinaryFailure(result)) {
2008
- resolvedRgPath = bundledPath;
2009
- rgPathChecked = true;
2010
- return result;
2011
- }
2017
+ const result = await spawnRg(import_ripgrep.rgPath, args, opts);
2018
+ if (!isBinaryFailure(result)) {
2019
+ resolvedRgPath = import_ripgrep.rgPath;
2020
+ rgPathChecked = true;
2021
+ return result;
2012
2022
  }
2013
2023
  const fallbackResult = await spawnRg("rg", args, opts);
2014
2024
  if (!isBinaryFailure(fallbackResult)) {