@morphllm/morphsdk 0.2.144 → 0.2.145
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-YIETFYCL.js → chunk-4LWMPKSB.js} +71 -44
- package/dist/chunk-4LWMPKSB.js.map +1 -0
- package/dist/{chunk-HZOTLGJH.js → chunk-4Y2NM6JD.js} +42 -2
- package/dist/chunk-4Y2NM6JD.js.map +1 -0
- package/dist/{chunk-BVVINERL.js → chunk-5FCXLQJU.js} +2 -2
- package/dist/{chunk-CZ53BD6B.js → chunk-6CFKWZK3.js} +3 -3
- package/dist/{chunk-NF2QWJDY.js → chunk-B3AKP3RA.js} +31 -2
- package/dist/chunk-B3AKP3RA.js.map +1 -0
- package/dist/{chunk-RDISKUTQ.js → chunk-BAF33L6C.js} +2 -2
- package/dist/{chunk-IBYOMW76.js → chunk-BXRJYLRS.js} +2 -2
- package/dist/chunk-CMSHXALI.js +60 -0
- package/dist/chunk-CMSHXALI.js.map +1 -0
- package/dist/{chunk-A5BCEQSU.js → chunk-EPIOAODF.js} +2 -2
- package/dist/{chunk-XX22ZYNY.js → chunk-G23BI5CQ.js} +2 -2
- package/dist/{chunk-OHCUVHG6.js → chunk-GHPQYSSF.js} +2 -2
- package/dist/{chunk-GFVUXQEC.js → chunk-GXCWKYGU.js} +2 -2
- package/dist/{chunk-U7VQWPYU.js → chunk-GXM3G7Z4.js} +2 -2
- package/dist/{chunk-W72JUWQY.js → chunk-HBIW2XV2.js} +2 -2
- package/dist/{chunk-4YSNUXSF.js → chunk-HE7K2QNQ.js} +25 -25
- package/dist/{chunk-FIVYDIHX.js → chunk-HYRHI2UL.js} +1 -1
- package/dist/{chunk-DKODF3YG.js → chunk-I3J46TSB.js} +5 -4
- package/dist/chunk-I3J46TSB.js.map +1 -0
- package/dist/{chunk-Z5PGIDOK.js → chunk-IRWHN55G.js} +1 -1
- package/dist/{chunk-YS2HX2AS.js → chunk-JMUAQQJU.js} +3 -3
- package/dist/{chunk-BS3APHNI.js → chunk-JRBU4UNP.js} +2 -2
- package/dist/{chunk-ZCUQX5PA.js → chunk-KELRCMA6.js} +2 -2
- package/dist/{chunk-ZCUQX5PA.js.map → chunk-KELRCMA6.js.map} +1 -1
- package/dist/{chunk-PFAYHEUS.js → chunk-MRPASJBX.js} +2 -2
- package/dist/{chunk-UPU7DO2Y.js → chunk-MTJ3PR4M.js} +2 -2
- package/dist/{chunk-TX7VXDUV.js → chunk-N7TTZIBK.js} +2 -2
- package/dist/chunk-OPEQQGST.js +396 -0
- package/dist/chunk-OPEQQGST.js.map +1 -0
- package/dist/{chunk-KGGPSPYH.js → chunk-PX7ODEML.js} +2 -2
- package/dist/{chunk-DHT77R7E.js → chunk-RZXS4ADX.js} +2 -2
- package/dist/{chunk-HYHHHNJK.js → chunk-S54SPKX3.js} +2 -2
- package/dist/{chunk-F6HIFE6U.js → chunk-SUE4GYA2.js} +2 -2
- package/dist/{chunk-EOUG4EY4.js → chunk-VRV5UYTN.js} +2 -2
- package/dist/{chunk-H73WKT7O.js → chunk-XL7R3XN5.js} +2 -2
- package/dist/client.cjs +426 -438
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +28 -29
- package/dist/edge.cjs +1 -1
- package/dist/edge.cjs.map +1 -1
- package/dist/edge.js +4 -4
- package/dist/{finish-DBKuo8yj.d.ts → finish-Ddj1MPGt.d.ts} +1 -1
- package/dist/index.cjs +445 -438
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +35 -35
- package/dist/modelrouter/core.cjs +1 -1
- package/dist/modelrouter/core.cjs.map +1 -1
- package/dist/modelrouter/core.js +3 -3
- package/dist/modelrouter/index.cjs +1 -1
- package/dist/modelrouter/index.cjs.map +1 -1
- package/dist/modelrouter/index.js +3 -3
- package/dist/subagents/anthropic.cjs +422 -434
- package/dist/subagents/anthropic.cjs.map +1 -1
- package/dist/subagents/anthropic.js +8 -9
- package/dist/subagents/vercel.cjs +422 -434
- package/dist/subagents/vercel.cjs.map +1 -1
- package/dist/subagents/vercel.js +8 -9
- package/dist/tools/browser/anthropic.cjs +1 -1
- package/dist/tools/browser/anthropic.cjs.map +1 -1
- package/dist/tools/browser/anthropic.js +5 -5
- package/dist/tools/browser/core.cjs +1 -1
- package/dist/tools/browser/core.cjs.map +1 -1
- package/dist/tools/browser/core.js +4 -4
- package/dist/tools/browser/index.cjs +1 -1
- package/dist/tools/browser/index.cjs.map +1 -1
- package/dist/tools/browser/index.js +7 -7
- package/dist/tools/browser/openai.cjs +1 -1
- package/dist/tools/browser/openai.cjs.map +1 -1
- package/dist/tools/browser/openai.js +5 -5
- package/dist/tools/browser/profiles/core.cjs +1 -1
- package/dist/tools/browser/profiles/core.cjs.map +1 -1
- package/dist/tools/browser/profiles/core.js +3 -3
- package/dist/tools/browser/profiles/index.cjs +1 -1
- package/dist/tools/browser/profiles/index.cjs.map +1 -1
- package/dist/tools/browser/profiles/index.js +3 -3
- package/dist/tools/browser/vercel.cjs +1 -1
- package/dist/tools/browser/vercel.cjs.map +1 -1
- package/dist/tools/browser/vercel.js +5 -5
- package/dist/tools/codebase_search/anthropic.cjs +1 -1
- package/dist/tools/codebase_search/anthropic.cjs.map +1 -1
- package/dist/tools/codebase_search/anthropic.js +4 -4
- package/dist/tools/codebase_search/core.cjs +1 -1
- package/dist/tools/codebase_search/core.cjs.map +1 -1
- package/dist/tools/codebase_search/core.js +3 -3
- package/dist/tools/codebase_search/index.cjs +1 -1
- package/dist/tools/codebase_search/index.cjs.map +1 -1
- package/dist/tools/codebase_search/index.js +8 -8
- package/dist/tools/codebase_search/openai.cjs +1 -1
- package/dist/tools/codebase_search/openai.cjs.map +1 -1
- package/dist/tools/codebase_search/openai.js +4 -4
- package/dist/tools/codebase_search/vercel.cjs +1 -1
- package/dist/tools/codebase_search/vercel.cjs.map +1 -1
- package/dist/tools/codebase_search/vercel.js +4 -4
- package/dist/tools/fastapply/anthropic.cjs +1 -1
- package/dist/tools/fastapply/anthropic.cjs.map +1 -1
- package/dist/tools/fastapply/anthropic.js +4 -4
- package/dist/tools/fastapply/apply.cjs +1 -1
- package/dist/tools/fastapply/apply.cjs.map +1 -1
- package/dist/tools/fastapply/apply.js +2 -2
- package/dist/tools/fastapply/core.cjs +1 -1
- package/dist/tools/fastapply/core.cjs.map +1 -1
- package/dist/tools/fastapply/core.js +3 -3
- package/dist/tools/fastapply/index.cjs +1 -1
- package/dist/tools/fastapply/index.cjs.map +1 -1
- package/dist/tools/fastapply/index.js +6 -6
- package/dist/tools/fastapply/openai.cjs +1 -1
- package/dist/tools/fastapply/openai.cjs.map +1 -1
- package/dist/tools/fastapply/openai.js +4 -4
- package/dist/tools/fastapply/vercel.cjs +1 -1
- package/dist/tools/fastapply/vercel.cjs.map +1 -1
- package/dist/tools/fastapply/vercel.js +4 -4
- package/dist/tools/index.cjs +1 -1
- package/dist/tools/index.cjs.map +1 -1
- package/dist/tools/index.js +6 -6
- package/dist/tools/utils/resilience.cjs +1 -1
- package/dist/tools/utils/resilience.cjs.map +1 -1
- package/dist/tools/utils/resilience.js +2 -2
- package/dist/tools/warp_grep/agent/config.cjs +4 -3
- package/dist/tools/warp_grep/agent/config.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/config.d.ts +2 -1
- package/dist/tools/warp_grep/agent/config.js +1 -1
- package/dist/tools/warp_grep/agent/parser.cjs +52 -121
- package/dist/tools/warp_grep/agent/parser.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/parser.d.ts +12 -5
- package/dist/tools/warp_grep/agent/parser.js +7 -3
- package/dist/tools/warp_grep/agent/runner.cjs +335 -416
- package/dist/tools/warp_grep/agent/runner.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/runner.d.ts +6 -3
- package/dist/tools/warp_grep/agent/runner.js +5 -6
- package/dist/tools/warp_grep/agent/types.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/types.d.ts +22 -3
- package/dist/tools/warp_grep/anthropic.cjs +422 -434
- package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
- package/dist/tools/warp_grep/anthropic.js +8 -9
- package/dist/tools/warp_grep/client.cjs +422 -434
- package/dist/tools/warp_grep/client.cjs.map +1 -1
- package/dist/tools/warp_grep/client.js +7 -8
- package/dist/tools/warp_grep/gemini.cjs +422 -434
- package/dist/tools/warp_grep/gemini.cjs.map +1 -1
- package/dist/tools/warp_grep/gemini.js +7 -8
- package/dist/tools/warp_grep/gemini.js.map +1 -1
- package/dist/tools/warp_grep/harness.cjs +164 -176
- package/dist/tools/warp_grep/harness.cjs.map +1 -1
- package/dist/tools/warp_grep/harness.d.ts +17 -38
- package/dist/tools/warp_grep/harness.js +15 -14
- package/dist/tools/warp_grep/harness.js.map +1 -1
- package/dist/tools/warp_grep/index.cjs +441 -434
- 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 +10 -10
- package/dist/tools/warp_grep/openai.cjs +422 -434
- package/dist/tools/warp_grep/openai.cjs.map +1 -1
- package/dist/tools/warp_grep/openai.js +8 -9
- package/dist/tools/warp_grep/providers/local.cjs +43 -2
- package/dist/tools/warp_grep/providers/local.cjs.map +1 -1
- package/dist/tools/warp_grep/providers/local.d.ts +5 -1
- package/dist/tools/warp_grep/providers/local.js +2 -2
- package/dist/tools/warp_grep/providers/remote.cjs +32 -2
- package/dist/tools/warp_grep/providers/remote.cjs.map +1 -1
- package/dist/tools/warp_grep/providers/remote.d.ts +9 -1
- package/dist/tools/warp_grep/providers/remote.js +2 -2
- package/dist/tools/warp_grep/providers/types.cjs.map +1 -1
- package/dist/tools/warp_grep/providers/types.d.ts +14 -1
- package/dist/tools/warp_grep/vercel.cjs +422 -434
- package/dist/tools/warp_grep/vercel.cjs.map +1 -1
- package/dist/tools/warp_grep/vercel.js +8 -9
- package/dist/version.cjs +1 -1
- package/dist/version.cjs.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-DKODF3YG.js.map +0 -1
- package/dist/chunk-GNROKGNS.js +0 -409
- package/dist/chunk-GNROKGNS.js.map +0 -1
- package/dist/chunk-HZOTLGJH.js.map +0 -1
- package/dist/chunk-NF2QWJDY.js.map +0 -1
- package/dist/chunk-VCKJ22DX.js +0 -131
- package/dist/chunk-VCKJ22DX.js.map +0 -1
- package/dist/chunk-YIETFYCL.js.map +0 -1
- /package/dist/{chunk-BVVINERL.js.map → chunk-5FCXLQJU.js.map} +0 -0
- /package/dist/{chunk-CZ53BD6B.js.map → chunk-6CFKWZK3.js.map} +0 -0
- /package/dist/{chunk-RDISKUTQ.js.map → chunk-BAF33L6C.js.map} +0 -0
- /package/dist/{chunk-IBYOMW76.js.map → chunk-BXRJYLRS.js.map} +0 -0
- /package/dist/{chunk-A5BCEQSU.js.map → chunk-EPIOAODF.js.map} +0 -0
- /package/dist/{chunk-XX22ZYNY.js.map → chunk-G23BI5CQ.js.map} +0 -0
- /package/dist/{chunk-OHCUVHG6.js.map → chunk-GHPQYSSF.js.map} +0 -0
- /package/dist/{chunk-GFVUXQEC.js.map → chunk-GXCWKYGU.js.map} +0 -0
- /package/dist/{chunk-U7VQWPYU.js.map → chunk-GXM3G7Z4.js.map} +0 -0
- /package/dist/{chunk-W72JUWQY.js.map → chunk-HBIW2XV2.js.map} +0 -0
- /package/dist/{chunk-4YSNUXSF.js.map → chunk-HE7K2QNQ.js.map} +0 -0
- /package/dist/{chunk-FIVYDIHX.js.map → chunk-HYRHI2UL.js.map} +0 -0
- /package/dist/{chunk-Z5PGIDOK.js.map → chunk-IRWHN55G.js.map} +0 -0
- /package/dist/{chunk-YS2HX2AS.js.map → chunk-JMUAQQJU.js.map} +0 -0
- /package/dist/{chunk-BS3APHNI.js.map → chunk-JRBU4UNP.js.map} +0 -0
- /package/dist/{chunk-PFAYHEUS.js.map → chunk-MRPASJBX.js.map} +0 -0
- /package/dist/{chunk-UPU7DO2Y.js.map → chunk-MTJ3PR4M.js.map} +0 -0
- /package/dist/{chunk-TX7VXDUV.js.map → chunk-N7TTZIBK.js.map} +0 -0
- /package/dist/{chunk-KGGPSPYH.js.map → chunk-PX7ODEML.js.map} +0 -0
- /package/dist/{chunk-DHT77R7E.js.map → chunk-RZXS4ADX.js.map} +0 -0
- /package/dist/{chunk-HYHHHNJK.js.map → chunk-S54SPKX3.js.map} +0 -0
- /package/dist/{chunk-F6HIFE6U.js.map → chunk-SUE4GYA2.js.map} +0 -0
- /package/dist/{chunk-EOUG4EY4.js.map → chunk-VRV5UYTN.js.map} +0 -0
- /package/dist/{chunk-H73WKT7O.js.map → chunk-XL7R3XN5.js.map} +0 -0
|
@@ -20,136 +20,67 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// tools/warp_grep/agent/parser.ts
|
|
21
21
|
var parser_exports = {};
|
|
22
22
|
__export(parser_exports, {
|
|
23
|
-
|
|
23
|
+
extractPathFromCommand: () => extractPathFromCommand,
|
|
24
|
+
parseFinishFiles: () => parseFinishFiles,
|
|
25
|
+
parseReadLines: () => parseReadLines
|
|
24
26
|
});
|
|
25
27
|
module.exports = __toCommonJS(parser_exports);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
function parseReadLines(linesStr) {
|
|
29
|
+
const ranges = [];
|
|
30
|
+
for (const rangeStr of linesStr.split(",")) {
|
|
31
|
+
const trimmed = rangeStr.trim();
|
|
32
|
+
if (!trimmed) continue;
|
|
33
|
+
const parts = trimmed.split("-").map((v) => parseInt(v.trim(), 10));
|
|
34
|
+
if (parts.length >= 2 && Number.isFinite(parts[0]) && Number.isFinite(parts[1])) {
|
|
35
|
+
ranges.push([parts[0], parts[1]]);
|
|
36
|
+
} else if (Number.isFinite(parts[0])) {
|
|
37
|
+
ranges.push([parts[0], parts[0]]);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
if (ranges.length === 1) return { start: ranges[0][0], end: ranges[0][1] };
|
|
41
|
+
if (ranges.length > 1) return { lines: ranges };
|
|
42
|
+
return {};
|
|
29
43
|
}
|
|
30
|
-
function
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const paramRegex = /<parameter=([a-z_][a-z0-9_]*)>([\s\S]*?)<\/parameter>/gi;
|
|
40
|
-
let paramMatch;
|
|
41
|
-
while ((paramMatch = paramRegex.exec(body)) !== null) {
|
|
42
|
-
params[paramMatch[1].toLowerCase()] = paramMatch[2].trim();
|
|
44
|
+
function parseFinishFiles(filesStr) {
|
|
45
|
+
const files = [];
|
|
46
|
+
for (const line of filesStr.trim().split(/\s+/)) {
|
|
47
|
+
const trimmed = line.trim();
|
|
48
|
+
if (!trimmed) continue;
|
|
49
|
+
const colonIdx = trimmed.indexOf(":");
|
|
50
|
+
if (colonIdx === -1) {
|
|
51
|
+
files.push({ path: trimmed, lines: "*" });
|
|
52
|
+
continue;
|
|
43
53
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
if (!directPath && command) {
|
|
60
|
-
const tokens = command.trim().split(/\s+/);
|
|
61
|
-
const pathTokens = tokens.slice(1).filter((t) => !t.startsWith("-") && !t.startsWith("|") && !t.startsWith("\\("));
|
|
62
|
-
if (pathTokens.length > 0) {
|
|
63
|
-
dirPath = pathTokens[0];
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
tools.push({ name: "list_directory", arguments: { path: dirPath, pattern: params.pattern || null } });
|
|
67
|
-
} else if (funcName === "read") {
|
|
68
|
-
const filePath = params.path;
|
|
69
|
-
if (!filePath) continue;
|
|
70
|
-
const args = { path: filePath };
|
|
71
|
-
const linesStr = params.lines;
|
|
72
|
-
if (linesStr) {
|
|
73
|
-
const ranges = [];
|
|
74
|
-
for (const rangeStr of linesStr.split(",")) {
|
|
75
|
-
const trimmed = rangeStr.trim();
|
|
76
|
-
if (!trimmed) continue;
|
|
77
|
-
const [s, e] = trimmed.split("-").map((v) => parseInt(v.trim(), 10));
|
|
78
|
-
if (Number.isFinite(s) && Number.isFinite(e)) {
|
|
79
|
-
ranges.push([s, e]);
|
|
80
|
-
} else if (Number.isFinite(s)) {
|
|
81
|
-
ranges.push([s, s]);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
if (ranges.length === 1) {
|
|
85
|
-
args.start = ranges[0][0];
|
|
86
|
-
args.end = ranges[0][1];
|
|
87
|
-
} else if (ranges.length > 1) {
|
|
88
|
-
args.lines = ranges;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
tools.push({ name: "read", arguments: args });
|
|
92
|
-
} else if (funcName === "finish") {
|
|
93
|
-
if (params.result && !params.files) {
|
|
94
|
-
tools.push({ name: "finish", arguments: { files: [], textResult: params.result } });
|
|
95
|
-
continue;
|
|
96
|
-
}
|
|
97
|
-
const filesStr = params.files;
|
|
98
|
-
if (!filesStr) {
|
|
99
|
-
tools.push({ name: "finish", arguments: { files: [], textResult: "No relevant code found." } });
|
|
100
|
-
continue;
|
|
101
|
-
}
|
|
102
|
-
const files = [];
|
|
103
|
-
for (const line of filesStr.split("\n")) {
|
|
104
|
-
const trimmed = line.trim();
|
|
105
|
-
if (!trimmed) continue;
|
|
106
|
-
const colonIdx = trimmed.indexOf(":");
|
|
107
|
-
if (colonIdx === -1) {
|
|
108
|
-
files.push({ path: trimmed, lines: "*" });
|
|
109
|
-
} else {
|
|
110
|
-
const filePath = trimmed.slice(0, colonIdx);
|
|
111
|
-
const rangesPart = trimmed.slice(colonIdx + 1);
|
|
112
|
-
const ranges = [];
|
|
113
|
-
for (const rangeStr of rangesPart.split(",")) {
|
|
114
|
-
const rt = rangeStr.trim();
|
|
115
|
-
if (!rt || rt === "*") {
|
|
116
|
-
files.push({ path: filePath, lines: "*" });
|
|
117
|
-
break;
|
|
118
|
-
}
|
|
119
|
-
const [s, e] = rt.split("-").map((v) => parseInt(v.trim(), 10));
|
|
120
|
-
if (Number.isFinite(s) && Number.isFinite(e)) {
|
|
121
|
-
ranges.push([s, e]);
|
|
122
|
-
} else if (Number.isFinite(s)) {
|
|
123
|
-
ranges.push([s, s]);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
if (ranges.length > 0) {
|
|
127
|
-
files.push({ path: filePath, lines: ranges });
|
|
128
|
-
} else if (!files.some((f) => f.path === filePath)) {
|
|
129
|
-
files.push({ path: filePath, lines: "*" });
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
if (files.length > 0) {
|
|
134
|
-
tools.push({ name: "finish", arguments: { files } });
|
|
135
|
-
} else {
|
|
136
|
-
tools.push({ name: "finish", arguments: { files: [], textResult: filesStr } });
|
|
54
|
+
const filePath = trimmed.slice(0, colonIdx);
|
|
55
|
+
const rangesPart = trimmed.slice(colonIdx + 1);
|
|
56
|
+
if (!rangesPart.trim() || rangesPart.trim() === "*") {
|
|
57
|
+
files.push({ path: filePath, lines: "*" });
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
const ranges = [];
|
|
61
|
+
for (const rangeStr of rangesPart.split(",")) {
|
|
62
|
+
const rt = rangeStr.trim();
|
|
63
|
+
if (!rt) continue;
|
|
64
|
+
const parts = rt.split("-").map((v) => parseInt(v.trim(), 10));
|
|
65
|
+
if (parts.length >= 2 && Number.isFinite(parts[0]) && Number.isFinite(parts[1])) {
|
|
66
|
+
ranges.push([parts[0], parts[1]]);
|
|
67
|
+
} else if (Number.isFinite(parts[0])) {
|
|
68
|
+
ranges.push([parts[0], parts[0]]);
|
|
137
69
|
}
|
|
138
70
|
}
|
|
71
|
+
files.push({ path: filePath, lines: ranges.length > 0 ? ranges : "*" });
|
|
139
72
|
}
|
|
140
|
-
return
|
|
73
|
+
return files;
|
|
74
|
+
}
|
|
75
|
+
function extractPathFromCommand(command) {
|
|
76
|
+
const tokens = command.trim().split(/\s+/);
|
|
77
|
+
const pathTokens = tokens.slice(1).filter((t) => !t.startsWith("-") && !t.startsWith("|") && !t.startsWith("\\("));
|
|
78
|
+
return pathTokens[0] || ".";
|
|
141
79
|
}
|
|
142
|
-
var LLMResponseParser = class {
|
|
143
|
-
parse(text) {
|
|
144
|
-
if (typeof text !== "string") {
|
|
145
|
-
throw new TypeError("Command text must be a string.");
|
|
146
|
-
}
|
|
147
|
-
const withoutThink = text.replace(/<think>[\s\S]*?<\/think>/gi, "");
|
|
148
|
-
return parseQwen3ToolCalls(withoutThink);
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
80
|
// Annotate the CommonJS export names for ESM import in node:
|
|
152
81
|
0 && (module.exports = {
|
|
153
|
-
|
|
82
|
+
extractPathFromCommand,
|
|
83
|
+
parseFinishFiles,
|
|
84
|
+
parseReadLines
|
|
154
85
|
});
|
|
155
86
|
//# sourceMappingURL=parser.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../tools/warp_grep/agent/parser.ts"],"sourcesContent":["// Parses assistant lines into structured tool calls (Qwen3-Coder-Next format only)\nimport type { ToolCall } from './types.js';\n\nconst VALID_COMMANDS = ['list_directory', 'ripgrep', 'read', 'finish'] as const;\ntype ValidCommand = typeof VALID_COMMANDS[number];\n\nfunction isValidCommand(name: string): name is ValidCommand {\n return VALID_COMMANDS.includes(name as ValidCommand);\n}\n\n/**\n * Parse Qwen3-Coder-Next native XML tool call format:\n * <tool_call><function=NAME><parameter=KEY>VALUE</parameter></function></tool_call>\n */\nfunction parseQwen3ToolCalls(text: string): ToolCall[] {\n const tools: ToolCall[] = [];\n const toolCallRegex = /<tool_call>\\s*<function=([a-z_][a-z0-9_]*)>([\\s\\S]*?)<\\/function>\\s*<\\/tool_call>/gi;\n let match;\n\n while ((match = toolCallRegex.exec(text)) !== null) {\n const funcName = match[1].toLowerCase();\n const body = match[2];\n\n if (!isValidCommand(funcName)) continue;\n\n // Extract all <parameter=KEY>VALUE</parameter> pairs\n const params: Record<string, string> = {};\n const paramRegex = /<parameter=([a-z_][a-z0-9_]*)>([\\s\\S]*?)<\\/parameter>/gi;\n let paramMatch;\n while ((paramMatch = paramRegex.exec(body)) !== null) {\n params[paramMatch[1].toLowerCase()] = paramMatch[2].trim();\n }\n\n if (funcName === 'ripgrep') {\n const pattern = params.pattern;\n if (!pattern) continue;\n const args: Record<string, unknown> = {\n pattern,\n path: params.path || '.',\n ...(params.glob && { glob: params.glob }),\n ...(params.context_lines && { context_lines: parseInt(params.context_lines, 10) }),\n ...(params.case_sensitive && { case_sensitive: params.case_sensitive === 'true' }),\n };\n tools.push({ name: 'grep', arguments: args });\n } else if (funcName === 'list_directory') {\n // Extract path from command parameter (best effort: look for target directory)\n const command = params.command;\n const directPath = params.path;\n let dirPath = directPath || '.';\n if (!directPath && command) {\n // Try to extract a meaningful path from the command string\n // Common patterns: \"find <path> ...\", \"ls <path>\", \"ls -la <path>\"\n // Skip the command name and any flags (tokens starting with -, \\(, |)\n const tokens = command.trim().split(/\\s+/);\n const pathTokens = tokens.slice(1).filter(t => !t.startsWith('-') && !t.startsWith('|') && !t.startsWith('\\\\('));\n if (pathTokens.length > 0) {\n dirPath = pathTokens[0];\n }\n }\n tools.push({ name: 'list_directory', arguments: { path: dirPath, pattern: params.pattern || null } });\n } else if (funcName === 'read') {\n const filePath = params.path;\n if (!filePath) continue;\n const args: Record<string, unknown> = { path: filePath };\n const linesStr = params.lines;\n if (linesStr) {\n const ranges: Array<[number, number]> = [];\n for (const rangeStr of linesStr.split(',')) {\n const trimmed = rangeStr.trim();\n if (!trimmed) continue;\n const [s, e] = trimmed.split('-').map(v => parseInt(v.trim(), 10));\n if (Number.isFinite(s) && Number.isFinite(e)) {\n ranges.push([s, e]);\n } else if (Number.isFinite(s)) {\n ranges.push([s, s]);\n }\n }\n if (ranges.length === 1) {\n args.start = ranges[0][0];\n args.end = ranges[0][1];\n } else if (ranges.length > 1) {\n args.lines = ranges;\n }\n }\n tools.push({ name: 'read', arguments: args });\n } else if (funcName === 'finish') {\n // If the model used \"result\" parameter instead of \"files\", treat as text-only finish\n if (params.result && !params.files) {\n tools.push({ name: 'finish', arguments: { files: [], textResult: params.result } });\n continue;\n }\n const filesStr = params.files;\n if (!filesStr) {\n tools.push({ name: 'finish', arguments: { files: [], textResult: 'No relevant code found.' } });\n continue;\n }\n // Parse flat string format: \"path:start-end\\npath\" or \"path\\npath:start-end\"\n const files: Array<{ path: string; lines: '*' | Array<[number, number]> }> = [];\n for (const line of filesStr.split('\\n')) {\n const trimmed = line.trim();\n if (!trimmed) continue;\n const colonIdx = trimmed.indexOf(':');\n if (colonIdx === -1) {\n // No colon — whole file\n files.push({ path: trimmed, lines: '*' });\n } else {\n const filePath = trimmed.slice(0, colonIdx);\n const rangesPart = trimmed.slice(colonIdx + 1);\n const ranges: Array<[number, number]> = [];\n for (const rangeStr of rangesPart.split(',')) {\n const rt = rangeStr.trim();\n if (!rt || rt === '*') {\n // Whole file marker\n files.push({ path: filePath, lines: '*' });\n break;\n }\n const [s, e] = rt.split('-').map(v => parseInt(v.trim(), 10));\n if (Number.isFinite(s) && Number.isFinite(e)) {\n ranges.push([s, e]);\n } else if (Number.isFinite(s)) {\n // Single line\n ranges.push([s, s]);\n }\n }\n if (ranges.length > 0) {\n files.push({ path: filePath, lines: ranges });\n } else if (!files.some(f => f.path === filePath)) {\n files.push({ path: filePath, lines: '*' });\n }\n }\n }\n if (files.length > 0) {\n tools.push({ name: 'finish', arguments: { files } });\n } else {\n tools.push({ name: 'finish', arguments: { files: [], textResult: filesStr } });\n }\n }\n }\n\n return tools;\n}\n\nexport class LLMResponseParser {\n parse(text: string): ToolCall[] {\n if (typeof text !== 'string') {\n throw new TypeError('Command text must be a string.');\n }\n\n // Strip <think> blocks\n const withoutThink = text.replace(/<think>[\\s\\S]*?<\\/think>/gi, '');\n\n // Parse Qwen3 <tool_call><function=...> format\n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,KAAK,EAAE,MAAM,UAAU,OAAO,OAAO,CAAC;AAAA,UAC9C,WAAW,CAAC,MAAM,KAAK,OAAK,EAAE,SAAS,QAAQ,GAAG;AAChD,kBAAM,KAAK,EAAE,MAAM,UAAU,OAAO,IAAI,CAAC;AAAA,UAC3C;AAAA,QACF;AAAA,MACF;AACA,UAAI,MAAM,SAAS,GAAG;AACpB,cAAM,KAAK,EAAE,MAAM,UAAU,WAAW,EAAE,MAAM,EAAE,CAAC;AAAA,MACrD,OAAO;AACL,cAAM,KAAK,EAAE,MAAM,UAAU,WAAW,EAAE,OAAO,CAAC,GAAG,YAAY,SAAS,EAAE,CAAC;AAAA,MAC/E;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;AAEO,IAAM,oBAAN,MAAwB;AAAA,EAC7B,MAAM,MAA0B;AAC9B,QAAI,OAAO,SAAS,UAAU;AAC5B,YAAM,IAAI,UAAU,gCAAgC;AAAA,IACtD;AAGA,UAAM,eAAe,KAAK,QAAQ,8BAA8B,EAAE;AAGlE,WAAO,oBAAoB,YAAY;AAAA,EACzC;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../../tools/warp_grep/agent/parser.ts"],"sourcesContent":["// Helpers for parsing string-format tool arguments from OpenAI tool calls\n\nimport type { FinishFileSpec } from './types.js';\n\n/** Parse \"lines\" string from read tool (e.g. \"1-50\" or \"1-20,45-80\") into structured args */\nexport function parseReadLines(linesStr: string): { start?: number; end?: number; lines?: Array<[number, number]> } {\n const ranges: Array<[number, number]> = [];\n for (const rangeStr of linesStr.split(',')) {\n const trimmed = rangeStr.trim();\n if (!trimmed) continue;\n const parts = trimmed.split('-').map(v => parseInt(v.trim(), 10));\n if (parts.length >= 2 && Number.isFinite(parts[0]) && Number.isFinite(parts[1])) {\n ranges.push([parts[0], parts[1]]);\n } else if (Number.isFinite(parts[0])) {\n ranges.push([parts[0], parts[0]]);\n }\n }\n if (ranges.length === 1) return { start: ranges[0][0], end: ranges[0][1] };\n if (ranges.length > 1) return { lines: ranges };\n return {};\n}\n\n/** Parse \"files\" string from finish tool (e.g. \"src/auth.py:1-50\\nsrc/user.py\" or space-separated) into FinishFileSpec[] */\nexport function parseFinishFiles(filesStr: string): FinishFileSpec[] {\n const files: FinishFileSpec[] = [];\n // Split on whitespace (training uses space-separated, SDK also supports newlines)\n for (const line of filesStr.trim().split(/\\s+/)) {\n const trimmed = line.trim();\n if (!trimmed) continue;\n const colonIdx = trimmed.indexOf(':');\n if (colonIdx === -1) {\n files.push({ path: trimmed, lines: '*' });\n continue;\n }\n const filePath = trimmed.slice(0, colonIdx);\n const rangesPart = trimmed.slice(colonIdx + 1);\n if (!rangesPart.trim() || rangesPart.trim() === '*') {\n files.push({ path: filePath, lines: '*' });\n continue;\n }\n const ranges: Array<[number, number]> = [];\n for (const rangeStr of rangesPart.split(',')) {\n const rt = rangeStr.trim();\n if (!rt) continue;\n const parts = rt.split('-').map(v => parseInt(v.trim(), 10));\n if (parts.length >= 2 && Number.isFinite(parts[0]) && Number.isFinite(parts[1])) {\n ranges.push([parts[0], parts[1]]);\n } else if (Number.isFinite(parts[0])) {\n ranges.push([parts[0], parts[0]]);\n }\n }\n files.push({ path: filePath, lines: ranges.length > 0 ? ranges : '*' });\n }\n return files;\n}\n\n/** Extract directory path from a list_directory command string (e.g. \"ls -la src/\" → \"src/\") */\nexport function extractPathFromCommand(command: string): string {\n const tokens = command.trim().split(/\\s+/);\n const pathTokens = tokens.slice(1).filter(t => !t.startsWith('-') && !t.startsWith('|') && !t.startsWith('\\\\('));\n return pathTokens[0] || '.';\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,SAAS,eAAe,UAAqF;AAClH,QAAM,SAAkC,CAAC;AACzC,aAAW,YAAY,SAAS,MAAM,GAAG,GAAG;AAC1C,UAAM,UAAU,SAAS,KAAK;AAC9B,QAAI,CAAC,QAAS;AACd,UAAM,QAAQ,QAAQ,MAAM,G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,GAAG,EAAE,IAAI,OAAK,SAAS,EAAE,KAAK,GAAG,EAAE,CAAC;AAC3D,UAAI,MAAM,UAAU,KAAK,OAAO,SAAS,MAAM,CAAC,CAAC,KAAK,OAAO,SAAS,MAAM,CAAC,CAAC,GAAG;AAC/E,eAAO,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;AAAA,MAClC,WAAW,OAAO,SAAS,MAAM,CAAC,CAAC,GAAG;AACpC,eAAO,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;AAAA,MAClC;AAAA,IACF;AACA,UAAM,KAAK,EAAE,MAAM,UAAU,OAAO,OAAO,SAAS,IAAI,SAAS,IAAI,CAAC;AAAA,EACxE;AACA,SAAO;AACT;AAGO,SAAS,uBAAuB,SAAyB;AAC9D,QAAM,SAAS,QAAQ,KAAK,EAAE,MAAM,KAAK;AACzC,QAAM,aAAa,OAAO,MAAM,CAAC,EAAE,OAAO,OAAK,CAAC,EAAE,WAAW,GAAG,KAAK,CAAC,EAAE,WAAW,GAAG,KAAK,CAAC,EAAE,WAAW,KAAK,CAAC;AAC/G,SAAO,WAAW,CAAC,KAAK;AAC1B;","names":[]}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FinishFileSpec } from './types.js';
|
|
2
2
|
import '../../utils/resilience.js';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
/** Parse "lines" string from read tool (e.g. "1-50" or "1-20,45-80") into structured args */
|
|
5
|
+
declare function parseReadLines(linesStr: string): {
|
|
6
|
+
start?: number;
|
|
7
|
+
end?: number;
|
|
8
|
+
lines?: Array<[number, number]>;
|
|
9
|
+
};
|
|
10
|
+
/** Parse "files" string from finish tool (e.g. "src/auth.py:1-50\nsrc/user.py" or space-separated) into FinishFileSpec[] */
|
|
11
|
+
declare function parseFinishFiles(filesStr: string): FinishFileSpec[];
|
|
12
|
+
/** Extract directory path from a list_directory command string (e.g. "ls -la src/" → "src/") */
|
|
13
|
+
declare function extractPathFromCommand(command: string): string;
|
|
7
14
|
|
|
8
|
-
export {
|
|
15
|
+
export { extractPathFromCommand, parseFinishFiles, parseReadLines };
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
extractPathFromCommand,
|
|
3
|
+
parseFinishFiles,
|
|
4
|
+
parseReadLines
|
|
5
|
+
} from "../../../chunk-CMSHXALI.js";
|
|
4
6
|
import "../../../chunk-PZ5AY32C.js";
|
|
5
7
|
export {
|
|
6
|
-
|
|
8
|
+
extractPathFromCommand,
|
|
9
|
+
parseFinishFiles,
|
|
10
|
+
parseReadLines
|
|
7
11
|
};
|
|
8
12
|
//# sourceMappingURL=parser.js.map
|