@morphllm/morphsdk 0.2.62 → 0.2.63

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 (59) hide show
  1. package/dist/{chunk-Y7CPJGLU.js → chunk-3SHLMXBV.js} +4 -4
  2. package/dist/{chunk-Y7CPJGLU.js.map → chunk-3SHLMXBV.js.map} +1 -1
  3. package/dist/{chunk-GZ7TJ7UB.js → chunk-3WMLFUAR.js} +2 -2
  4. package/dist/{chunk-3M4DOG6N.js → chunk-5QRN3JNB.js} +9 -9
  5. package/dist/chunk-5QRN3JNB.js.map +1 -0
  6. package/dist/{chunk-6Y5JB4JC.js → chunk-DCIUCDWJ.js} +15 -7
  7. package/dist/{chunk-6Y5JB4JC.js.map → chunk-DCIUCDWJ.js.map} +1 -1
  8. package/dist/{chunk-LHKFRPUO.js → chunk-GJ573YH3.js} +2 -2
  9. package/dist/{chunk-Z75HCPIE.js → chunk-GM5VR33N.js} +2 -2
  10. package/dist/{chunk-44GS4GJJ.js → chunk-PNIQNTXR.js} +2 -2
  11. package/dist/{chunk-XWSKUQVQ.js → chunk-T6677HCA.js} +5 -5
  12. package/dist/{chunk-S3RCM32V.js → chunk-TTBXKDCT.js} +2 -2
  13. package/dist/client.cjs +20 -15
  14. package/dist/client.cjs.map +1 -1
  15. package/dist/client.js +8 -8
  16. package/dist/{finish-kXAcUJyB.d.ts → finish-pPJfB0uO.d.ts} +2 -2
  17. package/dist/index.cjs +20 -15
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.js +9 -9
  20. package/dist/tools/warp_grep/agent/parser.cjs +8 -8
  21. package/dist/tools/warp_grep/agent/parser.cjs.map +1 -1
  22. package/dist/tools/warp_grep/agent/parser.js +1 -1
  23. package/dist/tools/warp_grep/agent/runner.cjs +20 -15
  24. package/dist/tools/warp_grep/agent/runner.cjs.map +1 -1
  25. package/dist/tools/warp_grep/agent/runner.js +3 -3
  26. package/dist/tools/warp_grep/agent/types.cjs.map +1 -1
  27. package/dist/tools/warp_grep/agent/types.d.ts +2 -2
  28. package/dist/tools/warp_grep/anthropic.cjs +20 -15
  29. package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
  30. package/dist/tools/warp_grep/anthropic.js +5 -5
  31. package/dist/tools/warp_grep/client.cjs +20 -15
  32. package/dist/tools/warp_grep/client.cjs.map +1 -1
  33. package/dist/tools/warp_grep/client.js +4 -4
  34. package/dist/tools/warp_grep/gemini.cjs +20 -15
  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 +22 -14
  38. package/dist/tools/warp_grep/harness.cjs.map +1 -1
  39. package/dist/tools/warp_grep/harness.d.ts +1 -1
  40. package/dist/tools/warp_grep/harness.js +2 -2
  41. package/dist/tools/warp_grep/harness.js.map +1 -1
  42. package/dist/tools/warp_grep/index.cjs +23 -15
  43. package/dist/tools/warp_grep/index.cjs.map +1 -1
  44. package/dist/tools/warp_grep/index.d.ts +1 -1
  45. package/dist/tools/warp_grep/index.js +8 -8
  46. package/dist/tools/warp_grep/openai.cjs +20 -15
  47. package/dist/tools/warp_grep/openai.cjs.map +1 -1
  48. package/dist/tools/warp_grep/openai.js +5 -5
  49. package/dist/tools/warp_grep/vercel.cjs +20 -15
  50. package/dist/tools/warp_grep/vercel.cjs.map +1 -1
  51. package/dist/tools/warp_grep/vercel.js +5 -5
  52. package/package.json +1 -1
  53. package/dist/chunk-3M4DOG6N.js.map +0 -1
  54. /package/dist/{chunk-GZ7TJ7UB.js.map → chunk-3WMLFUAR.js.map} +0 -0
  55. /package/dist/{chunk-LHKFRPUO.js.map → chunk-GJ573YH3.js.map} +0 -0
  56. /package/dist/{chunk-Z75HCPIE.js.map → chunk-GM5VR33N.js.map} +0 -0
  57. /package/dist/{chunk-44GS4GJJ.js.map → chunk-PNIQNTXR.js.map} +0 -0
  58. /package/dist/{chunk-XWSKUQVQ.js.map → chunk-T6677HCA.js.map} +0 -0
  59. /package/dist/{chunk-S3RCM32V.js.map → chunk-TTBXKDCT.js.map} +0 -0
@@ -6,7 +6,7 @@ export { RemoteCommandsProvider } from './providers/remote.js';
6
6
  export { runWarpGrep } from './agent/runner.js';
7
7
  export { AgentRunResult, ChatMessage, SessionConfig } from './agent/types.js';
8
8
  export { SYSTEM_PROMPT as WARP_GREP_SYSTEM_PROMPT, getSystemPrompt } from './agent/prompt.js';
