@wrongstack/tools 1.0.6 → 1.0.8
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/audit.js +4 -4
- package/dist/bash.js +2 -2
- package/dist/builtin.js +39 -39
- package/dist/{chunk-HKR56VNF.js → chunk-2IAEJRLT.js} +4 -3
- package/dist/{chunk-5UA4TNJJ.js → chunk-2NTHMZV3.js} +2 -2
- package/dist/{chunk-JQ43NVFU.js → chunk-3LQJXJDM.js} +2 -2
- package/dist/{chunk-47GYABZW.js → chunk-4SW6BXUR.js} +2 -2
- package/dist/{chunk-4KI4HHID.js → chunk-5KRKL3WD.js} +3 -3
- package/dist/{chunk-7EQ2LUXU.js → chunk-5MP76C72.js} +3 -3
- package/dist/{chunk-7PEZU5Y4.js → chunk-7E55DAFW.js} +8 -8
- package/dist/{chunk-D4HWMWGE.js → chunk-AH7J5HWL.js} +3 -3
- package/dist/{chunk-OZVGRDCM.js → chunk-B62LKMWQ.js} +3 -3
- package/dist/{chunk-WKXL5XHU.js → chunk-BVHKBBGA.js} +2 -2
- package/dist/{chunk-54SIRJ6D.js → chunk-C4DSQBTT.js} +3 -3
- package/dist/{chunk-2ZWQIVEW.js → chunk-CAF4L6KN.js} +2 -2
- package/dist/{chunk-MG7CUN6R.js → chunk-EGT5QLCB.js} +6 -3
- package/dist/{chunk-ZSW5KO5S.js → chunk-FI6SOIVE.js} +31 -7
- package/dist/{chunk-TL5T4A4E.js → chunk-GF4JHLCO.js} +3 -3
- package/dist/{chunk-OVFQC6FU.js → chunk-GNLHBDFO.js} +341 -146
- package/dist/{chunk-ZETZHHV5.js → chunk-H2VB7GCR.js} +3 -3
- package/dist/{chunk-C64UUXTA.js → chunk-HCPSVK7J.js} +3 -3
- package/dist/{chunk-K7Y2IWEB.js → chunk-HIRVCXLP.js} +4 -4
- package/dist/{chunk-IMIHTHF7.js → chunk-HOFVYIPI.js} +38 -10
- package/dist/{chunk-CYPYJIAF.js → chunk-JB5JLY7V.js} +4 -4
- package/dist/{chunk-S6E2AM4U.js → chunk-KF7GMVNU.js} +3 -3
- package/dist/{chunk-IOOFLBVM.js → chunk-KMXPP32M.js} +3 -3
- package/dist/{chunk-REWOZIA4.js → chunk-M2W36JT7.js} +2 -2
- package/dist/{chunk-FRIUJ534.js → chunk-MF6ZUBI7.js} +3 -3
- package/dist/{chunk-BU6VUXWG.js → chunk-N3OTTQNC.js} +2 -2
- package/dist/{chunk-YJQQ5F5J.js → chunk-NL45OWEO.js} +3 -3
- package/dist/{chunk-NKOTOW6X.js → chunk-O6AGFJBO.js} +3 -3
- package/dist/{chunk-YILT3CSO.js → chunk-OGQMPX3J.js} +18 -7
- package/dist/{chunk-OBVXDVLE.js → chunk-QJARSK2G.js} +3 -3
- package/dist/{chunk-R36RWYXE.js → chunk-R3HIZVFS.js} +3 -3
- package/dist/{chunk-TGVQMKVH.js → chunk-S6CGSFLX.js} +3 -3
- package/dist/{chunk-JK5WXW4S.js → chunk-SEONDNLN.js} +2 -2
- package/dist/{chunk-6IEBD27U.js → chunk-SKRMUHTU.js} +2 -2
- package/dist/{chunk-DOHU3XHS.js → chunk-TU6UVATU.js} +3 -3
- package/dist/{chunk-G35NLPG5.js → chunk-WKLUOXR4.js} +3 -3
- package/dist/{chunk-6ZRP5IKQ.js → chunk-YUK3WLHJ.js} +2 -2
- package/dist/{chunk-5BKQVP56.js → chunk-YZECCW3F.js} +34 -14
- package/dist/{chunk-3F7HQ3KS.js → chunk-YZQSUL5G.js} +2 -2
- package/dist/{chunk-2IC5FRD7.js → chunk-ZMCV3XOV.js} +2 -2
- package/dist/{chunk-WBAPU3AB.js → chunk-ZOUG3KKS.js} +2 -2
- package/dist/clarify.d.ts +26 -19
- package/dist/codebase-index/index.js +8 -8
- package/dist/codebase-index/parser-worker-script.js +3 -3
- package/dist/codebase-index/project-server.js +5 -5
- package/dist/codebase-index/worker.js +4 -4
- package/dist/diff.js +2 -2
- package/dist/e2e.js +2 -2
- package/dist/edit.js +8 -8
- package/dist/exec.js +2 -2
- package/dist/fetch.js +2 -2
- package/dist/format.js +4 -4
- package/dist/{generic-parser-WFMIRHBX.js → generic-parser-N2PLGBC2.js} +2 -2
- package/dist/git.js +2 -2
- package/dist/glob.js +2 -2
- package/dist/{go-parser-EMKTAAD3.js → go-parser-VDPRQEGM.js} +5 -5
- package/dist/grep.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +41 -41
- package/dist/install.js +4 -4
- package/dist/{json-parser-34DHYCPW.js → json-parser-IJD77VL4.js} +11 -17
- package/dist/json.js +2 -2
- package/dist/kanban.js +2 -2
- package/dist/languages/index.js +2 -2
- package/dist/{legacy-bridge-XM2GV665.js → legacy-bridge-4T4OTSQP.js} +4 -4
- package/dist/lint.js +4 -4
- package/dist/logs.js +2 -2
- package/dist/outdated.js +2 -2
- package/dist/pack.js +40 -40
- package/dist/{parser-dispatch-HZDZSIYH.js → parser-dispatch-4E2SDQUO.js} +4 -4
- package/dist/patch.js +8 -8
- package/dist/plan.js +4 -4
- package/dist/{py-parser-DDG53RXI.js → py-parser-MAW6DHFE.js} +3 -3
- package/dist/read.js +8 -8
- package/dist/replace.js +8 -8
- package/dist/session-kanban.d.ts +7 -0
- package/dist/session-kanban.js +3 -1
- package/dist/task.js +4 -4
- package/dist/test.js +4 -4
- package/dist/todo.js +3 -3
- package/dist/tool-tier.js +41 -41
- package/dist/tree.js +2 -2
- package/dist/typecheck.js +4 -4
- package/dist/write.js +8 -8
- package/dist/{yaml-parser-RGBXEZE4.js → yaml-parser-DFBC5FWH.js} +7 -6
- package/package.json +5 -5
package/dist/audit.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
auditTool
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-HCPSVK7J.js";
|
|
4
|
+
import "./chunk-3LQJXJDM.js";
|
|
5
|
+
import "./chunk-SEONDNLN.js";
|
|
6
6
|
import "./chunk-EMA2XENR.js";
|
|
7
7
|
import "./chunk-SCMRM6NL.js";
|
|
8
8
|
import "./chunk-HDYUBRMF.js";
|
|
9
9
|
import "./chunk-7JJFC6CT.js";
|
|
10
10
|
import "./chunk-5U5ULQX2.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-2IAEJRLT.js";
|
|
12
12
|
export {
|
|
13
13
|
auditTool
|
|
14
14
|
};
|
package/dist/bash.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bashTool
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5KRKL3WD.js";
|
|
4
4
|
import "./chunk-BTSFTGIL.js";
|
|
5
5
|
import "./chunk-PVCB7RUZ.js";
|
|
6
6
|
import "./chunk-SCMRM6NL.js";
|
|
7
7
|
import "./chunk-HDYUBRMF.js";
|
|
8
8
|
import "./chunk-7JJFC6CT.js";
|
|
9
9
|
import "./chunk-5U5ULQX2.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-2IAEJRLT.js";
|
|
11
11
|
export {
|
|
12
12
|
bashTool
|
|
13
13
|
};
|
package/dist/builtin.js
CHANGED
|
@@ -6,65 +6,65 @@ import {
|
|
|
6
6
|
TIER2_TOOLS,
|
|
7
7
|
TIER3_TOOLS,
|
|
8
8
|
builtinTools
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-GNLHBDFO.js";
|
|
10
|
+
import "./chunk-BVHKBBGA.js";
|
|
11
|
+
import "./chunk-JB5JLY7V.js";
|
|
12
12
|
import "./chunk-XRNN44QY.js";
|
|
13
13
|
import "./chunk-IXIS7RSG.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-O6AGFJBO.js";
|
|
15
|
+
import "./chunk-B62LKMWQ.js";
|
|
16
|
+
import "./chunk-KF7GMVNU.js";
|
|
17
|
+
import "./chunk-H2VB7GCR.js";
|
|
18
|
+
import "./chunk-HCPSVK7J.js";
|
|
19
|
+
import "./chunk-NL45OWEO.js";
|
|
20
|
+
import "./chunk-CAF4L6KN.js";
|
|
21
21
|
import "./chunk-YA2ZYCJY.js";
|
|
22
22
|
import "./chunk-B3MGJBFI.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-ZMCV3XOV.js";
|
|
24
|
+
import "./chunk-5MP76C72.js";
|
|
25
|
+
import "./chunk-EGT5QLCB.js";
|
|
26
|
+
import "./chunk-N3OTTQNC.js";
|
|
27
|
+
import "./chunk-YZQSUL5G.js";
|
|
28
|
+
import "./chunk-R3HIZVFS.js";
|
|
29
|
+
import "./chunk-QJARSK2G.js";
|
|
30
|
+
import "./chunk-AH7J5HWL.js";
|
|
31
|
+
import "./chunk-3LQJXJDM.js";
|
|
32
|
+
import "./chunk-SEONDNLN.js";
|
|
33
33
|
import "./chunk-EMA2XENR.js";
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-KMXPP32M.js";
|
|
35
|
+
import "./chunk-HOFVYIPI.js";
|
|
36
|
+
import "./chunk-FI6SOIVE.js";
|
|
37
37
|
import "./chunk-YJTXRH5Y.js";
|
|
38
38
|
import "./chunk-ZBMANLYH.js";
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-5KRKL3WD.js";
|
|
40
|
+
import "./chunk-OGQMPX3J.js";
|
|
41
41
|
import "./chunk-BTSFTGIL.js";
|
|
42
42
|
import "./chunk-PVCB7RUZ.js";
|
|
43
43
|
import "./chunk-SCMRM6NL.js";
|
|
44
44
|
import "./chunk-HDYUBRMF.js";
|
|
45
45
|
import "./chunk-7JJFC6CT.js";
|
|
46
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-4SW6BXUR.js";
|
|
47
47
|
import "./chunk-62OAECEQ.js";
|
|
48
48
|
import "./chunk-NBDZMMG2.js";
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
49
|
+
import "./chunk-S6CGSFLX.js";
|
|
50
|
+
import "./chunk-2NTHMZV3.js";
|
|
51
|
+
import "./chunk-YZECCW3F.js";
|
|
52
52
|
import "./chunk-6XYFYLN7.js";
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
55
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-HIRVCXLP.js";
|
|
54
|
+
import "./chunk-GF4JHLCO.js";
|
|
55
|
+
import "./chunk-WKLUOXR4.js";
|
|
56
56
|
import "./chunk-MSOAX3GC.js";
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
60
|
-
import "./chunk-
|
|
61
|
-
import "./chunk-
|
|
62
|
-
import "./chunk-
|
|
57
|
+
import "./chunk-TU6UVATU.js";
|
|
58
|
+
import "./chunk-ZOUG3KKS.js";
|
|
59
|
+
import "./chunk-C4DSQBTT.js";
|
|
60
|
+
import "./chunk-7E55DAFW.js";
|
|
61
|
+
import "./chunk-M2W36JT7.js";
|
|
62
|
+
import "./chunk-SKRMUHTU.js";
|
|
63
63
|
import "./chunk-ZKC5UNGD.js";
|
|
64
64
|
import "./chunk-YOHO4DVT.js";
|
|
65
65
|
import "./chunk-XHSHNOAF.js";
|
|
66
66
|
import "./chunk-5U5ULQX2.js";
|
|
67
|
-
import "./chunk-
|
|
67
|
+
import "./chunk-2IAEJRLT.js";
|
|
68
68
|
export {
|
|
69
69
|
BUILTIN_TOOL_DESCRIPTIONS,
|
|
70
70
|
OFF_ONLY_TOOLS,
|
|
@@ -221,8 +221,9 @@ function makeRootRelativizer(root) {
|
|
|
221
221
|
const prefix = resolved.endsWith(path.sep) ? resolved : resolved + path.sep;
|
|
222
222
|
const compare = process.platform === "win32" ? prefix.toLowerCase() : prefix;
|
|
223
223
|
return (absPath) => {
|
|
224
|
-
|
|
225
|
-
|
|
224
|
+
const normalizedAbs = process.platform === "win32" ? absPath.replace(/\//g, "\\") : absPath;
|
|
225
|
+
if (normalizedAbs.length <= prefix.length) return absPath;
|
|
226
|
+
const head = process.platform === "win32" ? normalizedAbs.slice(0, prefix.length).toLowerCase() : normalizedAbs.slice(0, prefix.length);
|
|
226
227
|
if (head !== compare) return absPath;
|
|
227
228
|
const rest = absPath.slice(prefix.length);
|
|
228
229
|
return rest.length > 0 ? rest : absPath;
|
|
@@ -244,4 +245,4 @@ export {
|
|
|
244
245
|
normalizeCommandOutput,
|
|
245
246
|
makeRootRelativizer
|
|
246
247
|
};
|
|
247
|
-
//# sourceMappingURL=chunk-
|
|
248
|
+
//# sourceMappingURL=chunk-2IAEJRLT.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
applySessionKanbanTaskToSource,
|
|
3
3
|
taskFileToSerializedGraph
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YZECCW3F.js";
|
|
5
5
|
|
|
6
6
|
// src/kanban.ts
|
|
7
7
|
import { stripLifecycleIssues as stripLifecycleIssues2 } from "@wrongstack/kanban";
|
|
@@ -2118,4 +2118,4 @@ export {
|
|
|
2118
2118
|
recordKanbanVerificationEvidence,
|
|
2119
2119
|
kanbanTool
|
|
2120
2120
|
};
|
|
2121
|
-
//# sourceMappingURL=chunk-
|
|
2121
|
+
//# sourceMappingURL=chunk-2NTHMZV3.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
executeLanguagePlan,
|
|
3
3
|
executePackagePlan,
|
|
4
4
|
planLanguageOperation
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SEONDNLN.js";
|
|
6
6
|
|
|
7
7
|
// src/languages/legacy-bridge.ts
|
|
8
8
|
import * as fs from "node:fs/promises";
|
|
@@ -104,4 +104,4 @@ export {
|
|
|
104
104
|
tryLegacyCodeOperation,
|
|
105
105
|
tryLegacyPackageOperation
|
|
106
106
|
};
|
|
107
|
-
//# sourceMappingURL=chunk-
|
|
107
|
+
//# sourceMappingURL=chunk-3LQJXJDM.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-NBDZMMG2.js";
|
|
6
6
|
import {
|
|
7
7
|
truncateMiddle
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2IAEJRLT.js";
|
|
9
9
|
|
|
10
10
|
// src/fetch.ts
|
|
11
11
|
import { FetchError, ToolError, ToolValidationError } from "@wrongstack/core/types";
|
|
@@ -281,4 +281,4 @@ function prettyJson(s) {
|
|
|
281
281
|
export {
|
|
282
282
|
fetchTool
|
|
283
283
|
};
|
|
284
|
-
//# sourceMappingURL=chunk-
|
|
284
|
+
//# sourceMappingURL=chunk-4SW6BXUR.js.map
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-5U5ULQX2.js";
|
|
18
18
|
import {
|
|
19
19
|
normalizeCommandOutput
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2IAEJRLT.js";
|
|
21
21
|
|
|
22
22
|
// src/bash.ts
|
|
23
23
|
import { spawn } from "node:child_process";
|
|
@@ -575,7 +575,7 @@ var bashTool = {
|
|
|
575
575
|
};
|
|
576
576
|
return;
|
|
577
577
|
}
|
|
578
|
-
const PIPE_TO_SHELL_PATTERN = /\|\s*(sh|bash|ksh|zsh|fish|cmd|powershell|pwsh)/i;
|
|
578
|
+
const PIPE_TO_SHELL_PATTERN = /\|\s*(?:sudo\s+)?(sh|bash|ksh|zsh|fish|cmd|powershell|pwsh)(?:\.exe)?\b/i;
|
|
579
579
|
const pipeToShellNote = PIPE_TO_SHELL_PATTERN.test(input.command) ? "\n\n[wrongstack] Caution: this command pipes output into a shell interpreter (pipe-to-shell). Piped content executes as arbitrary code \u2014 review the source before trusting the result, and prefer downloading to a file and inspecting it first." : "";
|
|
580
580
|
const rawTimeout = typeof input.timeout_ms === "number" && !Number.isNaN(input.timeout_ms) ? input.timeout_ms : DEFAULT_TIMEOUT_MS;
|
|
581
581
|
const timeoutMs = Math.max(1, Math.min(rawTimeout, 6e5));
|
|
@@ -1093,4 +1093,4 @@ export {
|
|
|
1093
1093
|
checkAndBlockKillCommand,
|
|
1094
1094
|
bashTool
|
|
1095
1095
|
};
|
|
1096
|
-
//# sourceMappingURL=chunk-
|
|
1096
|
+
//# sourceMappingURL=chunk-5KRKL3WD.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
enqueueReindex
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TU6UVATU.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveRealInsideRoot,
|
|
6
6
|
safeResolveReal,
|
|
7
7
|
sha256hex
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2IAEJRLT.js";
|
|
9
9
|
|
|
10
10
|
// src/patch.ts
|
|
11
11
|
import { spawn } from "node:child_process";
|
|
@@ -395,4 +395,4 @@ function extractPatchedFiles(output) {
|
|
|
395
395
|
export {
|
|
396
396
|
patchTool
|
|
397
397
|
};
|
|
398
|
-
//# sourceMappingURL=chunk-
|
|
398
|
+
//# sourceMappingURL=chunk-5MP76C72.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolvePythonBinary
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-M2W36JT7.js";
|
|
4
4
|
import {
|
|
5
5
|
parseParserBatchOutput,
|
|
6
6
|
recordParserSubprocess,
|
|
@@ -830,11 +830,11 @@ async function dispatch(file, content, lang) {
|
|
|
830
830
|
return parseSymbols({ file, content, lang });
|
|
831
831
|
}
|
|
832
832
|
case "go": {
|
|
833
|
-
const { parseSymbols } = await import("./go-parser-
|
|
833
|
+
const { parseSymbols } = await import("./go-parser-VDPRQEGM.js");
|
|
834
834
|
return parseSymbols({ file, content, lang: "go" });
|
|
835
835
|
}
|
|
836
836
|
case "py": {
|
|
837
|
-
const { parseSymbols } = await import("./py-parser-
|
|
837
|
+
const { parseSymbols } = await import("./py-parser-MAW6DHFE.js");
|
|
838
838
|
return parseSymbols({ file, content, lang: "py" });
|
|
839
839
|
}
|
|
840
840
|
case "rs": {
|
|
@@ -842,11 +842,11 @@ async function dispatch(file, content, lang) {
|
|
|
842
842
|
return parseSymbols({ file, content, lang: "rs" });
|
|
843
843
|
}
|
|
844
844
|
case "json": {
|
|
845
|
-
const { parseSymbols } = await import("./json-parser-
|
|
845
|
+
const { parseSymbols } = await import("./json-parser-IJD77VL4.js");
|
|
846
846
|
return parseSymbols({ file, content, lang: "json" });
|
|
847
847
|
}
|
|
848
848
|
case "yaml": {
|
|
849
|
-
const { parseSymbols } = await import("./yaml-parser-
|
|
849
|
+
const { parseSymbols } = await import("./yaml-parser-DFBC5FWH.js");
|
|
850
850
|
return parseSymbols({ file, content, lang: "yaml" });
|
|
851
851
|
}
|
|
852
852
|
// Phase 1: ten languages now route through the Tree-Sitter WASM
|
|
@@ -870,11 +870,11 @@ async function dispatch(file, content, lang) {
|
|
|
870
870
|
if (parsed.symbols.length > 0) return parsed;
|
|
871
871
|
} catch {
|
|
872
872
|
}
|
|
873
|
-
const { parseSymbols } = await import("./generic-parser-
|
|
873
|
+
const { parseSymbols } = await import("./generic-parser-N2PLGBC2.js");
|
|
874
874
|
return parseSymbols({ file, content, lang });
|
|
875
875
|
}
|
|
876
876
|
default: {
|
|
877
|
-
const { parseSymbols } = await import("./generic-parser-
|
|
877
|
+
const { parseSymbols } = await import("./generic-parser-N2PLGBC2.js");
|
|
878
878
|
return parseSymbols({ file, content, lang });
|
|
879
879
|
}
|
|
880
880
|
}
|
|
@@ -891,4 +891,4 @@ export {
|
|
|
891
891
|
parseFileContent,
|
|
892
892
|
parseFilesContent
|
|
893
893
|
};
|
|
894
|
-
//# sourceMappingURL=chunk-
|
|
894
|
+
//# sourceMappingURL=chunk-7E55DAFW.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
tryLegacyCodeOperation
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3LQJXJDM.js";
|
|
4
4
|
import {
|
|
5
5
|
spawnStream
|
|
6
6
|
} from "./chunk-EMA2XENR.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
detectPackageManager,
|
|
9
9
|
normalizeCommandOutput,
|
|
10
10
|
safeResolveReal
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2IAEJRLT.js";
|
|
12
12
|
|
|
13
13
|
// src/typecheck.ts
|
|
14
14
|
import * as path from "node:path";
|
|
@@ -162,4 +162,4 @@ async function findTsConfig(cwd) {
|
|
|
162
162
|
export {
|
|
163
163
|
typecheckTool
|
|
164
164
|
};
|
|
165
|
-
//# sourceMappingURL=chunk-
|
|
165
|
+
//# sourceMappingURL=chunk-AH7J5HWL.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
todoTool
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-S6CGSFLX.js";
|
|
4
4
|
import {
|
|
5
5
|
mirrorSessionTasksToKanban
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YZECCW3F.js";
|
|
7
7
|
|
|
8
8
|
// src/task.ts
|
|
9
9
|
import { randomUUID } from "node:crypto";
|
|
@@ -582,4 +582,4 @@ ${formatTaskList(file.tasks)}` : file.tasks.length > 0 ? formatTaskList(file.tas
|
|
|
582
582
|
export {
|
|
583
583
|
taskTool
|
|
584
584
|
};
|
|
585
|
-
//# sourceMappingURL=chunk-
|
|
585
|
+
//# sourceMappingURL=chunk-B62LKMWQ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
safeResolveReal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2IAEJRLT.js";
|
|
4
4
|
|
|
5
5
|
// src/e2e.ts
|
|
6
6
|
import { open, readdir } from "node:fs/promises";
|
|
@@ -422,4 +422,4 @@ export {
|
|
|
422
422
|
discoverE2EProjects,
|
|
423
423
|
e2ePlanTool
|
|
424
424
|
};
|
|
425
|
-
//# sourceMappingURL=chunk-
|
|
425
|
+
//# sourceMappingURL=chunk-BVHKBBGA.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseFilesContent
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7E55DAFW.js";
|
|
4
4
|
import {
|
|
5
5
|
recordFilesystemRead
|
|
6
6
|
} from "./chunk-ZKC5UNGD.js";
|
|
@@ -4993,7 +4993,7 @@ var ParserWorkerPool = class {
|
|
|
4993
4993
|
*/
|
|
4994
4994
|
async reparseInline(batch, orphaned, workerId) {
|
|
4995
4995
|
try {
|
|
4996
|
-
const { parseFileContent } = await import("./parser-dispatch-
|
|
4996
|
+
const { parseFileContent } = await import("./parser-dispatch-4E2SDQUO.js");
|
|
4997
4997
|
for (const item of orphaned) {
|
|
4998
4998
|
if (batch.settled) return;
|
|
4999
4999
|
try {
|
|
@@ -5856,4 +5856,4 @@ export {
|
|
|
5856
5856
|
incomingCallsService,
|
|
5857
5857
|
outgoingCallsService
|
|
5858
5858
|
};
|
|
5859
|
-
//# sourceMappingURL=chunk-
|
|
5859
|
+
//# sourceMappingURL=chunk-C4DSQBTT.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-YJTXRH5Y.js";
|
|
4
4
|
import {
|
|
5
5
|
safeResolveReal
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2IAEJRLT.js";
|
|
7
7
|
|
|
8
8
|
// src/logs.ts
|
|
9
9
|
import { spawn } from "node:child_process";
|
|
@@ -299,4 +299,4 @@ function parseLine(line) {
|
|
|
299
299
|
export {
|
|
300
300
|
logsTool
|
|
301
301
|
};
|
|
302
|
-
//# sourceMappingURL=chunk-
|
|
302
|
+
//# sourceMappingURL=chunk-CAF4L6KN.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-YJTXRH5Y.js";
|
|
5
5
|
import {
|
|
6
6
|
safeResolveReal
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2IAEJRLT.js";
|
|
8
8
|
|
|
9
9
|
// src/json.ts
|
|
10
10
|
import * as fs from "node:fs/promises";
|
|
@@ -615,8 +615,11 @@ function validateJsonSchema(data, schema) {
|
|
|
615
615
|
}
|
|
616
616
|
if (typeof value === "object" && value !== null && !Array.isArray(value) && s["properties"]) {
|
|
617
617
|
const props = s["properties"];
|
|
618
|
+
const obj = value;
|
|
618
619
|
for (const [k, propSchema] of Object.entries(props)) {
|
|
619
|
-
|
|
620
|
+
if (Object.prototype.hasOwnProperty.call(obj, k)) {
|
|
621
|
+
check(obj[k], propSchema, `${path}.${k}`);
|
|
622
|
+
}
|
|
620
623
|
}
|
|
621
624
|
}
|
|
622
625
|
}
|
|
@@ -701,4 +704,4 @@ ${toYaml(v, indent + 1)}`;
|
|
|
701
704
|
export {
|
|
702
705
|
jsonTool
|
|
703
706
|
};
|
|
704
|
-
//# sourceMappingURL=chunk-
|
|
707
|
+
//# sourceMappingURL=chunk-EGT5QLCB.js.map
|
|
@@ -12,12 +12,13 @@ import {
|
|
|
12
12
|
isBinaryBuffer,
|
|
13
13
|
makeRootRelativizer,
|
|
14
14
|
safeResolveReal
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-2IAEJRLT.js";
|
|
16
16
|
|
|
17
17
|
// src/grep.ts
|
|
18
18
|
import { spawn } from "node:child_process";
|
|
19
19
|
import * as fs from "node:fs/promises";
|
|
20
20
|
import * as path from "node:path";
|
|
21
|
+
import { StringDecoder } from "node:string_decoder";
|
|
21
22
|
import { ToolValidationError } from "@wrongstack/core/types";
|
|
22
23
|
import {
|
|
23
24
|
buildChildEnv,
|
|
@@ -31,6 +32,13 @@ var NATIVE_READ_CHUNK_BYTES = 64 * 1024;
|
|
|
31
32
|
var NATIVE_MAX_FILE_BYTES = 1e6;
|
|
32
33
|
var RG_MAX_QUEUE_CHUNKS = 128;
|
|
33
34
|
var RG_MAX_QUEUE_CHARS = 8 * 1024 * 1024;
|
|
35
|
+
function isInsideDefaultIgnoredDirectory(target, root) {
|
|
36
|
+
const relative2 = path.relative(root, target);
|
|
37
|
+
if (!relative2 || relative2 === ".." || relative2.startsWith(`..${path.sep}`) || path.isAbsolute(relative2)) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
return relative2.split(path.sep).some((segment) => DEFAULT_IGNORE.has(segment));
|
|
41
|
+
}
|
|
34
42
|
var grepTool = {
|
|
35
43
|
name: "grep",
|
|
36
44
|
category: "Search",
|
|
@@ -99,6 +107,8 @@ var grepTool = {
|
|
|
99
107
|
});
|
|
100
108
|
}
|
|
101
109
|
const base = input.path ? await safeResolveReal(input.path, ctx) : ctx.cwd;
|
|
110
|
+
const ignoreRoot = await fs.realpath(ctx.projectRoot ?? ctx.cwd).catch(() => path.resolve(ctx.projectRoot ?? ctx.cwd));
|
|
111
|
+
const ignoreTarget = await fs.realpath(base).catch(() => path.resolve(base));
|
|
102
112
|
const mode = input.output_mode ?? "content";
|
|
103
113
|
const rawLimit = typeof input.limit === "number" && Number.isFinite(input.limit) ? input.limit : 200;
|
|
104
114
|
const limit = Math.max(1, Math.min(Math.floor(rawLimit), 2e3));
|
|
@@ -112,6 +122,18 @@ var grepTool = {
|
|
|
112
122
|
const signal = opts?.signal ?? ctx.signal ?? new AbortController().signal;
|
|
113
123
|
const relativize = makeRootRelativizer(ctx.cwd);
|
|
114
124
|
const rgAvailable = await detectRg();
|
|
125
|
+
if (isInsideDefaultIgnoredDirectory(ignoreTarget, ignoreRoot)) {
|
|
126
|
+
yield {
|
|
127
|
+
type: "final",
|
|
128
|
+
output: {
|
|
129
|
+
matches: [],
|
|
130
|
+
count: 0,
|
|
131
|
+
truncated: false,
|
|
132
|
+
used: rgAvailable ? "rg" : "native"
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
115
137
|
if (rgAvailable) {
|
|
116
138
|
try {
|
|
117
139
|
yield* runRgStream(input, base, mode, limit, signal, relativize);
|
|
@@ -132,7 +154,7 @@ function __setRgAvailableForTests(available) {
|
|
|
132
154
|
rgAvailabilityCache = available !== void 0 ? Promise.resolve(available) : void 0;
|
|
133
155
|
}
|
|
134
156
|
function detectRg() {
|
|
135
|
-
rgAvailabilityCache ??= new Promise((
|
|
157
|
+
rgAvailabilityCache ??= new Promise((resolve2) => {
|
|
136
158
|
try {
|
|
137
159
|
const p = spawn("rg", ["--version"], {
|
|
138
160
|
env: buildChildEnv(),
|
|
@@ -140,10 +162,10 @@ function detectRg() {
|
|
|
140
162
|
signal: AbortSignal.timeout(1e4),
|
|
141
163
|
windowsHide: true
|
|
142
164
|
});
|
|
143
|
-
p.on("error", () =>
|
|
144
|
-
p.on("close", (code) =>
|
|
165
|
+
p.on("error", () => resolve2(false));
|
|
166
|
+
p.on("close", (code) => resolve2(code === 0));
|
|
145
167
|
} catch {
|
|
146
|
-
|
|
168
|
+
resolve2(false);
|
|
147
169
|
}
|
|
148
170
|
});
|
|
149
171
|
return rgAvailabilityCache;
|
|
@@ -398,6 +420,7 @@ async function runNative(input, base, mode, limit, signal, relativize) {
|
|
|
398
420
|
let lineNumber = 0;
|
|
399
421
|
let fileHits = 0;
|
|
400
422
|
let leftover = "";
|
|
423
|
+
const decoder = new StringDecoder("utf8");
|
|
401
424
|
let binaryChecked = false;
|
|
402
425
|
const buffer = Buffer.allocUnsafe(Math.min(NATIVE_READ_CHUNK_BYTES, maxBytes));
|
|
403
426
|
while (!stopped && !signal.aborted && bytesReadTotal < maxBytes) {
|
|
@@ -415,7 +438,7 @@ async function runNative(input, base, mode, limit, signal, relativize) {
|
|
|
415
438
|
if (isBinaryBuffer(chunk)) return;
|
|
416
439
|
}
|
|
417
440
|
bytesReadTotal += bytesRead;
|
|
418
|
-
const text = leftover +
|
|
441
|
+
const text = leftover + decoder.write(chunk);
|
|
419
442
|
const lines = text.split(/\r?\n/);
|
|
420
443
|
leftover = lines.pop() ?? "";
|
|
421
444
|
for (const rawLine of lines) {
|
|
@@ -439,6 +462,7 @@ async function runNative(input, base, mode, limit, signal, relativize) {
|
|
|
439
462
|
}
|
|
440
463
|
if (mode === "files_with_matches" && fileHits > 0) break;
|
|
441
464
|
}
|
|
465
|
+
leftover += decoder.end();
|
|
442
466
|
if (!stopped && !signal.aborted && leftover.length > 0) {
|
|
443
467
|
lineNumber++;
|
|
444
468
|
const ln = leftover.length > 4096 ? capSubject(leftover) : leftover;
|
|
@@ -526,4 +550,4 @@ export {
|
|
|
526
550
|
__resetRgDetectionForTests,
|
|
527
551
|
__setRgAvailableForTests
|
|
528
552
|
};
|
|
529
|
-
//# sourceMappingURL=chunk-
|
|
553
|
+
//# sourceMappingURL=chunk-FI6SOIVE.js.map
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
} from "./chunk-MSOAX3GC.js";
|
|
4
4
|
import {
|
|
5
5
|
enqueueReindex
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TU6UVATU.js";
|
|
7
7
|
import {
|
|
8
8
|
safeResolveReal,
|
|
9
9
|
sha256hex,
|
|
10
10
|
truncateDiffPayload
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2IAEJRLT.js";
|
|
12
12
|
|
|
13
13
|
// src/write.ts
|
|
14
14
|
import * as fs from "node:fs/promises";
|
|
@@ -179,4 +179,4 @@ async function finishWrite(input, ctx, prepared, signal) {
|
|
|
179
179
|
export {
|
|
180
180
|
writeTool
|
|
181
181
|
};
|
|
182
|
-
//# sourceMappingURL=chunk-
|
|
182
|
+
//# sourceMappingURL=chunk-GF4JHLCO.js.map
|