@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
@@ -7,13 +7,13 @@ import {
7
7
  searchService,
8
8
  statsService,
9
9
  symbolGraphService
10
- } from "../chunk-J43O3BOX.js";
10
+ } from "../chunk-N3K2SFEI.js";
11
11
  import "../chunk-NU2IZ72J.js";
12
12
  import "../chunk-VVZPQPTY.js";
13
13
  import "../chunk-6IEBD27U.js";
14
14
  import "../chunk-UCYQTZ7F.js";
15
15
  import "../chunk-YOHO4DVT.js";
16
- import "../chunk-DTQ75VBC.js";
16
+ import "../chunk-2CTZW6JQ.js";
17
17
  import "../chunk-KE7A76VC.js";
18
18
 
19
19
  // src/codebase-index/worker.ts
@@ -0,0 +1,13 @@
1
+ import type { DatabaseSync } from 'node:sqlite';
2
+ export declare const SYMBOLS_TEXT_DROPPED_KEY = "symbols_text_dropped";
3
+ export declare const NEXT_SYMBOL_ID_KEY = "next_symbol_id";
4
+ export declare function seedLangFamilies(stmt: (sql: string) => ReturnType<DatabaseSync['prepare']>): void;
5
+ export declare function repairMissingColumns(db: DatabaseSync): void;
6
+ export declare function dropDeprecatedSymbolsColumns(db: DatabaseSync, getMetadata: (key: string) => string | undefined, setMetadata: (key: string, value: string) => void): void;
7
+ export declare function initIndexSchema(db: DatabaseSync, stmt: (sql: string) => ReturnType<DatabaseSync['prepare']>, getMetadata: (key: string) => string | undefined, setMetadata: (key: string, value: string) => void, maxSqlVars: number, invalidateBm25: () => void): {
8
+ ftsAvailable: boolean;
9
+ vectorsAvailable: boolean;
10
+ };
11
+ export declare function ensureNextSymbolIdSeeded(stmt: (sql: string) => ReturnType<DatabaseSync['prepare']>): void;
12
+ export declare function allocateSymbolIds(stmt: (sql: string) => ReturnType<DatabaseSync['prepare']>, count: number, getMaxSymbolId: () => number): number;
13
+ //# sourceMappingURL=writer-init.d.ts.map
@@ -0,0 +1,14 @@
1
+ import type { DatabaseSync } from 'node:sqlite';
2
+ export declare const FTS_CHURN_KEY = "fts_churn_since_maintain";
3
+ export declare function optimizeStore(db: DatabaseSync): void;
4
+ export declare function recordFtsChurn(ftsAvailable: boolean, getMetadata: (key: string) => string | undefined, setMetadata: (key: string, value: string) => void, rows: number): void;
5
+ export declare function optimizeFtsIfNeeded(stmt: (sql: string) => ReturnType<DatabaseSync['prepare']>, ftsAvailable: boolean, getMetadata: (key: string) => string | undefined, setMetadata: (key: string, value: string) => void, runWithRetry: <T>(fn: () => T) => T, options?: {
6
+ minChurnRatio?: number;
7
+ minChurnRows?: number;
8
+ }): boolean;
9
+ export declare function checkpointWal(db: DatabaseSync): boolean;
10
+ export declare function compactIfNeeded(db: DatabaseSync, stmt: (sql: string) => ReturnType<DatabaseSync['prepare']>, runWithRetry: <T>(fn: () => T) => T, options?: {
11
+ minBytes?: number;
12
+ minFreeRatio?: number;
13
+ }): boolean;
14
+ //# sourceMappingURL=writer-maintenance.d.ts.map
@@ -23,24 +23,9 @@ export declare class IndexStore {
23
23
  private beginWriteTransaction;
24
24
  private commitWriteTransaction;
25
25
  private rollbackWriteTransaction;
26
- private seedLangFamilies;
27
- private repairMissingColumns;
28
- /**
29
- * P4: `symbols.text` duplicated name + signature + doc_comment (~19 MB on
30
- * the live index) and is derived on demand now. In-place DROP COLUMN — no
31
- * SCHEMA_VERSION bump, so no wipe-and-reparse. Best-effort: a busy or
32
- * SQLite-without-DROP-COLUMN open leaves the column in place, where new
33
- * inserts simply default it to '' and the next open retries.
34
- */
35
- private dropDeprecatedSymbolsColumns;
36
26
  private initSchema;
37
27
  private static readonly NEXT_SYMBOL_ID_KEY;
38
28
  private static readonly MAX_SQL_VARS;
39
- /** P2: persisted FTS-mutation churn counter — see {@link optimizeFtsIfNeeded}. */
40
- private static readonly FTS_CHURN_KEY;
41
- /** P4: one-shot marker that the deprecated symbols.text column is gone. */
42
- private static readonly SYMBOLS_TEXT_DROPPED_KEY;
43
- private ensureNextSymbolIdSeeded;
44
29
  private allocateSymbolIds;
45
30
  private invalidateIncomingRefsForFiles;
46
31
  private resolveRefsForNamesUnsafe;
package/dist/design.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { type SemanticTune } from '@wrongstack/core/design';
2
2
  import type { Tool } from '@wrongstack/core/types';
3
3
  type Overrides = Record<string, string>;
4
- interface DesignInput {
4
+ export interface DesignInput {
5
5
  action?: 'list' | 'use' | 'foundations' | 'set' | 'tune' | 'materialize' | 'verify' | undefined;
6
6
  kit?: string | undefined;
7
7
  stack?: string | undefined;
@@ -16,7 +16,7 @@ interface DesignInput {
16
16
  /** action "verify": explicit files to scan (project-relative). Defaults to a UI-file walk. */
17
17
  files?: string | string[] | undefined;
18
18
  }
19
- interface DesignOutput {
19
+ export interface DesignOutput {
20
20
  action: string;
21
21
  kit?: string | undefined;
22
22
  stack?: string | undefined;
package/dist/design.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  designTool
3
- } from "./chunk-ELRRTWNP.js";
3
+ } from "./chunk-IXIS7RSG.js";
4
4
  export {
5
5
  designTool
6
6
  };
package/dist/diff.d.ts CHANGED
@@ -1,14 +1,15 @@
1
1
  import type { Tool } from '@wrongstack/core/types';
2
- interface DiffInput {
2
+ export type DiffMode = 'unified' | 'side-by-side' | 'stat';
3
+ export interface DiffInput {
3
4
  path?: string | undefined;
4
5
  files?: string | string[] | undefined;
5
6
  a?: string | undefined;
6
7
  b?: string | undefined;
7
8
  staged?: boolean | undefined;
8
- mode?: 'unified' | 'side-by-side' | 'stat' | undefined;
9
+ mode?: DiffMode | undefined;
9
10
  context?: number | undefined;
10
11
  }
11
- interface DiffOutput {
12
+ export interface DiffOutput {
12
13
  diff: string;
13
14
  files: string[];
14
15
  truncated: boolean;
@@ -20,5 +21,4 @@ interface DiffOutput {
20
21
  note?: string | undefined;
21
22
  }
22
23
  export declare const diffTool: Tool<DiffInput, DiffOutput>;
23
- export {};
24
24
  //# sourceMappingURL=diff.d.ts.map
package/dist/diff.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  diffTool
3
- } from "./chunk-34VLZ35Z.js";
3
+ } from "./chunk-7HL23T3T.js";
4
4
  import "./chunk-ZBMANLYH.js";
5
5
  import "./chunk-ZUFHAHTE.js";
6
6
  export {
@@ -1,5 +1,5 @@
1
1
  import type { Tool } from '@wrongstack/core/types';
2
- interface DocumentInput {
2
+ export interface DocumentInput {
3
3
  target: 'file' | 'function' | 'class' | 'type' | 'all';
4
4
  path?: string | undefined;
5
5
  files?: string | string[] | undefined;
@@ -7,7 +7,7 @@ interface DocumentInput {
7
7
  overwrite?: boolean | undefined;
8
8
  cwd?: string | undefined;
9
9
  }
10
- interface DocumentedItem {
10
+ export interface DocumentedItem {
11
11
  path: string;
12
12
  name: string;
13
13
  signature: string;
@@ -15,12 +15,11 @@ interface DocumentedItem {
15
15
  status: 'documented' | 'skipped' | 'error';
16
16
  error?: string | undefined;
17
17
  }
18
- interface DocumentOutput {
18
+ export interface DocumentOutput {
19
19
  files_processed: number;
20
20
  items_documented: number;
21
21
  results: DocumentedItem[];
22
22
  style: string;
23
23
  }
24
24
  export declare const documentTool: Tool<DocumentInput, DocumentOutput>;
25
- export {};
26
25
  //# sourceMappingURL=document.d.ts.map
package/dist/document.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  documentTool
3
- } from "./chunk-IU4DV2PA.js";
3
+ } from "./chunk-CHEK3ASV.js";
4
4
  import "./chunk-ZUFHAHTE.js";
5
5
  export {
6
6
  documentTool
package/dist/e2e.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { Tool } from '@wrongstack/core/types';
2
2
  export type E2EFramework = 'playwright' | 'cypress';
3
3
  export type E2EPackageManager = 'pnpm' | 'npm' | 'yarn' | 'bun';
4
- interface E2EPlanInput {
4
+ export interface E2EPlanInput {
5
5
  cwd?: string | undefined;
6
6
  framework?: E2EFramework | 'all' | undefined;
7
7
  maxDepth?: number | undefined;
package/dist/e2e.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  discoverE2EProjects,
3
3
  e2ePlanTool
4
- } from "./chunk-VPALDFYM.js";
4
+ } from "./chunk-RV7BVTDG.js";
5
5
  import "./chunk-ZUFHAHTE.js";
6
6
  export {
7
7
  discoverE2EProjects,
package/dist/edit.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Tool } from '@wrongstack/core/types';
2
2
  import { type MatchTier } from './_edit-match.js';
3
- interface EditInput {
3
+ export interface EditInput {
4
4
  path: string;
5
5
  old_string: string;
6
6
  new_string: string;
@@ -12,7 +12,7 @@ interface EditInput {
12
12
  */
13
13
  replace_all?: boolean | undefined;
14
14
  }
15
- interface EditOutput {
15
+ export interface EditOutput {
16
16
  path: string;
17
17
  replacements: number;
18
18
  diff: string;
@@ -30,6 +30,6 @@ interface EditOutput {
30
30
  syntax_errors?: string[] | undefined;
31
31
  note?: string | undefined;
32
32
  }
33
+ export type { MatchTier };
33
34
  export declare const editTool: Tool<EditInput, EditOutput>;
34
- export {};
35
35
  //# sourceMappingURL=edit.d.ts.map
package/dist/edit.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  editTool
3
- } from "./chunk-Z6IHMJMC.js";
4
- import "./chunk-JSNSMG5R.js";
5
- import "./chunk-Z5Q3TXRY.js";
6
- import "./chunk-PV6HIZQD.js";
7
- import "./chunk-J43O3BOX.js";
3
+ } from "./chunk-DK4J2WMH.js";
4
+ import "./chunk-MSOAX3GC.js";
5
+ import "./chunk-ZTCJCYLN.js";
6
+ import "./chunk-GDDXX27P.js";
7
+ import "./chunk-N3K2SFEI.js";
8
8
  import "./chunk-NU2IZ72J.js";
9
9
  import "./chunk-VVZPQPTY.js";
10
10
  import "./chunk-6IEBD27U.js";
11
11
  import "./chunk-UCYQTZ7F.js";
12
12
  import "./chunk-YOHO4DVT.js";
13
- import "./chunk-DTQ75VBC.js";
13
+ import "./chunk-2CTZW6JQ.js";
14
14
  import "./chunk-KE7A76VC.js";
15
15
  import "./chunk-ZUFHAHTE.js";
16
16
  export {
package/dist/exec.d.ts CHANGED
@@ -36,13 +36,13 @@ export declare function getDangerBypass(): ReadonlySet<string>;
36
36
  export declare function isExecCommandAllowed(cmd: string): boolean;
37
37
  /** Snapshot of the effective allowlist (sorted) — for tests / diagnostics. */
38
38
  export declare function getExecAllowlist(): string[];
39
- interface ExecInput {
39
+ export interface ExecInput {
40
40
  command: string;
41
41
  args?: string[] | undefined;
42
42
  cwd?: string | undefined;
43
43
  timeout?: number | undefined;
44
44
  }
45
- interface ExecOutput {
45
+ export interface ExecOutput {
46
46
  command: string;
47
47
  args: string[];
48
48
  stdout: string;
@@ -63,5 +63,4 @@ interface ExecOutput {
63
63
  danger: DangerAssessment;
64
64
  }
65
65
  export declare const execTool: Tool<ExecInput, ExecOutput>;
66
- export {};
67
66
  //# sourceMappingURL=exec.d.ts.map
package/dist/exec.js CHANGED
@@ -7,12 +7,12 @@ import {
7
7
  isExecCommandAllowed,
8
8
  resetDangerBypass,
9
9
  resetExecPolicy
10
- } from "./chunk-OTPTQBYE.js";
10
+ } from "./chunk-MGPR7VG3.js";
11
11
  import "./chunk-BTSFTGIL.js";
12
- import "./chunk-QGF2C7TF.js";
12
+ import "./chunk-PVCB7RUZ.js";
13
13
  import "./chunk-SCMRM6NL.js";
14
- import "./chunk-ESLPBT5A.js";
15
- import "./chunk-HFXSNKCV.js";
14
+ import "./chunk-HDYUBRMF.js";
15
+ import "./chunk-7JJFC6CT.js";
16
16
  import "./chunk-KE7A76VC.js";
17
17
  import "./chunk-ZUFHAHTE.js";
18
18
  export {
package/dist/fetch.d.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  import type { Tool } from '@wrongstack/core/types';
2
- interface FetchInput {
2
+ export type FetchFormat = 'markdown' | 'text' | 'raw';
3
+ export interface FetchInput {
3
4
  url: string;
4
- format?: 'markdown' | 'text' | 'raw' | undefined;
5
+ format?: FetchFormat | undefined;
5
6
  }
6
- interface FetchOutput {
7
+ export interface FetchOutput {
7
8
  content: string;
8
9
  status: number;
9
10
  content_type: string;
package/dist/fetch.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  fetchTool
3
- } from "./chunk-C2DQKVLO.js";
3
+ } from "./chunk-MJSJWXBF.js";
4
4
  import {
5
5
  guardedFetch,
6
6
  guardedLookup
package/dist/format.d.ts CHANGED
@@ -1,11 +1,12 @@
1
- import type { Tool, ToolStreamEvent } from '@wrongstack/core/types';
2
- interface FormatInput {
1
+ import type { Tool } from '@wrongstack/core/types';
2
+ export type FormatFixer = 'biome' | 'prettier' | 'auto';
3
+ export interface FormatInput {
3
4
  files?: string | string[] | undefined;
4
- fixer?: 'biome' | 'prettier' | 'auto' | undefined;
5
+ fixer?: FormatFixer | undefined;
5
6
  check?: boolean | undefined;
6
7
  cwd?: string | undefined;
7
8
  }
8
- interface FormatOutput {
9
+ export interface FormatOutput {
9
10
  fixer: string;
10
11
  /** Parsed from formatter output when confidently available; undefined otherwise. */
11
12
  files_checked: number | undefined;
@@ -14,46 +15,17 @@ interface FormatOutput {
14
15
  output: string;
15
16
  truncated: boolean;
16
17
  }
17
- type FormatContext = Parameters<Tool<FormatInput, FormatOutput>['execute']>[1];
18
- export declare const formatTool: {
19
- name: string;
20
- category: string;
21
- description: string;
22
- usageHint: string;
23
- permission: "confirm";
24
- subjectKey: string;
25
- mutating: true;
26
- capabilities: string[];
27
- icon: "code";
28
- timeoutMs: number;
29
- inputSchema: {
30
- type: string;
31
- properties: {
32
- files: {
33
- type: string;
34
- description: string;
35
- };
36
- fixer: {
37
- type: string;
38
- enum: string[];
39
- description: string;
40
- };
41
- check: {
42
- type: string;
43
- description: string;
44
- };
45
- cwd: {
46
- type: string;
47
- description: string;
48
- };
49
- };
50
- };
51
- execute(input: FormatInput, ctx: FormatContext, opts?: {
52
- signal: AbortSignal;
53
- }): Promise<FormatOutput>;
54
- executeStream(input: FormatInput, ctx: FormatContext, opts?: {
55
- signal: AbortSignal;
56
- }): AsyncGenerator<ToolStreamEvent<FormatOutput>>;
18
+ export type FormatContext = Parameters<Tool<FormatInput, FormatOutput>['execute']>[1];
19
+ export declare const formatTool: Tool<FormatInput, FormatOutput>;
20
+ /**
21
+ * Extract file counts from real formatter output. Biome prints stable summary
22
+ * lines ("Checked 12 files in 30ms. Fixed 3 files."); anything else (including
23
+ * prettier's per-file listing, whose shape varies by version and flags) yields
24
+ * `undefined` rather than a guessed number.
25
+ */
26
+ export declare function parseFormatterCounts(fixer: string, output: string, isCheck?: boolean): {
27
+ checked: number | undefined;
28
+ changed: number | undefined;
57
29
  };
58
- export {};
30
+ export declare function detectFixer(cwd: string): Promise<string | null>;
59
31
  //# sourceMappingURL=format.d.ts.map
package/dist/format.js CHANGED
@@ -1,15 +1,19 @@
1
1
  import {
2
- formatTool
3
- } from "./chunk-J74TMK4M.js";
4
- import "./chunk-I7FBZOEP.js";
5
- import "./chunk-NDIT3SBZ.js";
6
- import "./chunk-OYP27E3I.js";
2
+ detectFixer,
3
+ formatTool,
4
+ parseFormatterCounts
5
+ } from "./chunk-NJX2RXKJ.js";
6
+ import "./chunk-T3SMFF5Q.js";
7
+ import "./chunk-7N5U2RAU.js";
8
+ import "./chunk-DRRY6SCM.js";
7
9
  import "./chunk-SCMRM6NL.js";
8
- import "./chunk-ESLPBT5A.js";
9
- import "./chunk-HFXSNKCV.js";
10
+ import "./chunk-HDYUBRMF.js";
11
+ import "./chunk-7JJFC6CT.js";
10
12
  import "./chunk-KE7A76VC.js";
11
13
  import "./chunk-ZUFHAHTE.js";
12
14
  export {
13
- formatTool
15
+ detectFixer,
16
+ formatTool,
17
+ parseFormatterCounts
14
18
  };
15
19
  //# sourceMappingURL=format.js.map
package/dist/git.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Tool } from '@wrongstack/core/types';
2
- type GitSubcommand = 'status' | 'log' | 'diff' | 'commit' | 'branch' | 'checkout' | 'stash' | 'push' | 'pull' | 'fetch' | 'reset' | 'worktree';
3
- interface GitInput {
2
+ export type GitSubcommand = 'status' | 'log' | 'diff' | 'commit' | 'branch' | 'checkout' | 'stash' | 'push' | 'pull' | 'fetch' | 'reset' | 'worktree';
3
+ export interface GitInput {
4
4
  command: GitSubcommand;
5
5
  files?: string | string[] | undefined;
6
6
  dry_run?: boolean | undefined;
@@ -21,7 +21,7 @@ interface GitInput {
21
21
  /** force operation (e.g. worktree remove --force) */
22
22
  force?: boolean | undefined;
23
23
  }
24
- interface GitOutput {
24
+ export interface GitOutput {
25
25
  command: GitSubcommand;
26
26
  stdout: string;
27
27
  stderr: string;
package/dist/git.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  gitTool
3
- } from "./chunk-6AAOT4PW.js";
3
+ } from "./chunk-AQ5YBURX.js";
4
4
  import "./chunk-ZUFHAHTE.js";
5
5
  export {
6
6
  gitTool
package/dist/glob.d.ts CHANGED
@@ -1,13 +1,12 @@
1
1
  import type { Tool } from '@wrongstack/core/types';
2
- interface GlobInput {
2
+ export interface GlobInput {
3
3
  pattern: string;
4
4
  path?: string | undefined;
5
5
  limit?: number | undefined;
6
6
  }
7
- interface GlobOutput {
7
+ export interface GlobOutput {
8
8
  files: string[];
9
9
  truncated: boolean;
10
10
  }
11
11
  export declare const globTool: Tool<GlobInput, GlobOutput>;
12
- export {};
13
12
  //# sourceMappingURL=glob.d.ts.map
package/dist/glob.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  globTool
3
- } from "./chunk-ZMW6WJFT.js";
3
+ } from "./chunk-ASEXQRA7.js";
4
4
  import "./chunk-ZBMANLYH.js";
5
- import "./chunk-DTQ75VBC.js";
5
+ import "./chunk-2CTZW6JQ.js";
6
6
  import "./chunk-ZUFHAHTE.js";
7
7
  export {
8
8
  globTool
package/dist/grep.d.ts CHANGED
@@ -1,23 +1,25 @@
1
1
  import type { Tool } from '@wrongstack/core/types';
2
- interface GrepInput {
2
+ export type GrepOutputMode = 'content' | 'files_with_matches' | 'count';
3
+ export type GrepEngine = 'rg' | 'native';
4
+ export type GrepBackend = GrepEngine;
5
+ export interface GrepInput {
3
6
  pattern: string;
4
7
  path?: string | undefined;
5
8
  glob?: string | undefined;
6
- output_mode?: 'content' | 'files_with_matches' | 'count' | undefined;
9
+ output_mode?: GrepOutputMode | undefined;
7
10
  context_lines?: number | undefined;
8
11
  case_insensitive?: boolean | undefined;
9
12
  limit?: number | undefined;
10
13
  }
11
- interface GrepOutput {
14
+ export interface GrepOutput {
12
15
  matches: string[];
13
16
  count: number;
14
17
  truncated: boolean;
15
- used: 'rg' | 'native';
18
+ used: GrepEngine;
16
19
  }
17
20
  export declare const grepTool: Tool<GrepInput, GrepOutput>;
18
21
  /** Test-only: forget the cached rg availability so mocks can vary per test. */
19
22
  export declare function __resetRgDetectionForTests(): void;
20
23
  /** Test-only: explicitly set rg availability to test both engines. */
21
24
  export declare function __setRgAvailableForTests(available: boolean | undefined): void;
22
- export {};
23
25
  //# sourceMappingURL=grep.d.ts.map
package/dist/grep.js CHANGED
@@ -2,10 +2,10 @@ import {
2
2
  __resetRgDetectionForTests,
3
3
  __setRgAvailableForTests,
4
4
  grepTool
5
- } from "./chunk-XSSFBS5I.js";
6
- import "./chunk-Q5JPPCZC.js";
5
+ } from "./chunk-4ERMPDHV.js";
6
+ import "./chunk-YJTXRH5Y.js";
7
7
  import "./chunk-ZBMANLYH.js";
8
- import "./chunk-DTQ75VBC.js";
8
+ import "./chunk-2CTZW6JQ.js";
9
9
  import "./chunk-ZUFHAHTE.js";
10
10
  export {
11
11
  __resetRgDetectionForTests,