@morphllm/morphsdk 0.2.59 → 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/{anthropic-CaFUHxBW.d.ts → anthropic-BC-AMEIN.d.ts} +1 -1
- 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-CextMMm9.d.ts → client-CSINf0lQ.d.ts} +1 -1
- package/dist/client.cjs +33 -31
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.ts +2 -2
- package/dist/client.js +13 -13
- package/dist/{gemini-CE80Pbdy.d.ts → gemini-DPFWWG3k.d.ts} +1 -1
- 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.d.ts +2 -2
- 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/{openai-Fvpqln7F.d.ts → openai-Beb9escY.d.ts} +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.d.ts +2 -2
- 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.d.ts +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.d.ts +2 -2
- 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.d.ts +5 -5
- 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.d.ts +2 -2
- 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.d.ts +1 -1
- 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.d.ts +2 -2
- package/dist/tools/warp_grep/vercel.js +7 -7
- package/dist/{types-a_hxdPI6.d.ts → types-CnvVDM63.d.ts} +8 -9
- package/dist/{vercel-3yjvfmVB.d.ts → vercel-Bo84tpBe.d.ts} +1 -1
- 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
package/dist/client.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ import './tools/browser/core.js';
|
|
|
5
5
|
import './tools/warp_grep/client.js';
|
|
6
6
|
import './git/client.js';
|
|
7
7
|
import './modelrouter/core.js';
|
|
8
|
-
export { M as MorphClient, a as MorphClientConfig } from './client-
|
|
8
|
+
export { M as MorphClient, a as MorphClientConfig } from './client-CSINf0lQ.js';
|
|
9
9
|
import './tools/fastapply/types.js';
|
|
10
10
|
import './tools/codebase_search/types.js';
|
|
11
11
|
import './tools/browser/types.js';
|
|
12
|
-
import './types-
|
|
12
|
+
import './types-CnvVDM63.js';
|
|
13
13
|
import './tools/warp_grep/providers/types.js';
|
|
14
14
|
import './git/types.js';
|
|
15
15
|
import 'isomorphic-git';
|
package/dist/client.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MorphClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-XWSKUQVQ.js";
|
|
4
|
+
import "./chunk-Z75HCPIE.js";
|
|
5
|
+
import "./chunk-GZ7TJ7UB.js";
|
|
6
|
+
import "./chunk-LHKFRPUO.js";
|
|
7
7
|
import "./chunk-KW7OEGZK.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-S3RCM32V.js";
|
|
9
|
+
import "./chunk-Y7CPJGLU.js";
|
|
10
10
|
import "./chunk-527P5X2E.js";
|
|
11
11
|
import "./chunk-6Y5JB4JC.js";
|
|
12
12
|
import "./chunk-APP75CBN.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-3M4DOG6N.js";
|
|
14
14
|
import "./chunk-Q5AHGIQO.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-JNOZPU44.js";
|
|
16
16
|
import "./chunk-G2RSY56Q.js";
|
|
17
17
|
import "./chunk-SMGZ6A64.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-563RLKFC.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-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-BHNJEBQJ.js";
|
|
26
|
+
import "./chunk-PKPJWARB.js";
|
|
27
|
+
import "./chunk-IXNSTNS7.js";
|
|
28
28
|
import "./chunk-CKTA4AXM.js";
|
|
29
29
|
import "./chunk-63WE2C5R.js";
|
|
30
30
|
import "./chunk-LVY5LPEX.js";
|
|
@@ -33,7 +33,7 @@ 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-
|
|
36
|
+
import "./chunk-5FUTL2UF.js";
|
|
37
37
|
export {
|
|
38
38
|
MorphClient
|
|
39
39
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FunctionDeclaration } from '@google/generative-ai';
|
|
2
2
|
import { formatResult } from './tools/warp_grep/client.js';
|
|
3
3
|
import { getSystemPrompt } from './tools/warp_grep/agent/prompt.js';
|
|
4
|
-
import { d as WarpGrepToolConfig, b as WarpGrepResult } from './types-
|
|
4
|
+
import { d as WarpGrepToolConfig, b as WarpGrepResult } from './types-CnvVDM63.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Google Gemini SDK adapter for morph-warp-grep tool
|
package/dist/git/client.js
CHANGED
package/dist/git/config.js
CHANGED
package/dist/git/index.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -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
|
// index.ts
|
|
31
43
|
var index_exports = {};
|
|
32
44
|
__export(index_exports, {
|
|
@@ -1349,33 +1361,9 @@ function parseNestedXmlTools(text) {
|
|
|
1349
1361
|
return tools;
|
|
1350
1362
|
}
|
|
1351
1363
|
function preprocessText(text) {
|
|
1352
|
-
|
|
1364
|
+
const processed = text.replace(/<think>[\s\S]*?<\/think>/gi, "").replace(/<\/?tool_call>/gi, "");
|
|
1353
1365
|
const nestedTools = parseNestedXmlTools(processed);
|
|
1354
|
-
const openingTagRegex = /<tool_call>|<tool>/gi;
|
|
1355
|
-
const closingTagRegex = /<\/tool_call>|<\/tool>/gi;
|
|
1356
|
-
const openingMatches = processed.match(openingTagRegex) || [];
|
|
1357
|
-
const closingMatches = processed.match(closingTagRegex) || [];
|
|
1358
|
-
if (openingMatches.length > closingMatches.length) {
|
|
1359
|
-
const lastClosingMatch = /<\/tool_call>|<\/tool>/gi;
|
|
1360
|
-
let lastClosingIndex = -1;
|
|
1361
|
-
let match;
|
|
1362
|
-
while ((match = lastClosingMatch.exec(processed)) !== null) {
|
|
1363
|
-
lastClosingIndex = match.index + match[0].length;
|
|
1364
|
-
}
|
|
1365
|
-
if (lastClosingIndex > 0) {
|
|
1366
|
-
processed = processed.slice(0, lastClosingIndex);
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
1366
|
const toolCallLines = [];
|
|
1370
|
-
const toolTagRegex = /<tool_call>([\s\S]*?)<\/tool_call>|<tool>([\s\S]*?)<\/tool>/gi;
|
|
1371
|
-
let tagMatch;
|
|
1372
|
-
while ((tagMatch = toolTagRegex.exec(processed)) !== null) {
|
|
1373
|
-
const content = (tagMatch[1] || tagMatch[2] || "").trim();
|
|
1374
|
-
if (content) {
|
|
1375
|
-
const lines = content.split(/\r?\n/).map((l) => l.trim()).filter((l) => l);
|
|
1376
|
-
toolCallLines.push(...lines);
|
|
1377
|
-
}
|
|
1378
|
-
}
|
|
1379
1367
|
const allLines = processed.split(/\r?\n/).map((l) => l.trim());
|
|
1380
1368
|
for (const line of allLines) {
|
|
1381
1369
|
if (!line) continue;
|
|
@@ -1964,9 +1952,20 @@ var import_path5 = __toESM(require("path"), 1);
|
|
|
1964
1952
|
|
|
1965
1953
|
// tools/warp_grep/utils/ripgrep.ts
|
|
1966
1954
|
var import_child_process = require("child_process");
|
|
1967
|
-
var import_ripgrep = require("@vscode/ripgrep");
|
|
1968
1955
|
var resolvedRgPath = null;
|
|
1969
1956
|
var rgPathChecked = false;
|
|
1957
|
+
var bundledRgPath = null;
|
|
1958
|
+
async function getBundledRgPath() {
|
|
1959
|
+
if (bundledRgPath !== null) return bundledRgPath;
|
|
1960
|
+
try {
|
|
1961
|
+
const module2 = await Promise.resolve().then(() => __toESM(require_lib(), 1));
|
|
1962
|
+
bundledRgPath = module2.rgPath;
|
|
1963
|
+
return bundledRgPath;
|
|
1964
|
+
} catch {
|
|
1965
|
+
bundledRgPath = "";
|
|
1966
|
+
return null;
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1970
1969
|
function spawnRg(rgBinary, args, opts) {
|
|
1971
1970
|
return new Promise((resolve2) => {
|
|
1972
1971
|
const child = (0, import_child_process.spawn)(rgBinary, args, {
|
|
@@ -1997,11 +1996,14 @@ async function runRipgrep(args, opts) {
|
|
|
1997
1996
|
return spawnRg(resolvedRgPath, args, opts);
|
|
1998
1997
|
}
|
|
1999
1998
|
if (!rgPathChecked) {
|
|
2000
|
-
const
|
|
2001
|
-
if (
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
1999
|
+
const bundledPath = await getBundledRgPath();
|
|
2000
|
+
if (bundledPath) {
|
|
2001
|
+
const result = await spawnRg(bundledPath, args, opts);
|
|
2002
|
+
if (!isBinaryFailure(result)) {
|
|
2003
|
+
resolvedRgPath = bundledPath;
|
|
2004
|
+
rgPathChecked = true;
|
|
2005
|
+
return result;
|
|
2006
|
+
}
|
|
2005
2007
|
}
|
|
2006
2008
|
const fallbackResult = await spawnRg("rg", args, opts);
|
|
2007
2009
|
if (!isBinaryFailure(fallbackResult)) {
|