@wrongstack/tools 1.0.2 → 1.0.3

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 (65) hide show
  1. package/dist/_win32-resolve.d.ts +1 -6
  2. package/dist/audit.js +5 -5
  3. package/dist/bash.js +2 -2
  4. package/dist/builtin.js +29 -29
  5. package/dist/{chunk-NFX2IUQA.js → chunk-32XPUSY3.js} +3 -3
  6. package/dist/{chunk-52UXXQMP.js → chunk-3JVSOBHU.js} +3 -3
  7. package/dist/{chunk-7N5U2RAU.js → chunk-3LS3FYEF.js} +2 -2
  8. package/dist/{chunk-FBUP524S.js → chunk-4YKVHCQC.js} +13 -2
  9. package/dist/{chunk-KE7A76VC.js → chunk-5U5ULQX2.js} +4 -14
  10. package/dist/{chunk-DL2ARI4S.js → chunk-6LCKF5KH.js} +5 -5
  11. package/dist/{chunk-MBR5VAB5.js → chunk-6ZLRRC74.js} +2 -2
  12. package/dist/{chunk-DKHMPKDG.js → chunk-77MBK46T.js} +3 -3
  13. package/dist/{chunk-7XUEPBNT.js → chunk-AMURQAJX.js} +2 -2
  14. package/dist/{chunk-TI5COGLY.js → chunk-CVNCSMVU.js} +3 -3
  15. package/dist/{chunk-MJSJWXBF.js → chunk-DX5KZEMK.js} +14 -2
  16. package/dist/{chunk-TU5MTW2S.js → chunk-E2ZD4ERD.js} +2 -2
  17. package/dist/{chunk-DRRY6SCM.js → chunk-EMA2XENR.js} +2 -2
  18. package/dist/{chunk-3D5DJWOE.js → chunk-FC3X7GGJ.js} +11 -3
  19. package/dist/{chunk-T3SMFF5Q.js → chunk-GU7QJ37F.js} +2 -2
  20. package/dist/{chunk-4WPBS45A.js → chunk-IRUEHGCR.js} +3 -3
  21. package/dist/{chunk-WEEVSWQB.js → chunk-KIQTABBJ.js} +3 -3
  22. package/dist/{chunk-6H4ERJP7.js → chunk-KYVOTHG7.js} +2 -2
  23. package/dist/{chunk-O6BY43ZB.js → chunk-MIV2RU5B.js} +3 -3
  24. package/dist/{chunk-5KS24LTS.js → chunk-NOCU555K.js} +2 -2
  25. package/dist/{chunk-6GOZTS6F.js → chunk-OUEH4I4X.js} +3 -3
  26. package/dist/{chunk-HWXIRVKH.js → chunk-PNLDTRC5.js} +26 -12
  27. package/dist/{chunk-KVTEIUND.js → chunk-QU2VRCMM.js} +2 -2
  28. package/dist/{chunk-3AU6CZWL.js → chunk-REWOZIA4.js} +2 -2
  29. package/dist/{chunk-MGPR7VG3.js → chunk-T7YVY2BV.js} +2 -2
  30. package/dist/{chunk-UCXFTCAI.js → chunk-TYRVYBHW.js} +22 -22
  31. package/dist/{chunk-LQSOU63Z.js → chunk-VKAJMHVG.js} +2 -2
  32. package/dist/{chunk-EL2NJXSK.js → chunk-VO6M2FVG.js} +2 -2
  33. package/dist/{chunk-NJX2RXKJ.js → chunk-YDTRKEYY.js} +11 -3
  34. package/dist/{chunk-UOYRAS4J.js → chunk-YECHJJJF.js} +3 -3
  35. package/dist/{chunk-QA6IASYX.js → chunk-Z34CUZCZ.js} +3 -3
  36. package/dist/codebase-index/index.js +8 -8
  37. package/dist/codebase-index/parser-worker-script.js +3 -3
  38. package/dist/codebase-index/project-server.js +5 -5
  39. package/dist/codebase-index/worker.js +4 -4
  40. package/dist/edit.js +7 -7
  41. package/dist/exec.js +2 -2
  42. package/dist/fetch.js +1 -1
  43. package/dist/format.js +5 -5
  44. package/dist/{go-parser-QIEXU3P2.js → go-parser-EMKTAAD3.js} +2 -2
  45. package/dist/index.js +31 -31
  46. package/dist/install.js +5 -5
  47. package/dist/languages/index.js +3 -3
  48. package/dist/{legacy-bridge-YXANP5QB.js → legacy-bridge-WVQ4BHDI.js} +5 -5
  49. package/dist/lint.js +5 -5
  50. package/dist/outdated.js +2 -2
  51. package/dist/pack.js +30 -30
  52. package/dist/{parser-dispatch-37FT3EXQ.js → parser-dispatch-UQAB4E6V.js} +4 -4
  53. package/dist/patch.js +7 -7
  54. package/dist/plan.js +2 -2
  55. package/dist/{py-parser-6GJTGUXK.js → py-parser-DDG53RXI.js} +3 -3
  56. package/dist/read.js +7 -7
  57. package/dist/replace.js +7 -7
  58. package/dist/task.js +2 -2
  59. package/dist/test.js +5 -5
  60. package/dist/todo.js +1 -1
  61. package/dist/tool-tier.js +31 -31
  62. package/dist/typecheck.js +5 -5
  63. package/dist/win32.js +1 -1
  64. package/dist/write.js +7 -7
  65. package/package.json +5 -5
