@morphllm/morphsdk 0.2.83 → 0.2.84

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 (46) hide show
  1. package/dist/{chunk-RL4JBZ3T.js → chunk-262WRPS5.js} +2 -2
  2. package/dist/{chunk-HRK53IKL.js → chunk-D4EQYM6O.js} +2 -2
  3. package/dist/{chunk-P2O5JKE5.js → chunk-KRDIR7GG.js} +17 -8
  4. package/dist/chunk-KRDIR7GG.js.map +1 -0
  5. package/dist/{chunk-QOYI77CN.js → chunk-LF2X6YNP.js} +2 -2
  6. package/dist/{chunk-LXG37353.js → chunk-LX2WNS3L.js} +2 -2
  7. package/dist/{chunk-S27A4NQM.js → chunk-MJ7JODAY.js} +2 -2
  8. package/dist/{chunk-HPR6BJA7.js → chunk-N3RNM4A4.js} +5 -5
  9. package/dist/client.cjs +16 -7
  10. package/dist/client.cjs.map +1 -1
  11. package/dist/client.js +7 -7
  12. package/dist/index.cjs +16 -7
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.js +7 -7
  15. package/dist/tools/warp_grep/agent/runner.cjs +16 -7
  16. package/dist/tools/warp_grep/agent/runner.cjs.map +1 -1
  17. package/dist/tools/warp_grep/agent/runner.js +2 -2
  18. package/dist/tools/warp_grep/anthropic.cjs +16 -7
  19. package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
  20. package/dist/tools/warp_grep/anthropic.js +4 -4
  21. package/dist/tools/warp_grep/client.cjs +16 -7
  22. package/dist/tools/warp_grep/client.cjs.map +1 -1
  23. package/dist/tools/warp_grep/client.js +3 -3
  24. package/dist/tools/warp_grep/gemini.cjs +16 -7
  25. package/dist/tools/warp_grep/gemini.cjs.map +1 -1
  26. package/dist/tools/warp_grep/gemini.js +3 -3
  27. package/dist/tools/warp_grep/harness.cjs +16 -7
  28. package/dist/tools/warp_grep/harness.cjs.map +1 -1
  29. package/dist/tools/warp_grep/harness.js +1 -1
  30. package/dist/tools/warp_grep/index.cjs +16 -7
  31. package/dist/tools/warp_grep/index.cjs.map +1 -1
  32. package/dist/tools/warp_grep/index.js +3 -3
  33. package/dist/tools/warp_grep/openai.cjs +16 -7
  34. package/dist/tools/warp_grep/openai.cjs.map +1 -1
  35. package/dist/tools/warp_grep/openai.js +4 -4
  36. package/dist/tools/warp_grep/vercel.cjs +16 -7
  37. package/dist/tools/warp_grep/vercel.cjs.map +1 -1
  38. package/dist/tools/warp_grep/vercel.js +4 -4
  39. package/package.json +1 -1
  40. package/dist/chunk-P2O5JKE5.js.map +0 -1
  41. /package/dist/{chunk-RL4JBZ3T.js.map → chunk-262WRPS5.js.map} +0 -0
  42. /package/dist/{chunk-HRK53IKL.js.map → chunk-D4EQYM6O.js.map} +0 -0
  43. /package/dist/{chunk-QOYI77CN.js.map → chunk-LF2X6YNP.js.map} +0 -0
  44. /package/dist/{chunk-LXG37353.js.map → chunk-LX2WNS3L.js.map} +0 -0
  45. /package/dist/{chunk-S27A4NQM.js.map → chunk-MJ7JODAY.js.map} +0 -0
  46. /package/dist/{chunk-HPR6BJA7.js.map → chunk-N3RNM4A4.js.map} +0 -0
@@ -10,10 +10,10 @@ import {
10
10
  executeToolCall,
11
11
  executeWarpGrep,
12
12
  formatResult
13
- } from "../../chunk-HRK53IKL.js";
13
+ } from "../../chunk-D4EQYM6O.js";
14
14
  import {
15
15
  runWarpGrep
16
- } from "../../chunk-QOYI77CN.js";
16
+ } from "../../chunk-LF2X6YNP.js";
17
17
  import {
18
18
  RemoteCommandsProvider
19
19
  } from "../../chunk-PUGSTXLO.js";
@@ -23,7 +23,7 @@ import {
23
23
  toolGrep,
24
24
  toolListDirectory,
25
25
  toolRead
26
- } from "../../chunk-P2O5JKE5.js";
26
+ } from "../../chunk-KRDIR7GG.js";
27
27
  import "../../chunk-APP75CBN.js";
28
28
  import "../../chunk-5QRN3JNB.js";
29
29
  import {
@@ -650,14 +650,23 @@ async function toolRead(provider, args) {
650
650
 
651
651
  // tools/warp_grep/agent/tools/list_directory.ts
652
652
  async function toolListDirectory(provider, args) {
653
- const list = await provider.listDirectory({
654
- path: args.path,
655
- pattern: args.pattern ?? null,
656
- maxResults: args.maxResults ?? AGENT_CONFIG.MAX_OUTPUT_LINES,
657
- maxDepth: args.maxDepth ?? AGENT_CONFIG.MAX_LIST_DEPTH
658
- });
653
+ const maxResults = args.maxResults ?? AGENT_CONFIG.MAX_OUTPUT_LINES;
654
+ const initialDepth = args.maxDepth ?? AGENT_CONFIG.MAX_LIST_DEPTH;
655
+ async function getListRecursive(currentDepth) {
656
+ const entries = await provider.listDirectory({
657
+ path: args.path,
658
+ pattern: args.pattern ?? null,
659
+ maxResults,
660
+ maxDepth: currentDepth
661
+ });
662
+ if (entries.length >= maxResults && currentDepth > 0) {
663
+ return getListRecursive(currentDepth - 1);
664
+ }
665
+ return { entries };
666
+ }
667
+ const { entries: list } = await getListRecursive(initialDepth);
659
668
  if (!list.length) return "empty";
660
- if (list.length >= AGENT_CONFIG.MAX_OUTPUT_LINES) {
669
+ if (list.length >= maxResults) {
661
670
  return "query not specific enough, tool called tried to return too much context and failed";
662
671
  }
663
672
  return list.map((e) => {