@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.
Files changed (89) hide show
  1. package/dist/audit.js +4 -4
  2. package/dist/bash.js +2 -2
  3. package/dist/builtin.js +39 -39
  4. package/dist/{chunk-HKR56VNF.js → chunk-2IAEJRLT.js} +4 -3
  5. package/dist/{chunk-5UA4TNJJ.js → chunk-2NTHMZV3.js} +2 -2
  6. package/dist/{chunk-JQ43NVFU.js → chunk-3LQJXJDM.js} +2 -2
  7. package/dist/{chunk-47GYABZW.js → chunk-4SW6BXUR.js} +2 -2
  8. package/dist/{chunk-4KI4HHID.js → chunk-5KRKL3WD.js} +3 -3
  9. package/dist/{chunk-7EQ2LUXU.js → chunk-5MP76C72.js} +3 -3
  10. package/dist/{chunk-7PEZU5Y4.js → chunk-7E55DAFW.js} +8 -8
  11. package/dist/{chunk-D4HWMWGE.js → chunk-AH7J5HWL.js} +3 -3
  12. package/dist/{chunk-OZVGRDCM.js → chunk-B62LKMWQ.js} +3 -3
  13. package/dist/{chunk-WKXL5XHU.js → chunk-BVHKBBGA.js} +2 -2
  14. package/dist/{chunk-54SIRJ6D.js → chunk-C4DSQBTT.js} +3 -3
  15. package/dist/{chunk-2ZWQIVEW.js → chunk-CAF4L6KN.js} +2 -2
  16. package/dist/{chunk-MG7CUN6R.js → chunk-EGT5QLCB.js} +6 -3
  17. package/dist/{chunk-ZSW5KO5S.js → chunk-FI6SOIVE.js} +31 -7
  18. package/dist/{chunk-TL5T4A4E.js → chunk-GF4JHLCO.js} +3 -3
  19. package/dist/{chunk-OVFQC6FU.js → chunk-GNLHBDFO.js} +341 -146
  20. package/dist/{chunk-ZETZHHV5.js → chunk-H2VB7GCR.js} +3 -3
  21. package/dist/{chunk-C64UUXTA.js → chunk-HCPSVK7J.js} +3 -3
  22. package/dist/{chunk-K7Y2IWEB.js → chunk-HIRVCXLP.js} +4 -4
  23. package/dist/{chunk-IMIHTHF7.js → chunk-HOFVYIPI.js} +38 -10
  24. package/dist/{chunk-CYPYJIAF.js → chunk-JB5JLY7V.js} +4 -4
  25. package/dist/{chunk-S6E2AM4U.js → chunk-KF7GMVNU.js} +3 -3
  26. package/dist/{chunk-IOOFLBVM.js → chunk-KMXPP32M.js} +3 -3
  27. package/dist/{chunk-REWOZIA4.js → chunk-M2W36JT7.js} +2 -2
  28. package/dist/{chunk-FRIUJ534.js → chunk-MF6ZUBI7.js} +3 -3
  29. package/dist/{chunk-BU6VUXWG.js → chunk-N3OTTQNC.js} +2 -2
  30. package/dist/{chunk-YJQQ5F5J.js → chunk-NL45OWEO.js} +3 -3
  31. package/dist/{chunk-NKOTOW6X.js → chunk-O6AGFJBO.js} +3 -3
  32. package/dist/{chunk-YILT3CSO.js → chunk-OGQMPX3J.js} +18 -7
  33. package/dist/{chunk-OBVXDVLE.js → chunk-QJARSK2G.js} +3 -3
  34. package/dist/{chunk-R36RWYXE.js → chunk-R3HIZVFS.js} +3 -3
  35. package/dist/{chunk-TGVQMKVH.js → chunk-S6CGSFLX.js} +3 -3
  36. package/dist/{chunk-JK5WXW4S.js → chunk-SEONDNLN.js} +2 -2
  37. package/dist/{chunk-6IEBD27U.js → chunk-SKRMUHTU.js} +2 -2
  38. package/dist/{chunk-DOHU3XHS.js → chunk-TU6UVATU.js} +3 -3
  39. package/dist/{chunk-G35NLPG5.js → chunk-WKLUOXR4.js} +3 -3
  40. package/dist/{chunk-6ZRP5IKQ.js → chunk-YUK3WLHJ.js} +2 -2
  41. package/dist/{chunk-5BKQVP56.js → chunk-YZECCW3F.js} +34 -14
  42. package/dist/{chunk-3F7HQ3KS.js → chunk-YZQSUL5G.js} +2 -2
  43. package/dist/{chunk-2IC5FRD7.js → chunk-ZMCV3XOV.js} +2 -2
  44. package/dist/{chunk-WBAPU3AB.js → chunk-ZOUG3KKS.js} +2 -2
  45. package/dist/clarify.d.ts +26 -19
  46. package/dist/codebase-index/index.js +8 -8
  47. package/dist/codebase-index/parser-worker-script.js +3 -3
  48. package/dist/codebase-index/project-server.js +5 -5
  49. package/dist/codebase-index/worker.js +4 -4
  50. package/dist/diff.js +2 -2
  51. package/dist/e2e.js +2 -2
  52. package/dist/edit.js +8 -8
  53. package/dist/exec.js +2 -2
  54. package/dist/fetch.js +2 -2
  55. package/dist/format.js +4 -4
  56. package/dist/{generic-parser-WFMIRHBX.js → generic-parser-N2PLGBC2.js} +2 -2
  57. package/dist/git.js +2 -2
  58. package/dist/glob.js +2 -2
  59. package/dist/{go-parser-EMKTAAD3.js → go-parser-VDPRQEGM.js} +5 -5
  60. package/dist/grep.js +2 -2
  61. package/dist/index.d.ts +1 -1
  62. package/dist/index.js +41 -41
  63. package/dist/install.js +4 -4
  64. package/dist/{json-parser-34DHYCPW.js → json-parser-IJD77VL4.js} +11 -17
  65. package/dist/json.js +2 -2
  66. package/dist/kanban.js +2 -2
  67. package/dist/languages/index.js +2 -2
  68. package/dist/{legacy-bridge-XM2GV665.js → legacy-bridge-4T4OTSQP.js} +4 -4
  69. package/dist/lint.js +4 -4
  70. package/dist/logs.js +2 -2
  71. package/dist/outdated.js +2 -2
  72. package/dist/pack.js +40 -40
  73. package/dist/{parser-dispatch-HZDZSIYH.js → parser-dispatch-4E2SDQUO.js} +4 -4
  74. package/dist/patch.js +8 -8
  75. package/dist/plan.js +4 -4
  76. package/dist/{py-parser-DDG53RXI.js → py-parser-MAW6DHFE.js} +3 -3
  77. package/dist/read.js +8 -8
  78. package/dist/replace.js +8 -8
  79. package/dist/session-kanban.d.ts +7 -0
  80. package/dist/session-kanban.js +3 -1
  81. package/dist/task.js +4 -4
  82. package/dist/test.js +4 -4
  83. package/dist/todo.js +3 -3
  84. package/dist/tool-tier.js +41 -41
  85. package/dist/tree.js +2 -2
  86. package/dist/typecheck.js +4 -4
  87. package/dist/write.js +8 -8
  88. package/dist/{yaml-parser-RGBXEZE4.js → yaml-parser-DFBC5FWH.js} +7 -6
  89. package/package.json +5 -5