@@ -1,3 +1,4 @@
1
+ export { buildWin32CmdShimInvocation, type Win32CmdShimInvocation, } from '@wrongstack/core/utils';
1
2
  /**
2
3
  * On Windows, Node.js `spawn()` without a shell does NOT resolve .cmd/.bat
3
4
  * extensions through PATHEXT — it only auto-resolves .exe. Most Node.js CLI
@@ -28,15 +29,9 @@ export declare function resolveWin32Command(cmd: string): string;
28
29
  * diagnostic. We never throw from here.
29
30
  */
30
31
  export declare function resolvePowerShell(cmd: string): string;
31
- export interface Win32CmdShimInvocation {
32
- command: string;
33
- args: string[];
34
- windowsVerbatimArguments: true;
35
- }
36
32
  /**
37
33
  * Throw if any argument contains a cmd.exe command-injection metacharacter.
38
34
  * Call this ONLY on the Windows `.cmd`/`.bat` shim path. A no-op for safe args.
39
35
  */
40
36
  export declare function assertSafeWin32ShellArgs(args: readonly unknown[]): void;
41
- export declare function buildWin32CmdShimInvocation(command: string, args?: readonly string[]): Win32CmdShimInvocation;
42
37
  //# sourceMappingURL=_win32-resolve.d.ts.map
package/dist/audit.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  auditTool
3
- } from "./chunk-WEEVSWQB.js";
4
- import "./chunk-T3SMFF5Q.js";
5
- import "./chunk-7N5U2RAU.js";
6
- import "./chunk-DRRY6SCM.js";
3
+ } from "./chunk-KIQTABBJ.js";
4
+ import "./chunk-GU7QJ37F.js";
5
+ import "./chunk-3LS3FYEF.js";
6
+ import "./chunk-EMA2XENR.js";
7
7
  import "./chunk-SCMRM6NL.js";
8
8
  import "./chunk-HDYUBRMF.js";
9
9
  import "./chunk-7JJFC6CT.js";
10
- import "./chunk-KE7A76VC.js";
10
+ import "./chunk-5U5ULQX2.js";
11
11
  import "./chunk-ZUFHAHTE.js";
12
12
  export {
13
13
  auditTool
package/dist/bash.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  bashTool
3
- } from "./chunk-6H4ERJP7.js";
3
+ } from "./chunk-KYVOTHG7.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
- import "./chunk-KE7A76VC.js";
9
+ import "./chunk-5U5ULQX2.js";
10
10
  import "./chunk-ZUFHAHTE.js";
11
11
  export {
12
12
  bashTool
package/dist/builtin.js CHANGED
@@ -6,68 +6,68 @@ import {
6
6
  TIER2_TOOLS,
7
7
  TIER3_TOOLS,
8
8
  builtinTools
9
- } from "./chunk-UCXFTCAI.js";
9
+ } from "./chunk-TYRVYBHW.js";
10
10
  import "./chunk-RV7BVTDG.js";
