@morphllm/morphsdk 0.2.202 → 0.2.203
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-2PPYWRMZ.js +3 -4
- package/dist/{chunk-SIFDK4AA.js → chunk-2UIOCSVJ.js} +3 -24
- package/dist/chunk-44OIEPIO.js +4 -23
- package/dist/chunk-4EQQGUZ7.cjs +104 -0
- package/dist/chunk-4OUGA3KS.js +1 -5
- package/dist/chunk-4R5MDGL6.cjs +280 -0
- package/dist/chunk-65W4I66Q.cjs +103 -0
- package/dist/{chunk-3CPI6ZIC.js → chunk-66THRMD7.js} +10 -35
- package/dist/chunk-6TZCVTW5.js +3 -4
- package/dist/chunk-6WP7EA4F.js +2 -4
- package/dist/chunk-74A4HLIO.cjs +42 -0
- package/dist/chunk-75ZPJI57.cjs +9 -0
- package/dist/chunk-7NA7X7W2.cjs +77 -0
- package/dist/chunk-7PJYY46L.cjs +2 -0
- package/dist/chunk-AFF6XYKL.cjs +71 -0
- package/dist/{chunk-2XU3XXUE.js → chunk-AJBZA23L.js} +3 -25
- package/dist/chunk-AWFZKS27.cjs +11 -0
- package/dist/{chunk-LVKKICOB.js → chunk-AXEKIRRY.js} +22 -62
- package/dist/chunk-B3FD67F2.cjs +256 -0
- package/dist/chunk-BJBWWIZV.cjs +2 -0
- package/dist/{chunk-UAZKHSEU.js → chunk-E3XNKAMI.js} +5 -15
- package/dist/{chunk-VQDDL3UH.js → chunk-E7FLETFO.js} +2 -8
- package/dist/{chunk-YAM6P5OQ.js → chunk-EI2M567U.js} +2 -6
- package/dist/chunk-EJTL2BOZ.cjs +42 -0
- package/dist/chunk-ETBRAKVV.js +1 -5
- package/dist/{chunk-6OYJC4TZ.js → chunk-EZ2OFDBJ.js} +5 -19
- package/dist/chunk-FBOZIVVQ.js +1 -0
- package/dist/{chunk-CAWQEHKP.js → chunk-GDFPZ3NJ.js} +4 -19
- package/dist/{chunk-UKXCGQPS.js → chunk-GIQAIHUI.js} +8 -33
- package/dist/chunk-GSUQGDCL.cjs +235 -0
- package/dist/{chunk-D6YJ5X3C.js → chunk-H3HRSRR5.js} +4 -12
- package/dist/chunk-HDP4QAZL.js +1 -4
- package/dist/chunk-HMLYJVZM.cjs +410 -0
- package/dist/chunk-IPJA3ZS6.cjs +10 -0
- package/dist/{chunk-XPHNS7NW.js → chunk-IUM6CQYX.js} +3 -12
- package/dist/{chunk-26K5EJD3.js → chunk-J56Q6C4Y.js} +4 -18
- package/dist/chunk-JBTR3FQD.cjs +135 -0
- package/dist/chunk-JNQKQKHS.cjs +81 -0
- package/dist/chunk-JOZC4T6C.cjs +168 -0
- package/dist/{chunk-JEVLCA5C.js → chunk-JUGNTIVU.js} +6 -19
- package/dist/{chunk-NFPRKZQ5.js → chunk-JY6COF3X.js} +5 -22
- package/dist/{chunk-ICCGLO6V.js → chunk-KLVJIC2O.js} +5 -17
- package/dist/chunk-KSZYOX6S.cjs +91 -0
- package/dist/chunk-KVGZ2TSG.cjs +274 -0
- package/dist/chunk-LDM7RNNN.js +1 -0
- package/dist/{chunk-65TUD7JV.js → chunk-LLQH6CCB.js} +10 -28
- package/dist/chunk-M34E2AMK.js +1 -5
- package/dist/chunk-MF56KEI4.js +1 -4
- package/dist/chunk-MLKGABMK.js +1 -3
- package/dist/chunk-MLPZKUCO.js +4 -5
- package/dist/chunk-MWXJ6DZ2.cjs +21 -0
- package/dist/{chunk-IBRBSDLT.js → chunk-N7UKZ5X7.js} +2 -6
- package/dist/chunk-NDUC7OV6.cjs +74 -0
- package/dist/{chunk-PDSIWL7I.js → chunk-NLACTMZT.js} +6 -19
- package/dist/chunk-NNKBKENK.cjs +15 -0
- package/dist/chunk-NRG6QX3L.js +1 -3
- package/dist/chunk-OCCGJ4S6.js +8 -0
- package/dist/chunk-ODY2NKQU.cjs +50 -0
- package/dist/chunk-OM5ZSXQW.cjs +91 -0
- package/dist/chunk-OOEORM7H.cjs +334 -0
- package/dist/chunk-OPDWMD4Q.js +1 -3
- package/dist/chunk-OSL4CNSO.js +7 -23
- package/dist/chunk-OXXMTDOY.cjs +86 -0
- package/dist/chunk-PA3UTI4A.js +1 -4
- package/dist/chunk-QEEAIXL5.cjs +74 -0
- package/dist/chunk-RYVW7RUM.js +2 -6
- package/dist/chunk-S6QBPXBI.cjs +107 -0
- package/dist/chunk-TL34BLQD.cjs +10 -0
- package/dist/chunk-TPZHMD7J.cjs +72 -0
- package/dist/chunk-UAPK3AIJ.js +1 -10
- package/dist/chunk-UF5IKELS.cjs +26 -0
- package/dist/chunk-UNX7V6P6.cjs +60 -0
- package/dist/chunk-UUCRWJJR.cjs +313 -0
- package/dist/chunk-VDFLPO7B.cjs +396 -0
- package/dist/chunk-VHD7CW5O.cjs +43 -0
- package/dist/chunk-VL4QNALG.cjs +50 -0
- package/dist/chunk-WR7LSUIR.cjs +213 -0
- package/dist/chunk-XE6D4J63.cjs +72 -0
- package/dist/chunk-ZLG2M2I4.cjs +21 -0
- package/dist/chunk-ZSHVXDA2.js +4 -10
- package/dist/client.cjs +40 -4360
- package/dist/client.js +32 -37
- package/dist/core/client.cjs +10 -476
- package/dist/core/client.js +6 -11
- package/dist/core/error.cjs +8 -251
- package/dist/core/error.js +4 -9
- package/dist/core/index.cjs +20 -488
- package/dist/core/index.js +8 -19
- package/dist/core/resource.cjs +9 -33
- package/dist/core/resource.js +2 -7
- package/dist/edge.cjs +62 -1111
- package/dist/edge.js +10 -42
- package/dist/index.cjs +115 -4431
- package/dist/index.js +39 -87
- package/dist/modelrouter/core.cjs +28 -648
- package/dist/modelrouter/core.js +8 -21
- package/dist/modelrouter/index.cjs +28 -648
- package/dist/modelrouter/index.js +8 -21
- package/dist/modelrouter/types.cjs +1 -17
- package/dist/modelrouter/types.js +1 -0
- package/dist/subagents/anthropic.cjs +27 -2784
- package/dist/subagents/anthropic.js +19 -24
- package/dist/subagents/index.cjs +14 -95
- package/dist/subagents/index.js +2 -11
- package/dist/subagents/prompts.cjs +14 -93
- package/dist/subagents/prompts.js +2 -11
- package/dist/subagents/types.cjs +1 -17
- package/dist/subagents/types.js +1 -0
- package/dist/subagents/vercel.cjs +27 -2761
- package/dist/subagents/vercel.js +19 -24
- package/dist/tools/compact/core.cjs +12 -548
- package/dist/tools/compact/core.js +8 -13
- package/dist/tools/compact/index.cjs +17 -595
- package/dist/tools/compact/index.js +9 -17
- package/dist/tools/compact/types.cjs +1 -17
- package/dist/tools/compact/types.js +1 -0
- package/dist/tools/fastapply/anthropic.cjs +27 -891
- package/dist/tools/fastapply/anthropic.js +11 -24
- package/dist/tools/fastapply/apply.cjs +28 -672
- package/dist/tools/fastapply/apply.js +4 -19
- package/dist/tools/fastapply/core.cjs +37 -1061
- package/dist/tools/fastapply/core.js +9 -29
- package/dist/tools/fastapply/index.cjs +62 -1062
- package/dist/tools/fastapply/index.js +14 -44
- package/dist/tools/fastapply/openai.cjs +32 -901
- package/dist/tools/fastapply/openai.js +11 -26
- package/dist/tools/fastapply/prompts.cjs +10 -62
- package/dist/tools/fastapply/prompts.js +2 -9
- package/dist/tools/fastapply/types.cjs +1 -17
- package/dist/tools/fastapply/types.js +1 -0
- package/dist/tools/fastapply/vercel.cjs +25 -897
- package/dist/tools/fastapply/vercel.js +11 -22
- package/dist/tools/index.cjs +62 -1062
- package/dist/tools/index.js +14 -44
- package/dist/tools/utils/resilience.cjs +15 -312
- package/dist/tools/utils/resilience.js +3 -12
- package/dist/tools/warp_grep/agent/config.cjs +16 -127
- package/dist/tools/warp_grep/agent/config.js +2 -11
- package/dist/tools/warp_grep/agent/formatter.cjs +12 -48
- package/dist/tools/warp_grep/agent/formatter.js +2 -9
- package/dist/tools/warp_grep/agent/parser.cjs +16 -83
- package/dist/tools/warp_grep/agent/parser.js +2 -11
- package/dist/tools/warp_grep/agent/runner.cjs +15 -1081
- package/dist/tools/warp_grep/agent/runner.js +7 -14
- package/dist/tools/warp_grep/agent/types.cjs +1 -17
- package/dist/tools/warp_grep/agent/types.js +1 -0
- package/dist/tools/warp_grep/anthropic.cjs +47 -2561
- package/dist/tools/warp_grep/anthropic.js +19 -35
- package/dist/tools/warp_grep/client.cjs +49 -2471
- package/dist/tools/warp_grep/client.js +17 -34
- package/dist/tools/warp_grep/gemini.cjs +48 -2490
- package/dist/tools/warp_grep/gemini.js +21 -41
- package/dist/tools/warp_grep/harness.cjs +81 -936
- package/dist/tools/warp_grep/harness.js +12 -51
- package/dist/tools/warp_grep/index.cjs +124 -2575
- package/dist/tools/warp_grep/index.js +24 -87
- package/dist/tools/warp_grep/openai.cjs +53 -2575
- package/dist/tools/warp_grep/openai.js +19 -37
- package/dist/tools/warp_grep/providers/code_storage_http.cjs +12 -65
- package/dist/tools/warp_grep/providers/code_storage_http.js +2 -9
- package/dist/tools/warp_grep/providers/local.cjs +10 -589
- package/dist/tools/warp_grep/providers/local.js +6 -11
- package/dist/tools/warp_grep/providers/remote.cjs +8 -331
- package/dist/tools/warp_grep/providers/remote.js +3 -8
- package/dist/tools/warp_grep/providers/types.cjs +1 -17
- package/dist/tools/warp_grep/providers/types.js +1 -0
- package/dist/tools/warp_grep/utils/files.cjs +9 -42
- package/dist/tools/warp_grep/utils/files.js +2 -7
- package/dist/tools/warp_grep/utils/github.cjs +9 -43
- package/dist/tools/warp_grep/utils/github.js +2 -7
- package/dist/tools/warp_grep/utils/paths.cjs +28 -104
- package/dist/tools/warp_grep/utils/paths.js +2 -17
- package/dist/tools/warp_grep/utils/ripgrep.cjs +9 -103
- package/dist/tools/warp_grep/utils/ripgrep.js +2 -7
- package/dist/tools/warp_grep/vercel.cjs +53 -2557
- package/dist/tools/warp_grep/vercel.js +19 -37
- package/dist/version.cjs +7 -225
- package/dist/version.js +2 -7
- package/package.json +2 -2
- package/dist/chunk-E6TL6MIH.js +0 -203
package/dist/tools/index.js
CHANGED
|
@@ -1,44 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import {
|
|
16
|
-
executeEditFile
|
|
17
|
-
} from "../chunk-65TUD7JV.js";
|
|
18
|
-
import {
|
|
19
|
-
FastApplyAnchorIntegrityError,
|
|
20
|
-
FastApplyContextLengthError,
|
|
21
|
-
applyEdit,
|
|
22
|
-
countChanges,
|
|
23
|
-
generateUdiff
|
|
24
|
-
} from "../chunk-JEVLCA5C.js";
|
|
25
|
-
import "../chunk-ICCGLO6V.js";
|
|
26
|
-
import "../chunk-6WP7EA4F.js";
|
|
27
|
-
import "../chunk-YAM6P5OQ.js";
|
|
28
|
-
import "../chunk-VQDDL3UH.js";
|
|
29
|
-
import "../chunk-E6TL6MIH.js";
|
|
30
|
-
import "../chunk-NRG6QX3L.js";
|
|
31
|
-
import "../chunk-MLKGABMK.js";
|
|
32
|
-
export {
|
|
33
|
-
EDIT_FILE_SYSTEM_PROMPT,
|
|
34
|
-
EDIT_FILE_TOOL_DESCRIPTION,
|
|
35
|
-
FastApplyAnchorIntegrityError,
|
|
36
|
-
FastApplyContextLengthError,
|
|
37
|
-
anthropic_exports as anthropic,
|
|
38
|
-
applyEdit,
|
|
39
|
-
countChanges,
|
|
40
|
-
executeEditFile,
|
|
41
|
-
generateUdiff,
|
|
42
|
-
openai_exports as openai,
|
|
43
|
-
vercel_exports as vercel
|
|
44
|
-
};
|
|
1
|
+
import '../chunk-FBOZIVVQ.js';
|
|
2
|
+
export { openai_exports as openai } from '../chunk-GDFPZ3NJ.js';
|
|
3
|
+
export { vercel_exports as vercel } from '../chunk-NLACTMZT.js';
|
|
4
|
+
export { anthropic_exports as anthropic } from '../chunk-J56Q6C4Y.js';
|
|
5
|
+
export { EDIT_FILE_SYSTEM_PROMPT, EDIT_FILE_TOOL_DESCRIPTION } from '../chunk-PA3UTI4A.js';
|
|
6
|
+
export { executeEditFile } from '../chunk-LLQH6CCB.js';
|
|
7
|
+
export { FastApplyAnchorIntegrityError, FastApplyContextLengthError, applyEdit, countChanges, generateUdiff } from '../chunk-JUGNTIVU.js';
|
|
8
|
+
import '../chunk-KLVJIC2O.js';
|
|
9
|
+
import '../chunk-6WP7EA4F.js';
|
|
10
|
+
import '../chunk-EI2M567U.js';
|
|
11
|
+
import '../chunk-E7FLETFO.js';
|
|
12
|
+
import '../chunk-OCCGJ4S6.js';
|
|
13
|
+
import '../chunk-NRG6QX3L.js';
|
|
14
|
+
import '../chunk-MLKGABMK.js';
|
|
@@ -1,317 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
'use strict';
|
|
19
2
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
MorphError: () => MorphError,
|
|
24
|
-
fetchWithRetry: () => fetchWithRetry,
|
|
25
|
-
withTimeout: () => withTimeout
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(resilience_exports);
|
|
3
|
+
var chunkOM5ZSXQW_cjs = require('../../chunk-OM5ZSXQW.cjs');
|
|
4
|
+
require('../../chunk-TL34BLQD.cjs');
|
|
5
|
+
require('../../chunk-75ZPJI57.cjs');
|
|
28
6
|
|
|
29
|
-
// package.json
|
|
30
|
-
var package_default = {
|
|
31
|
-
name: "@morphllm/morphsdk",
|
|
32
|
-
version: "0.2.202",
|
|
33
|
-
description: "TypeScript SDK and CLI for Morph Fast Apply integration",
|
|
34
|
-
type: "module",
|
|
35
|
-
main: "./dist/index.cjs",
|
|
36
|
-
module: "./dist/index.js",
|
|
37
|
-
types: "./dist/index.d.ts",
|
|
38
|
-
exports: {
|
|
39
|
-
".": {
|
|
40
|
-
types: "./dist/index.d.ts",
|
|
41
|
-
import: "./dist/index.js",
|
|
42
|
-
require: "./dist/index.cjs"
|
|
43
|
-
},
|
|
44
|
-
"./logger": {
|
|
45
|
-
types: "./dist/logger.d.ts",
|
|
46
|
-
import: "./dist/logger.js",
|
|
47
|
-
require: "./dist/logger.cjs"
|
|
48
|
-
},
|
|
49
|
-
"./edge": {
|
|
50
|
-
types: "./dist/edge.d.ts",
|
|
51
|
-
import: "./dist/edge.js",
|
|
52
|
-
require: "./dist/edge.cjs"
|
|
53
|
-
},
|
|
54
|
-
"./tools/warp-grep": {
|
|
55
|
-
types: "./dist/tools/warp_grep/index.d.ts",
|
|
56
|
-
import: "./dist/tools/warp_grep/index.js",
|
|
57
|
-
require: "./dist/tools/warp_grep/index.cjs"
|
|
58
|
-
},
|
|
59
|
-
"./tools/warp-grep/openai": {
|
|
60
|
-
types: "./dist/tools/warp_grep/openai.d.ts",
|
|
61
|
-
import: "./dist/tools/warp_grep/openai.js",
|
|
62
|
-
require: "./dist/tools/warp_grep/openai.cjs"
|
|
63
|
-
},
|
|
64
|
-
"./tools/warp-grep/anthropic": {
|
|
65
|
-
types: "./dist/tools/warp_grep/anthropic.d.ts",
|
|
66
|
-
import: "./dist/tools/warp_grep/anthropic.js",
|
|
67
|
-
require: "./dist/tools/warp_grep/anthropic.cjs"
|
|
68
|
-
},
|
|
69
|
-
"./tools/warp-grep/vercel": {
|
|
70
|
-
types: "./dist/tools/warp_grep/vercel.d.ts",
|
|
71
|
-
import: "./dist/tools/warp_grep/vercel.js",
|
|
72
|
-
require: "./dist/tools/warp_grep/vercel.cjs"
|
|
73
|
-
},
|
|
74
|
-
"./tools/warp-grep/client": {
|
|
75
|
-
types: "./dist/tools/warp_grep/client.d.ts",
|
|
76
|
-
import: "./dist/tools/warp_grep/client.js",
|
|
77
|
-
require: "./dist/tools/warp_grep/client.cjs"
|
|
78
|
-
},
|
|
79
|
-
"./tools/warp-grep/gemini": {
|
|
80
|
-
types: "./dist/tools/warp_grep/gemini.d.ts",
|
|
81
|
-
import: "./dist/tools/warp_grep/gemini.js",
|
|
82
|
-
require: "./dist/tools/warp_grep/gemini.cjs"
|
|
83
|
-
},
|
|
84
|
-
"./tools/warp-grep/harness": {
|
|
85
|
-
types: "./dist/tools/warp_grep/harness.d.ts",
|
|
86
|
-
import: "./dist/tools/warp_grep/harness.js",
|
|
87
|
-
require: "./dist/tools/warp_grep/harness.cjs"
|
|
88
|
-
},
|
|
89
|
-
"./tools/fastapply": {
|
|
90
|
-
types: "./dist/tools/fastapply/index.d.ts",
|
|
91
|
-
import: "./dist/tools/fastapply/index.js",
|
|
92
|
-
require: "./dist/tools/fastapply/index.cjs"
|
|
93
|
-
},
|
|
94
|
-
"./tools/fastapply/anthropic": {
|
|
95
|
-
types: "./dist/tools/fastapply/anthropic.d.ts",
|
|
96
|
-
import: "./dist/tools/fastapply/anthropic.js",
|
|
97
|
-
require: "./dist/tools/fastapply/anthropic.cjs"
|
|
98
|
-
},
|
|
99
|
-
"./tools/fastapply/openai": {
|
|
100
|
-
types: "./dist/tools/fastapply/openai.d.ts",
|
|
101
|
-
import: "./dist/tools/fastapply/openai.js",
|
|
102
|
-
require: "./dist/tools/fastapply/openai.cjs"
|
|
103
|
-
},
|
|
104
|
-
"./tools/fastapply/vercel": {
|
|
105
|
-
types: "./dist/tools/fastapply/vercel.d.ts",
|
|
106
|
-
import: "./dist/tools/fastapply/vercel.js",
|
|
107
|
-
require: "./dist/tools/fastapply/vercel.cjs"
|
|
108
|
-
},
|
|
109
|
-
"./modelrouter": {
|
|
110
|
-
types: "./dist/modelrouter/index.d.ts",
|
|
111
|
-
import: "./dist/modelrouter/index.js",
|
|
112
|
-
require: "./dist/modelrouter/index.cjs"
|
|
113
|
-
},
|
|
114
|
-
"./tools/compact": {
|
|
115
|
-
types: "./dist/tools/compact/index.d.ts",
|
|
116
|
-
import: "./dist/tools/compact/index.js",
|
|
117
|
-
require: "./dist/tools/compact/index.cjs"
|
|
118
|
-
},
|
|
119
|
-
"./subagents": {
|
|
120
|
-
types: "./dist/subagents/index.d.ts",
|
|
121
|
-
import: "./dist/subagents/index.js",
|
|
122
|
-
require: "./dist/subagents/index.cjs"
|
|
123
|
-
},
|
|
124
|
-
"./subagents/vercel": {
|
|
125
|
-
types: "./dist/subagents/vercel.d.ts",
|
|
126
|
-
import: "./dist/subagents/vercel.js",
|
|
127
|
-
require: "./dist/subagents/vercel.cjs"
|
|
128
|
-
},
|
|
129
|
-
"./subagents/anthropic": {
|
|
130
|
-
types: "./dist/subagents/anthropic.d.ts",
|
|
131
|
-
import: "./dist/subagents/anthropic.js",
|
|
132
|
-
require: "./dist/subagents/anthropic.cjs"
|
|
133
|
-
},
|
|
134
|
-
"./ai-sdk": {
|
|
135
|
-
types: "./dist/ai-sdk/index.d.ts",
|
|
136
|
-
import: "./dist/ai-sdk/index.js",
|
|
137
|
-
require: "./dist/ai-sdk/index.cjs"
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
files: [
|
|
141
|
-
"dist/**/*.js",
|
|
142
|
-
"dist/**/*.cjs",
|
|
143
|
-
"dist/**/*.d.ts",
|
|
144
|
-
"!dist/**/__tests__/**",
|
|
145
|
-
"!dist/**/*.test.*"
|
|
146
|
-
],
|
|
147
|
-
scripts: {
|
|
148
|
-
build: "tsup version.ts index.ts edge.ts client.ts core/index.ts core/client.ts core/resource.ts core/error.ts tools/index.ts tools/fastapply/index.ts tools/fastapply/core.ts tools/fastapply/apply.ts tools/fastapply/types.ts tools/fastapply/prompts.ts tools/fastapply/anthropic.ts tools/fastapply/openai.ts tools/fastapply/vercel.ts tools/warp_grep/index.ts tools/warp_grep/client.ts tools/warp_grep/openai.ts tools/warp_grep/anthropic.ts tools/warp_grep/vercel.ts tools/warp_grep/gemini.ts tools/warp_grep/harness.ts tools/warp_grep/agent/config.ts tools/warp_grep/agent/parser.ts tools/warp_grep/agent/runner.ts tools/warp_grep/agent/types.ts tools/warp_grep/agent/formatter.ts tools/warp_grep/providers/types.ts tools/warp_grep/providers/local.ts tools/warp_grep/providers/remote.ts tools/warp_grep/providers/code_storage_http.ts tools/warp_grep/tools/grep.ts tools/warp_grep/tools/analyse.ts tools/warp_grep/tools/read.ts tools/warp_grep/tools/finish.ts tools/warp_grep/utils/paths.ts tools/warp_grep/utils/github.ts tools/warp_grep/utils/ripgrep.ts tools/warp_grep/utils/format.ts tools/warp_grep/utils/files.ts modelrouter/index.ts modelrouter/core.ts modelrouter/types.ts tools/compact/index.ts tools/compact/core.ts tools/compact/types.ts tools/utils/resilience.ts subagents/index.ts subagents/types.ts subagents/prompts.ts subagents/vercel.ts subagents/anthropic.ts --format esm,cjs --clean --dts --dts-resolve && tsup ai-sdk/index.ts --format esm,cjs --dts --no-clean --out-dir dist/ai-sdk",
|
|
149
|
-
prepare: "npm run build",
|
|
150
|
-
typecheck: "tsc --noEmit && tsc --noEmit -p ai-sdk/tsconfig.json",
|
|
151
|
-
lint: "eslint .",
|
|
152
|
-
test: "vitest run",
|
|
153
|
-
"test:watch": "vitest watch",
|
|
154
|
-
"test:anthropic": "vitest run anthropic",
|
|
155
|
-
"test:openai": "vitest run openai",
|
|
156
|
-
"test:vercel": "vitest run vercel",
|
|
157
|
-
"test:git": "vitest run git",
|
|
158
|
-
"test:agent": "npx tsx tests/fullAgentTest.ts",
|
|
159
|
-
"test:integration": "npx tsx tests/fullIntegrationTest.ts",
|
|
160
|
-
"test:e2e": "vitest run --config vitest.e2e.config.ts",
|
|
161
|
-
"release:patch": "npm version patch && npm publish",
|
|
162
|
-
"release:minor": "npm version minor && npm publish",
|
|
163
|
-
"release:major": "npm version major && npm publish"
|
|
164
|
-
},
|
|
165
|
-
keywords: [
|
|
166
|
-
"morph",
|
|
167
|
-
"fast-apply",
|
|
168
|
-
"cli",
|
|
169
|
-
"sdk",
|
|
170
|
-
"edit-file"
|
|
171
|
-
],
|
|
172
|
-
engines: {
|
|
173
|
-
node: ">=18"
|
|
174
|
-
},
|
|
175
|
-
license: "MIT",
|
|
176
|
-
dependencies: {
|
|
177
|
-
"@vscode/ripgrep": "^1.17.0",
|
|
178
|
-
ai: ">=5.0.0",
|
|
179
|
-
diff: "^7.0.0",
|
|
180
|
-
openai: "^4.52.7",
|
|
181
|
-
zod: ">=3.23.0"
|
|
182
|
-
},
|
|
183
|
-
devDependencies: {
|
|
184
|
-
"@ai-sdk/anthropic": "^2.0.70",
|
|
185
|
-
"@ai-sdk/openai": "^2.0.35",
|
|
186
|
-
"@anthropic-ai/sdk": "^0.30.1",
|
|
187
|
-
"@google/generative-ai": "^0.24.1",
|
|
188
|
-
"@types/diff": "^7.0.2",
|
|
189
|
-
"@types/node": "^20.14.10",
|
|
190
|
-
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
191
|
-
"@typescript-eslint/parser": "^7.18.0",
|
|
192
|
-
dotenv: "^16.4.5",
|
|
193
|
-
eslint: "^8.57.0",
|
|
194
|
-
shx: "^0.3.4",
|
|
195
|
-
tsup: "^8.5.0",
|
|
196
|
-
tsx: "^4.16.2",
|
|
197
|
-
typescript: "^5.5.4",
|
|
198
|
-
vitest: "^2.1.6"
|
|
199
|
-
},
|
|
200
|
-
peerDependencies: {
|
|
201
|
-
"@ai-sdk/openai-compatible": ">=2.0.74 <4",
|
|
202
|
-
"@anthropic-ai/sdk": ">=0.25.0",
|
|
203
|
-
"@google/generative-ai": ">=0.21.0",
|
|
204
|
-
ai: ">=5.0.0",
|
|
205
|
-
zod: ">=3.23.0"
|
|
206
|
-
},
|
|
207
|
-
peerDependenciesMeta: {
|
|
208
|
-
"@anthropic-ai/sdk": {
|
|
209
|
-
optional: true
|
|
210
|
-
},
|
|
211
|
-
"@google/generative-ai": {
|
|
212
|
-
optional: true
|
|
213
|
-
},
|
|
214
|
-
ai: {
|
|
215
|
-
optional: true
|
|
216
|
-
},
|
|
217
|
-
zod: {
|
|
218
|
-
optional: true
|
|
219
|
-
}
|
|
220
|
-
},
|
|
221
|
-
publishConfig: {
|
|
222
|
-
access: "public"
|
|
223
|
-
}
|
|
224
|
-
};
|
|
225
7
|
|
|
226
|
-
// version.ts
|
|
227
|
-
var SDK_VERSION = package_default.version;
|
|
228
8
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
initialDelay = DEFAULT_RETRY_CONFIG.initialDelay,
|
|
241
|
-
maxDelay = DEFAULT_RETRY_CONFIG.maxDelay,
|
|
242
|
-
backoffMultiplier = DEFAULT_RETRY_CONFIG.backoffMultiplier,
|
|
243
|
-
retryableErrors = DEFAULT_RETRY_CONFIG.retryableErrors,
|
|
244
|
-
onRetry
|
|
245
|
-
} = retryConfig;
|
|
246
|
-
let lastError = null;
|
|
247
|
-
let delay = initialDelay;
|
|
248
|
-
options = { ...options, headers: { "X-Morph-SDK-Version": SDK_VERSION, ...options.headers } };
|
|
249
|
-
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
250
|
-
try {
|
|
251
|
-
const response = await fetch(url, options);
|
|
252
|
-
if (response.status === 429 || response.status === 503) {
|
|
253
|
-
if (attempt < maxRetries) {
|
|
254
|
-
const retryAfter = response.headers.get("Retry-After");
|
|
255
|
-
const waitTime = retryAfter ? parseInt(retryAfter) * 1e3 : Math.min(delay, maxDelay);
|
|
256
|
-
const error = new Error(`HTTP ${response.status}: Retrying after ${waitTime}ms`);
|
|
257
|
-
if (onRetry) {
|
|
258
|
-
onRetry(attempt + 1, error);
|
|
259
|
-
}
|
|
260
|
-
await sleep(waitTime);
|
|
261
|
-
delay *= backoffMultiplier;
|
|
262
|
-
continue;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
return response;
|
|
266
|
-
} catch (error) {
|
|
267
|
-
lastError = error;
|
|
268
|
-
const isRetryable = retryableErrors.some(
|
|
269
|
-
(errType) => lastError?.message?.includes(errType)
|
|
270
|
-
);
|
|
271
|
-
if (!isRetryable || attempt === maxRetries) {
|
|
272
|
-
throw lastError;
|
|
273
|
-
}
|
|
274
|
-
const waitTime = Math.min(delay, maxDelay);
|
|
275
|
-
if (onRetry) {
|
|
276
|
-
onRetry(attempt + 1, lastError);
|
|
277
|
-
}
|
|
278
|
-
await sleep(waitTime);
|
|
279
|
-
delay *= backoffMultiplier;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
throw lastError || new Error("Max retries exceeded");
|
|
283
|
-
}
|
|
284
|
-
async function withTimeout(promise, timeoutMs, errorMessage) {
|
|
285
|
-
let timeoutId;
|
|
286
|
-
const timeoutPromise = new Promise((_, reject) => {
|
|
287
|
-
timeoutId = setTimeout(() => {
|
|
288
|
-
reject(new Error(errorMessage || `Operation timed out after ${timeoutMs}ms`));
|
|
289
|
-
}, timeoutMs);
|
|
290
|
-
});
|
|
291
|
-
try {
|
|
292
|
-
const result = await Promise.race([promise, timeoutPromise]);
|
|
293
|
-
clearTimeout(timeoutId);
|
|
294
|
-
return result;
|
|
295
|
-
} catch (error) {
|
|
296
|
-
clearTimeout(timeoutId);
|
|
297
|
-
throw error;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
function sleep(ms) {
|
|
301
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
302
|
-
}
|
|
303
|
-
var MorphError = class extends Error {
|
|
304
|
-
constructor(message, code, statusCode, retryable = false) {
|
|
305
|
-
super(message);
|
|
306
|
-
this.code = code;
|
|
307
|
-
this.statusCode = statusCode;
|
|
308
|
-
this.retryable = retryable;
|
|
309
|
-
this.name = "MorphError";
|
|
310
|
-
}
|
|
311
|
-
};
|
|
312
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
313
|
-
0 && (module.exports = {
|
|
314
|
-
MorphError,
|
|
315
|
-
fetchWithRetry,
|
|
316
|
-
withTimeout
|
|
9
|
+
Object.defineProperty(exports, "MorphError", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkOM5ZSXQW_cjs.MorphError; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "fetchWithRetry", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkOM5ZSXQW_cjs.fetchWithRetry; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "withTimeout", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunkOM5ZSXQW_cjs.withTimeout; }
|
|
317
20
|
});
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
withTimeout
|
|
5
|
-
} from "../../chunk-VQDDL3UH.js";
|
|
6
|
-
import "../../chunk-E6TL6MIH.js";
|
|
7
|
-
import "../../chunk-MLKGABMK.js";
|
|
8
|
-
export {
|
|
9
|
-
MorphError,
|
|
10
|
-
fetchWithRetry,
|
|
11
|
-
withTimeout
|
|
12
|
-
};
|
|
1
|
+
export { MorphError, fetchWithRetry, withTimeout } from '../../chunk-E7FLETFO.js';
|
|
2
|
+
import '../../chunk-OCCGJ4S6.js';
|
|
3
|
+
import '../../chunk-MLKGABMK.js';
|
|
@@ -1,130 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
'use strict';
|
|
19
2
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
3
|
+
var chunk4EQQGUZ7_cjs = require('../../../chunk-4EQQGUZ7.cjs');
|
|
4
|
+
require('../../../chunk-75ZPJI57.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "AGENT_CONFIG", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunk4EQQGUZ7_cjs.AGENT_CONFIG; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "DEFAULT_EXCLUDES", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunk4EQQGUZ7_cjs.DEFAULT_EXCLUDES; }
|
|
26
15
|
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const parsed = parseInt(envValue, 10);
|
|
31
|
-
return isNaN(parsed) || parsed <= 0 ? defaultMs : parsed;
|
|
32
|
-
};
|
|
33
|
-
var AGENT_CONFIG = {
|
|
34
|
-
MAX_TURNS: 6,
|
|
35
|
-
/** Default timeout for model calls. Can be overridden via MORPH_WARP_GREP_TIMEOUT env var (in ms) */
|
|
36
|
-
TIMEOUT_MS: parseEnvTimeout(process.env.MORPH_WARP_GREP_TIMEOUT, 6e4),
|
|
37
|
-
MAX_CONTEXT_CHARS: 321600,
|
|
38
|
-
MAX_OUTPUT_LINES: 200,
|
|
39
|
-
MAX_LIST_RESULTS: 500,
|
|
40
|
-
MAX_READ_LINES: 800,
|
|
41
|
-
MAX_LIST_DEPTH: 3,
|
|
42
|
-
LIST_TIMEOUT_MS: 2e3
|
|
43
|
-
};
|
|
44
|
-
var BUILTIN_EXCLUDES = [
|
|
45
|
-
// Version control
|
|
46
|
-
".git",
|
|
47
|
-
".svn",
|
|
48
|
-
".hg",
|
|
49
|
-
".bzr",
|
|
50
|
-
// Dependencies
|
|
51
|
-
"node_modules",
|
|
52
|
-
"bower_components",
|
|
53
|
-
".pnpm",
|
|
54
|
-
".yarn",
|
|
55
|
-
"vendor",
|
|
56
|
-
"packages",
|
|
57
|
-
"Pods",
|
|
58
|
-
".bundle",
|
|
59
|
-
// Python
|
|
60
|
-
"__pycache__",
|
|
61
|
-
".pytest_cache",
|
|
62
|
-
".mypy_cache",
|
|
63
|
-
".ruff_cache",
|
|
64
|
-
".venv",
|
|
65
|
-
"venv",
|
|
66
|
-
".tox",
|
|
67
|
-
".nox",
|
|
68
|
-
".eggs",
|
|
69
|
-
"*.egg-info",
|
|
70
|
-
// Build outputs
|
|
71
|
-
"dist",
|
|
72
|
-
"build",
|
|
73
|
-
"out",
|
|
74
|
-
"output",
|
|
75
|
-
"target",
|
|
76
|
-
"_build",
|
|
77
|
-
".next",
|
|
78
|
-
".nuxt",
|
|
79
|
-
".output",
|
|
80
|
-
".vercel",
|
|
81
|
-
".netlify",
|
|
82
|
-
// Cache directories
|
|
83
|
-
".cache",
|
|
84
|
-
".parcel-cache",
|
|
85
|
-
".turbo",
|
|
86
|
-
".nx",
|
|
87
|
-
".gradle",
|
|
88
|
-
// IDE/Editor
|
|
89
|
-
".idea",
|
|
90
|
-
".vscode",
|
|
91
|
-
".vs",
|
|
92
|
-
// Coverage
|
|
93
|
-
"coverage",
|
|
94
|
-
".coverage",
|
|
95
|
-
"htmlcov",
|
|
96
|
-
".nyc_output",
|
|
97
|
-
// Temporary
|
|
98
|
-
"tmp",
|
|
99
|
-
"temp",
|
|
100
|
-
".tmp",
|
|
101
|
-
".temp",
|
|
102
|
-
// Lock files
|
|
103
|
-
"package-lock.json",
|
|
104
|
-
"yarn.lock",
|
|
105
|
-
"pnpm-lock.yaml",
|
|
106
|
-
"bun.lockb",
|
|
107
|
-
"Cargo.lock",
|
|
108
|
-
"Gemfile.lock",
|
|
109
|
-
"poetry.lock",
|
|
110
|
-
// Binary/minified
|
|
111
|
-
"*.min.js",
|
|
112
|
-
"*.min.css",
|
|
113
|
-
"*.bundle.js",
|
|
114
|
-
"*.wasm",
|
|
115
|
-
"*.so",
|
|
116
|
-
"*.dll",
|
|
117
|
-
"*.pyc",
|
|
118
|
-
"*.map",
|
|
119
|
-
"*.js.map",
|
|
120
|
-
// Hidden directories catch-all
|
|
121
|
-
".*"
|
|
122
|
-
];
|
|
123
|
-
var DEFAULT_EXCLUDES = (process.env.MORPH_WARP_GREP_EXCLUDE || "").split(",").map((s) => s.trim()).filter(Boolean).concat(BUILTIN_EXCLUDES);
|
|
124
|
-
var DEFAULT_MODEL = "morph-warp-grep-v2.1";
|
|
125
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
126
|
-
0 && (module.exports = {
|
|
127
|
-
AGENT_CONFIG,
|
|
128
|
-
DEFAULT_EXCLUDES,
|
|
129
|
-
DEFAULT_MODEL
|
|
16
|
+
Object.defineProperty(exports, "DEFAULT_MODEL", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunk4EQQGUZ7_cjs.DEFAULT_MODEL; }
|
|
130
19
|
});
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
DEFAULT_EXCLUDES,
|
|
4
|
-
DEFAULT_MODEL
|
|
5
|
-
} from "../../../chunk-M34E2AMK.js";
|
|
6
|
-
import "../../../chunk-MLKGABMK.js";
|
|
7
|
-
export {
|
|
8
|
-
AGENT_CONFIG,
|
|
9
|
-
DEFAULT_EXCLUDES,
|
|
10
|
-
DEFAULT_MODEL
|
|
11
|
-
};
|
|
1
|
+
export { AGENT_CONFIG, DEFAULT_EXCLUDES, DEFAULT_MODEL } from '../../../chunk-M34E2AMK.js';
|
|
2
|
+
import '../../../chunk-MLKGABMK.js';
|
|
@@ -1,51 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
'use strict';
|
|
19
2
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
3
|
+
var chunkUF5IKELS_cjs = require('../../../chunk-UF5IKELS.cjs');
|
|
4
|
+
require('../../../chunk-75ZPJI57.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "ToolOutputFormatter", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkUF5IKELS_cjs.ToolOutputFormatter; }
|
|
25
11
|
});
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const name = (toolName ?? "").trim();
|
|
30
|
-
if (!name) {
|
|
31
|
-
return "";
|
|
32
|
-
}
|
|
33
|
-
const payload = output?.toString?.()?.trim?.() ?? "";
|
|
34
|
-
const isError = Boolean(options.isError);
|
|
35
|
-
if (!payload && !isError) {
|
|
36
|
-
return "";
|
|
37
|
-
}
|
|
38
|
-
return `<tool_response>
|
|
39
|
-
${payload}
|
|
40
|
-
</tool_response>`;
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
var sharedFormatter = new ToolOutputFormatter();
|
|
44
|
-
function formatAgentToolOutput(toolName, args, output, options = {}) {
|
|
45
|
-
return sharedFormatter.format(toolName, args, output, options);
|
|
46
|
-
}
|
|
47
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
-
0 && (module.exports = {
|
|
49
|
-
ToolOutputFormatter,
|
|
50
|
-
formatAgentToolOutput
|
|
12
|
+
Object.defineProperty(exports, "formatAgentToolOutput", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkUF5IKELS_cjs.formatAgentToolOutput; }
|
|
51
15
|
});
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
formatAgentToolOutput
|
|
4
|
-
} from "../../../chunk-MF56KEI4.js";
|
|
5
|
-
import "../../../chunk-MLKGABMK.js";
|
|
6
|
-
export {
|
|
7
|
-
ToolOutputFormatter,
|
|
8
|
-
formatAgentToolOutput
|
|
9
|
-
};
|
|
1
|
+
export { ToolOutputFormatter, formatAgentToolOutput } from '../../../chunk-MF56KEI4.js';
|
|
2
|
+
import '../../../chunk-MLKGABMK.js';
|