@morphllm/morphsdk 0.2.83 → 0.2.85
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-HRK53IKL.js → chunk-37SJ3IOY.js} +63 -42
- package/dist/chunk-37SJ3IOY.js.map +1 -0
- package/dist/{chunk-S27A4NQM.js → chunk-5X7IJXKA.js} +2 -2
- package/dist/{chunk-RL4JBZ3T.js → chunk-AJEE5RRB.js} +2 -2
- package/dist/{chunk-QOYI77CN.js → chunk-HJOMBO2A.js} +154 -3
- package/dist/chunk-HJOMBO2A.js.map +1 -0
- package/dist/{chunk-LXG37353.js → chunk-IXNX4HMC.js} +2 -2
- package/dist/{chunk-P2O5JKE5.js → chunk-KRDIR7GG.js} +17 -8
- package/dist/chunk-KRDIR7GG.js.map +1 -0
- package/dist/{chunk-FY32COVL.js → chunk-L5C6E32T.js} +1 -1
- package/dist/{chunk-FY32COVL.js.map → chunk-L5C6E32T.js.map} +1 -1
- package/dist/{chunk-HPR6BJA7.js → chunk-SQF3OG24.js} +5 -5
- package/dist/{client-CsO9LifG.d.ts → client-Drz3OGq-.d.ts} +1 -1
- package/dist/client.cjs +220 -44
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.ts +3 -2
- package/dist/client.js +7 -7
- package/dist/index.cjs +220 -44
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +8 -8
- package/dist/tools/warp_grep/agent/runner.cjs +170 -9
- package/dist/tools/warp_grep/agent/runner.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/runner.d.ts +9 -2
- package/dist/tools/warp_grep/agent/runner.js +6 -4
- package/dist/tools/warp_grep/agent/types.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/types.d.ts +12 -1
- package/dist/tools/warp_grep/anthropic.cjs +16 -7
- package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
- package/dist/tools/warp_grep/anthropic.d.ts +3 -2
- package/dist/tools/warp_grep/anthropic.js +4 -4
- package/dist/tools/warp_grep/client.cjs +225 -46
- package/dist/tools/warp_grep/client.cjs.map +1 -1
- package/dist/tools/warp_grep/client.d.ts +39 -6
- package/dist/tools/warp_grep/client.js +3 -3
- package/dist/tools/warp_grep/gemini.cjs +16 -7
- package/dist/tools/warp_grep/gemini.cjs.map +1 -1
- package/dist/tools/warp_grep/gemini.d.ts +3 -2
- package/dist/tools/warp_grep/gemini.js +3 -3
- package/dist/tools/warp_grep/harness.cjs +16 -7
- package/dist/tools/warp_grep/harness.cjs.map +1 -1
- package/dist/tools/warp_grep/harness.js +1 -1
- package/dist/tools/warp_grep/index.cjs +227 -46
- package/dist/tools/warp_grep/index.cjs.map +1 -1
- package/dist/tools/warp_grep/index.d.ts +3 -3
- package/dist/tools/warp_grep/index.js +7 -5
- package/dist/tools/warp_grep/openai.cjs +16 -7
- package/dist/tools/warp_grep/openai.cjs.map +1 -1
- package/dist/tools/warp_grep/openai.d.ts +3 -2
- package/dist/tools/warp_grep/openai.js +4 -4
- package/dist/tools/warp_grep/providers/remote.d.ts +1 -1
- package/dist/tools/warp_grep/vercel.cjs +16 -7
- package/dist/tools/warp_grep/vercel.cjs.map +1 -1
- package/dist/tools/warp_grep/vercel.d.ts +2 -1
- package/dist/tools/warp_grep/vercel.js +4 -4
- package/dist/{types-Cv4LpqVl.d.ts → types-BMowL9iZ.d.ts} +5 -0
- package/package.json +1 -1
- package/dist/chunk-HRK53IKL.js.map +0 -1
- package/dist/chunk-P2O5JKE5.js.map +0 -1
- package/dist/chunk-QOYI77CN.js.map +0 -1
- /package/dist/{chunk-S27A4NQM.js.map → chunk-5X7IJXKA.js.map} +0 -0
- /package/dist/{chunk-RL4JBZ3T.js.map → chunk-AJEE5RRB.js.map} +0 -0
- /package/dist/{chunk-LXG37353.js.map → chunk-IXNX4HMC.js.map} +0 -0
- /package/dist/{chunk-HPR6BJA7.js.map → chunk-SQF3OG24.js.map} +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ChatCompletionTool } from 'openai/resources/chat/completions';
|
|
2
2
|
export { formatResult } from './client.js';
|
|
3
3
|
export { getSystemPrompt } from './agent/prompt.js';
|
|
4
|
-
import { d as WarpGrepToolConfig, b as WarpGrepResult } from '../../types-
|
|
5
|
-
import './
|
|
4
|
+
import { d as WarpGrepToolConfig, b as WarpGrepResult } from '../../types-BMowL9iZ.js';
|
|
5
|
+
import './agent/types.js';
|
|
6
6
|
import '../utils/resilience.js';
|
|
7
|
+
import './providers/types.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* OpenAI SDK adapter for morph-warp-grep tool
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
execute,
|
|
4
4
|
openai_default,
|
|
5
5
|
warpGrepTool
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-IXNX4HMC.js";
|
|
7
7
|
import "../../chunk-KW7OEGZK.js";
|
|
8
8
|
import {
|
|
9
9
|
formatResult
|
|
10
|
-
} from "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
10
|
+
} from "../../chunk-37SJ3IOY.js";
|
|
11
|
+
import "../../chunk-HJOMBO2A.js";
|
|
12
12
|
import "../../chunk-PUGSTXLO.js";
|
|
13
|
-
import "../../chunk-
|
|
13
|
+
import "../../chunk-KRDIR7GG.js";
|
|
14
14
|
import "../../chunk-APP75CBN.js";
|
|
15
15
|
import "../../chunk-5QRN3JNB.js";
|
|
16
16
|
import {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WarpGrepProvider, GrepResult, ReadResult, ListDirectoryEntry } from './types.js';
|
|
2
|
-
import { R as RemoteCommands } from '../../../types-
|
|
2
|
+
import { R as RemoteCommands } from '../../../types-BMowL9iZ.js';
|
|
3
3
|
import '../../utils/resilience.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -651,14 +651,23 @@ async function toolRead(provider, args) {
|
|
|
651
651
|
|
|
652
652
|
// tools/warp_grep/agent/tools/list_directory.ts
|
|
653
653
|
async function toolListDirectory(provider, args) {
|
|
654
|
-
const
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
654
|
+
const maxResults = args.maxResults ?? AGENT_CONFIG.MAX_OUTPUT_LINES;
|
|
655
|
+
const initialDepth = args.maxDepth ?? AGENT_CONFIG.MAX_LIST_DEPTH;
|
|
656
|
+
async function getListRecursive(currentDepth) {
|
|
657
|
+
const entries = await provider.listDirectory({
|
|
658
|
+
path: args.path,
|
|
659
|
+
pattern: args.pattern ?? null,
|
|
660
|
+
maxResults,
|
|
661
|
+
maxDepth: currentDepth
|
|
662
|
+
});
|
|
663
|
+
if (entries.length >= maxResults && currentDepth > 0) {
|
|
664
|
+
return getListRecursive(currentDepth - 1);
|
|
665
|
+
}
|
|
666
|
+
return { entries };
|
|
667
|
+
}
|
|
668
|
+
const { entries: list } = await getListRecursive(initialDepth);
|
|
660
669
|
if (!list.length) return "empty";
|
|
661
|
-
if (list.length >=
|
|
670
|
+
if (list.length >= maxResults) {
|
|
662
671
|
return "query not specific enough, tool called tried to return too much context and failed";
|
|
663
672
|
}
|
|
664
673
|
return list.map((e) => {
|