11
- import "./chunk-HWXIRVKH.js";
11
+ import "./chunk-PNLDTRC5.js";
12
12
  import "./chunk-XRNN44QY.js";
13
- import "./chunk-5KS24LTS.js";
14
- import "./chunk-LQSOU63Z.js";
13
+ import "./chunk-NOCU555K.js";
14
+ import "./chunk-VKAJMHVG.js";
15
15
  import "./chunk-24T5XIJU.js";
16
16
  import "./chunk-B3MGJBFI.js";
17
17
  import "./chunk-VBF2YXUW.js";
18
18
  import "./chunk-7ODZTPCU.js";
19
19
  import "./chunk-IXIS7RSG.js";
20
- import "./chunk-QA6IASYX.js";
21
- import "./chunk-O6BY43ZB.js";
22
- import "./chunk-WEEVSWQB.js";
23
- import "./chunk-6GOZTS6F.js";
20
+ import "./chunk-Z34CUZCZ.js";
21
+ import "./chunk-MIV2RU5B.js";
22
+ import "./chunk-KIQTABBJ.js";
23
+ import "./chunk-OUEH4I4X.js";
24
24
  import "./chunk-VU3QBYL4.js";
25
25
  import "./chunk-CHEK3ASV.js";
26
26
  import "./chunk-KLJZ4WV4.js";
27
27
  import "./chunk-AQ5YBURX.js";
28
- import "./chunk-TU5MTW2S.js";
28
+ import "./chunk-E2ZD4ERD.js";
29
29
  import "./chunk-VZGPASGD.js";
30
30
  import "./chunk-7HL23T3T.js";
31
31
  import "./chunk-JDOO4P6Z.js";
32
- import "./chunk-3D5DJWOE.js";
33
- import "./chunk-NJX2RXKJ.js";
34
- import "./chunk-4WPBS45A.js";
35
- import "./chunk-T3SMFF5Q.js";
36
- import "./chunk-7N5U2RAU.js";
37
- import "./chunk-DRRY6SCM.js";
38
- import "./chunk-DKHMPKDG.js";
32
+ import "./chunk-FC3X7GGJ.js";
33
+ import "./chunk-YDTRKEYY.js";
34
+ import "./chunk-IRUEHGCR.js";
35
+ import "./chunk-GU7QJ37F.js";
36
+ import "./chunk-3LS3FYEF.js";
37
+ import "./chunk-EMA2XENR.js";
38
+ import "./chunk-77MBK46T.js";
39
39
  import "./chunk-ASEXQRA7.js";
40
40
  import "./chunk-4ERMPDHV.js";
41
41
  import "./chunk-YJTXRH5Y.js";
42
42
  import "./chunk-ZBMANLYH.js";
43
- import "./chunk-6H4ERJP7.js";
44
- import "./chunk-MGPR7VG3.js";
43
+ import "./chunk-KYVOTHG7.js";
44
+ import "./chunk-T7YVY2BV.js";
45
45
  import "./chunk-BTSFTGIL.js";
46
46
  import "./chunk-PVCB7RUZ.js";
47
47
  import "./chunk-SCMRM6NL.js";
48
48
  import "./chunk-HDYUBRMF.js";
49
49
  import "./chunk-7JJFC6CT.js";
50
- import "./chunk-MJSJWXBF.js";
50
+ import "./chunk-DX5KZEMK.js";
51
51
  import "./chunk-62OAECEQ.js";
52
52
  import "./chunk-NBDZMMG2.js";
53
- import "./chunk-FBUP524S.js";
53
+ import "./chunk-4YKVHCQC.js";
54
54
  import "./chunk-SMARDKAC.js";
55
55
  import "./chunk-X6KXNHUO.js";
56
56
  import "./chunk-SOR7OCYP.js";
57
- import "./chunk-UOYRAS4J.js";
58
- import "./chunk-KVTEIUND.js";
59
- import "./chunk-7XUEPBNT.js";
57
+ import "./chunk-YECHJJJF.js";
58
+ import "./chunk-QU2VRCMM.js";
59
+ import "./chunk-AMURQAJX.js";
60
60
  import "./chunk-MSOAX3GC.js";
