@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.
- package/dist/{chunk-PKPJWARB.js → chunk-5QIWYEHJ.js} +2 -2
- package/dist/{chunk-3WMLFUAR.js → chunk-BLKHVDYQ.js} +3 -3
- package/dist/{chunk-GJ573YH3.js → chunk-IQFKDBQD.js} +3 -3
- package/dist/{chunk-BHNJEBQJ.js → chunk-IUG2FHNN.js} +2 -2
- package/dist/{chunk-LVY5LPEX.js → chunk-IZISG7DL.js} +41 -4
- package/dist/chunk-IZISG7DL.js.map +1 -0
- package/dist/{chunk-GM5VR33N.js → chunk-NTCSWQEM.js} +3 -3
- package/dist/{chunk-T6677HCA.js → chunk-NTKQXKGM.js} +9 -9
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/{chunk-IXNSTNS7.js → chunk-QZNGKOCZ.js} +2 -2
- package/dist/{chunk-TTBXKDCT.js → chunk-S6FZAPJ7.js} +3 -3
- package/dist/{chunk-3SHLMXBV.js → chunk-SUBBMTMY.js} +2 -2
- package/dist/chunk-SUBBMTMY.js.map +1 -0
- package/dist/{chunk-563RLKFC.js → chunk-TPP2UGQP.js} +7 -21
- package/dist/chunk-TPP2UGQP.js.map +1 -0
- package/dist/{chunk-PNIQNTXR.js → chunk-V2IEG55Y.js} +3 -3
- package/dist/{chunk-JNOZPU44.js → chunk-ZO4PPFCZ.js} +2 -2
- package/dist/client.cjs +46 -36
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +13 -13
- package/dist/git/client.js +1 -1
- package/dist/git/config.js +1 -1
- package/dist/git/index.js +1 -1
- package/dist/index.cjs +46 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -14
- package/dist/modelrouter/core.js +1 -1
- package/dist/modelrouter/index.js +1 -1
- package/dist/tools/browser/anthropic.cjs.map +1 -1
- package/dist/tools/browser/anthropic.js +2 -2
- package/dist/tools/browser/core.cjs +41 -3
- package/dist/tools/browser/core.cjs.map +1 -1
- package/dist/tools/browser/core.d.ts +38 -8
- package/dist/tools/browser/core.js +4 -2
- package/dist/tools/browser/index.cjs +41 -3
- package/dist/tools/browser/index.cjs.map +1 -1
- package/dist/tools/browser/index.d.ts +2 -2
- package/dist/tools/browser/index.js +4 -2
- package/dist/tools/browser/live.js +1 -1
- package/dist/tools/browser/openai.cjs.map +1 -1
- package/dist/tools/browser/openai.js +2 -2
- package/dist/tools/browser/prompts.js +1 -1
- package/dist/tools/browser/types.cjs.map +1 -1
- package/dist/tools/browser/types.d.ts +38 -1
- package/dist/tools/browser/vercel.cjs.map +1 -1
- package/dist/tools/browser/vercel.js +2 -2
- package/dist/tools/codebase_search/anthropic.js +1 -1
- package/dist/tools/codebase_search/core.js +1 -1
- package/dist/tools/codebase_search/index.js +1 -1
- package/dist/tools/codebase_search/openai.js +1 -1
- package/dist/tools/codebase_search/prompts.js +1 -1
- package/dist/tools/codebase_search/vercel.js +1 -1
- package/dist/tools/fastapply/anthropic.js +2 -2
- package/dist/tools/fastapply/core.js +1 -1
- package/dist/tools/fastapply/index.js +4 -4
- package/dist/tools/fastapply/openai.js +2 -2
- package/dist/tools/fastapply/prompts.js +1 -1
- package/dist/tools/fastapply/vercel.js +2 -2
- package/dist/tools/index.js +4 -4
- package/dist/tools/utils/resilience.js +1 -1
- package/dist/tools/warp_grep/agent/config.js +1 -1
- package/dist/tools/warp_grep/agent/formatter.js +1 -1
- package/dist/tools/warp_grep/agent/parser.js +1 -1
- package/dist/tools/warp_grep/agent/prompt.js +1 -1
- package/dist/tools/warp_grep/agent/runner.cjs +1 -1
- package/dist/tools/warp_grep/agent/runner.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/runner.js +2 -2
- package/dist/tools/warp_grep/anthropic.cjs +7 -33
- package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
- package/dist/tools/warp_grep/anthropic.js +6 -6
- package/dist/tools/warp_grep/client.cjs +7 -33
- package/dist/tools/warp_grep/client.cjs.map +1 -1
- package/dist/tools/warp_grep/client.js +5 -5
- package/dist/tools/warp_grep/gemini.cjs +7 -33
- package/dist/tools/warp_grep/gemini.cjs.map +1 -1
- package/dist/tools/warp_grep/gemini.js +6 -6
- package/dist/tools/warp_grep/harness.cjs +6 -32
- package/dist/tools/warp_grep/harness.cjs.map +1 -1
- package/dist/tools/warp_grep/harness.js +3 -3
- package/dist/tools/warp_grep/index.cjs +7 -33
- package/dist/tools/warp_grep/index.cjs.map +1 -1
- package/dist/tools/warp_grep/index.js +9 -9
- package/dist/tools/warp_grep/openai.cjs +7 -33
- package/dist/tools/warp_grep/openai.cjs.map +1 -1
- package/dist/tools/warp_grep/openai.js +6 -6
- package/dist/tools/warp_grep/providers/local.cjs +6 -32
- package/dist/tools/warp_grep/providers/local.cjs.map +1 -1
- package/dist/tools/warp_grep/providers/local.js +3 -3
- package/dist/tools/warp_grep/providers/remote.js +1 -1
- package/dist/tools/warp_grep/utils/files.js +1 -1
- package/dist/tools/warp_grep/utils/paths.js +1 -1
- package/dist/tools/warp_grep/utils/ripgrep.cjs +6 -42
- package/dist/tools/warp_grep/utils/ripgrep.cjs.map +1 -1
- package/dist/tools/warp_grep/utils/ripgrep.js +2 -2
- package/dist/tools/warp_grep/vercel.cjs +7 -33
- package/dist/tools/warp_grep/vercel.cjs.map +1 -1
- package/dist/tools/warp_grep/vercel.js +6 -6
- package/package.json +2 -4
- package/dist/chunk-3SHLMXBV.js.map +0 -1
- package/dist/chunk-563RLKFC.js.map +0 -1
- package/dist/chunk-5FUTL2UF.js +0 -22
- package/dist/chunk-LVY5LPEX.js.map +0 -1
- package/dist/lib-GEPX5Y3T.js +0 -14
- package/dist/lib-GEPX5Y3T.js.map +0 -1
- /package/dist/{chunk-PKPJWARB.js.map → chunk-5QIWYEHJ.js.map} +0 -0
- /package/dist/{chunk-3WMLFUAR.js.map → chunk-BLKHVDYQ.js.map} +0 -0
- /package/dist/{chunk-GJ573YH3.js.map → chunk-IQFKDBQD.js.map} +0 -0
- /package/dist/{chunk-BHNJEBQJ.js.map → chunk-IUG2FHNN.js.map} +0 -0
- /package/dist/{chunk-GM5VR33N.js.map → chunk-NTCSWQEM.js.map} +0 -0
- /package/dist/{chunk-T6677HCA.js.map → chunk-NTKQXKGM.js.map} +0 -0
- /package/dist/{chunk-5FUTL2UF.js.map → chunk-PZ5AY32C.js.map} +0 -0
- /package/dist/{chunk-IXNSTNS7.js.map → chunk-QZNGKOCZ.js.map} +0 -0
- /package/dist/{chunk-TTBXKDCT.js.map → chunk-S6FZAPJ7.js.map} +0 -0
- /package/dist/{chunk-PNIQNTXR.js.map → chunk-V2IEG55Y.js.map} +0 -0
- /package/dist/{chunk-JNOZPU44.js.map → chunk-ZO4PPFCZ.js.map} +0 -0
package/dist/client.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
|
// client.ts
|
|
43
31
|
var client_exports = {};
|
|
44
32
|
__export(client_exports, {
|
|
@@ -602,6 +590,12 @@ var BrowserClient = class {
|
|
|
602
590
|
async getErrors(recordingId) {
|
|
603
591
|
return getErrors(recordingId, this.config);
|
|
604
592
|
}
|
|
593
|
+
/**
|
|
594
|
+
* Get animated WebP preview of recording
|
|
595
|
+
*/
|
|
596
|
+
async getWebp(recordingId, options) {
|
|
597
|
+
return getWebp(recordingId, this.config, options);
|
|
598
|
+
}
|
|
605
599
|
/**
|
|
606
600
|
* Check if browser worker service is healthy
|
|
607
601
|
*/
|
|
@@ -708,9 +702,13 @@ async function getRecording(recordingId, config = {}) {
|
|
|
708
702
|
if (debug) console.error(`[Browser] getRecording error: ${response.status} - ${errorText}`);
|
|
709
703
|
throw new Error(`HTTP ${response.status}: ${errorText}`);
|
|
710
704
|
}
|
|
711
|
-
const
|
|
712
|
-
if (debug) console.log(`[Browser] Recording status: ${
|
|
713
|
-
return
|
|
705
|
+
const data = await response.json();
|
|
706
|
+
if (debug) console.log(`[Browser] Recording status: ${data.status}`);
|
|
707
|
+
return {
|
|
708
|
+
...data,
|
|
709
|
+
getWebp: (options) => getWebp(recordingId, config, options),
|
|
710
|
+
getErrors: () => getErrors(recordingId, config)
|
|
711
|
+
};
|
|
714
712
|
}
|
|
715
713
|
async function waitForRecording(recordingId, config = {}, options = {}) {
|
|
716
714
|
const timeout = options.timeout ?? 6e4;
|
|
@@ -929,6 +927,32 @@ function wrapTaskResponseWithSchema(result, config, schema) {
|
|
|
929
927
|
};
|
|
930
928
|
return wrapped;
|
|
931
929
|
}
|
|
930
|
+
async function getWebp(recordingId, config = {}, options = {}) {
|
|
931
|
+
const apiUrl = config.apiUrl || DEFAULT_CONFIG2.apiUrl;
|
|
932
|
+
const debug = config.debug || false;
|
|
933
|
+
if (!config.apiKey) {
|
|
934
|
+
throw new Error("API key required for getWebp");
|
|
935
|
+
}
|
|
936
|
+
const params = new URLSearchParams();
|
|
937
|
+
if (options.max_duration !== void 0) params.set("max_duration", String(options.max_duration));
|
|
938
|
+
if (options.fps !== void 0) params.set("fps", String(options.fps));
|
|
939
|
+
if (options.width !== void 0) params.set("width", String(options.width));
|
|
940
|
+
if (options.quality !== void 0) params.set("quality", String(options.quality));
|
|
941
|
+
const url = `${apiUrl}/recordings/${recordingId}/webp${params.toString() ? "?" + params.toString() : ""}`;
|
|
942
|
+
if (debug) console.log(`[Browser] getWebp: ${url}`);
|
|
943
|
+
const response = await fetch(url, {
|
|
944
|
+
method: "GET",
|
|
945
|
+
headers: { "Authorization": `Bearer ${config.apiKey}` }
|
|
946
|
+
});
|
|
947
|
+
if (!response.ok) {
|
|
948
|
+
const errorText = await response.text().catch(() => response.statusText);
|
|
949
|
+
if (debug) console.error(`[Browser] getWebp error: ${response.status} - ${errorText}`);
|
|
950
|
+
throw new Error(`HTTP ${response.status}: ${errorText}`);
|
|
951
|
+
}
|
|
952
|
+
const result = await response.json();
|
|
953
|
+
if (debug) console.log(`[Browser] WebP ready: ${result.webp_url} (cached: ${result.cached})`);
|
|
954
|
+
return result;
|
|
955
|
+
}
|
|
932
956
|
async function checkHealth(config = {}) {
|
|
933
957
|
const apiUrl = config.apiUrl || DEFAULT_CONFIG2.apiUrl;
|
|
934
958
|
try {
|
|
@@ -1840,7 +1864,7 @@ async function runWarpGrep(config) {
|
|
|
1840
1864
|
messages.push({ role: "assistant", content: assistantContent });
|
|
1841
1865
|
const toolCalls = parser.parse(assistantContent);
|
|
1842
1866
|
if (toolCalls.length === 0) {
|
|
1843
|
-
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" });
|
|
1867
|
+
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" });
|
|
1844
1868
|
terminationReason = "terminated";
|
|
1845
1869
|
break;
|
|
1846
1870
|
}
|
|
@@ -1943,20 +1967,9 @@ var import_path5 = __toESM(require("path"), 1);
|
|
|
1943
1967
|
|
|
1944
1968
|
// tools/warp_grep/utils/ripgrep.ts
|
|
1945
1969
|
var import_child_process = require("child_process");
|
|
1970
|
+
var import_ripgrep = require("@vscode/ripgrep");
|
|
1946
1971
|
var resolvedRgPath = null;
|
|
1947
1972
|
var rgPathChecked = false;
|
|
1948
|
-
var bundledRgPath = null;
|
|
1949
|
-
async function getBundledRgPath() {
|
|
1950
|
-
if (bundledRgPath !== null) return bundledRgPath;
|
|
1951
|
-
try {
|
|
1952
|
-
const module2 = await Promise.resolve().then(() => __toESM(require_lib(), 1));
|
|
1953
|
-
bundledRgPath = module2.rgPath;
|
|
1954
|
-
return bundledRgPath;
|
|
1955
|
-
} catch {
|
|
1956
|
-
bundledRgPath = "";
|
|
1957
|
-
return null;
|
|
1958
|
-
}
|
|
1959
|
-
}
|
|
1960
1973
|
function spawnRg(rgBinary, args, opts) {
|
|
1961
1974
|
return new Promise((resolve2) => {
|
|
1962
1975
|
const child = (0, import_child_process.spawn)(rgBinary, args, {
|
|
@@ -1987,14 +2000,11 @@ async function runRipgrep(args, opts) {
|
|
|
1987
2000
|
return spawnRg(resolvedRgPath, args, opts);
|
|
1988
2001
|
}
|
|
1989
2002
|
if (!rgPathChecked) {
|
|
1990
|
-
const
|
|
1991
|
-
if (
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
rgPathChecked = true;
|
|
1996
|
-
return result;
|
|
1997
|
-
}
|
|
2003
|
+
const result = await spawnRg(import_ripgrep.rgPath, args, opts);
|
|
2004
|
+
if (!isBinaryFailure(result)) {
|
|
2005
|
+
resolvedRgPath = import_ripgrep.rgPath;
|
|
2006
|
+
rgPathChecked = true;
|
|
2007
|
+
return result;
|
|
1998
2008
|
}
|
|
1999
2009
|
const fallbackResult = await spawnRg("rg", args, opts);
|
|
2000
2010
|
if (!isBinaryFailure(fallbackResult)) {
|