@wrongstack/tools 0.320.1 → 1.0.1

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 (192) hide show
  1. package/dist/_danger-detect.d.ts +8 -0
  2. package/dist/_syntax-check.d.ts +1 -2
  3. package/dist/audit.d.ts +4 -5
  4. package/dist/audit.js +6 -6
  5. package/dist/auto-proceed-loop-guard.d.ts +1 -1
  6. package/dist/auto-proceed-loop-guard.js +9 -160
  7. package/dist/bash-kill-guard.d.ts +2 -3
  8. package/dist/bash.d.ts +2 -3
  9. package/dist/bash.js +4 -4
  10. package/dist/batch-tool-use.d.ts +2 -3
  11. package/dist/batch-tool-use.js +1 -1
  12. package/dist/browser/index.d.ts +1 -1
  13. package/dist/browser/index.js +1 -1
  14. package/dist/browser/tools.d.ts +56 -45
  15. package/dist/builtin.js +50 -50
  16. package/dist/{chunk-T77XOX7E.js → chunk-24T5XIJU.js} +1 -1
  17. package/dist/{chunk-DTQ75VBC.js → chunk-2CTZW6JQ.js} +2 -2
  18. package/dist/{chunk-KWXIKGE3.js → chunk-3D5DJWOE.js} +3 -3
  19. package/dist/{chunk-XSSFBS5I.js → chunk-4ERMPDHV.js} +11 -6
  20. package/dist/{chunk-QSNVDHOZ.js → chunk-4WPBS45A.js} +4 -5
  21. package/dist/{chunk-4CQWNZ62.js → chunk-5ITQPCLC.js} +2 -2
  22. package/dist/{chunk-B4HTSV6Z.js → chunk-5KS24LTS.js} +11 -11
  23. package/dist/{chunk-QPNYDH5B.js → chunk-62OAECEQ.js} +29 -7
  24. package/dist/{chunk-DFQDJT22.js → chunk-6GOZTS6F.js} +3 -3
  25. package/dist/{chunk-5UFVCIUB.js → chunk-6H4ERJP7.js} +140 -24
  26. package/dist/{chunk-34VLZ35Z.js → chunk-7HL23T3T.js} +63 -10
  27. package/dist/{chunk-HFXSNKCV.js → chunk-7JJFC6CT.js} +1 -1
  28. package/dist/{chunk-23EX5WDO.js → chunk-7LQCT3LT.js} +3 -3
  29. package/dist/{chunk-NDIT3SBZ.js → chunk-7N5U2RAU.js} +2 -2
  30. package/dist/{chunk-QBV725YG.js → chunk-7ODZTPCU.js} +2 -2
  31. package/dist/{chunk-6AAOT4PW.js → chunk-AQ5YBURX.js} +16 -4
  32. package/dist/{chunk-ZMW6WJFT.js → chunk-ASEXQRA7.js} +3 -3
  33. package/dist/{chunk-FRN7TIAA.js → chunk-B3MGJBFI.js} +1 -1
  34. package/dist/{chunk-JLYA4X7K.js → chunk-CGXTR34H.js} +21 -6
  35. package/dist/{chunk-IU4DV2PA.js → chunk-CHEK3ASV.js} +6 -3
  36. package/dist/{chunk-GOIZNNOA.js → chunk-DJYLI7EW.js} +1 -1
  37. package/dist/{chunk-Z6IHMJMC.js → chunk-DK4J2WMH.js} +11 -11
  38. package/dist/{chunk-OYP27E3I.js → chunk-DRRY6SCM.js} +47 -20
  39. package/dist/{chunk-JVRLTEO7.js → chunk-E7JE3UEX.js} +2 -2
  40. package/dist/{chunk-BK732J7I.js → chunk-FBUP524S.js} +4 -4
  41. package/dist/{chunk-NYRLWDT5.js → chunk-FVM3O4JQ.js} +1 -1
  42. package/dist/chunk-FYDBUVQD.js +244 -0
  43. package/dist/{chunk-PV6HIZQD.js → chunk-GDDXX27P.js} +50 -50
  44. package/dist/{chunk-3GIKYHLA.js → chunk-GKSG5CPH.js} +6 -6
  45. package/dist/{chunk-ESLPBT5A.js → chunk-HDYUBRMF.js} +4 -3
  46. package/dist/{chunk-4BABEJC2.js → chunk-IAYMTTR2.js} +236 -79
  47. package/dist/{chunk-ELRRTWNP.js → chunk-IXIS7RSG.js} +2 -2
  48. package/dist/{chunk-HR67OWEP.js → chunk-IYH4OHBP.js} +5 -5
  49. package/dist/{chunk-W232EFEM.js → chunk-JDOO4P6Z.js} +7 -4
  50. package/dist/{chunk-2OXHS3KZ.js → chunk-KLJZ4WV4.js} +4 -3
  51. package/dist/{chunk-3M7LLN7W.js → chunk-LQSOU63Z.js} +12 -11
  52. package/dist/{chunk-OTPTQBYE.js → chunk-MGPR7VG3.js} +279 -265
  53. package/dist/{chunk-C2DQKVLO.js → chunk-MJSJWXBF.js} +1 -1
  54. package/dist/{chunk-NSPNFOJ7.js → chunk-MK2JK35J.js} +25 -10
  55. package/dist/{chunk-JSNSMG5R.js → chunk-MSOAX3GC.js} +1 -1
  56. package/dist/{chunk-J43O3BOX.js → chunk-N3K2SFEI.js} +532 -492
  57. package/dist/{chunk-J74TMK4M.js → chunk-NJX2RXKJ.js} +50 -7
  58. package/dist/chunk-NL2S2CXD.js +171 -0
  59. package/dist/{chunk-WAQASTXB.js → chunk-O6BY43ZB.js} +29 -8
  60. package/dist/{chunk-QGF2C7TF.js → chunk-PVCB7RUZ.js} +2 -2
  61. package/dist/{chunk-YTKSNTT4.js → chunk-QA6IASYX.js} +8 -8
  62. package/dist/{chunk-VPALDFYM.js → chunk-RV7BVTDG.js} +1 -1
  63. package/dist/chunk-S57CDR2H.js +288 -0
  64. package/dist/{chunk-W2CECGTG.js → chunk-SMARDKAC.js} +1 -1
  65. package/dist/{chunk-QWKSKFKZ.js → chunk-SOR7OCYP.js} +1 -1
  66. package/dist/{chunk-I7FBZOEP.js → chunk-T3SMFF5Q.js} +11 -5
  67. package/dist/{chunk-4BHUSMNL.js → chunk-UI3ZJIG3.js} +1 -1
  68. package/dist/{chunk-WXJY3BKV.js → chunk-VBF2YXUW.js} +2 -2
  69. package/dist/{chunk-FQNXYA6W.js → chunk-VU3QBYL4.js} +36 -5
  70. package/dist/{chunk-VD2LV5WO.js → chunk-VZGPASGD.js} +37 -12
  71. package/dist/{chunk-UZFY3CKD.js → chunk-WEEVSWQB.js} +17 -6
  72. package/dist/chunk-XXRMF2BC.js +186 -0
  73. package/dist/{chunk-LRDIRJJL.js → chunk-YEISRT4S.js} +5 -11
  74. package/dist/{chunk-Q5JPPCZC.js → chunk-YJTXRH5Y.js} +3 -2
  75. package/dist/{chunk-Z5Q3TXRY.js → chunk-ZTCJCYLN.js} +3 -3
  76. package/dist/circuit-breaker.d.ts +1 -0
  77. package/dist/circuit-breaker.js +1 -1
  78. package/dist/clarify.d.ts +1 -0
  79. package/dist/codebase-index/codebase-ast-replace-tool.d.ts +2 -3
  80. package/dist/codebase-index/codebase-impact-analysis-tool.d.ts +5 -4
  81. package/dist/codebase-index/codebase-incoming-calls-tool.d.ts +4 -3
  82. package/dist/codebase-index/codebase-index-tool.d.ts +2 -3
  83. package/dist/codebase-index/codebase-invariant-check-tool.d.ts +2 -3
  84. package/dist/codebase-index/codebase-outgoing-calls-tool.d.ts +4 -3
  85. package/dist/codebase-index/codebase-repo-map-tool.d.ts +2 -3
  86. package/dist/codebase-index/codebase-search-tool.d.ts +2 -3
  87. package/dist/codebase-index/codebase-skeleton-tool.d.ts +2 -3
  88. package/dist/codebase-index/codebase-stats-tool.d.ts +9 -3
  89. package/dist/codebase-index/codebase-targeted-test-tool.d.ts +4 -3
  90. package/dist/codebase-index/index.d.ts +11 -11
  91. package/dist/codebase-index/index.js +8 -8
  92. package/dist/codebase-index/project-server-framing.d.ts +29 -0
  93. package/dist/codebase-index/project-server-lifecycle.d.ts +20 -0
  94. package/dist/codebase-index/project-server-operations.d.ts +37 -0
  95. package/dist/codebase-index/project-server-types.d.ts +30 -0
  96. package/dist/codebase-index/project-server-watcher.d.ts +25 -0
  97. package/dist/codebase-index/project-server.js +448 -391
  98. package/dist/codebase-index/worker.js +2 -2
  99. package/dist/codebase-index/writer-init.d.ts +13 -0
  100. package/dist/codebase-index/writer-maintenance.d.ts +14 -0
  101. package/dist/codebase-index/writer.d.ts +0 -15
  102. package/dist/design.d.ts +2 -2
  103. package/dist/design.js +1 -1
  104. package/dist/diff.d.ts +4 -4
  105. package/dist/diff.js +1 -1
  106. package/dist/document.d.ts +3 -4
  107. package/dist/document.js +1 -1
  108. package/dist/e2e.d.ts +1 -1
  109. package/dist/e2e.js +1 -1
  110. package/dist/edit.d.ts +3 -3
  111. package/dist/edit.js +6 -6
  112. package/dist/exec.d.ts +2 -3
  113. package/dist/exec.js +4 -4
  114. package/dist/fetch.d.ts +4 -3
  115. package/dist/fetch.js +1 -1
  116. package/dist/format.d.ts +17 -45
  117. package/dist/format.js +12 -8
  118. package/dist/git.d.ts +3 -3
  119. package/dist/git.js +1 -1
  120. package/dist/glob.d.ts +2 -3
  121. package/dist/glob.js +2 -2
  122. package/dist/grep.d.ts +7 -5
  123. package/dist/grep.js +3 -3
  124. package/dist/index.d.ts +54 -45
  125. package/dist/index.js +118 -59
  126. package/dist/install.d.ts +7 -55
  127. package/dist/install.js +6 -6
  128. package/dist/json.d.ts +3 -4
  129. package/dist/json.js +2 -2
  130. package/dist/kanban-tool-types.d.ts +1 -2
  131. package/dist/kanban.d.ts +3 -19
  132. package/dist/kanban.js +1 -1
  133. package/dist/languages/execute-tool.d.ts +2 -3
  134. package/dist/languages/index.d.ts +2 -2
  135. package/dist/languages/index.js +4 -4
  136. package/dist/languages/tool.d.ts +3 -4
  137. package/dist/{legacy-bridge-FOV5ODDI.js → legacy-bridge-YXANP5QB.js} +6 -6
  138. package/dist/lint.d.ts +5 -4
  139. package/dist/lint.js +6 -6
  140. package/dist/logs.d.ts +3 -4
  141. package/dist/logs.js +2 -2
  142. package/dist/memory.d.ts +7 -8
  143. package/dist/memory.js +1 -1
  144. package/dist/mode.d.ts +3 -4
  145. package/dist/mode.js +1 -1
  146. package/dist/next-steps-tool.d.ts +2 -3
  147. package/dist/next-steps.d.ts +4 -0
  148. package/dist/next-steps.js +9 -175
  149. package/dist/outdated.d.ts +5 -29
  150. package/dist/outdated.js +3 -3
  151. package/dist/pack.js +51 -51
  152. package/dist/patch.d.ts +2 -3
  153. package/dist/patch.js +5 -5
  154. package/dist/plan.d.ts +4 -4
  155. package/dist/plan.js +3 -3
  156. package/dist/process-registry.js +2 -2
  157. package/dist/ps-slash.js +4 -4
  158. package/dist/pwsh.d.ts +1 -0
  159. package/dist/read.d.ts +5 -5
  160. package/dist/read.js +5 -5
  161. package/dist/replace.d.ts +2 -3
  162. package/dist/replace.js +6 -6
  163. package/dist/scaffold.d.ts +7 -3
  164. package/dist/scaffold.js +3 -1
  165. package/dist/search.d.ts +17 -3
  166. package/dist/search.js +5 -1
  167. package/dist/set-working-dir.d.ts +2 -3
  168. package/dist/skill.d.ts +4 -5
  169. package/dist/skill.js +1 -1
  170. package/dist/task.d.ts +6 -6
  171. package/dist/task.js +3 -3
  172. package/dist/test.d.ts +5 -4
  173. package/dist/test.js +6 -6
  174. package/dist/todo.d.ts +8 -8
  175. package/dist/todo.js +2 -2
  176. package/dist/tool-diff.js +11 -230
  177. package/dist/tool-help.d.ts +2 -3
  178. package/dist/tool-help.js +1 -1
  179. package/dist/tool-search.d.ts +2 -3
  180. package/dist/tool-search.js +1 -1
  181. package/dist/tool-summary.js +5 -281
  182. package/dist/tool-tier.js +52 -52
  183. package/dist/tool-use.d.ts +2 -3
  184. package/dist/tool-use.js +1 -1
  185. package/dist/tree.d.ts +5 -3
  186. package/dist/tree.js +5 -1
  187. package/dist/typecheck.d.ts +3 -3
  188. package/dist/typecheck.js +6 -6
  189. package/dist/write.d.ts +2 -3
  190. package/dist/write.js +6 -6
  191. package/package.json +5 -5
  192. package/dist/spawn-background.d.ts +0 -80