61
- import "./chunk-TI5COGLY.js";
62
- import "./chunk-MBR5VAB5.js";
63
- import "./chunk-52UXXQMP.js";
64
- import "./chunk-DL2ARI4S.js";
65
- import "./chunk-3AU6CZWL.js";
61
+ import "./chunk-CVNCSMVU.js";
62
+ import "./chunk-6ZLRRC74.js";
63
+ import "./chunk-3JVSOBHU.js";
64
+ import "./chunk-6LCKF5KH.js";
65
+ import "./chunk-REWOZIA4.js";
66
66
  import "./chunk-6IEBD27U.js";
67
67
  import "./chunk-ZKC5UNGD.js";
68
68
  import "./chunk-YOHO4DVT.js";
69
69
  import "./chunk-2CTZW6JQ.js";
70
- import "./chunk-KE7A76VC.js";
70
+ import "./chunk-5U5ULQX2.js";
71
71
  import "./chunk-ZUFHAHTE.js";
72
72
  export {
73
73
  BUILTIN_TOOL_DESCRIPTIONS,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  builtinToolsPack
3
- } from "./chunk-EL2NJXSK.js";
3
+ } from "./chunk-VO6M2FVG.js";
4
4
  import {
5
5
  TIER1_TOOLS,
6
6
  TIER2_TOOLS
7
- } from "./chunk-UCXFTCAI.js";
7
+ } from "./chunk-TYRVYBHW.js";
8
8
 
9
9
  // src/tool-tier.ts
