@morphllm/morphsdk 0.2.60 → 0.2.62
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-YV75OQTE.js → chunk-3M4DOG6N.js} +2 -26
- package/dist/chunk-3M4DOG6N.js.map +1 -0
- package/dist/{chunk-ILJ3J5IA.js → chunk-44GS4GJJ.js} +3 -3
- package/dist/{chunk-TPP2UGQP.js → chunk-563RLKFC.js} +21 -7
- package/dist/chunk-563RLKFC.js.map +1 -0
- package/dist/chunk-5FUTL2UF.js +22 -0
- package/dist/{chunk-IUG2FHNN.js → chunk-BHNJEBQJ.js} +2 -2
- package/dist/{chunk-6N6ZYZYD.js → chunk-GZ7TJ7UB.js} +3 -3
- package/dist/{chunk-QZNGKOCZ.js → chunk-IXNSTNS7.js} +2 -2
- package/dist/{chunk-ZO4PPFCZ.js → chunk-JNOZPU44.js} +2 -2
- package/dist/{chunk-4VGOBA2J.js → chunk-LHKFRPUO.js} +3 -3
- package/dist/{chunk-5QIWYEHJ.js → chunk-PKPJWARB.js} +2 -2
- package/dist/{chunk-374N3GIA.js → chunk-S3RCM32V.js} +3 -3
- package/dist/{chunk-FN4EP3WY.js → chunk-XWSKUQVQ.js} +8 -8
- package/dist/{chunk-2CASO3ZO.js → chunk-Y7CPJGLU.js} +2 -2
- package/dist/{chunk-3IQIT6MC.js → chunk-Z75HCPIE.js} +3 -3
- package/dist/client.cjs +33 -31
- 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 +33 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -14
- package/dist/lib-GEPX5Y3T.js +14 -0
- package/dist/lib-GEPX5Y3T.js.map +1 -0
- 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 +1 -25
- 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 +1 -25
- package/dist/tools/warp_grep/agent/runner.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/runner.js +3 -3
- package/dist/tools/warp_grep/anthropic.cjs +33 -31
- package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
- package/dist/tools/warp_grep/anthropic.js +7 -7
- package/dist/tools/warp_grep/client.cjs +33 -31
- package/dist/tools/warp_grep/client.cjs.map +1 -1
- package/dist/tools/warp_grep/client.js +6 -6
- package/dist/tools/warp_grep/gemini.cjs +33 -31
- package/dist/tools/warp_grep/gemini.cjs.map +1 -1
- package/dist/tools/warp_grep/gemini.js +7 -7
- package/dist/tools/warp_grep/harness.cjs +33 -31
- package/dist/tools/warp_grep/harness.cjs.map +1 -1
- package/dist/tools/warp_grep/harness.js +4 -4
- package/dist/tools/warp_grep/index.cjs +33 -31
- package/dist/tools/warp_grep/index.cjs.map +1 -1
- package/dist/tools/warp_grep/index.js +10 -10
- package/dist/tools/warp_grep/openai.cjs +33 -31
- package/dist/tools/warp_grep/openai.cjs.map +1 -1
- package/dist/tools/warp_grep/openai.js +7 -7
- package/dist/tools/warp_grep/providers/local.cjs +32 -6
- 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 +42 -6
- 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 +33 -31
- package/dist/tools/warp_grep/vercel.cjs.map +1 -1
- package/dist/tools/warp_grep/vercel.js +7 -7
- package/package.json +5 -3
- package/dist/chunk-PZ5AY32C.js +0 -10
- package/dist/chunk-TPP2UGQP.js.map +0 -1
- package/dist/chunk-YV75OQTE.js.map +0 -1
- /package/dist/{chunk-ILJ3J5IA.js.map → chunk-44GS4GJJ.js.map} +0 -0
- /package/dist/{chunk-PZ5AY32C.js.map → chunk-5FUTL2UF.js.map} +0 -0
- /package/dist/{chunk-IUG2FHNN.js.map → chunk-BHNJEBQJ.js.map} +0 -0
- /package/dist/{chunk-6N6ZYZYD.js.map → chunk-GZ7TJ7UB.js.map} +0 -0
- /package/dist/{chunk-QZNGKOCZ.js.map → chunk-IXNSTNS7.js.map} +0 -0
- /package/dist/{chunk-ZO4PPFCZ.js.map → chunk-JNOZPU44.js.map} +0 -0
- /package/dist/{chunk-4VGOBA2J.js.map → chunk-LHKFRPUO.js.map} +0 -0
- /package/dist/{chunk-5QIWYEHJ.js.map → chunk-PKPJWARB.js.map} +0 -0
- /package/dist/{chunk-374N3GIA.js.map → chunk-S3RCM32V.js.map} +0 -0
- /package/dist/{chunk-FN4EP3WY.js.map → chunk-XWSKUQVQ.js.map} +0 -0
- /package/dist/{chunk-2CASO3ZO.js.map → chunk-Y7CPJGLU.js.map} +0 -0
- /package/dist/{chunk-3IQIT6MC.js.map → chunk-Z75HCPIE.js.map} +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import "../../chunk-ISWL67SF.js";
|
|
2
2
|
import {
|
|
3
3
|
gemini_exports
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-44GS4GJJ.js";
|
|
5
5
|
import {
|
|
6
6
|
anthropic_exports
|
|
7
|
-
} from "../../chunk-
|
|
7
|
+
} from "../../chunk-Z75HCPIE.js";
|
|
8
8
|
import {
|
|
9
9
|
openai_exports
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-GZ7TJ7UB.js";
|
|
11
11
|
import {
|
|
12
12
|
vercel_exports
|
|
13
|
-
} from "../../chunk-
|
|
13
|
+
} from "../../chunk-LHKFRPUO.js";
|
|
14
14
|
import {
|
|
15
15
|
WARP_GREP_DESCRIPTION,
|
|
16
16
|
WARP_GREP_TOOL_NAME
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
executeToolCall,
|
|
21
21
|
executeWarpGrep,
|
|
22
22
|
formatResult
|
|
23
|
-
} from "../../chunk-
|
|
23
|
+
} from "../../chunk-S3RCM32V.js";
|
|
24
24
|
import {
|
|
25
25
|
runWarpGrep
|
|
26
|
-
} from "../../chunk-
|
|
26
|
+
} from "../../chunk-Y7CPJGLU.js";
|
|
27
27
|
import {
|
|
28
28
|
RemoteCommandsProvider
|
|
29
29
|
} from "../../chunk-527P5X2E.js";
|
|
@@ -35,20 +35,20 @@ import {
|
|
|
35
35
|
toolRead
|
|
36
36
|
} from "../../chunk-6Y5JB4JC.js";
|
|
37
37
|
import "../../chunk-APP75CBN.js";
|
|
38
|
-
import "../../chunk-
|
|
38
|
+
import "../../chunk-3M4DOG6N.js";
|
|
39
39
|
import {
|
|
40
40
|
SYSTEM_PROMPT,
|
|
41
41
|
getSystemPrompt
|
|
42
42
|
} from "../../chunk-Q5AHGIQO.js";
|
|
43
43
|
import {
|
|
44
44
|
LocalRipgrepProvider
|
|
45
|
-
} from "../../chunk-
|
|
45
|
+
} from "../../chunk-JNOZPU44.js";
|
|
46
46
|
import "../../chunk-G2RSY56Q.js";
|
|
47
47
|
import "../../chunk-SMGZ6A64.js";
|
|
48
|
-
import "../../chunk-
|
|
48
|
+
import "../../chunk-563RLKFC.js";
|
|
49
49
|
import "../../chunk-XT5ZO6ES.js";
|
|
50
50
|
import "../../chunk-4VWJFZVS.js";
|
|
51
|
-
import "../../chunk-
|
|
51
|
+
import "../../chunk-5FUTL2UF.js";
|
|
52
52
|
export {
|
|
53
53
|
LocalRipgrepProvider,
|
|
54
54
|
RemoteCommandsProvider,
|
|
@@ -5,6 +5,9 @@ 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
|
+
};
|
|
8
11
|
var __export = (target, all) => {
|
|
9
12
|
for (var name in all)
|
|
10
13
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -27,6 +30,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
30
|
));
|
|
28
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
32
|
|
|
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
|
+
|
|
30
42
|
// tools/warp_grep/openai.ts
|
|
31
43
|
var openai_exports = {};
|
|
32
44
|
__export(openai_exports, {
|
|
@@ -429,33 +441,9 @@ function parseNestedXmlTools(text) {
|
|
|
429
441
|
return tools;
|
|
430
442
|
}
|
|
431
443
|
function preprocessText(text) {
|
|
432
|
-
|
|
444
|
+
const processed = text.replace(/<think>[\s\S]*?<\/think>/gi, "").replace(/<\/?tool_call>/gi, "");
|
|
433
445
|
const nestedTools = parseNestedXmlTools(processed);
|
|
434
|
-
const openingTagRegex = /<tool_call>|<tool>/gi;
|
|
435
|
-
const closingTagRegex = /<\/tool_call>|<\/tool>/gi;
|
|
436
|
-
const openingMatches = processed.match(openingTagRegex) || [];
|
|
437
|
-
const closingMatches = processed.match(closingTagRegex) || [];
|
|
438
|
-
if (openingMatches.length > closingMatches.length) {
|
|
439
|
-
const lastClosingMatch = /<\/tool_call>|<\/tool>/gi;
|
|
440
|
-
let lastClosingIndex = -1;
|
|
441
|
-
let match;
|
|
442
|
-
while ((match = lastClosingMatch.exec(processed)) !== null) {
|
|
443
|
-
lastClosingIndex = match.index + match[0].length;
|
|
444
|
-
}
|
|
445
|
-
if (lastClosingIndex > 0) {
|
|
446
|
-
processed = processed.slice(0, lastClosingIndex);
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
446
|
const toolCallLines = [];
|
|
450
|
-
const toolTagRegex = /<tool_call>([\s\S]*?)<\/tool_call>|<tool>([\s\S]*?)<\/tool>/gi;
|
|
451
|
-
let tagMatch;
|
|
452
|
-
while ((tagMatch = toolTagRegex.exec(processed)) !== null) {
|
|
453
|
-
const content = (tagMatch[1] || tagMatch[2] || "").trim();
|
|
454
|
-
if (content) {
|
|
455
|
-
const lines = content.split(/\r?\n/).map((l) => l.trim()).filter((l) => l);
|
|
456
|
-
toolCallLines.push(...lines);
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
447
|
const allLines = processed.split(/\r?\n/).map((l) => l.trim());
|
|
460
448
|
for (const line of allLines) {
|
|
461
449
|
if (!line) continue;
|
|
@@ -1118,9 +1106,20 @@ var import_path4 = __toESM(require("path"), 1);
|
|
|
1118
1106
|
|
|
1119
1107
|
// tools/warp_grep/utils/ripgrep.ts
|
|
1120
1108
|
var import_child_process = require("child_process");
|
|
1121
|
-
var import_ripgrep = require("@vscode/ripgrep");
|
|
1122
1109
|
var resolvedRgPath = null;
|
|
1123
1110
|
var rgPathChecked = false;
|
|
1111
|
+
var bundledRgPath = null;
|
|
1112
|
+
async function getBundledRgPath() {
|
|
1113
|
+
if (bundledRgPath !== null) return bundledRgPath;
|
|
1114
|
+
try {
|
|
1115
|
+
const module2 = await Promise.resolve().then(() => __toESM(require_lib(), 1));
|
|
1116
|
+
bundledRgPath = module2.rgPath;
|
|
1117
|
+
return bundledRgPath;
|
|
1118
|
+
} catch {
|
|
1119
|
+
bundledRgPath = "";
|
|
1120
|
+
return null;
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1124
1123
|
function spawnRg(rgBinary, args, opts) {
|
|
1125
1124
|
return new Promise((resolve) => {
|
|
1126
1125
|
const child = (0, import_child_process.spawn)(rgBinary, args, {
|
|
@@ -1151,11 +1150,14 @@ async function runRipgrep(args, opts) {
|
|
|
1151
1150
|
return spawnRg(resolvedRgPath, args, opts);
|
|
1152
1151
|
}
|
|
1153
1152
|
if (!rgPathChecked) {
|
|
1154
|
-
const
|
|
1155
|
-
if (
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1153
|
+
const bundledPath = await getBundledRgPath();
|
|
1154
|
+
if (bundledPath) {
|
|
1155
|
+
const result = await spawnRg(bundledPath, args, opts);
|
|
1156
|
+
if (!isBinaryFailure(result)) {
|
|
1157
|
+
resolvedRgPath = bundledPath;
|
|
1158
|
+
rgPathChecked = true;
|
|
1159
|
+
return result;
|
|
1160
|
+
}
|
|
1159
1161
|
}
|
|
1160
1162
|
const fallbackResult = await spawnRg("rg", args, opts);
|
|
1161
1163
|
if (!isBinaryFailure(fallbackResult)) {
|