9
- export { n as normalizeFinishFiles, r as readFinishFiles, t as toolGrep, b as toolListDirectory, a as toolRead } from '../../finish-kXAcUJyB.js';
9
+ export { n as normalizeFinishFiles, r as readFinishFiles, t as toolGrep, b as toolListDirectory, a as toolRead } from '../../finish-pPJfB0uO.js';
10
10
  export { a as anthropic } from '../../anthropic-BC-AMEIN.js';
11
11
  export { o as openai } from '../../openai-Beb9escY.js';
12
12
  export { v as vercel } from '../../vercel-Bo84tpBe.js';
@@ -1,16 +1,16 @@
1
1
  import "../../chunk-ISWL67SF.js";
2
2
  import {
3
3
  gemini_exports
4
- } from "../../chunk-44GS4GJJ.js";
4
+ } from "../../chunk-PNIQNTXR.js";
5
5
  import {
6
6
  anthropic_exports
7
- } from "../../chunk-Z75HCPIE.js";
7
+ } from "../../chunk-GM5VR33N.js";
8
8
  import {
9
9
  openai_exports
10
- } from "../../chunk-GZ7TJ7UB.js";
10
+ } from "../../chunk-3WMLFUAR.js";
11
11
  import {
12
12
  vercel_exports
13
- } from "../../chunk-LHKFRPUO.js";
13
+ } from "../../chunk-GJ573YH3.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-S3RCM32V.js";
23
+ } from "../../chunk-TTBXKDCT.js";
24
24
  import {
25
25
  runWarpGrep
26
- } from "../../chunk-Y7CPJGLU.js";
26
+ } from "../../chunk-3SHLMXBV.js";
27
27
  import {
28
28
  RemoteCommandsProvider
29
29
  } from "../../chunk-527P5X2E.js";
@@ -33,9 +33,9 @@ import {
33
33
  toolGrep,
34
34
  toolListDirectory,
35
35
  toolRead
36
- } from "../../chunk-6Y5JB4JC.js";
36
+ } from "../../chunk-DCIUCDWJ.js";
37
37
  import "../../chunk-APP75CBN.js";
38
- import "../../chunk-3M4DOG6N.js";
38
+ import "../../chunk-5QRN3JNB.js";
39
39
  import {
40
40
  SYSTEM_PROMPT,
41
41
  getSystemPrompt
@@ -417,19 +417,19 @@ function parseNestedXmlTools(text) {
417
417
  const filePath = getXmlElementText(fileContent, "path");
418
418
  const linesStr = getXmlElementText(fileContent, "lines");
419
419
  if (filePath && linesStr) {
420
- const ranges = [];
421
- for (const rangeStr of linesStr.split(",")) {
422
- if (rangeStr.trim() === "*") {
423
- ranges.push([1, 999999]);
424
- } else {
420
+ if (linesStr.trim() === "*") {
421
+ files.push({ path: filePath, lines: "*" });
422
+ } else {
423
+ const ranges = [];
424
+ for (const rangeStr of linesStr.split(",")) {
425
425
  const [s, e] = rangeStr.split("-").map((v) => parseInt(v.trim(), 10));
426
426
  if (Number.isFinite(s) && Number.isFinite(e)) {
427
427
  ranges.push([s, e]);
428
428
  }
429
429
  }
430
- }
431
- if (ranges.length > 0) {
432
- files.push({ path: filePath, lines: ranges });
430
+ if (ranges.length > 0) {
431
+ files.push({ path: filePath, lines: ranges });
432
+ }
433
433
  }
434
434
  }
435
435
  }
@@ -660,13 +660,18 @@ async function toolListDirectory(provider, args) {
660
660
  async function readFinishFiles(repoRoot, files, reader) {
661
661
  const out = [];
662
662
  for (const f of files) {
663
- const ranges = mergeRanges(f.lines);
664
- const chunks = [];
665
- for (const [s, e] of ranges) {
666
- const lines = await reader(f.path, s, e);
667
- chunks.push(lines.join("\n"));
663
+ if (f.lines === "*") {
664
+ const lines = await reader(f.path);
665
+ out.push({ path: f.path, ranges: "*", content: lines.join("\n") });
666
+ } else {
667
+ const ranges = mergeRanges(f.lines);
668
+ const chunks = [];
669
+ for (const [s, e] of ranges) {
670
+ const lines = await reader(f.path, s, e);
671
+ chunks.push(lines.join("\n"));
672
+ }
673
+ out.push({ path: f.path, ranges, content: chunks.join("\n") });
668
674
  }
669
- out.push({ path: f.path, ranges, content: chunks.join("\n") });
670
675
  }
671
676
  return out;
672
677
  }
@@ -1067,7 +1072,7 @@ async function runWarpGrep(config) {
1067
1072
  }
1068
1073
  const parts = ["Relevant context found:"];
1069
1074
  for (const f of finishMeta.files) {
1070
- const ranges = f.lines.map(([s, e]) => `${s}-${e}`).join(", ");
1075
+ const ranges = f.lines === "*" ? "*" : f.lines.map(([s, e]) => `${s}-${e}`).join(", ");
1071
1076
  parts.push(`- ${f.path}: ${ranges}`);
1072
1077
  }
1073
1078
  const payload = parts.join("\n");