10
10
  function toolNameSet(tools) {
@@ -54,4 +54,4 @@ export {
54
54
  selectBuiltinToolsForTier,
55
55
  registerBuiltinToolTier
56
56
  };
57
- //# sourceMappingURL=chunk-NFX2IUQA.js.map
57
+ //# sourceMappingURL=chunk-32XPUSY3.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseFilesContent
3
- } from "./chunk-DL2ARI4S.js";
3
+ } from "./chunk-6LCKF5KH.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-37FT3EXQ.js");
4996
+ const { parseFileContent } = await import("./parser-dispatch-UQAB4E6V.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-52UXXQMP.js.map
5859
+ //# sourceMappingURL=chunk-3JVSOBHU.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  spawnStream
3
- } from "./chunk-DRRY6SCM.js";
3
+ } from "./chunk-EMA2XENR.js";
4
4
  import {
5
5
  normalizeCommandOutput,
6
6
  safeResolveReal
@@ -3515,4 +3515,4 @@ export {
3515
3515
  languagePackageTool,
3516
3516
  languageInfoTool
3517
3517
  };
3518
- //# sourceMappingURL=chunk-7N5U2RAU.js.map
3518
+ //# sourceMappingURL=chunk-3LS3FYEF.js.map
@@ -26,6 +26,16 @@ function activeBoardId(items, ctx) {
26
26
  const metaBoardId = metaKanban && typeof metaKanban === "object" ? metaKanban["boardId"] : void 0;
27
27
  return ctx.currentKanbanBoardId ?? (typeof metaBoardId === "string" ? metaBoardId : void 0) ?? items.find((item) => item.kanbanBoardId)?.kanbanBoardId ?? "";
28
28
  }
29
+ function deduplicateManagedTodoRows(items, boardId) {
30
+ const rowsById = /* @__PURE__ */ new Map();
31
+ for (const item of items) {
32
+ const existing = rowsById.get(item.id);
33
+ const itemIsBound = item.kanbanBoardId === boardId && Boolean(item.kanbanTaskId);
34
+ const existingIsBound = existing?.kanbanBoardId === boardId && Boolean(existing.kanbanTaskId);
35
+ if (!existing || itemIsBound && !existingIsBound) rowsById.set(item.id, item);
36
+ }
37
+ return [...rowsById.values()];
38
+ }
29
39
  function bindTodosToBoard(items, previous, board) {
30
40
  const previousById = new Map(previous.map((item) => [item.id, item]));
31
41
  const taskById = new Map(board.tasks.map((task) => [task.id, task]));
@@ -354,7 +364,8 @@ var todoTool = {
354
364
  const boardId = activeBoardId(items, ctx);
355
365
  let board = boardId ? await getBoard(ctx.projectRoot, boardId) : null;
356
366
  const managed = board?.lifecycle?.mode === "managed";
357
- let boundItems = managed && board ? bindTodosToBoard(items, ctx.todos ?? [], board) : items;
367
+ const managedItems = managed && board ? deduplicateManagedTodoRows(items, board.id) : items;
368
+ let boundItems = managed && board ? bindTodosToBoard(managedItems, ctx.todos ?? [], board) : managedItems;
358
369
  const creationWarnings = [];
359
370
  if (managed && board) {
360
371
  const managedBoardId = board.id;
@@ -476,4 +487,4 @@ var todoTool = {
476
487
  export {
477
488
  todoTool
478
489
  };
479
- //# sourceMappingURL=chunk-FBUP524S.js.map
490
+ //# sourceMappingURL=chunk-4YKVHCQC.js.map
@@ -1,6 +1,9 @@
1
1
  // src/_win32-resolve.ts
2
2
  import * as fs from "node:fs";
3
3
  import * as path from "node:path";
4
+ import {
5
+ buildWin32CmdShimInvocation
6
+ } from "@wrongstack/core/utils";
4
7
  function resolveWin32Command(cmd) {
5
8
  if (process.platform !== "win32") return cmd;
6
9
  if (cmd.includes("/") || cmd.includes("\\") || path.extname(cmd.replace(/\//g, "\\"))) {
@@ -46,19 +49,6 @@ function assertSafeWin32ShellArgs(args) {
46
49
  }
47
50
  }
48
51
  }
49
- function buildWin32CmdShimInvocation(command, args = []) {
50
- assertSafeWin32ShellArgs([command, ...args]);
51
- const line = ["call", quoteWin32CmdArg(command), ...args.map(quoteWin32CmdArg)].join(" ");
52
- return {
53
- command: process.env["COMSPEC"] ?? "cmd.exe",
54
- args: ["/d", "/c", line],
55
- windowsVerbatimArguments: true
56
- };
57
- }
58
- function quoteWin32CmdArg(arg) {
59
- const escaped = arg.replace(/(\\+)$/, "$1$1");
60
- return `"${escaped}"`;
61
- }
62
52
 
63
53
  export {
64
54
  resolveWin32Command,
@@ -66,4 +56,4 @@ export {
66
56
  assertSafeWin32ShellArgs,
67
57
  buildWin32CmdShimInvocation
68
58
  };
69
- //# sourceMappingURL=chunk-KE7A76VC.js.map
59
+ //# sourceMappingURL=chunk-5U5ULQX2.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolvePythonBinary
3
- } from "./chunk-3AU6CZWL.js";
3
+ } from "./chunk-REWOZIA4.js";
4
4
  import {
5
5
  parseParserBatchOutput,
6
6
  recordParserSubprocess,
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-ZKC5UNGD.js";
9
9
  import {
10
10
  resolveWin32Command
11
- } from "./chunk-KE7A76VC.js";
11
+ } from "./chunk-5U5ULQX2.js";
12
12
 
13
13
  // src/codebase-index/import-extractor.ts
14
14
  var IMPORT_MAX_FILE_CHARS = 512 * 1024;
@@ -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-QIEXU3P2.js");
833
+ const { parseSymbols } = await import("./go-parser-EMKTAAD3.js");
834
834
  return parseSymbols({ file, content, lang: "go" });
835
835
  }
836
836
  case "py": {
837
- const { parseSymbols } = await import("./py-parser-6GJTGUXK.js");
837
+ const { parseSymbols } = await import("./py-parser-DDG53RXI.js");
838
838
  return parseSymbols({ file, content, lang: "py" });
839
839
  }
840
840
  case "rs": {
@@ -891,4 +891,4 @@ export {
891
891
  parseFileContent,
892
892
  parseFilesContent
893
893
  };
894
- //# sourceMappingURL=chunk-DL2ARI4S.js.map
894
+ //# sourceMappingURL=chunk-6LCKF5KH.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveIndexDir
3
- } from "./chunk-52UXXQMP.js";
3
+ } from "./chunk-3JVSOBHU.js";
4
4
 
5
5
  // src/codebase-index/project-server-endpoint.ts
6
6
  import { createHash } from "node:crypto";
@@ -120,4 +120,4 @@ export {
120
120
  PROJECT_INDEX_SERVER_MAX_FRAME_CHARS,
121
121
  encodeProjectServerMessage
122
122
  };
123
- //# sourceMappingURL=chunk-MBR5VAB5.js.map
123
+ //# sourceMappingURL=chunk-6ZLRRC74.js.map
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-ZBMANLYH.js";
7
7
  import {
8
8
  enqueueReindex
9
- } from "./chunk-TI5COGLY.js";
9
+ } from "./chunk-CVNCSMVU.js";
10
10
  import {
11
11
  isBinaryBuffer,
12
12
  safeResolveReal,
@@ -274,7 +274,7 @@ function passesExtraGlob(extraGlob, name, full, base) {
274
274
  return extraGlob.test(full);
275
275
  }
276
276
  async function resolveFiles(filesInput, ctx, extraGlob) {
277
- const base = ctx.cwd;
277
+ const base = ctx.workingDir ?? ctx.cwd;
278
278
  const parts = Array.isArray(filesInput) ? filesInput.filter((s) => typeof s === "string").map((s) => s.trim()).filter(Boolean) : filesInput.trim().split(",").map((s) => s.trim()).filter(Boolean);
279
279
  const resolved = [];
280
280
  for (const p of parts) {
@@ -413,4 +413,4 @@ export {
413
413
  replaceTool,
414
414
  __resetRgDetectionForTests
415
415
  };
416
- //# sourceMappingURL=chunk-DKHMPKDG.js.map
416
+ //# sourceMappingURL=chunk-77MBK46T.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-MSOAX3GC.js";
4
4
  import {
5
5
  enqueueReindex
6
- } from "./chunk-TI5COGLY.js";
6
+ } from "./chunk-CVNCSMVU.js";
7
7
  import {
8
8
  safeResolveReal,
9
9
  sha256hex,
@@ -518,4 +518,4 @@ Compare this against your old_string and retry with the file's actual text.` : "
518
518
  export {
519
519
  editTool
520
520
  };
521
- //# sourceMappingURL=chunk-7XUEPBNT.js.map
521
+ //# sourceMappingURL=chunk-AMURQAJX.js.map
@@ -9,7 +9,7 @@ import {
9
9
  projectIndexServerBuildId,
10
10
  projectIndexServerEndpoint,
11
11
  projectIndexServerMetadataPath
12
- } from "./chunk-MBR5VAB5.js";
12
+ } from "./chunk-6ZLRRC74.js";
13
13
  import {
14
14
  CircuitOpenError,
15
15
  IndexTimeoutError,
@@ -24,7 +24,7 @@ import {
24
24
  searchService,
25
25
  statsService,
26
26
  symbolGraphService
27
- } from "./chunk-52UXXQMP.js";
27
+ } from "./chunk-3JVSOBHU.js";
28
28
  import {
29
29
  recordIpcPending
30
30
  } from "./chunk-ZKC5UNGD.js";
@@ -1312,4 +1312,4 @@ export {
1312
1312
  checkCodebaseIndexServerHealth,
1313
1313
  ensureCodebaseIndexServer
1314
1314
  };
1315
- //# sourceMappingURL=chunk-TI5COGLY.js.map
1315
+ //# sourceMappingURL=chunk-CVNCSMVU.js.map
@@ -30,7 +30,19 @@ var fetchTool = {
30
30
  category: "Network",
31
31
  description: "Fetch a URL and return its content. HTML pages are automatically converted to clean markdown. This tool has strong SSRF protections (private IPs, localhost, and cloud metadata endpoints are blocked by default).",
32
32
  usageHint: "Use this when you need external information (documentation, API responses, web pages, etc.).\n\nSecurity notes:\n- Only HTTPS is allowed by default.\n- Internal/private networks are blocked unless explicitly enabled via environment variable.\n- Redirects are followed but re-validated at each hop.\n- Output is capped (128KB by default) to avoid flooding context.\nPrefer this over raw `bash curl` or `bash wget`.",
33
- permission: "auto",
33
+ // H-9 (AT-02): `fetch` was `permission:'auto'` with `mutating:false`, so
34
+ // the `tool.permission === 'auto' && !isMutating` branch at
35
+ // `permission-policy.ts:408-424` returned `{permission:'auto'}` for
36
+ // every call, in every mode (YOLO or not) — a complete, prompt-free
37
+ // exfiltration primitive when chained with the equally-unprompted
38
+ // `read` of `.env`/`~/.ssh/*` (sensitive-read gate is `!effectiveYolo`
39
+ // and therefore also skipped under the shipped default). Promoting to
40
+ // `permission:'confirm'` is the narrowest change that closes the
41
+ // exfiltration path: it prompts the user, and an "always" answer is
42
+ // persisted to `trust.json` against the URL subject declared below.
43
+ // The SSRF guard (`guardedFetch`) still constrains where the request
44
+ // can land; this change just ensures the *whether* is no longer silent.
45
+ permission: "confirm",
34
46
  mutating: false,
35
47
  capabilities: ["net.outbound"],
36
48
  icon: "web",
@@ -269,4 +281,4 @@ function prettyJson(s) {
269
281
  export {
270
282
  fetchTool
271
283
  };
272
- //# sourceMappingURL=chunk-MJSJWXBF.js.map
284
+ //# sourceMappingURL=chunk-DX5KZEMK.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  enqueueReindex
3
- } from "./chunk-TI5COGLY.js";
3
+ } from "./chunk-CVNCSMVU.js";
4
4
  import {
5
5
  resolveRealInsideRoot,
6
6
  safeResolveReal,
@@ -395,4 +395,4 @@ function extractPatchedFiles(output) {
395
395
  export {
396
396
  patchTool
397
397
  };
398
- //# sourceMappingURL=chunk-TU5MTW2S.js.map
398
+ //# sourceMappingURL=chunk-E2ZD4ERD.js.map
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  buildWin32CmdShimInvocation,
11
11
  resolveWin32Command
12
- } from "./chunk-KE7A76VC.js";
12
+ } from "./chunk-5U5ULQX2.js";
13
13
 
14
14
  // src/_spawn-stream.ts
15
15
  import { spawn } from "node:child_process";
@@ -285,4 +285,4 @@ function utf8Prefix(text, maxBytes) {
285
285
  export {
286
286
  spawnStream
287
287
  };
288
- //# sourceMappingURL=chunk-DRRY6SCM.js.map
288
+ //# sourceMappingURL=chunk-EMA2XENR.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  tryLegacyCodeOperation
3
- } from "./chunk-T3SMFF5Q.js";
3
+ } from "./chunk-GU7QJ37F.js";
4
4
  import {
5
5
  spawnStream
6
- } from "./chunk-DRRY6SCM.js";
6
+ } from "./chunk-EMA2XENR.js";
7
7
  import {
8
8
  normalizeCommandOutput,
9
9
  safeResolveReal
@@ -100,6 +100,14 @@ var lintTool = {
100
100
  }
101
101
  yield { type: "log", text: `Running ${detected}\u2026`, data: { linter: detected } };
102
102
  const files = input.files ? (Array.isArray(input.files) ? input.files : input.files.split(",")).map((f) => f.trim().replace(/\\/g, "/")).filter(Boolean) : [];
103
+ for (const f of files) {
104
+ if (f.startsWith("-")) {
105
+ throw new ToolValidationError({
106
+ message: `lint: file path "${f}" may not begin with '-' (flag injection)`,
107
+ field: "files"
108
+ });
109
+ }
110
+ }
103
111
  const args = [];
104
112
  if (detected === "eslint") {
105
113
  if (input.fix) args.push("--fix");
@@ -181,4 +189,4 @@ async function detectLinter(cwd) {
181
189
  export {
182
190
  lintTool
183
191
  };
184
- //# sourceMappingURL=chunk-3D5DJWOE.js.map
192
+ //# sourceMappingURL=chunk-FC3X7GGJ.js.map
@@ -2,7 +2,7 @@ import {
2
2
  executeLanguagePlan,
3
3
  executePackagePlan,
4
4
  planLanguageOperation
5
- } from "./chunk-7N5U2RAU.js";
5
+ } from "./chunk-3LS3FYEF.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-T3SMFF5Q.js.map
107
+ //# sourceMappingURL=chunk-GU7QJ37F.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  tryLegacyCodeOperation
3
- } from "./chunk-T3SMFF5Q.js";
3
+ } from "./chunk-GU7QJ37F.js";
4
4
  import {
5
5
  spawnStream
6
- } from "./chunk-DRRY6SCM.js";
6
+ } from "./chunk-EMA2XENR.js";
7
7
  import {
8
8
  detectPackageManager,
9
9
  normalizeCommandOutput,
@@ -162,4 +162,4 @@ async function findTsConfig(cwd) {
162
162
  export {
163
163
  typecheckTool
164
164
  };
165
- //# sourceMappingURL=chunk-4WPBS45A.js.map
165
+ //# sourceMappingURL=chunk-IRUEHGCR.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  tryLegacyPackageOperation
3
- } from "./chunk-T3SMFF5Q.js";
3
+ } from "./chunk-GU7QJ37F.js";
4
4
  import {
5
5
  spawnStream
6
- } from "./chunk-DRRY6SCM.js";
6
+ } from "./chunk-EMA2XENR.js";
7
7
  import {
8
8
  COMMAND_OUTPUT_MAX_BYTES,
9
9
  detectPackageManager,
@@ -220,4 +220,4 @@ function extractAdvisories(data) {
220
220
  export {
221
221
  auditTool
222
222
  };
223
- //# sourceMappingURL=chunk-WEEVSWQB.js.map
223
+ //# sourceMappingURL=chunk-KIQTABBJ.js.map
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-HDYUBRMF.js";
15
15
  import {
16
16
  resolvePowerShell
17
- } from "./chunk-KE7A76VC.js";
17
+ } from "./chunk-5U5ULQX2.js";
18
18
  import {
19
19
  normalizeCommandOutput
20
20
  } from "./chunk-ZUFHAHTE.js";
@@ -1093,4 +1093,4 @@ export {
1093
1093
  checkAndBlockKillCommand,
1094
1094
  bashTool
1095
1095
  };
1096
- //# sourceMappingURL=chunk-6H4ERJP7.js.map
1096
+ //# sourceMappingURL=chunk-KYVOTHG7.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  tryLegacyPackageOperation
3
- } from "./chunk-T3SMFF5Q.js";
3
+ } from "./chunk-GU7QJ37F.js";
4
4
  import {
5
5
  spawnStream
6
- } from "./chunk-DRRY6SCM.js";
6
+ } from "./chunk-EMA2XENR.js";
7
7
  import {
8
8
  detectPackageManager,
9
9
  normalizeCommandOutput,
@@ -253,4 +253,4 @@ function resolveManifestPath(cwd, pkgManager) {
253
253
  export {
254
254
  installTool
255
255
  };
256
- //# sourceMappingURL=chunk-O6BY43ZB.js.map
256
+ //# sourceMappingURL=chunk-MIV2RU5B.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  todoTool
3
- } from "./chunk-FBUP524S.js";
3
+ } from "./chunk-4YKVHCQC.js";
4
4
  import {
5
5
  projectSessionPlanToKanban
6
6
  } from "./chunk-X6KXNHUO.js";