package/dist/audit.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  auditTool
3
- } from "./chunk-C64UUXTA.js";
4
- import "./chunk-JQ43NVFU.js";
5
- import "./chunk-JK5WXW4S.js";
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-HKR56VNF.js";
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-4KI4HHID.js";
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-HKR56VNF.js";
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-OVFQC6FU.js";
10
- import "./chunk-WKXL5XHU.js";
11
- import "./chunk-CYPYJIAF.js";
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-NKOTOW6X.js";
15
- import "./chunk-OZVGRDCM.js";
16
- import "./chunk-S6E2AM4U.js";
17
- import "./chunk-ZETZHHV5.js";
18
- import "./chunk-C64UUXTA.js";
19
- import "./chunk-YJQQ5F5J.js";
20
- import "./chunk-2ZWQIVEW.js";
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-2IC5FRD7.js";
24
- import "./chunk-7EQ2LUXU.js";
25
- import "./chunk-MG7CUN6R.js";
26
- import "./chunk-BU6VUXWG.js";
27
- import "./chunk-3F7HQ3KS.js";
28
- import "./chunk-R36RWYXE.js";
29
- import "./chunk-OBVXDVLE.js";
30
- import "./chunk-D4HWMWGE.js";
31
- import "./chunk-JQ43NVFU.js";
32
- import "./chunk-JK5WXW4S.js";
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-IOOFLBVM.js";
35
- import "./chunk-IMIHTHF7.js";
36
- import "./chunk-ZSW5KO5S.js";
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-4KI4HHID.js";
40
- import "./chunk-YILT3CSO.js";
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-47GYABZW.js";
46
+ import "./chunk-4SW6BXUR.js";
47
47
  import "./chunk-62OAECEQ.js";
48
48
  import "./chunk-NBDZMMG2.js";
49
- import "./chunk-TGVQMKVH.js";
50
- import "./chunk-5UA4TNJJ.js";
51
- import "./chunk-5BKQVP56.js";
49
+ import "./chunk-S6CGSFLX.js";
50
+ import "./chunk-2NTHMZV3.js";
51
+ import "./chunk-YZECCW3F.js";
52
52
  import "./chunk-6XYFYLN7.js";
