@morphllm/morphsdk 0.2.62 → 0.2.64
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-3M4DOG6N.js → chunk-5QRN3JNB.js} +9 -9
- package/dist/chunk-5QRN3JNB.js.map +1 -0
- package/dist/{chunk-GZ7TJ7UB.js → chunk-BLKHVDYQ.js} +3 -3
- package/dist/{chunk-6Y5JB4JC.js → chunk-DCIUCDWJ.js} +15 -7
- package/dist/{chunk-6Y5JB4JC.js.map → chunk-DCIUCDWJ.js.map} +1 -1
- package/dist/{chunk-XWSKUQVQ.js → chunk-DT6MPBD4.js} +8 -8
- package/dist/{chunk-LHKFRPUO.js → chunk-IQFKDBQD.js} +3 -3
- package/dist/{chunk-BHNJEBQJ.js → chunk-IUG2FHNN.js} +2 -2
- package/dist/{chunk-Z75HCPIE.js → chunk-NTCSWQEM.js} +3 -3
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/{chunk-IXNSTNS7.js → chunk-QZNGKOCZ.js} +2 -2
- package/dist/{chunk-S3RCM32V.js → chunk-S6FZAPJ7.js} +3 -3
- package/dist/{chunk-Y7CPJGLU.js → chunk-SUBBMTMY.js} +5 -5
- 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-44GS4GJJ.js → chunk-V2IEG55Y.js} +3 -3
- package/dist/{chunk-JNOZPU44.js → chunk-ZO4PPFCZ.js} +2 -2
- package/dist/client.cjs +27 -48
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +14 -14
- package/dist/{finish-kXAcUJyB.d.ts → finish-pPJfB0uO.d.ts} +2 -2
- 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 +27 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -15
- package/dist/modelrouter/core.js +1 -1
- package/dist/modelrouter/index.js +1 -1
- package/dist/tools/browser/anthropic.js +1 -1
- package/dist/tools/browser/core.js +1 -1
- package/dist/tools/browser/index.js +1 -1
- package/dist/tools/browser/live.js +1 -1
- package/dist/tools/browser/openai.js +1 -1
- package/dist/tools/browser/prompts.js +1 -1
- package/dist/tools/browser/vercel.js +1 -1
- 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.cjs +8 -8
- package/dist/tools/warp_grep/agent/parser.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/parser.js +2 -2
- package/dist/tools/warp_grep/agent/prompt.js +1 -1
- package/dist/tools/warp_grep/agent/runner.cjs +21 -16
- package/dist/tools/warp_grep/agent/runner.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/runner.js +4 -4
- package/dist/tools/warp_grep/agent/types.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/types.d.ts +2 -2
- package/dist/tools/warp_grep/anthropic.cjs +27 -48
- package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
- package/dist/tools/warp_grep/anthropic.js +8 -8
- package/dist/tools/warp_grep/client.cjs +27 -48
- package/dist/tools/warp_grep/client.cjs.map +1 -1
- package/dist/tools/warp_grep/client.js +7 -7
- package/dist/tools/warp_grep/gemini.cjs +27 -48
- package/dist/tools/warp_grep/gemini.cjs.map +1 -1
- package/dist/tools/warp_grep/gemini.js +8 -8
- package/dist/tools/warp_grep/harness.cjs +28 -46
- package/dist/tools/warp_grep/harness.cjs.map +1 -1
- package/dist/tools/warp_grep/harness.d.ts +1 -1
- package/dist/tools/warp_grep/harness.js +5 -5
- package/dist/tools/warp_grep/harness.js.map +1 -1
- package/dist/tools/warp_grep/index.cjs +30 -48
- package/dist/tools/warp_grep/index.cjs.map +1 -1
- package/dist/tools/warp_grep/index.d.ts +1 -1
- package/dist/tools/warp_grep/index.js +11 -11
- package/dist/tools/warp_grep/openai.cjs +27 -48
- package/dist/tools/warp_grep/openai.cjs.map +1 -1
- package/dist/tools/warp_grep/openai.js +8 -8
- 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 +27 -48
- package/dist/tools/warp_grep/vercel.cjs.map +1 -1
- package/dist/tools/warp_grep/vercel.js +8 -8
- package/package.json +2 -4
- package/dist/chunk-3M4DOG6N.js.map +0 -1
- package/dist/chunk-563RLKFC.js.map +0 -1
- package/dist/chunk-5FUTL2UF.js +0 -22
- package/dist/chunk-Y7CPJGLU.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-GZ7TJ7UB.js.map → chunk-BLKHVDYQ.js.map} +0 -0
- /package/dist/{chunk-XWSKUQVQ.js.map → chunk-DT6MPBD4.js.map} +0 -0
- /package/dist/{chunk-LHKFRPUO.js.map → chunk-IQFKDBQD.js.map} +0 -0
- /package/dist/{chunk-BHNJEBQJ.js.map → chunk-IUG2FHNN.js.map} +0 -0
- /package/dist/{chunk-Z75HCPIE.js.map → chunk-NTCSWQEM.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-S3RCM32V.js.map → chunk-S6FZAPJ7.js.map} +0 -0
- /package/dist/{chunk-44GS4GJJ.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, {
|
|
@@ -1323,19 +1311,19 @@ function parseNestedXmlTools(text) {
|
|
|
1323
1311
|
const filePath = getXmlElementText(fileContent, "path");
|
|
1324
1312
|
const linesStr = getXmlElementText(fileContent, "lines");
|
|
1325
1313
|
if (filePath && linesStr) {
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1314
|
+
if (linesStr.trim() === "*") {
|
|
1315
|
+
files.push({ path: filePath, lines: "*" });
|
|
1316
|
+
} else {
|
|
1317
|
+
const ranges = [];
|
|
1318
|
+
for (const rangeStr of linesStr.split(",")) {
|
|
1331
1319
|
const [s, e] = rangeStr.split("-").map((v) => parseInt(v.trim(), 10));
|
|
1332
1320
|
if (Number.isFinite(s) && Number.isFinite(e)) {
|
|
1333
1321
|
ranges.push([s, e]);
|
|
1334
1322
|
}
|
|
1335
1323
|
}
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1324
|
+
if (ranges.length > 0) {
|
|
1325
|
+
files.push({ path: filePath, lines: ranges });
|
|
1326
|
+
}
|
|
1339
1327
|
}
|
|
1340
1328
|
}
|
|
1341
1329
|
}
|
|
@@ -1566,13 +1554,18 @@ async function toolListDirectory(provider, args) {
|
|
|
1566
1554
|
async function readFinishFiles(repoRoot, files, reader) {
|
|
1567
1555
|
const out = [];
|
|
1568
1556
|
for (const f of files) {
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1557
|
+
if (f.lines === "*") {
|
|
1558
|
+
const lines = await reader(f.path);
|
|
1559
|
+
out.push({ path: f.path, ranges: "*", content: lines.join("\n") });
|
|
1560
|
+
} else {
|
|
1561
|
+
const ranges = mergeRanges(f.lines);
|
|
1562
|
+
const chunks = [];
|
|
1563
|
+
for (const [s, e] of ranges) {
|
|
1564
|
+
const lines = await reader(f.path, s, e);
|
|
1565
|
+
chunks.push(lines.join("\n"));
|
|
1566
|
+
}
|
|
1567
|
+
out.push({ path: f.path, ranges, content: chunks.join("\n") });
|
|
1574
1568
|
}
|
|
1575
|
-
out.push({ path: f.path, ranges, content: chunks.join("\n") });
|
|
1576
1569
|
}
|
|
1577
1570
|
return out;
|
|
1578
1571
|
}
|
|
@@ -1835,7 +1828,7 @@ async function runWarpGrep(config) {
|
|
|
1835
1828
|
messages.push({ role: "assistant", content: assistantContent });
|
|
1836
1829
|
const toolCalls = parser.parse(assistantContent);
|
|
1837
1830
|
if (toolCalls.length === 0) {
|
|
1838
|
-
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" });
|
|
1831
|
+
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" });
|
|
1839
1832
|
terminationReason = "terminated";
|
|
1840
1833
|
break;
|
|
1841
1834
|
}
|
|
@@ -1899,7 +1892,7 @@ async function runWarpGrep(config) {
|
|
|
1899
1892
|
}
|
|
1900
1893
|
const parts = ["Relevant context found:"];
|
|
1901
1894
|
for (const f of finishMeta.files) {
|
|
1902
|
-
const ranges = f.lines.map(([s, e]) => `${s}-${e}`).join(", ");
|
|
1895
|
+
const ranges = f.lines === "*" ? "*" : f.lines.map(([s, e]) => `${s}-${e}`).join(", ");
|
|
1903
1896
|
parts.push(`- ${f.path}: ${ranges}`);
|
|
1904
1897
|
}
|
|
1905
1898
|
const payload = parts.join("\n");
|
|
@@ -1938,20 +1931,9 @@ var import_path5 = __toESM(require("path"), 1);
|
|
|
1938
1931
|
|
|
1939
1932
|
// tools/warp_grep/utils/ripgrep.ts
|
|
1940
1933
|
var import_child_process = require("child_process");
|
|
1934
|
+
var import_ripgrep = require("@vscode/ripgrep");
|
|
1941
1935
|
var resolvedRgPath = null;
|
|
1942
1936
|
var rgPathChecked = false;
|
|
1943
|
-
var bundledRgPath = null;
|
|
1944
|
-
async function getBundledRgPath() {
|
|
1945
|
-
if (bundledRgPath !== null) return bundledRgPath;
|
|
1946
|
-
try {
|
|
1947
|
-
const module2 = await Promise.resolve().then(() => __toESM(require_lib(), 1));
|
|
1948
|
-
bundledRgPath = module2.rgPath;
|
|
1949
|
-
return bundledRgPath;
|
|
1950
|
-
} catch {
|
|
1951
|
-
bundledRgPath = "";
|
|
1952
|
-
return null;
|
|
1953
|
-
}
|
|
1954
|
-
}
|
|
1955
1937
|
function spawnRg(rgBinary, args, opts) {
|
|
1956
1938
|
return new Promise((resolve2) => {
|
|
1957
1939
|
const child = (0, import_child_process.spawn)(rgBinary, args, {
|
|
@@ -1982,14 +1964,11 @@ async function runRipgrep(args, opts) {
|
|
|
1982
1964
|
return spawnRg(resolvedRgPath, args, opts);
|
|
1983
1965
|
}
|
|
1984
1966
|
if (!rgPathChecked) {
|
|
1985
|
-
const
|
|
1986
|
-
if (
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
rgPathChecked = true;
|
|
1991
|
-
return result;
|
|
1992
|
-
}
|
|
1967
|
+
const result = await spawnRg(import_ripgrep.rgPath, args, opts);
|
|
1968
|
+
if (!isBinaryFailure(result)) {
|
|
1969
|
+
resolvedRgPath = import_ripgrep.rgPath;
|
|
1970
|
+
rgPathChecked = true;
|
|
1971
|
+
return result;
|
|
1993
1972
|
}
|
|
1994
1973
|
const fallbackResult = await spawnRg("rg", args, opts);
|
|
1995
1974
|
if (!isBinaryFailure(fallbackResult)) {
|