@morphllm/morphsdk 0.2.202 → 0.2.204
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/README.md +101 -0
- package/dist/chunk-2GMG5XKU.js +100 -0
- package/dist/chunk-2PPYWRMZ.js +3 -4
- package/dist/chunk-3HAHJYZQ.cjs +74 -0
- package/dist/{chunk-2XU3XXUE.js → chunk-3JROKKS4.js} +3 -25
- package/dist/{chunk-26K5EJD3.js → chunk-43JBUEIX.js} +4 -18
- package/dist/chunk-44OIEPIO.js +4 -23
- package/dist/chunk-4EQQGUZ7.cjs +104 -0
- package/dist/chunk-4OUGA3KS.js +1 -5
- package/dist/{chunk-VQDDL3UH.js → chunk-4TZBUFVP.js} +2 -8
- package/dist/{chunk-YAM6P5OQ.js → chunk-564XJOQP.js} +2 -6
- package/dist/chunk-5H3FKFOI.cjs +77 -0
- package/dist/chunk-5TTZQF4X.cjs +110 -0
- package/dist/chunk-6HAYJA6M.cjs +317 -0
- 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-7PJYY46L.cjs +2 -0
- package/dist/chunk-AWFZKS27.cjs +11 -0
- package/dist/chunk-BJBWWIZV.cjs +2 -0
- package/dist/chunk-DLYDIYDK.cjs +305 -0
- package/dist/{chunk-65TUD7JV.js → chunk-DYCMPDPV.js} +13 -29
- package/dist/{chunk-3CPI6ZIC.js → chunk-DZP7BR66.js} +22 -43
- package/dist/chunk-E63OPKP7.js +96 -0
- package/dist/chunk-E6V75LI6.cjs +334 -0
- package/dist/{chunk-XPHNS7NW.js → chunk-EJ6ID24K.js} +3 -12
- package/dist/chunk-EJTL2BOZ.cjs +42 -0
- package/dist/chunk-ETBRAKVV.js +1 -5
- package/dist/chunk-F633IVQA.cjs +91 -0
- package/dist/chunk-FBOZIVVQ.js +1 -0
- package/dist/{chunk-UKXCGQPS.js → chunk-FGA6EYC2.js} +35 -37
- package/dist/{chunk-CAWQEHKP.js → chunk-G4RODMXA.js} +4 -19
- package/dist/chunk-GUNGJC6X.cjs +256 -0
- package/dist/chunk-GYE3FY6Z.js +8 -0
- package/dist/chunk-HDP4QAZL.js +1 -4
- package/dist/chunk-HNMEBYIS.cjs +86 -0
- package/dist/chunk-HP3PCOTW.cjs +81 -0
- package/dist/{chunk-ICCGLO6V.js → chunk-IGXNLXPN.js} +12 -17
- package/dist/chunk-IPJA3ZS6.cjs +10 -0
- package/dist/chunk-JHC2R3HU.cjs +317 -0
- package/dist/{chunk-IBRBSDLT.js → chunk-JVMIFGZY.js} +5 -8
- package/dist/chunk-KF6S3EPJ.cjs +100 -0
- package/dist/chunk-KVGZ2TSG.cjs +274 -0
- package/dist/{chunk-6OYJC4TZ.js → chunk-L5SCKZVK.js} +13 -22
- package/dist/chunk-LDM7RNNN.js +1 -0
- package/dist/{chunk-UAZKHSEU.js → chunk-LQST3NW2.js} +5 -15
- 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-MMX5PUGC.cjs +242 -0
- package/dist/chunk-MWXJ6DZ2.cjs +21 -0
- package/dist/chunk-NJWOWXUR.cjs +137 -0
- package/dist/chunk-NNKBKENK.cjs +15 -0
- package/dist/chunk-NRG6QX3L.js +1 -3
- package/dist/chunk-OCKEEEYE.cjs +433 -0
- package/dist/chunk-OENJO7YW.js +306 -0
- package/dist/chunk-OKLAYEBC.cjs +2 -0
- package/dist/chunk-OPDWMD4Q.js +1 -3
- package/dist/{chunk-D6YJ5X3C.js → chunk-OX5GN2KB.js} +26 -14
- package/dist/{chunk-JEVLCA5C.js → chunk-OYBOP47A.js} +18 -19
- package/dist/chunk-OZHCHPIE.js +1 -0
- package/dist/chunk-PA3UTI4A.js +1 -4
- package/dist/chunk-QEEAIXL5.cjs +74 -0
- package/dist/chunk-QT5LGZG3.cjs +10 -0
- package/dist/chunk-R3TUE7O2.cjs +107 -0
- package/dist/chunk-RYVW7RUM.js +2 -6
- package/dist/{chunk-LVKKICOB.js → chunk-SOQYE5A4.js} +36 -69
- package/dist/chunk-ST2OXLT5.cjs +91 -0
- package/dist/{chunk-SIFDK4AA.js → chunk-TH4MG73B.js} +3 -24
- package/dist/{chunk-OSL4CNSO.js → chunk-TLMAMVAW.js} +7 -23
- package/dist/chunk-TPZHMD7J.cjs +72 -0
- package/dist/{chunk-PDSIWL7I.js → chunk-U4PYAGNR.js} +6 -19
- package/dist/chunk-UAPK3AIJ.js +1 -10
- package/dist/chunk-UF5IKELS.cjs +26 -0
- package/dist/chunk-UHFVWYSP.cjs +408 -0
- package/dist/chunk-UKBSXYKE.cjs +280 -0
- package/dist/chunk-UNX7V6P6.cjs +60 -0
- package/dist/chunk-UZMMJ47A.cjs +107 -0
- package/dist/chunk-VHD7CW5O.cjs +43 -0
- package/dist/chunk-VL4QNALG.cjs +50 -0
- package/dist/chunk-VYE7O4FM.cjs +51 -0
- package/dist/chunk-WIYVT4UO.cjs +173 -0
- package/dist/chunk-WJHHO24M.cjs +91 -0
- package/dist/chunk-WR7LSUIR.cjs +213 -0
- package/dist/chunk-XE6D4J63.cjs +72 -0
- package/dist/chunk-YAUXTFIN.cjs +21 -0
- package/dist/{chunk-NFPRKZQ5.js → chunk-YJUCGZNN.js} +5 -22
- package/dist/chunk-ZSHVXDA2.js +4 -10
- package/dist/chunk-ZX6T3LNG.js +302 -0
- package/dist/{client-BWhi-vSj.d.ts → client-DSXbcxII.d.ts} +10 -1
- package/dist/client.cjs +44 -4360
- package/dist/client.d.ts +4 -2
- package/dist/client.js +36 -37
- package/dist/core/client.cjs +14 -476
- package/dist/core/client.d.ts +8 -0
- package/dist/core/client.js +10 -11
- package/dist/core/error.cjs +8 -251
- package/dist/core/error.js +4 -9
- package/dist/core/index.cjs +27 -491
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +12 -19
- package/dist/core/resource.cjs +9 -33
- package/dist/core/resource.d.ts +2 -0
- package/dist/core/resource.js +2 -7
- package/dist/edge.cjs +74 -1111
- package/dist/edge.d.ts +3 -0
- package/dist/edge.js +14 -42
- package/dist/guard-CvW03v4u.d.ts +59 -0
- package/dist/index.cjs +140 -4431
- package/dist/index.d.ts +6 -2
- package/dist/index.js +44 -87
- package/dist/modelrouter/core.cjs +35 -651
- package/dist/modelrouter/core.d.ts +2 -0
- package/dist/modelrouter/core.js +12 -21
- package/dist/modelrouter/index.cjs +35 -651
- package/dist/modelrouter/index.d.ts +2 -0
- package/dist/modelrouter/index.js +12 -21
- package/dist/modelrouter/types.cjs +1 -17
- package/dist/modelrouter/types.d.ts +5 -0
- package/dist/modelrouter/types.js +1 -0
- package/dist/subagents/anthropic.cjs +31 -2784
- package/dist/subagents/anthropic.d.ts +3 -1
- package/dist/subagents/anthropic.js +23 -24
- package/dist/subagents/index.cjs +14 -95
- package/dist/subagents/index.d.ts +3 -1
- package/dist/subagents/index.js +2 -11
- package/dist/subagents/prompts.cjs +14 -93
- package/dist/subagents/prompts.d.ts +3 -1
- package/dist/subagents/prompts.js +2 -11
- package/dist/subagents/types.cjs +1 -17
- package/dist/subagents/types.d.ts +3 -1
- package/dist/subagents/types.js +1 -0
- package/dist/subagents/vercel.cjs +31 -2761
- package/dist/subagents/vercel.d.ts +3 -1
- package/dist/subagents/vercel.js +23 -24
- package/dist/tools/compact/core.cjs +20 -552
- package/dist/tools/compact/core.d.ts +2 -0
- package/dist/tools/compact/core.js +12 -13
- package/dist/tools/compact/index.cjs +24 -598
- package/dist/tools/compact/index.d.ts +3 -1
- package/dist/tools/compact/index.js +13 -17
- package/dist/tools/compact/types.cjs +1 -17
- package/dist/tools/compact/types.d.ts +4 -4
- package/dist/tools/compact/types.js +1 -0
- package/dist/tools/fastapply/anthropic.cjs +39 -899
- package/dist/tools/fastapply/anthropic.d.ts +2 -0
- package/dist/tools/fastapply/anthropic.js +15 -24
- package/dist/tools/fastapply/apply.cjs +32 -672
- package/dist/tools/fastapply/apply.d.ts +2 -0
- package/dist/tools/fastapply/apply.js +8 -19
- package/dist/tools/fastapply/core.cjs +49 -1069
- package/dist/tools/fastapply/core.d.ts +3 -0
- package/dist/tools/fastapply/core.js +13 -29
- package/dist/tools/fastapply/index.cjs +56 -1052
- package/dist/tools/fastapply/index.d.ts +2 -0
- package/dist/tools/fastapply/index.js +18 -44
- package/dist/tools/fastapply/openai.cjs +45 -910
- package/dist/tools/fastapply/openai.d.ts +2 -0
- package/dist/tools/fastapply/openai.js +15 -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.d.ts +9 -4
- package/dist/tools/fastapply/types.js +1 -0
- package/dist/tools/fastapply/vercel.cjs +37 -905
- package/dist/tools/fastapply/vercel.d.ts +2 -0
- package/dist/tools/fastapply/vercel.js +15 -22
- package/dist/tools/index.cjs +56 -1052
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.js +18 -44
- package/dist/tools/pii/index.cjs +47 -0
- package/dist/tools/pii/index.d.ts +4 -0
- package/dist/tools/pii/index.js +6 -0
- package/dist/tools/pii/model.cjs +45 -0
- package/dist/tools/pii/model.d.ts +83 -0
- package/dist/tools/pii/model.js +4 -0
- package/dist/tools/pii/patterns.cjs +15 -0
- package/dist/tools/pii/patterns.d.ts +31 -0
- package/dist/tools/pii/patterns.js +2 -0
- package/dist/tools/pii/regex.cjs +32 -0
- package/dist/tools/pii/regex.d.ts +48 -0
- package/dist/tools/pii/regex.js +3 -0
- package/dist/tools/pii/types.cjs +2 -0
- package/dist/tools/pii/types.d.ts +108 -0
- package/dist/tools/pii/types.js +1 -0
- 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.d.ts +2 -0
- package/dist/tools/warp_grep/agent/parser.js +2 -11
- package/dist/tools/warp_grep/agent/runner.cjs +19 -1081
- package/dist/tools/warp_grep/agent/runner.d.ts +2 -0
- package/dist/tools/warp_grep/agent/runner.js +11 -14
- package/dist/tools/warp_grep/agent/types.cjs +1 -17
- package/dist/tools/warp_grep/agent/types.d.ts +4 -0
- package/dist/tools/warp_grep/agent/types.js +1 -0
- package/dist/tools/warp_grep/anthropic.cjs +51 -2561
- package/dist/tools/warp_grep/anthropic.d.ts +3 -1
- package/dist/tools/warp_grep/anthropic.js +23 -35
- package/dist/tools/warp_grep/client.cjs +53 -2471
- package/dist/tools/warp_grep/client.d.ts +3 -1
- package/dist/tools/warp_grep/client.js +21 -34
- package/dist/tools/warp_grep/gemini.cjs +52 -2490
- package/dist/tools/warp_grep/gemini.d.ts +3 -1
- package/dist/tools/warp_grep/gemini.js +25 -41
- package/dist/tools/warp_grep/harness.cjs +81 -936
- package/dist/tools/warp_grep/harness.d.ts +2 -0
- package/dist/tools/warp_grep/harness.js +12 -51
- package/dist/tools/warp_grep/index.cjs +128 -2575
- package/dist/tools/warp_grep/index.d.ts +3 -1
- package/dist/tools/warp_grep/index.js +28 -87
- package/dist/tools/warp_grep/openai.cjs +57 -2575
- package/dist/tools/warp_grep/openai.d.ts +3 -1
- package/dist/tools/warp_grep/openai.js +23 -37
- package/dist/tools/warp_grep/providers/code_storage_http.cjs +12 -65
- package/dist/tools/warp_grep/providers/code_storage_http.d.ts +3 -1
- 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.d.ts +3 -1
- 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 +57 -2557
- package/dist/tools/warp_grep/vercel.d.ts +3 -1
- package/dist/tools/warp_grep/vercel.js +23 -37
- package/dist/{types-DxZLPogx.d.ts → types-BKhXjDCB.d.ts} +6 -1
- package/dist/version.cjs +7 -225
- package/dist/version.js +2 -7
- package/package.json +11 -2
- package/dist/chunk-E6TL6MIH.js +0 -203
package/dist/edge.d.ts
CHANGED
|
@@ -6,5 +6,8 @@ export { AmbiguityLevel, Classification, ClassifyClass, ClassifyInput, ClassifyR
|
|
|
6
6
|
export { RetryConfig } from './tools/utils/resilience.js';
|
|
7
7
|
export { CompactClient } from './tools/compact/core.js';
|
|
8
8
|
export { CompactConfig, CompactInput, CompactMessage, CompactResult, CompactedRange } from './tools/compact/types.js';
|
|
9
|
+
export { detectPII, redactPII } from './tools/pii/regex.js';
|
|
10
|
+
export { PIIEntity, PIIPlaceholder, PIIRedactOptions, PIIRedactResult, PIIType } from './tools/pii/types.js';
|
|
9
11
|
import './core/client.js';
|
|
12
|
+
import './guard-CvW03v4u.js';
|
|
10
13
|
import './core/resource.js';
|
package/dist/edge.js
CHANGED
|
@@ -1,42 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "./chunk-6OYJC4TZ.js";
|
|
16
|
-
import {
|
|
17
|
-
CompactClient
|
|
18
|
-
} from "./chunk-D6YJ5X3C.js";
|
|
19
|
-
import "./chunk-ICCGLO6V.js";
|
|
20
|
-
import "./chunk-6WP7EA4F.js";
|
|
21
|
-
import "./chunk-YAM6P5OQ.js";
|
|
22
|
-
import "./chunk-VQDDL3UH.js";
|
|
23
|
-
import {
|
|
24
|
-
SDK_VERSION
|
|
25
|
-
} from "./chunk-E6TL6MIH.js";
|
|
26
|
-
import "./chunk-NRG6QX3L.js";
|
|
27
|
-
import "./chunk-MLKGABMK.js";
|
|
28
|
-
export {
|
|
29
|
-
AnthropicRouter,
|
|
30
|
-
CompactClient,
|
|
31
|
-
FastApplyAnchorIntegrityError,
|
|
32
|
-
FastApplyContextLengthError,
|
|
33
|
-
GeminiRouter,
|
|
34
|
-
OpenAIRouter,
|
|
35
|
-
RawRouter,
|
|
36
|
-
RouterClassifier,
|
|
37
|
-
SDK_VERSION,
|
|
38
|
-
applyEdit,
|
|
39
|
-
callMorphAPI,
|
|
40
|
-
countChanges,
|
|
41
|
-
generateUdiff
|
|
42
|
-
};
|
|
1
|
+
export { AnthropicRouter, GeminiRouter, OpenAIRouter, RawRouter, RouterClassifier } from './chunk-L5SCKZVK.js';
|
|
2
|
+
export { FastApplyAnchorIntegrityError, FastApplyContextLengthError, applyEdit, callMorphAPI, countChanges, generateUdiff } from './chunk-OYBOP47A.js';
|
|
3
|
+
export { CompactClient } from './chunk-OX5GN2KB.js';
|
|
4
|
+
import './chunk-IGXNLXPN.js';
|
|
5
|
+
import './chunk-6WP7EA4F.js';
|
|
6
|
+
import './chunk-E63OPKP7.js';
|
|
7
|
+
import './chunk-OENJO7YW.js';
|
|
8
|
+
export { detectPII, redactPII } from './chunk-2GMG5XKU.js';
|
|
9
|
+
import './chunk-ZX6T3LNG.js';
|
|
10
|
+
import './chunk-564XJOQP.js';
|
|
11
|
+
import './chunk-4TZBUFVP.js';
|
|
12
|
+
export { SDK_VERSION } from './chunk-GYE3FY6Z.js';
|
|
13
|
+
import './chunk-NRG6QX3L.js';
|
|
14
|
+
import './chunk-MLKGABMK.js';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { PIIRedactorConfig, PIIEntity } from './tools/pii/types.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Reversible PII redaction for requests the SDK sends to Morph.
|
|
5
|
+
*
|
|
6
|
+
* `redactPII` on `MorphClient` must not change what the caller gets back: FastApply
|
|
7
|
+
* writes the merged code to disk, so a placeholder left in a response would corrupt a
|
|
8
|
+
* file. A guard therefore works in sessions. Within one session every sensitive value
|
|
9
|
+
* is swapped for a unique token on the way out, and each token is swapped back on the
|
|
10
|
+
* way in. Morph's servers see `__PII_EMAIL_1_k3x9__`; the caller sees the real value.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* `true` redacts with the regex detector and default settings. Pass a config to choose
|
|
15
|
+
* types, an allowlist, or `mode: 'model'`. The `placeholder` setting is ignored here,
|
|
16
|
+
* because tokens must be reversible.
|
|
17
|
+
*/
|
|
18
|
+
type RedactPIIOption = boolean | Omit<PIIRedactorConfig, 'placeholder'>;
|
|
19
|
+
/** Thrown when a response contains a token this session never issued. */
|
|
20
|
+
declare class PIIRestoreError extends Error {
|
|
21
|
+
readonly tokens: string[];
|
|
22
|
+
constructor(tokens: string[]);
|
|
23
|
+
}
|
|
24
|
+
/** One request, or one multi-turn run, sharing a single token table. */
|
|
25
|
+
declare class PIISession {
|
|
26
|
+
private readonly detect;
|
|
27
|
+
private readonly nonce;
|
|
28
|
+
private readonly tokenFor;
|
|
29
|
+
private readonly valueFor;
|
|
30
|
+
private readonly counters;
|
|
31
|
+
private readonly cache;
|
|
32
|
+
private readonly tokenPattern;
|
|
33
|
+
constructor(detect: (text: string) => Promise<PIIEntity[]>);
|
|
34
|
+
/** Number of distinct values redacted so far. */
|
|
35
|
+
get size(): number;
|
|
36
|
+
private token;
|
|
37
|
+
/** Replace sensitive values with tokens. Repeated text is answered from a cache. */
|
|
38
|
+
redact(text: string): Promise<string>;
|
|
39
|
+
/** Put the original values back. Unknown tokens are left as they are. */
|
|
40
|
+
restore(text: string): string;
|
|
41
|
+
restore(text: string | null | undefined): string | null | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Like `restore`, but throws if the text holds a token this session did not issue, or a
|
|
44
|
+
* damaged one (a token that lost its head or its tail). Use it wherever the result is
|
|
45
|
+
* written somewhere durable.
|
|
46
|
+
*/
|
|
47
|
+
restoreStrict(text: string): string;
|
|
48
|
+
}
|
|
49
|
+
interface PIIGuard {
|
|
50
|
+
/** Start a token table for one request or one agent run. */
|
|
51
|
+
session(): PIISession;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Turn a `redactPII` option into a guard, or `undefined` when redaction is off. The same
|
|
55
|
+
* option object always yields the same guard, so a local model is loaded once.
|
|
56
|
+
*/
|
|
57
|
+
declare function resolvePIIGuard(option: RedactPIIOption | undefined): PIIGuard | undefined;
|
|
58
|
+
|
|
59
|
+
export { PIIRestoreError as P, type RedactPIIOption as R, PIISession as a, type PIIGuard as b, resolvePIIGuard as r };
|