@morphllm/morphsdk 0.2.81 → 0.2.82
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-NTTQJM6O.js → chunk-24EYSWME.js} +2 -2
- package/dist/{chunk-OFMDENAQ.js → chunk-3ONNAQZU.js} +2 -2
- package/dist/{chunk-4NI25AKV.js → chunk-4KMBU6T3.js} +2 -2
- package/dist/{chunk-XT5ZO6ES.js → chunk-5PNMAWLC.js} +8 -2
- package/dist/chunk-5PNMAWLC.js.map +1 -0
- package/dist/{chunk-X6A64F2F.js → chunk-EK5ZEOI3.js} +5 -5
- package/dist/{chunk-4VMIPD4G.js → chunk-FJKPMMNQ.js} +8 -6
- package/dist/chunk-FJKPMMNQ.js.map +1 -0
- package/dist/{chunk-467MCW5R.js → chunk-P2O5JKE5.js} +2 -2
- package/dist/{chunk-PHJQ4N3T.js → chunk-PUGSTXLO.js} +2 -2
- package/dist/{chunk-B3UC7UVA.js → chunk-WIAYUEJK.js} +7 -5
- package/dist/chunk-WIAYUEJK.js.map +1 -0
- package/dist/{chunk-Z2HDXUH7.js → chunk-ZLJAODDJ.js} +2 -2
- package/dist/{client-CSINf0lQ.d.ts → client-CsO9LifG.d.ts} +1 -1
- package/dist/client.cjs +15 -5
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.ts +2 -2
- package/dist/client.js +10 -10
- package/dist/index.cjs +15 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +10 -10
- package/dist/tools/warp_grep/agent/config.cjs +7 -1
- package/dist/tools/warp_grep/agent/config.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/config.d.ts +1 -0
- package/dist/tools/warp_grep/agent/config.js +1 -1
- package/dist/tools/warp_grep/agent/runner.cjs +11 -3
- package/dist/tools/warp_grep/agent/runner.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/runner.js +3 -3
- package/dist/tools/warp_grep/agent/types.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/types.d.ts +2 -0
- package/dist/tools/warp_grep/anthropic.cjs +13 -4
- package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
- package/dist/tools/warp_grep/anthropic.d.ts +1 -1
- package/dist/tools/warp_grep/anthropic.js +7 -7
- package/dist/tools/warp_grep/client.cjs +15 -5
- package/dist/tools/warp_grep/client.cjs.map +1 -1
- package/dist/tools/warp_grep/client.d.ts +1 -1
- package/dist/tools/warp_grep/client.js +6 -6
- package/dist/tools/warp_grep/gemini.cjs +13 -4
- package/dist/tools/warp_grep/gemini.cjs.map +1 -1
- package/dist/tools/warp_grep/gemini.d.ts +1 -1
- package/dist/tools/warp_grep/gemini.js +6 -6
- package/dist/tools/warp_grep/harness.cjs +7 -1
- package/dist/tools/warp_grep/harness.cjs.map +1 -1
- package/dist/tools/warp_grep/harness.js +3 -3
- package/dist/tools/warp_grep/index.cjs +15 -5
- 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 +6 -6
- package/dist/tools/warp_grep/openai.cjs +13 -4
- package/dist/tools/warp_grep/openai.cjs.map +1 -1
- package/dist/tools/warp_grep/openai.d.ts +1 -1
- package/dist/tools/warp_grep/openai.js +7 -7
- package/dist/tools/warp_grep/providers/local.cjs +7 -1
- package/dist/tools/warp_grep/providers/local.cjs.map +1 -1
- package/dist/tools/warp_grep/providers/local.js +2 -2
- package/dist/tools/warp_grep/providers/remote.cjs +7 -1
- package/dist/tools/warp_grep/providers/remote.cjs.map +1 -1
- package/dist/tools/warp_grep/providers/remote.d.ts +1 -1
- package/dist/tools/warp_grep/providers/remote.js +2 -2
- package/dist/tools/warp_grep/vercel.cjs +13 -4
- package/dist/tools/warp_grep/vercel.cjs.map +1 -1
- package/dist/tools/warp_grep/vercel.d.ts +1 -1
- package/dist/tools/warp_grep/vercel.js +7 -7
- package/dist/{types-CnvVDM63.d.ts → types-Cv4LpqVl.d.ts} +2 -0
- package/package.json +1 -1
- package/dist/chunk-4VMIPD4G.js.map +0 -1
- package/dist/chunk-B3UC7UVA.js.map +0 -1
- package/dist/chunk-XT5ZO6ES.js.map +0 -1
- /package/dist/{chunk-NTTQJM6O.js.map → chunk-24EYSWME.js.map} +0 -0
- /package/dist/{chunk-OFMDENAQ.js.map → chunk-3ONNAQZU.js.map} +0 -0
- /package/dist/{chunk-4NI25AKV.js.map → chunk-4KMBU6T3.js.map} +0 -0
- /package/dist/{chunk-X6A64F2F.js.map → chunk-EK5ZEOI3.js.map} +0 -0
- /package/dist/{chunk-467MCW5R.js.map → chunk-P2O5JKE5.js.map} +0 -0
- /package/dist/{chunk-PHJQ4N3T.js.map → chunk-PUGSTXLO.js.map} +0 -0
- /package/dist/{chunk-Z2HDXUH7.js.map → chunk-ZLJAODDJ.js.map} +0 -0
package/dist/client.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ import './tools/browser/core.js';
|
|
|
5
5
|
import './tools/warp_grep/client.js';
|
|
6
6
|
import './git/client.js';
|
|
7
7
|
import './modelrouter/core.js';
|
|
8
|
-
export { M as MorphClient, a as MorphClientConfig } from './client-
|
|
8
|
+
export { M as MorphClient, a as MorphClientConfig } from './client-CsO9LifG.js';
|
|
9
9
|
import './tools/fastapply/types.js';
|
|
10
10
|
import './tools/codebase_search/types.js';
|
|
11
11
|
import './tools/browser/types.js';
|
|
12
|
-
import './types-
|
|
12
|
+
import './types-Cv4LpqVl.js';
|
|
13
13
|
import './tools/warp_grep/providers/types.js';
|
|
14
14
|
import './git/types.js';
|
|
15
15
|
import 'isomorphic-git';
|
package/dist/client.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MorphClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-EK5ZEOI3.js";
|
|
4
|
+
import "./chunk-ZLJAODDJ.js";
|
|
5
|
+
import "./chunk-24EYSWME.js";
|
|
6
|
+
import "./chunk-3ONNAQZU.js";
|
|
7
7
|
import "./chunk-KW7OEGZK.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-FJKPMMNQ.js";
|
|
9
|
+
import "./chunk-WIAYUEJK.js";
|
|
10
|
+
import "./chunk-PUGSTXLO.js";
|
|
11
|
+
import "./chunk-P2O5JKE5.js";
|
|
12
12
|
import "./chunk-APP75CBN.js";
|
|
13
13
|
import "./chunk-5QRN3JNB.js";
|
|
14
14
|
import "./chunk-FMLHRJDF.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-4KMBU6T3.js";
|
|
16
16
|
import "./chunk-G2RSY56Q.js";
|
|
17
17
|
import "./chunk-YPKNMYD4.js";
|
|
18
18
|
import "./chunk-TPP2UGQP.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-5PNMAWLC.js";
|
|
20
20
|
import "./chunk-UBX7QYBD.js";
|
|
21
21
|
import "./chunk-GJU7UOFL.js";
|
|
22
22
|
import "./chunk-76DJEQEP.js";
|
package/dist/index.cjs
CHANGED
|
@@ -1001,9 +1001,15 @@ async function checkHealth(config = {}) {
|
|
|
1001
1001
|
}
|
|
1002
1002
|
|
|
1003
1003
|
// tools/warp_grep/agent/config.ts
|
|
1004
|
+
var parseEnvTimeout = (envValue, defaultMs) => {
|
|
1005
|
+
if (!envValue) return defaultMs;
|
|
1006
|
+
const parsed = parseInt(envValue, 10);
|
|
1007
|
+
return isNaN(parsed) || parsed <= 0 ? defaultMs : parsed;
|
|
1008
|
+
};
|
|
1004
1009
|
var AGENT_CONFIG = {
|
|
1005
1010
|
MAX_TURNS: 4,
|
|
1006
|
-
|
|
1011
|
+
/** Default timeout for model calls. Can be overridden via MORPH_WARP_GREP_TIMEOUT env var (in ms) */
|
|
1012
|
+
TIMEOUT_MS: parseEnvTimeout(process.env.MORPH_WARP_GREP_TIMEOUT, 3e4),
|
|
1007
1013
|
MAX_CONTEXT_CHARS: 54e4,
|
|
1008
1014
|
MAX_OUTPUT_LINES: 200,
|
|
1009
1015
|
MAX_READ_LINES: 800,
|
|
@@ -1871,7 +1877,8 @@ async function callModel(messages, model, options = {}) {
|
|
|
1871
1877
|
},
|
|
1872
1878
|
options.retryConfig
|
|
1873
1879
|
);
|
|
1874
|
-
const
|
|
1880
|
+
const timeoutMs = options.timeout ?? AGENT_CONFIG.TIMEOUT_MS;
|
|
1881
|
+
const resp = await withTimeout(fetchPromise, timeoutMs, "morph-warp-grep request timed out");
|
|
1875
1882
|
if (!resp.ok) {
|
|
1876
1883
|
if (resp.status === 404) {
|
|
1877
1884
|
throw new Error(
|
|
@@ -1905,7 +1912,8 @@ async function runWarpGrep(config) {
|
|
|
1905
1912
|
const assistantContent = await callModel(messages, model, {
|
|
1906
1913
|
morphApiKey: config.morphApiKey,
|
|
1907
1914
|
morphApiUrl: config.morphApiUrl,
|
|
1908
|
-
retryConfig: config.retryConfig
|
|
1915
|
+
retryConfig: config.retryConfig,
|
|
1916
|
+
timeout: config.timeout
|
|
1909
1917
|
}).catch((e) => {
|
|
1910
1918
|
errors.push({ message: e instanceof Error ? e.message : String(e) });
|
|
1911
1919
|
return "";
|
|
@@ -2636,7 +2644,8 @@ var WarpGrepClient = class {
|
|
|
2636
2644
|
debug: input.debug ?? this.config.debug,
|
|
2637
2645
|
morphApiKey: this.config.morphApiKey,
|
|
2638
2646
|
morphApiUrl: this.config.morphApiUrl,
|
|
2639
|
-
retryConfig: this.config.retryConfig
|
|
2647
|
+
retryConfig: this.config.retryConfig,
|
|
2648
|
+
timeout: this.config.timeout
|
|
2640
2649
|
}
|
|
2641
2650
|
);
|
|
2642
2651
|
}
|
|
@@ -2653,7 +2662,8 @@ async function executeToolCall(input, config) {
|
|
|
2653
2662
|
debug: config.debug ?? false,
|
|
2654
2663
|
morphApiKey: config.morphApiKey,
|
|
2655
2664
|
morphApiUrl: config.morphApiUrl,
|
|
2656
|
-
retryConfig: config.retryConfig
|
|
2665
|
+
retryConfig: config.retryConfig,
|
|
2666
|
+
timeout: config.timeout
|
|
2657
2667
|
});
|
|
2658
2668
|
const finish = result.finish;
|
|
2659
2669
|
if (result.terminationReason !== "completed" || !finish?.metadata) {
|