@morphllm/morphsdk 0.2.75 → 0.2.80

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.
Files changed (65) hide show
  1. package/dist/{chunk-IYLEB6BY.js → chunk-4R3ALD5C.js} +3 -3
  2. package/dist/{chunk-NGF2VIQV.js → chunk-5PGRBWJX.js} +3 -3
  3. package/dist/{chunk-RRWN62VU.js → chunk-6OII5QOW.js} +2 -2
  4. package/dist/{chunk-Q5AHGIQO.js → chunk-FMLHRJDF.js} +3 -1
  5. package/dist/{chunk-Q5AHGIQO.js.map → chunk-FMLHRJDF.js.map} +1 -1
  6. package/dist/{chunk-B5A4XLSQ.js → chunk-FY32COVL.js} +1 -1
  7. package/dist/{chunk-B5A4XLSQ.js.map → chunk-FY32COVL.js.map} +1 -1
  8. package/dist/{chunk-QIG7YPFW.js → chunk-HBIDSKIQ.js} +14 -3
  9. package/dist/chunk-HBIDSKIQ.js.map +1 -0
  10. package/dist/{chunk-KEHWEBFQ.js → chunk-LM62QCGS.js} +5 -5
  11. package/dist/{chunk-POVU2CPK.js → chunk-ND7IFSMR.js} +2 -2
  12. package/dist/{chunk-4WJSTOHP.js → chunk-QL5SMQ73.js} +3 -3
  13. package/dist/{chunk-SMGZ6A64.js → chunk-YPKNMYD4.js} +17 -1
  14. package/dist/chunk-YPKNMYD4.js.map +1 -0
  15. package/dist/client.cjs +28 -1
  16. package/dist/client.cjs.map +1 -1
  17. package/dist/client.js +9 -9
  18. package/dist/index.cjs +28 -1
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.js +10 -10
  21. package/dist/tools/warp_grep/agent/prompt.cjs +2 -0
  22. package/dist/tools/warp_grep/agent/prompt.cjs.map +1 -1
  23. package/dist/tools/warp_grep/agent/prompt.d.ts +1 -1
  24. package/dist/tools/warp_grep/agent/prompt.js +1 -1
  25. package/dist/tools/warp_grep/agent/runner.cjs +2 -0
  26. package/dist/tools/warp_grep/agent/runner.cjs.map +1 -1
  27. package/dist/tools/warp_grep/agent/runner.js +2 -2
  28. package/dist/tools/warp_grep/anthropic.cjs +28 -1
  29. package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
  30. package/dist/tools/warp_grep/anthropic.js +6 -6
  31. package/dist/tools/warp_grep/client.cjs +28 -1
  32. package/dist/tools/warp_grep/client.cjs.map +1 -1
  33. package/dist/tools/warp_grep/client.js +5 -5
  34. package/dist/tools/warp_grep/gemini.cjs +28 -1
  35. package/dist/tools/warp_grep/gemini.cjs.map +1 -1
  36. package/dist/tools/warp_grep/gemini.js +5 -5
  37. package/dist/tools/warp_grep/harness.cjs +28 -1
  38. package/dist/tools/warp_grep/harness.cjs.map +1 -1
  39. package/dist/tools/warp_grep/harness.js +3 -3
  40. package/dist/tools/warp_grep/index.cjs +30 -1
  41. package/dist/tools/warp_grep/index.cjs.map +1 -1
  42. package/dist/tools/warp_grep/index.d.ts +1 -0
  43. package/dist/tools/warp_grep/index.js +9 -6
  44. package/dist/tools/warp_grep/openai.cjs +28 -1
  45. package/dist/tools/warp_grep/openai.cjs.map +1 -1
  46. package/dist/tools/warp_grep/openai.js +6 -6
  47. package/dist/tools/warp_grep/providers/local.cjs +26 -1
  48. package/dist/tools/warp_grep/providers/local.cjs.map +1 -1
  49. package/dist/tools/warp_grep/providers/local.js +2 -2
  50. package/dist/tools/warp_grep/utils/paths.cjs +17 -0
  51. package/dist/tools/warp_grep/utils/paths.cjs.map +1 -1
  52. package/dist/tools/warp_grep/utils/paths.d.ts +13 -1
  53. package/dist/tools/warp_grep/utils/paths.js +3 -1
  54. package/dist/tools/warp_grep/vercel.cjs +28 -1
  55. package/dist/tools/warp_grep/vercel.cjs.map +1 -1
  56. package/dist/tools/warp_grep/vercel.js +6 -6
  57. package/package.json +1 -1
  58. package/dist/chunk-QIG7YPFW.js.map +0 -1
  59. package/dist/chunk-SMGZ6A64.js.map +0 -1
  60. /package/dist/{chunk-IYLEB6BY.js.map → chunk-4R3ALD5C.js.map} +0 -0
  61. /package/dist/{chunk-NGF2VIQV.js.map → chunk-5PGRBWJX.js.map} +0 -0
  62. /package/dist/{chunk-RRWN62VU.js.map → chunk-6OII5QOW.js.map} +0 -0
  63. /package/dist/{chunk-KEHWEBFQ.js.map → chunk-LM62QCGS.js.map} +0 -0
  64. /package/dist/{chunk-POVU2CPK.js.map → chunk-ND7IFSMR.js.map} +0 -0
  65. /package/dist/{chunk-4WJSTOHP.js.map → chunk-QL5SMQ73.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  warpGrepInputSchema
3
- } from "../../chunk-B5A4XLSQ.js";
3
+ } from "../../chunk-FY32COVL.js";
4
4
  import {
5
5
  WARP_GREP_DESCRIPTION,
6
6
  WARP_GREP_TOOL_NAME
@@ -10,10 +10,10 @@ import {
10
10
  executeToolCall,
11
11
  executeWarpGrep,
12
12
  formatResult
13
- } from "../../chunk-NGF2VIQV.js";
13
+ } from "../../chunk-5PGRBWJX.js";
14
14
  import {
15
15
  runWarpGrep
16
- } from "../../chunk-RRWN62VU.js";
16
+ } from "../../chunk-6OII5QOW.js";
17
17
  import {
18
18
  RemoteCommandsProvider
19
19
  } from "../../chunk-26QXQFLZ.js";