@@ -414,4 +414,4 @@ function mkResult(plan, ok, message, todos) {
414
414
  export {
415
415
  planTool
416
416
  };
417
- //# sourceMappingURL=chunk-5KS24LTS.js.map
417
+ //# sourceMappingURL=chunk-NOCU555K.js.map
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  buildWin32CmdShimInvocation,
7
7
  resolveWin32Command
8
- } from "./chunk-KE7A76VC.js";
8
+ } from "./chunk-5U5ULQX2.js";
9
9
  import {
10
10
  COMMAND_OUTPUT_MAX_BYTES,
11
11
  detectPackageManager,
@@ -66,7 +66,7 @@ var outdatedTool = {
66
66
  const manager = await detectPackageManager(cwd, ctx.projectRoot);
67
67
  if (manager === "npm") {
68
68
  try {
69
- const { detectNonJsEcosystem } = await import("./legacy-bridge-YXANP5QB.js");
69
+ const { detectNonJsEcosystem } = await import("./legacy-bridge-WVQ4BHDI.js");
70
70
  const nonJs = await detectNonJsEcosystem(cwd, ctx.projectRoot);
71
71
  if (nonJs) {
72
72
  const { planLanguageOperation, executePackagePlan } = await import("./languages/index.js");
@@ -282,4 +282,4 @@ Note: exit code 1 from \`outdated\` means outdated packages were found (expected
282
282
  export {
283
283
  outdatedTool
284
284
  };
285
- //# sourceMappingURL=chunk-6GOZTS6F.js.map
285
+ //# sourceMappingURL=chunk-OUEH4I4X.js.map