@@ -0,0 +1,186 @@
1
+ // src/next-steps.ts
2
+ function projectNextStepsToolInput(input) {
3
+ if (!input || typeof input !== "object" || Array.isArray(input)) return [];
4
+ const rawSteps = input["steps"];
5
+ if (!Array.isArray(rawSteps)) return [];
6
+ const steps = [];
7
+ for (const candidate of rawSteps) {
8
+ if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) continue;
9
+ const text = candidate["text"];
10
+ if (typeof text !== "string" || !text.trim()) continue;
11
+ const auto = steps.length === 0 && candidate["auto"] === true;
12
+ steps.push(
13
+ auto ? { index: steps.length + 1, text: text.trim(), auto: true } : { index: steps.length + 1, text: text.trim() }
14
+ );
15
+ if (steps.length >= MAX_STEPS) break;
16
+ }
17
+ return steps;
18
+ }
19
+ function isFinalTurnStopReason(stopReason) {
20
+ return stopReason !== "tool_use" && stopReason !== "tool_call";
21
+ }
22
+ function fenceSpans(content) {
23
+ const spans = [];
24
+ const lines = content.split("\n");
25
+ let offset = 0;
26
+ let open = null;
27
+ for (const line of lines) {
28
+ const lineStart = offset;
29
+ offset += line.length + 1;
30
+ const trimmed = line.trim();
31
+ const marker = /^(`{3,}|~{3,})/.exec(trimmed)?.[1];
32
+ if (marker === void 0) continue;
33
+ if (open === null) {
34
+ open = { markerChar: marker[0], markerLength: marker.length, start: lineStart };
35
+ continue;
36
+ }
37
+ if (marker[0] === open.markerChar && marker.length >= open.markerLength && trimmed === marker) {
38
+ spans.push([open.start, offset]);
39
+ open = null;
40
+ }
41
+ }
42
+ if (open !== null) spans.push([open.start, content.length]);
43
+ return spans;
44
+ }
45
+ function indexInsideCodeFence(content, index) {
46
+ return fenceSpans(content).some(([start, end]) => index >= start && index < end);
47
+ }
48
+ function nonFencedIndexOf(content, needle, fromIndex, spans) {
49
+ let at = fromIndex;
50
+ for (; ; ) {
51
+ const found = content.indexOf(needle, at);
52
+ if (found === -1) return -1;
53
+ if (!spans.some(([start, end]) => found >= start && found < end)) return found;
54
+ at = found + 1;
55
+ }
56
+ }
57
+ var ITEM_RE = /^(?:(\d+)[.)]\s*|[-*•]\s*)(.+?)(\s+auto="true")?$/;
58
+ var MAX_STEPS = 6;
59
+ function parseNextSteps(content, requireHeading = true) {
60
+ if (requireHeading) {
61
+ return parseWithHeading(content);
62
+ }
63
+ return parseRawNumbered(content);
64
+ }
65
+ function pushStep(steps, index, text, hasAuto) {
66
+ steps.push(hasAuto ? { index, text, auto: true } : { index, text });
67
+ }
68
+ function parseRawNumbered(content) {
69
+ const lines = content.split("\n");
70
+ const steps = [];
71
+ const seenNumbers = /* @__PURE__ */ new Set();
72
+ for (const rawLine of lines) {
73
+ const line = rawLine.trim();
74
+ if (!line) continue;
75
+ const m = ITEM_RE.exec(line);
76
+ if (!m) continue;
77
+ const numPart = m[1];
78
+ const text = m[2].trim();
79
+ let index;
80
+ if (numPart !== void 0) {
81
+ index = Number.parseInt(numPart, 10);
82
+ } else {
83
+ index = steps.length + 1;
84
+ }
85
+ if (seenNumbers.has(index)) continue;
86
+ seenNumbers.add(index);
87
+ const hasAuto = !!m[3] && steps.length === 0 && index === 1;
88
+ pushStep(steps, index, text, hasAuto);
89
+ if (steps.length >= MAX_STEPS) break;
90
+ }
91
+ return {
92
+ steps,
93
+ texts: steps.map((s) => s.text),
94
+ stripped: content,
95
+ autoTexts: steps.filter((s) => s.auto).map((s) => s.text)
96
+ };
97
+ }
98
+ function parseWithHeading(content) {
99
+ const empty = { steps: [], texts: [], stripped: content, autoTexts: [] };
100
+ const spans = fenceSpans(content);
101
+ const outsideFences = (index) => !spans.some(([start, end]) => index >= start && index < end);
102
+ const headingScan = /<nextsteps\b[^>]*>\s*\n+/gi;
103
+ let heading = null;
104
+ for (let m = headingScan.exec(content); m !== null; m = headingScan.exec(content)) {
105
+ if (outsideFences(m.index)) {
106
+ heading = { index: m.index, length: m[0].length };
107
+ break;
108
+ }
109
+ }
110
+ if (heading === null) return empty;
111
+ const headingEnd = heading.index + heading.length;
112
+ const afterHeading = content.slice(headingEnd);
113
+ const lines = afterHeading.split("\n");
114
+ const steps = [];
115
+ const seenNumbers = /* @__PURE__ */ new Set();
116
+ for (const rawLine of lines) {
117
+ const line = rawLine.trim();
118
+ if (!line) continue;
119
+ const m = ITEM_RE.exec(line);
120
+ if (!m) break;
121
+ const numPart = m[1];
122
+ const text = m[2].trim();
123
+ let index;
124
+ if (numPart !== void 0) {
125
+ index = Number.parseInt(numPart, 10);
126
+ } else {
127
+ index = steps.length + 1;
128
+ }
129
+ if (seenNumbers.has(index)) continue;
130
+ seenNumbers.add(index);
131
+ const hasAuto = !!m[3] && steps.length === 0 && index === 1;
132
+ pushStep(steps, index, text, hasAuto);
133
+ if (steps.length >= MAX_STEPS) break;
134
+ }
135
+ if (steps.length === 0) return empty;
136
+ const closeAbs = nonFencedIndexOf(content, "</nextsteps>", headingEnd, spans);
137
+ if (closeAbs === -1) return empty;
138
+ const texts = steps.map((s) => s.text);
139
+ const autoTexts = steps.filter((s) => s.auto).map((s) => s.text);
140
+ let blockEndAbs = closeAbs + "</nextsteps>".length;
141
+ if (content[blockEndAbs] === "\n") blockEndAbs += 1;
142
+ const stripped = (content.slice(0, heading.index) + content.slice(blockEndAbs)).replace(/\n{3,}/g, "\n\n").trim();
143
+ return { steps, texts, stripped, autoTexts };
144
+ }
145
+ function stripNextStepsBlock(text) {
146
+ const spans = fenceSpans(text);
147
+ const outsideFences = (index) => !spans.some(([start, end]) => index >= start && index < end);
148
+ let result = "";
149
+ let cursor = 0;
150
+ const openTagRe = /<next_?steps\b[^>]*>/gi;
151
+ for (let match = openTagRe.exec(text); match !== null; match = openTagRe.exec(text)) {
152
+ if (!outsideFences(match.index)) continue;
153
+ let removed;
154
+ if (match[0].endsWith("/>")) {
155
+ removed = match[0].length;
156
+ } else {
157
+ const closeRe = /<\/next_?steps\s*>/gi;
158
+ closeRe.lastIndex = match.index + match[0].length;
159
+ removed = -1;
160
+ for (let close = closeRe.exec(text); close !== null; close = closeRe.exec(text)) {
161
+ if (!outsideFences(close.index)) continue;
162
+ removed = close.index + close[0].length - match.index;
163
+ break;
164
+ }
165
+ if (removed === -1) {
166
+ removed = match[0].length;
167
+ }
168
+ }
169
+ result += text.slice(cursor, match.index);
170
+ cursor = match.index + removed;
171
+ openTagRe.lastIndex = cursor;
172
+ }
173
+ result += text.slice(cursor);
174
+ return result.replace(/\n{3,}/g, "\n\n").trim();
175
+ }
176
+ var stripNextSteps = stripNextStepsBlock;
177
+
178
+ export {
179
+ projectNextStepsToolInput,
180
+ isFinalTurnStopReason,
181
+ indexInsideCodeFence,
182
+ parseNextSteps,
183
+ stripNextStepsBlock,
184
+ stripNextSteps
185
+ };
186
+ //# sourceMappingURL=chunk-XXRMF2BC.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-XRNN44QY.js";
4
4
  import {
5
5
  spawnStream
6
- } from "./chunk-OYP27E3I.js";
6
+ } from "./chunk-DRRY6SCM.js";
7
7
  import {
8
8
  codebaseIndexStats,
9
9
  enqueueReindex,
@@ -13,7 +13,7 @@ import {
13
13
  outgoingCallsService,
14
14
  runStartupIndex,
15
15
  searchCodebaseIndex
16
- } from "./chunk-Z5Q3TXRY.js";
16
+ } from "./chunk-ZTCJCYLN.js";
17
17
  import {
18
18
  IndexTimeoutError,
19
19
  SCHEMA_VERSION,
@@ -21,7 +21,7 @@ import {
21
21
  indexCircuitBreaker,
22
22
  indexStorePool,
23
23
  resolveIndexDir
24
- } from "./chunk-J43O3BOX.js";
24
+ } from "./chunk-N3K2SFEI.js";
25
25
  import {
26
26
  EXT_TO_LANG,
27
27
  detectLang,
@@ -254,12 +254,6 @@ var PolyglotInvariantEngine = class {
254
254
  params,
255
255
  returnType
256
256
  });
257
- functions.set(methodName, {
258
- name: methodName,
259
- isExported: isExp,
260
- params,
261
- returnType
262
- });
263
257
  }
264
258
  }
265
259
  }
@@ -1990,7 +1984,7 @@ var codebaseRepoMapTool = {
1990
1984
  permission: "auto",
1991
1985
  mutating: false,
1992
1986
  capabilities: ["fs.read"],
1993
- description: "Generate a reference-weighted, token-budgeted Repository Map (Repo Map) of the codebase. Extracts the most architecturally central types, interfaces, classes, and function signatures across the repository into a compact outline (~800-1500 tokens). Use this at the beginning of tasks or when navigating unfamiliar repositories to get a bird-eye view of the architecture.",
1987
+ description: "Generate a reference-weighted, token-budgeted Repository Map of the codebase (~1200 token default). Use it for orientation before a cross-file change. Extracts the most architecturally central types, interfaces, classes, and function signatures across the repository into a compact outline (~800-1500 tokens). Use this at the beginning of tasks or when navigating unfamiliar repositories to get a bird-eye view of the architecture.",
1994
1988
  usageHint: 'USE AT THE START OF COMPLEX OR REPOSITORY-WIDE TASKS:\n\n- Call with default parameters to get a global architecture map within ~1200 tokens.\n- Pass `focusFiles: ["src/auth.ts"]` to ensure candidate files are guaranteed to be mapped alongside related entry-points.\n- Use the returned line numbers (e.g. `/* L32-L45 */`) to navigate or partially read only the functions you need.',
1995
1989
  inputSchema: {
1996
1990
  type: "object",
@@ -2866,4 +2860,4 @@ export {
2866
2860
  deadCodeScanTool,
2867
2861
  runDeadCodeScan
2868
2862
  };
2869
- //# sourceMappingURL=chunk-LRDIRJJL.js.map
2863
+ //# sourceMappingURL=chunk-YEISRT4S.js.map
@@ -7,6 +7,7 @@ import {
7
7
 
8
8
  export {
9
9
  capSubject,
10
- compileUserRegex
10
+ compileUserRegex,
11
+ MAX_SUBJECT_LEN
11
12
  };
12
- //# sourceMappingURL=chunk-Q5JPPCZC.js.map
13
+ //# sourceMappingURL=chunk-YJTXRH5Y.js.map
@@ -9,7 +9,7 @@ import {
9
9
  projectIndexServerBuildId,
10
10
  projectIndexServerEndpoint,
11
11
  projectIndexServerMetadataPath
12
- } from "./chunk-PV6HIZQD.js";
12
+ } from "./chunk-GDDXX27P.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-J43O3BOX.js";
27
+ } from "./chunk-N3K2SFEI.js";
28
28
  import {
29
29
  isIndexablePath
30
30
  } from "./chunk-YOHO4DVT.js";
@@ -1269,4 +1269,4 @@ export {
1269
1269
  checkCodebaseIndexServerHealth,
1270
1270
  ensureCodebaseIndexServer
1271
1271
  };
1272
- //# sourceMappingURL=chunk-Z5Q3TXRY.js.map
1272
+ //# sourceMappingURL=chunk-ZTCJCYLN.js.map
@@ -47,6 +47,7 @@ export interface CircuitBreakerConfig {
47
47
  */
48
48
  cooldownMs?: number | undefined;
49
49
  }
50
+ export type BreakerState = 'closed' | 'open' | 'half-open';
50
51
  export interface CircuitBreakerSnapshot {
51
52
  state: 'closed' | 'open' | 'half-open';
52
53
  consecutiveFailures: number;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CircuitBreaker
3
- } from "./chunk-HFXSNKCV.js";
3
+ } from "./chunk-7JJFC6CT.js";
4
4
  export {
5
5
  CircuitBreaker
6
6
  };
package/dist/clarify.d.ts CHANGED
@@ -20,6 +20,7 @@ export interface ClarifyQuestionInput {
20
20
  /** Allow write-in custom responses in addition to options (default: true). */
21
21
  allowCustomResponse?: boolean | undefined;
22
22
  }
23
+ export type ClarifyInput = ClarifyQuestionInput;
23
24
  export interface ClarifyOutput {
24
25
  status: 'answered' | 'auto_decided' | 'skipped';
25
26
  question: string;
@@ -10,9 +10,9 @@
10
10
  */
11
11
  import type { Tool } from '@wrongstack/core/types';
12
12
  import { type MutateSymbolOptions } from './ast-symbol-mutator.js';
13
- interface CodebaseAstReplaceInput extends MutateSymbolOptions {
13
+ export interface CodebaseAstReplaceInput extends MutateSymbolOptions {
14
14
  }
15
- interface CodebaseAstReplaceOutput {
15
+ export interface CodebaseAstReplaceOutput {
16
16
  status: 'ok' | 'error';
17
17
  file: string;
18
18
  symbol: string;
@@ -28,5 +28,4 @@ interface CodebaseAstReplaceOutput {
28
28
  error?: string | undefined;
29
29
  }
30
30
  export declare const codebaseAstReplaceTool: Tool<CodebaseAstReplaceInput, CodebaseAstReplaceOutput>;
31
- export {};
32
31
  //# sourceMappingURL=codebase-ast-replace-tool.d.ts.map
@@ -8,7 +8,7 @@
8
8
  * })
9
9
  */
10
10
  import type { Tool } from '@wrongstack/core/types';
11
- interface ImpactAnalysisInput {
11
+ export interface ImpactAnalysisInput {
12
12
  /** The symbol name (function, method, class, interface, type) to analyze. */
13
13
  symbol: string;
14
14
  /** Optional file path to disambiguate when multiple symbols share a name. */
@@ -16,7 +16,8 @@ interface ImpactAnalysisInput {
16
16
  /** Whether to traverse transitive callers (callers of callers). Defaults to true. */
17
17
  transitive?: boolean | undefined;
18
18
  }
19
- interface ImpactCallSite {
19
+ export type CodebaseImpactAnalysisInput = ImpactAnalysisInput;
20
+ export interface ImpactCallSite {
20
21
  file: string;
21
22
  line: number;
22
23
  callerName: string;
@@ -24,7 +25,7 @@ interface ImpactCallSite {
24
25
  callType: string;
25
26
  isTest: boolean;
26
27
  }
27
- interface ImpactAnalysisOutput {
28
+ export interface ImpactAnalysisOutput {
28
29
  status: 'ok' | 'error';
29
30
  symbol: string;
30
31
  riskLevel: 'low' | 'medium' | 'high';
@@ -38,6 +39,6 @@ interface ImpactAnalysisOutput {
38
39
  symbolFound?: boolean;
39
40
  error?: string | undefined;
40
41
  }
42
+ export type CodebaseImpactAnalysisOutput = ImpactAnalysisOutput;
41
43
  export declare const codebaseImpactAnalysisTool: Tool<ImpactAnalysisInput, ImpactAnalysisOutput>;
42
- export {};
43
44
  //# sourceMappingURL=codebase-impact-analysis-tool.d.ts.map
@@ -16,13 +16,14 @@
16
16
  import type { Tool } from '@wrongstack/core/types';
17
17
  import type { CallSite } from './schema.js';
18
18
  export declare const codebaseIncomingCallsTool: Tool<IncomingCallsInput, IncomingCallsOutput>;
19
- interface IncomingCallsInput {
19
+ export interface IncomingCallsInput {
20
20
  symbol: string;
21
21
  file?: string | undefined;
22
22
  limit?: number | undefined;
23
23
  transitive?: boolean | undefined;
24
24
  }
25
- interface IncomingCallsOutput {
25
+ export type CodebaseIncomingCallsInput = IncomingCallsInput;
26
+ export interface IncomingCallsOutput {
26
27
  symbol: string;
27
28
  calls: CallSite[];
28
29
  total: number;
@@ -37,5 +38,5 @@ interface IncomingCallsOutput {
37
38
  /** Advisory note when the symbol was not found in the index. */
38
39
  note?: string | undefined;
39
40
  }
40
- export {};
41
+ export type CodebaseIncomingCallsOutput = IncomingCallsOutput;
41
42
  //# sourceMappingURL=codebase-incoming-calls-tool.d.ts.map
@@ -1,10 +1,10 @@
1
1
  import type { Tool } from '@wrongstack/core/types';
2
2
  export declare const codebaseIndexTool: Tool<CodebaseIndexInput, CodebaseIndexOutput>;
3
- interface CodebaseIndexInput {
3
+ export interface CodebaseIndexInput {
4
4
  force?: boolean | undefined;
5
5
  langs?: string[] | undefined;
6
6
  }
7
- interface CodebaseIndexOutput {
7
+ export interface CodebaseIndexOutput {
8
8
  filesIndexed: number;
9
9
  fileOutcomes?: {
10
10
  parsed: number;
@@ -19,5 +19,4 @@ interface CodebaseIndexOutput {
19
19
  /** Advisory note when the indexer was skipped (e.g. another index in progress). */
20
20
  note?: string | undefined;
21
21
  }
22
- export {};
23
22
  //# sourceMappingURL=codebase-index-tool.d.ts.map
@@ -7,18 +7,17 @@
7
7
  import type { Tool } from '@wrongstack/core/types';
8
8
  import { type InvariantViolation } from './ast-invariant-engine.js';
9
9
  import type { SymbolLang } from './schema.js';
10
- interface CodebaseInvariantCheckInput {
10
+ export interface CodebaseInvariantCheckInput {
11
11
  file?: string | undefined;
12
12
  originalCode?: string | undefined;
13
13
  modifiedCode: string;
14
14
  lang?: SymbolLang | undefined;
15
15
  }
16
- interface CodebaseInvariantCheckOutput {
16
+ export interface CodebaseInvariantCheckOutput {
17
17
  valid: boolean;
18
18
  violations: InvariantViolation[];
19
19
  summary: string;
20
20
  error?: string | undefined;
21
21
  }
22
22
  export declare const codebaseInvariantCheckTool: Tool<CodebaseInvariantCheckInput, CodebaseInvariantCheckOutput>;
23
- export {};
24
23
  //# sourceMappingURL=codebase-invariant-check-tool.d.ts.map
@@ -16,13 +16,14 @@
16
16
  import type { Tool } from '@wrongstack/core/types';
17
17
  import type { CallSite } from './schema.js';
18
18
  export declare const codebaseOutgoingCallsTool: Tool<OutgoingCallsInput, OutgoingCallsOutput>;
19
- interface OutgoingCallsInput {
19
+ export interface OutgoingCallsInput {
20
20
  symbol: string;
21
21
  file?: string | undefined;
22
22
  limit?: number | undefined;
23
23
  transitive?: boolean | undefined;
24
24
  }
25
- interface OutgoingCallsOutput {
25
+ export type CodebaseOutgoingCallsInput = OutgoingCallsInput;
26
+ export interface OutgoingCallsOutput {
26
27
  symbol: string;
27
28
  calls: CallSite[];
28
29
  total: number;
@@ -37,5 +38,5 @@ interface OutgoingCallsOutput {
37
38
  /** Advisory note when the symbol was not found, or unresolved refs exist. */
38
39
  note?: string | undefined;
39
40
  }
40
- export {};
41
+ export type CodebaseOutgoingCallsOutput = OutgoingCallsOutput;
41
42
  //# sourceMappingURL=codebase-outgoing-calls-tool.d.ts.map
@@ -8,16 +8,15 @@
8
8
  */
9
9
  import type { Tool } from '@wrongstack/core/types';
10
10
  import { type RepoMapResult } from './repo-map.js';
11
- interface CodebaseRepoMapInput {
11
+ export interface CodebaseRepoMapInput {
12
12
  /** Maximum token budget (approximate) for the generated map. Defaults to 1200. */
13
13
  maxTokens?: number | undefined;
14
14
  /** Optional file paths to prioritize and boost in the map generation. */
15
15
  focusFiles?: string[] | undefined;
16
16
  }
17
- interface CodebaseRepoMapOutput extends RepoMapResult {
17
+ export interface CodebaseRepoMapOutput extends RepoMapResult {
18
18
  status: 'ok' | 'error';
19
19
  error?: string | undefined;
20
20
  }
21
21
  export declare const codebaseRepoMapTool: Tool<CodebaseRepoMapInput, CodebaseRepoMapOutput>;
22
- export {};
23
22
  //# sourceMappingURL=codebase-repo-map-tool.d.ts.map
@@ -27,7 +27,7 @@ import type { SearchResult, SymbolLang } from './schema.js';
27
27
  */
28
28
  export declare const INDEXABLE_LANG_IDS: readonly SymbolLang[];
29
29
  export declare const codebaseSearchTool: Tool<CodebaseSearchInput, CodebaseSearchOutput>;
30
- interface CodebaseSearchInput {
30
+ export interface CodebaseSearchInput {
31
31
  query: string;
32
32
  kind?: string | undefined;
33
33
  lang?: string | undefined;
@@ -41,7 +41,7 @@ interface CodebaseSearchInput {
41
41
  */
42
42
  preferLsp?: boolean | undefined;
43
43
  }
44
- interface CodebaseSearchOutput {
44
+ export interface CodebaseSearchOutput {
45
45
  results: SearchResult[];
46
46
  total: number;
47
47
  query: string;
@@ -54,5 +54,4 @@ interface CodebaseSearchOutput {
54
54
  /** Non-empty when the index blocked the search (not ready, indexing, failed). */
55
55
  indexStatus?: string | undefined;
56
56
  }
57
- export {};
58
57
  //# sourceMappingURL=codebase-search-tool.d.ts.map
@@ -13,13 +13,13 @@
13
13
  */
14
14
  import type { Tool } from '@wrongstack/core/types';
15
15
  import { type FileSkeletonResult, type SkeletonOptions } from './skeleton-extractor.js';
16
- interface CodebaseSkeletonInput extends SkeletonOptions {
16
+ export interface CodebaseSkeletonInput extends SkeletonOptions {
17
17
  /** Relative or absolute file or directory path. */
18
18
  path: string;
19
19
  /** Maximum number of files to process if `path` is a directory. Defaults to 20. */
20
20
  maxFiles?: number;
21
21
  }
22
- interface CodebaseSkeletonOutput {
22
+ export interface CodebaseSkeletonOutput {
23
23
  path: string;
24
24
  isDir: boolean;
25
25
  skeleton: string;
@@ -33,5 +33,4 @@ interface CodebaseSkeletonOutput {
33
33
  files?: FileSkeletonResult[];
34
34
  }
35
35
  export declare const codebaseSkeletonTool: Tool<CodebaseSkeletonInput, CodebaseSkeletonOutput>;
36
- export {};
37
36
  //# sourceMappingURL=codebase-skeleton-tool.d.ts.map
@@ -6,8 +6,15 @@
6
6
  * Returns: { totalSymbols, totalFiles, byLang, byKind, lastIndexed, sizeBytes, version }
7
7
  */
8
8
  import type { Tool } from '@wrongstack/core/types';
9
- export declare const codebaseStatsTool: Tool<Record<string, never>, CodebaseStatsOutput>;
10
- interface CodebaseStatsOutput {
9
+ /**
10
+ * `codebase-stats` takes no arguments (its JSON schema is
11
+ * `properties: {}, additionalProperties: false`). Expressed as a type alias
12
+ * rather than an empty interface, which is structurally `{}` — a type that
13
+ * accepts any non-nullish value and is flagged by `noEmptyInterface`.
14
+ */
15
+ export type CodebaseStatsInput = Record<string, never>;
16
+ export declare const codebaseStatsTool: Tool<CodebaseStatsInput, CodebaseStatsOutput>;
17
+ export interface CodebaseStatsOutput {
11
18
  totalSymbols: number;
12
19
  totalFiles: number;
13
20
  byLang: Record<string, number>;
@@ -26,5 +33,4 @@ interface CodebaseStatsOutput {
26
33
  /** Non-empty when the index is not ready or is still building. */
27
34
  indexStatus?: string | undefined;
28
35
  }
29
- export {};
30
36
  //# sourceMappingURL=codebase-stats-tool.d.ts.map
@@ -8,7 +8,7 @@
8
8
  * })
9
9
  */
10
10
  import type { Tool } from '@wrongstack/core/types';
11
- interface TargetedTestInput {
11
+ export interface TargetedTestInput {
12
12
  /** Symbol name (function, class, method) whose tests should be discovered and run. */
13
13
  symbol?: string | undefined;
14
14
  /** Source file path whose corresponding test suite should be run. */
@@ -16,7 +16,8 @@ interface TargetedTestInput {
16
16
  /** Optional explicit list of test files to run. */
17
17
  testFiles?: string[] | undefined;
18
18
  }
19
- interface TargetedTestOutput {
19
+ export type CodebaseTargetedTestInput = TargetedTestInput;
20
+ export interface TargetedTestOutput {
20
21
  status: 'passed' | 'failed' | 'no_tests_found' | 'error';
21
22
  discoveredSuites: string[];
22
23
  testsRun: number;
@@ -26,6 +27,6 @@ interface TargetedTestOutput {
26
27
  output: string;
27
28
  error?: string | undefined;
28
29
  }
30
+ export type CodebaseTargetedTestOutput = TargetedTestOutput;
29
31
  export declare const codebaseTargetedTestTool: Tool<TargetedTestInput, TargetedTestOutput>;
30
- export {};
31
32
  //# sourceMappingURL=codebase-targeted-test-tool.d.ts.map
@@ -18,18 +18,18 @@ export { cancelPendingReindexes, checkCodebaseIndexServerHealth, codebaseIndexSt
18
18
  export { buildBm25Index, buildIndexableText, tokenise, } from './bm25.js';
19
19
  export type { CircuitSnapshot, CircuitState } from './circuit-breaker.js';
20
20
  export { CircuitOpenError, IndexCircuitBreaker, IndexTimeoutError, indexCircuitBreaker, resetIndexCircuitBreaker, } from './circuit-breaker.js';
21
- export { codebaseAstReplaceTool } from './codebase-ast-replace-tool.js';
22
- export { codebaseInvariantCheckTool } from './codebase-invariant-check-tool.js';
21
+ export { codebaseAstReplaceTool, type CodebaseAstReplaceInput, type CodebaseAstReplaceOutput, } from './codebase-ast-replace-tool.js';
22
+ export { codebaseInvariantCheckTool, type CodebaseInvariantCheckInput, type CodebaseInvariantCheckOutput, } from './codebase-invariant-check-tool.js';
23
23
  export { replaceSymbolInFile, type MutateSymbolOptions, type MutateSymbolResult, } from './ast-symbol-mutator.js';
24
- export { codebaseImpactAnalysisTool } from './codebase-impact-analysis-tool.js';
25
- export { codebaseIncomingCallsTool } from './codebase-incoming-calls-tool.js';
26
- export { codebaseIndexTool } from './codebase-index-tool.js';
27
- export { codebaseOutgoingCallsTool } from './codebase-outgoing-calls-tool.js';
28
- export { codebaseRepoMapTool } from './codebase-repo-map-tool.js';
29
- export { codebaseSearchTool } from './codebase-search-tool.js';
30
- export { codebaseSkeletonTool } from './codebase-skeleton-tool.js';
31
- export { codebaseStatsTool } from './codebase-stats-tool.js';
32
- export { codebaseTargetedTestTool } from './codebase-targeted-test-tool.js';
24
+ export { codebaseImpactAnalysisTool, type CodebaseImpactAnalysisInput, type CodebaseImpactAnalysisOutput, type ImpactAnalysisInput, type ImpactAnalysisOutput, type ImpactCallSite, } from './codebase-impact-analysis-tool.js';
25
+ export { codebaseIncomingCallsTool, type CodebaseIncomingCallsInput, type CodebaseIncomingCallsOutput, type IncomingCallsInput, type IncomingCallsOutput, } from './codebase-incoming-calls-tool.js';
26
+ export { codebaseIndexTool, type CodebaseIndexInput, type CodebaseIndexOutput, } from './codebase-index-tool.js';
27
+ export { codebaseOutgoingCallsTool, type CodebaseOutgoingCallsInput, type CodebaseOutgoingCallsOutput, type OutgoingCallsInput, type OutgoingCallsOutput, } from './codebase-outgoing-calls-tool.js';
28
+ export { codebaseRepoMapTool, type CodebaseRepoMapInput, type CodebaseRepoMapOutput, } from './codebase-repo-map-tool.js';
29
+ export { codebaseSearchTool, type CodebaseSearchInput, type CodebaseSearchOutput, } from './codebase-search-tool.js';
30
+ export { codebaseSkeletonTool, type CodebaseSkeletonInput, type CodebaseSkeletonOutput, } from './codebase-skeleton-tool.js';
31
+ export { codebaseStatsTool, type CodebaseStatsInput, type CodebaseStatsOutput, } from './codebase-stats-tool.js';
32
+ export { codebaseTargetedTestTool, type CodebaseTargetedTestInput, type CodebaseTargetedTestOutput, type TargetedTestInput, type TargetedTestOutput, } from './codebase-targeted-test-tool.js';
33
33
  export { generateRepoMap, type RepoMapOptions, type RepoMapResult, } from './repo-map.js';
34
34
  export { extractDirectorySkeleton, extractFileSkeleton, type FileSkeletonResult, type SkeletonOptions, type SkeletonSymbolRange, } from './skeleton-extractor.js';
35
35
  export { deadCodeScanTool, runDeadCodeScan } from './dead-code-scan.js';
@@ -18,12 +18,12 @@ import {
18
18
  polyglotInvariantEngine,
19
19
  replaceSymbolInFile,
20
20
  runDeadCodeScan
21
- } from "../chunk-LRDIRJJL.js";
21
+ } from "../chunk-YEISRT4S.js";
22
22
  import "../chunk-XRNN44QY.js";
23
- import "../chunk-OYP27E3I.js";
23
+ import "../chunk-DRRY6SCM.js";
24
24
  import "../chunk-SCMRM6NL.js";
25
- import "../chunk-ESLPBT5A.js";
26
- import "../chunk-HFXSNKCV.js";
25
+ import "../chunk-HDYUBRMF.js";
26
+ import "../chunk-7JJFC6CT.js";
27
27
  import {
28
28
  cancelPendingReindexes,
29
29
  checkCodebaseIndexServerHealth,
@@ -45,11 +45,11 @@ import {
45
45
  shutdownCodebaseIndexHost,
46
46
  shutdownCodebaseIndexServer,
47
47
  symbolGraphService
48
- } from "../chunk-Z5Q3TXRY.js";
48
+ } from "../chunk-ZTCJCYLN.js";
49
49
  import {
50
50
  projectIndexServerEndpoint,
51
51
  projectIndexServerMetadataPath
52
- } from "../chunk-PV6HIZQD.js";
52
+ } from "../chunk-GDDXX27P.js";
53
53
  import {
54
54
  CircuitOpenError,
55
55
  IndexCircuitBreaker,
@@ -66,7 +66,7 @@ import {
66
66
  resolveIndexDir,
67
67
  runIndexer,
68
68
  tokenise
69
- } from "../chunk-J43O3BOX.js";
69
+ } from "../chunk-N3K2SFEI.js";
70
70
  import "../chunk-NU2IZ72J.js";
71
71
  import "../chunk-VVZPQPTY.js";
72
72
  import "../chunk-6IEBD27U.js";
@@ -79,7 +79,7 @@ import {
79
79
  import {
80
80
  compileGitignore,
81
81
  loadGitignoreMatcher
82
- } from "../chunk-DTQ75VBC.js";
82
+ } from "../chunk-2CTZW6JQ.js";
83
83
  import "../chunk-KE7A76VC.js";
84
84
  import "../chunk-ZUFHAHTE.js";
85
85
  export {