@@ -29,12 +29,14 @@ import "../../chunk-5QRN3JNB.js";
29
29
  import {
30
30
  SYSTEM_PROMPT,
31
31
  getSystemPrompt
32
- } from "../../chunk-Q5AHGIQO.js";
32
+ } from "../../chunk-FMLHRJDF.js";
33
33
  import {
34
34
  LocalRipgrepProvider
35
- } from "../../chunk-QIG7YPFW.js";
35
+ } from "../../chunk-HBIDSKIQ.js";
36
36
  import "../../chunk-G2RSY56Q.js";
37
- import "../../chunk-SMGZ6A64.js";
37
+ import {
38
+ fixPathRepetition
39
+ } from "../../chunk-YPKNMYD4.js";
38
40
  import "../../chunk-TPP2UGQP.js";
39
41
  import "../../chunk-XT5ZO6ES.js";
40
42
  import "../../chunk-4VWJFZVS.js";
@@ -48,6 +50,7 @@ export {
48
50
  WarpGrepClient,
49
51
  executeToolCall,
50
52
  executeWarpGrep,
53
+ fixPathRepetition,
51
54
  formatResult,
52
55
  getSystemPrompt,
53
56
  normalizeFinishFiles,
@@ -319,6 +319,8 @@ I think I have a rough idea, but this is my last turn so I must call the finish
319
319
  No commentary outside \`<think>\`. No explanations after tool calls.
320
320
  </output_format>
321
321
 
322
+ use as all 8 tool calls to be optimal
323
+
322
324
  <finishing_requirements>
323
325
  When calling \`finish\`:
324
326
  - Include the import section (typically lines 1-20) of each file
@@ -1184,6 +1186,21 @@ function isSymlink(p) {
1184
1186
  return false;
1185
1187
  }
1186
1188
  }
1189
+ function fixPathRepetition(fullPath) {
1190
+ const segments = fullPath.split(import_path3.default.sep).filter(Boolean);
1191
+ if (segments.length < 2) return null;
1192
+ for (let len = Math.floor(segments.length / 2); len >= 1; len--) {
1193
+ for (let i = 0; i <= segments.length - 2 * len; i++) {
1194
+ const first = segments.slice(i, i + len);
1195
+ const second = segments.slice(i + len, i + 2 * len);
1196
+ if (first.every((seg, idx) => seg === second[idx])) {
1197
+ const fixed = [...segments.slice(0, i), ...segments.slice(i + len)];
1198
+ return import_path3.default.sep + fixed.join(import_path3.default.sep);
1199
+ }
1200
+ }
1201
+ }
1202
+ return null;
1203
+ }
1187
1204
  function isTextualFile(filePath, maxBytes = 2e6) {
1188
1205
  try {
1189
1206
  const st = import_fs.default.statSync(filePath);
@@ -1366,7 +1383,17 @@ Details: ${res.stderr}` : ""}`
1366
1383
  error: `[PATH ERROR] ${err instanceof Error ? err.message : String(err)}`
1367
1384
  };
1368
1385
  }
1369
- const stat = await import_promises2.default.stat(abs).catch(() => null);
1386
+ let stat = await import_promises2.default.stat(abs).catch(() => null);
1387
+ if (!stat || !stat.isFile()) {
1388
+ const fixedPath = fixPathRepetition(abs);
1389
+ if (fixedPath) {
1390
+ const fixedStat = await import_promises2.default.stat(fixedPath).catch(() => null);
1391
+ if (fixedStat?.isFile()) {
1392
+ abs = fixedPath;
1393
+ stat = fixedStat;
1394
+ }
1395
+ }
1396
+ }
1370
1397
  if (!stat || !stat.isFile()) {
1371
1398
  return {
1372
1399
  lines: [],