53
- import "./chunk-K7Y2IWEB.js";
54
- import "./chunk-TL5T4A4E.js";
55
- import "./chunk-G35NLPG5.js";
53
+ import "./chunk-HIRVCXLP.js";
54
+ import "./chunk-GF4JHLCO.js";
55
+ import "./chunk-WKLUOXR4.js";
56
56
  import "./chunk-MSOAX3GC.js";
57
- import "./chunk-DOHU3XHS.js";
58
- import "./chunk-WBAPU3AB.js";
59
- import "./chunk-54SIRJ6D.js";
60
- import "./chunk-7PEZU5Y4.js";
61
- import "./chunk-REWOZIA4.js";
62
- import "./chunk-6IEBD27U.js";
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-HKR56VNF.js";
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
- if (absPath.length <= prefix.length) return absPath;
225
- const head = process.platform === "win32" ? absPath.slice(0, prefix.length).toLowerCase() : absPath.slice(0, prefix.length);
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-HKR56VNF.js.map
248
+ //# sourceMappingURL=chunk-2IAEJRLT.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  applySessionKanbanTaskToSource,
3
3
  taskFileToSerializedGraph
4
- } from "./chunk-5BKQVP56.js";
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-5UA4TNJJ.js.map
2121
+ //# sourceMappingURL=chunk-2NTHMZV3.js.map
@@ -2,7 +2,7 @@ import {
2
2
  executeLanguagePlan,
3
3
  executePackagePlan,
4
4
  planLanguageOperation
5
- } from "./chunk-JK5WXW4S.js";
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-JQ43NVFU.js.map
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-HKR56VNF.js";
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-47GYABZW.js.map
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-HKR56VNF.js";
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-4KI4HHID.js.map
1096
+ //# sourceMappingURL=chunk-5KRKL3WD.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  enqueueReindex
3
- } from "./chunk-DOHU3XHS.js";
3
+ } from "./chunk-TU6UVATU.js";
4
4
  import {
5
5
  resolveRealInsideRoot,
6
6
  safeResolveReal,
7
7
  sha256hex
8
- } from "./chunk-HKR56VNF.js";
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-7EQ2LUXU.js.map
398
+ //# sourceMappingURL=chunk-5MP76C72.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolvePythonBinary
3
- } from "./chunk-REWOZIA4.js";
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-EMKTAAD3.js");
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-DDG53RXI.js");
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-34DHYCPW.js");
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-RGBXEZE4.js");
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-WFMIRHBX.js");
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-WFMIRHBX.js");
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-7PEZU5Y4.js.map
894
+ //# sourceMappingURL=chunk-7E55DAFW.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  tryLegacyCodeOperation
3
- } from "./chunk-JQ43NVFU.js";
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-HKR56VNF.js";
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-D4HWMWGE.js.map
165
+ //# sourceMappingURL=chunk-AH7J5HWL.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  todoTool
3
- } from "./chunk-TGVQMKVH.js";
3
+ } from "./chunk-S6CGSFLX.js";
4
4
  import {
5
5
  mirrorSessionTasksToKanban
6
- } from "./chunk-5BKQVP56.js";
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-OZVGRDCM.js.map
585
+ //# sourceMappingURL=chunk-B62LKMWQ.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  safeResolveReal
3
- } from "./chunk-HKR56VNF.js";
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-WKXL5XHU.js.map
425
+ //# sourceMappingURL=chunk-BVHKBBGA.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseFilesContent
3
- } from "./chunk-7PEZU5Y4.js";
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-HZDZSIYH.js");
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-54SIRJ6D.js.map
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-HKR56VNF.js";
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-2ZWQIVEW.js.map
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-HKR56VNF.js";
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
- check(value[k], propSchema, `${path}.${k}`);
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-MG7CUN6R.js.map
707
+ //# sourceMappingURL=chunk-EGT5QLCB.js.map
@@ -12,12 +12,13 @@ import {
12
12
  isBinaryBuffer,
13
13
  makeRootRelativizer,
14
14
  safeResolveReal
15
- } from "./chunk-HKR56VNF.js";
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((resolve) => {
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", () => resolve(false));
144
- p.on("close", (code) => resolve(code === 0));
165
+ p.on("error", () => resolve2(false));
166
+ p.on("close", (code) => resolve2(code === 0));
145
167
  } catch {
146
- resolve(false);
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 + chunk.toString("utf8");
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-ZSW5KO5S.js.map
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-DOHU3XHS.js";
6
+ } from "./chunk-TU6UVATU.js";
7
7
  import {
8
8
  safeResolveReal,
9
9
  sha256hex,
10
10
  truncateDiffPayload
11
- } from "./chunk-HKR56VNF.js";
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-TL5T4A4E.js.map
182
+ //# sourceMappingURL=chunk-GF4JHLCO.js.map