@wrongstack/tools 1.0.3 → 1.0.4

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 (107) hide show
  1. package/README.md +0 -6
  2. package/dist/_util.d.ts +18 -0
  3. package/dist/audit.js +4 -4
  4. package/dist/bash.js +2 -2
  5. package/dist/browser/index.d.ts +1 -1
  6. package/dist/browser/index.js +9 -1
  7. package/dist/browser/tools.d.ts +14 -0
  8. package/dist/builtin.d.ts +16 -13
  9. package/dist/builtin.js +40 -44
  10. package/dist/{chunk-6LCKF5KH.js → chunk-24Q4O34E.js} +1 -1
  11. package/dist/{chunk-AQ5YBURX.js → chunk-2IC5FRD7.js} +2 -2
  12. package/dist/{chunk-4ERMPDHV.js → chunk-2QY3DC3H.js} +20 -16
  13. package/dist/{chunk-VU3QBYL4.js → chunk-2ZWQIVEW.js} +2 -2
  14. package/dist/{chunk-JDOO4P6Z.js → chunk-3F7HQ3KS.js} +2 -2
  15. package/dist/{chunk-DX5KZEMK.js → chunk-47GYABZW.js} +2 -2
  16. package/dist/{chunk-KYVOTHG7.js → chunk-4KI4HHID.js} +2 -2
  17. package/dist/{chunk-X6KXNHUO.js → chunk-5BKQVP56.js} +22 -5
  18. package/dist/{chunk-SMARDKAC.js → chunk-5UA4TNJJ.js} +2 -2
  19. package/dist/{chunk-SOR7OCYP.js → chunk-6XYFYLN7.js} +23 -1
  20. package/dist/{chunk-QU2VRCMM.js → chunk-A636Z2TG.js} +3 -3
  21. package/dist/{chunk-3JVSOBHU.js → chunk-AX5ZG5O5.js} +3 -3
  22. package/dist/{chunk-7HL23T3T.js → chunk-BU6VUXWG.js} +2 -2
  23. package/dist/{chunk-KIQTABBJ.js → chunk-C64UUXTA.js} +3 -3
  24. package/dist/{chunk-IRUEHGCR.js → chunk-D4HWMWGE.js} +3 -3
  25. package/dist/{chunk-E2ZD4ERD.js → chunk-EMCIC2JA.js} +3 -3
  26. package/dist/{chunk-ASEXQRA7.js → chunk-FEXPWYU7.js} +7 -5
  27. package/dist/{chunk-ZUFHAHTE.js → chunk-HKR56VNF.js} +15 -2
  28. package/dist/{chunk-3LS3FYEF.js → chunk-JK5WXW4S.js} +2 -2
  29. package/dist/{chunk-GU7QJ37F.js → chunk-JQ43NVFU.js} +2 -2
  30. package/dist/{chunk-AMURQAJX.js → chunk-KVEL4EFI.js} +3 -3
  31. package/dist/{chunk-VZGPASGD.js → chunk-MG7CUN6R.js} +2 -2
  32. package/dist/{chunk-32XPUSY3.js → chunk-NERS6GBT.js} +3 -3
  33. package/dist/{chunk-NOCU555K.js → chunk-NKOTOW6X.js} +3 -3
  34. package/dist/{chunk-YDTRKEYY.js → chunk-OBVXDVLE.js} +3 -3
  35. package/dist/{chunk-PNLDTRC5.js → chunk-OSXM3O3J.js} +6 -6
  36. package/dist/{chunk-VKAJMHVG.js → chunk-OZVGRDCM.js} +3 -3
  37. package/dist/{chunk-CVNCSMVU.js → chunk-PVQBD3TA.js} +46 -6
  38. package/dist/{chunk-FC3X7GGJ.js → chunk-R36RWYXE.js} +3 -3
  39. package/dist/{chunk-Z34CUZCZ.js → chunk-S6E2AM4U.js} +3 -3
  40. package/dist/{chunk-TYRVYBHW.js → chunk-T34DVSAE.js} +235 -176
  41. package/dist/{chunk-4YKVHCQC.js → chunk-TGVQMKVH.js} +3 -3
  42. package/dist/{chunk-6ZLRRC74.js → chunk-VQDSIHAR.js} +40 -2
  43. package/dist/{chunk-YECHJJJF.js → chunk-VSOVZ5JI.js} +4 -4
  44. package/dist/{chunk-RV7BVTDG.js → chunk-WKXL5XHU.js} +2 -2
  45. package/dist/{chunk-77MBK46T.js → chunk-WWAXJKX3.js} +3 -3
  46. package/dist/{chunk-24T5XIJU.js → chunk-YA2ZYCJY.js} +4 -4
  47. package/dist/{chunk-T7YVY2BV.js → chunk-YILT3CSO.js} +2 -2
  48. package/dist/{chunk-OUEH4I4X.js → chunk-YJQQ5F5J.js} +3 -3
  49. package/dist/{chunk-VO6M2FVG.js → chunk-YZLOYJGN.js} +2 -2
  50. package/dist/{chunk-MIV2RU5B.js → chunk-ZETZHHV5.js} +3 -3
  51. package/dist/clarify.d.ts +18 -3
  52. package/dist/codebase-index/codebase-search-tool.d.ts +2 -3
  53. package/dist/codebase-index/index.js +6 -6
  54. package/dist/codebase-index/parser-worker-script.js +1 -1
  55. package/dist/codebase-index/project-server-endpoint.d.ts +33 -0
  56. package/dist/codebase-index/project-server.js +3 -3
  57. package/dist/codebase-index/worker.js +2 -2
  58. package/dist/diff.js +2 -2
  59. package/dist/e2e.js +2 -2
  60. package/dist/edit.js +6 -6
  61. package/dist/exec.js +2 -2
  62. package/dist/fetch.js +2 -2
  63. package/dist/format.js +4 -4
  64. package/dist/git.js +2 -2
  65. package/dist/glob.js +2 -2
  66. package/dist/grep.js +2 -2
  67. package/dist/index.d.ts +2 -8
  68. package/dist/index.js +65 -81
  69. package/dist/install.js +4 -4
  70. package/dist/json.js +2 -2
  71. package/dist/kanban.js +2 -2
  72. package/dist/languages/index.js +2 -2
  73. package/dist/{legacy-bridge-WVQ4BHDI.js → legacy-bridge-XM2GV665.js} +4 -4
  74. package/dist/lint.js +4 -4
  75. package/dist/logs.js +2 -2
  76. package/dist/outdated.js +2 -2
  77. package/dist/pack.js +41 -45
  78. package/dist/{parser-dispatch-UQAB4E6V.js → parser-dispatch-IF75EZFB.js} +2 -2
  79. package/dist/patch.js +6 -6
  80. package/dist/plan.js +4 -4
  81. package/dist/read-url-content.d.ts +17 -0
  82. package/dist/read.js +6 -6
  83. package/dist/replace.js +6 -6
  84. package/dist/session-kanban.js +1 -1
  85. package/dist/task.js +4 -4
  86. package/dist/test.js +4 -4
  87. package/dist/todo.js +3 -3
  88. package/dist/tool-search.js +1 -1
  89. package/dist/tool-tier.d.ts +12 -2
  90. package/dist/tool-tier.js +42 -46
  91. package/dist/tree.js +2 -2
  92. package/dist/typecheck.js +4 -4
  93. package/dist/write.js +6 -6
  94. package/package.json +5 -21
  95. package/dist/batch-tool-use.d.ts +0 -24
  96. package/dist/batch-tool-use.js +0 -7
  97. package/dist/chunk-7ODZTPCU.js +0 -128
  98. package/dist/chunk-CHEK3ASV.js +0 -183
  99. package/dist/chunk-KLJZ4WV4.js +0 -213
  100. package/dist/chunk-VBF2YXUW.js +0 -203
  101. package/dist/document.d.ts +0 -25
  102. package/dist/document.js +0 -8
  103. package/dist/scaffold.d.ts +0 -23
  104. package/dist/scaffold.js +0 -10
  105. package/dist/set-working-dir.d.ts +0 -17
  106. package/dist/tool-help.d.ts +0 -21
  107. package/dist/tool-help.js +0 -7
package/README.md CHANGED
@@ -71,8 +71,6 @@ execution remain separate permission-gated steps.
71
71
  | `install` | `confirm` | Package manager install |
72
72
  | `audit` | `confirm` | Dependency vulnerability audit |
73
73
  | `outdated` | `auto` | List outdated dependencies |
74
- | `scaffold` | `confirm` | Template-based scaffolding |
75
- | `document` | `auto` | Deprecated read-only documentation-candidate preview; use plugin tool `auto_doc` for generation |
76
74
  | `logs` | `auto` | Tail logs with rolling 100k-line window |
77
75
 
78
76
  ### Agent control
@@ -80,10 +78,6 @@ execution remain separate permission-gated steps.
80
78
  | Tool | Notes |
81
79
  |------|-------|
82
80
  | `todo` | TodoWrite / TodoRead for session task tracking |
83
- | `tool_search` | Lazy-load deferred tool schemas |
84
- | `tool_use` | Generic single-tool call |
85
- | `batch_tool_use` | Parallel multi-tool dispatch |
86
- | `tool_help` | Show tool usage hint |
87
81
  | `remember` / `forget` | Memory-store mutations |
88
82
  | `create_mode` | Author a new agent mode |
89
83
 
package/dist/_util.d.ts CHANGED
@@ -130,4 +130,22 @@ export declare function truncateHeadTail(s: string, maxBytes: number): string;
130
130
  export declare function normalizeCommandOutput(raw: string, opts?: {
131
131
  maxBytes?: number | undefined;
132
132
  }): string;
133
+ /**
134
+ * Build a project-root-relative path shortener for search tool output.
135
+ *
136
+ * `grep` and `glob` emit one path per match, and the absolute project prefix
137
+ * (`D:\long\path\to\project\`) is repeated on every single line — pure token
138
+ * waste in the model's context, since the agent already works from the project
139
+ * root. Stripping it makes match lines read like the paths the user and the
140
+ * other tools use (`packages/tools/src/grep.ts:42:…`).
141
+ *
142
+ * Only paths that actually live under `root` are shortened. The search tools
143
+ * resolve their base through `safeResolveReal`, which also admits
144
+ * `~/.wrongstack`; turning those into a `../../..` chain would be strictly
145
+ * worse than the absolute path, so they are returned untouched. Windows path
146
+ * comparison is case-insensitive (a drive letter can arrive as `d:\` from one
147
+ * source and `D:\` from another) but the returned suffix always preserves the
148
+ * original casing.
149
+ */
150
+ export declare function makeRootRelativizer(root: string): (absPath: string) => string;
133
151
  //# sourceMappingURL=_util.d.ts.map
package/dist/audit.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  auditTool
3
- } from "./chunk-KIQTABBJ.js";
4
- import "./chunk-GU7QJ37F.js";
5
- import "./chunk-3LS3FYEF.js";
3
+ } from "./chunk-C64UUXTA.js";
4
+ import "./chunk-JQ43NVFU.js";
5
+ import "./chunk-JK5WXW4S.js";
6
6
  import "./chunk-EMA2XENR.js";
7
7
  import "./chunk-SCMRM6NL.js";
8
8
  import "./chunk-HDYUBRMF.js";
9
9
  import "./chunk-7JJFC6CT.js";
10
10
  import "./chunk-5U5ULQX2.js";
11
- import "./chunk-ZUFHAHTE.js";
11
+ import "./chunk-HKR56VNF.js";
12
12
  export {
13
13
  auditTool
14
14
  };
package/dist/bash.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  bashTool
3
- } from "./chunk-KYVOTHG7.js";
3
+ } from "./chunk-4KI4HHID.js";
4
4
  import "./chunk-BTSFTGIL.js";
5
5
  import "./chunk-PVCB7RUZ.js";
6
6
  import "./chunk-SCMRM6NL.js";
7
7
  import "./chunk-HDYUBRMF.js";
8
8
  import "./chunk-7JJFC6CT.js";
9
9
  import "./chunk-5U5ULQX2.js";
10
- import "./chunk-ZUFHAHTE.js";
10
+ import "./chunk-HKR56VNF.js";
11
11
  export {
12
12
  bashTool
13
13
  };
@@ -2,6 +2,6 @@ export { BrowserArtifactStore } from './artifacts.js';
2
2
  export { type BrowserLauncher, BrowserSessionManager, browserInstallationDiagnostics, } from './manager.js';
3
3
  export { BrowserNetworkGuardProxy } from './network-guard-proxy.js';
4
4
  export { assertBrowserUrlAllowed, type BrowserDnsLookup, type BrowserResolvedTarget, parsePrivateOriginAllowlist, redactBrowserText, resolvePinnedBrowserTarget, safeBrowserUrl, } from './security.js';
5
- export { browserClickTool, browserCloseTool, browserDragTool, browserEvaluateTool, browserHoverTool, browserListTool, browserNavigateTool, browserOpenTool, browserPressTool, browserScreenshotTool, browserSelectTool, browserSnapshotTool, browserStatusTool, browserTools, browserTypeTool, browserUploadTool, browserWaitTool, shutdownBrowserTools, type BrowserCloseInput, type BrowserDragInput, type BrowserEvaluateInput, type BrowserNavigateInput, type BrowserOpenInput, type BrowserPressInput, type BrowserScreenshotInput, type BrowserSelectInput, type BrowserSelectorInput, type BrowserSnapshotInput, type BrowserTypeInput, type BrowserUploadInput, type BrowserWaitInput, } from './tools.js';
5
+ export { browserClickTool, browserCloseTool, browserDragTool, browserEvaluateTool, browserHoverTool, browserListTool, browserNavigateTool, browserOpenTool, browserPressTool, browserScreenshotTool, browserSelectTool, browserSnapshotTool, browserStatusTool, browserTools, BROWSER_TOOL_NAMES, enableBrowserSuite, disableBrowserSuite, isBrowserSuiteEnabled, browserTypeTool, browserUploadTool, browserWaitTool, shutdownBrowserTools, type BrowserCloseInput, type BrowserDragInput, type BrowserEvaluateInput, type BrowserNavigateInput, type BrowserOpenInput, type BrowserPressInput, type BrowserScreenshotInput, type BrowserSelectInput, type BrowserSelectorInput, type BrowserSnapshotInput, type BrowserTypeInput, type BrowserUploadInput, type BrowserWaitInput, } from './tools.js';
6
6
  export type { BrowserArtifact, BrowserArtifactKind, BrowserConsoleEntry, BrowserManagerOptions, BrowserNetworkEntry, BrowserOpenOptions, BrowserSessionSummary, BrowserSnapshot, } from './types.js';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,6 @@
1
1
  import "../chunk-Z6DAKQ3U.js";
2
2
  import {
3
+ BROWSER_TOOL_NAMES,
3
4
  BrowserArtifactStore,
4
5
  BrowserNetworkGuardProxy,
5
6
  BrowserSessionManager,
@@ -22,13 +23,17 @@ import {
22
23
  browserTypeTool,
23
24
  browserUploadTool,
24
25
  browserWaitTool,
26
+ disableBrowserSuite,
27
+ enableBrowserSuite,
28
+ isBrowserSuiteEnabled,
25
29
  parsePrivateOriginAllowlist,
26
30
  redactBrowserText,
27
31
  resolvePinnedBrowserTarget,
28
32
  safeBrowserUrl,
29
33
  shutdownBrowserTools
30
- } from "../chunk-SOR7OCYP.js";
34
+ } from "../chunk-6XYFYLN7.js";
31
35
  export {
36
+ BROWSER_TOOL_NAMES,
32
37
  BrowserArtifactStore,
33
38
  BrowserNetworkGuardProxy,
34
39
  BrowserSessionManager,
@@ -51,6 +56,9 @@ export {
51
56
  browserTypeTool,
52
57
  browserUploadTool,
53
58
  browserWaitTool,
59
+ disableBrowserSuite,
60
+ enableBrowserSuite,
61
+ isBrowserSuiteEnabled,
54
62
  parsePrivateOriginAllowlist,
55
63
  redactBrowserText,
56
64
  resolvePinnedBrowserTarget,
@@ -84,5 +84,19 @@ export declare const browserEvaluateTool: Tool<BrowserEvaluateInput>;
84
84
  export declare const browserUploadTool: Tool<BrowserUploadInput>;
85
85
  export declare const browserCloseTool: Tool<BrowserCloseInput>;
86
86
  export declare const browserTools: Tool[];
87
+ export declare const BROWSER_TOOL_NAMES: readonly string[];
88
+ /** Bulk enable all browser automation tools in a ToolRegistry. */
89
+ export declare function enableBrowserSuite(registry: {
90
+ enable(name: string): boolean;
91
+ }): number;
92
+ /** Bulk disable all browser automation tools in a ToolRegistry so they do not enter context. */
93
+ export declare function disableBrowserSuite(registry: {
94
+ disable(name: string, reason?: any): boolean;
95
+ }): number;
96
+ /** Check whether all browser tools are currently enabled in the registry. */
97
+ export declare function isBrowserSuiteEnabled(registry: {
98
+ isDisabled(name: string): boolean;
99
+ get(name: string): unknown;
100
+ }): boolean;
87
101
  export declare function shutdownBrowserTools(): Promise<void>;
88
102
  //# sourceMappingURL=tools.d.ts.map
package/dist/builtin.d.ts CHANGED
@@ -15,8 +15,10 @@ export declare const BUILTIN_TOOL_DESCRIPTIONS: Readonly<Record<string, string>>
15
15
  *
16
16
  * These tools are useful but not critical for core development flow:
17
17
  * package management (install/audit/outdated run once per session at most),
18
- * meta-tools (toolSearch/toolUse/batchToolUse/toolHelp duplicate built-in
19
- * model capabilities), scaffolding, logging, and auto-documentation.
18
+ * browser automation, the E2E planner, and log tailing. The `tool_search` /
19
+ * `tool_use` gateway is deliberately NOT here — it is what makes everything
20
+ * omitted below tier `off` reachable, so withholding it would strand the
21
+ * tools this list exists to withhold.
20
22
  */
21
23
  export declare const OPTIONAL_TOOLS: Tool[];
22
24
  /**
@@ -27,12 +29,12 @@ export declare const OPTIONAL_TOOLS: Tool[];
27
29
  export declare const OFF_ONLY_TOOLS: Tool[];
28
30
  /**
29
31
  * Tier 1 (Token Saving) tool set — the absolute minimum for useful work.
30
- * 23 tools covering core file ops, indexed project discovery, structured
31
- * edits, shell, search, and utilities. Codebase index lifecycle tools stay
32
- * available at every tier so token saving does not force broad filesystem
33
- * scans. Saves ~3500-5500 tokens vs full mode by omitting specialized
34
- * schemas from direct provider exposure; hosts may retain those tools in a
35
- * lazy catalog.
32
+ * 26 tools covering core file ops, indexed project discovery, structured
33
+ * edits, shell, search, utilities, and the lazy-catalog gateway. Codebase
34
+ * index lifecycle tools stay available at every tier so token saving does not
35
+ * force broad filesystem scans. Saves ~3500-5500 tokens vs full mode by
36
+ * omitting specialized schemas from direct provider exposure; the withheld
37
+ * tools stay executable and are reachable through the gateway pair.
36
38
  *
37
39
  * Tier 1 tools:
38
40
  * read, write, edit, clarify — file operations
@@ -42,6 +44,7 @@ export declare const OFF_ONLY_TOOLS: Tool[];
42
44
  * bash, grep, glob — shell + exact/path fallback
43
45
  * diff, patch, json — utility
44
46
  * search — web research
47
+ * tool_search, tool_use — reach the withheld catalog
45
48
  */
46
49
  export declare const TIER1_TOOLS: Tool[];
47
50
  /**
@@ -56,12 +59,12 @@ export declare const TIER1_TOOLS: Tool[];
56
59
  export declare const TIER2_TOOLS: Tool[];
57
60
  /**
58
61
  * Tier 3 tool set — specialized, administrative, and exploratory tools.
59
- * Adds 10 tools: outdated, logs, document, scaffold, dead-code-scan,
60
- * tool-search, tool-use, batch-tool-use, tool-help, set-working-dir.
62
+ * Adds 3 tools: outdated, logs, dead-code-scan.
61
63
  *
62
- * These tools are situational (e.g. documentation generation, scaffolding,
63
- * log tailing, dependency audits). Omitting them in standard tier saves
64
- * tokens while keeping all core capabilities available.
64
+ * These tools are situational (log tailing, dependency maintenance, dead-code
65
+ * sweeps). Omitting their schemas below tier `off` saves tokens; they stay
66
+ * registered and executable, and the model reaches them through `tool_search`
67
+ * / `tool_use` — which is why that pair lives in TIER1 rather than here.
65
68
  */
66
69
  export declare const TIER3_TOOLS: Tool[];
67
70
  /** The executable catalog always exposes the reviewed description above. */
package/dist/builtin.js CHANGED
@@ -6,69 +6,65 @@ import {
6
6
  TIER2_TOOLS,
7
7
  TIER3_TOOLS,
8
8
  builtinTools
9
- } from "./chunk-TYRVYBHW.js";
10
- import "./chunk-RV7BVTDG.js";
11
- import "./chunk-PNLDTRC5.js";
9
+ } from "./chunk-T34DVSAE.js";
10
+ import "./chunk-WKXL5XHU.js";
11
+ import "./chunk-OSXM3O3J.js";
12
12
  import "./chunk-XRNN44QY.js";
13
- import "./chunk-NOCU555K.js";
14
- import "./chunk-VKAJMHVG.js";
15
- import "./chunk-24T5XIJU.js";
16
- import "./chunk-B3MGJBFI.js";
17
- import "./chunk-VBF2YXUW.js";
18
- import "./chunk-7ODZTPCU.js";
19
13
  import "./chunk-IXIS7RSG.js";
20
- import "./chunk-Z34CUZCZ.js";
21
- import "./chunk-MIV2RU5B.js";
22
- import "./chunk-KIQTABBJ.js";
23
- import "./chunk-OUEH4I4X.js";
24
- import "./chunk-VU3QBYL4.js";
25
- import "./chunk-CHEK3ASV.js";
26
- import "./chunk-KLJZ4WV4.js";
27
- import "./chunk-AQ5YBURX.js";
28
- import "./chunk-E2ZD4ERD.js";
29
- import "./chunk-VZGPASGD.js";
30
- import "./chunk-7HL23T3T.js";
31
- import "./chunk-JDOO4P6Z.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";
14
+ import "./chunk-NKOTOW6X.js";
15
+ import "./chunk-OZVGRDCM.js";
16
+ import "./chunk-S6E2AM4U.js";
17
+ import "./chunk-ZETZHHV5.js";
18
+ import "./chunk-C64UUXTA.js";
19
+ import "./chunk-YJQQ5F5J.js";
20
+ import "./chunk-2ZWQIVEW.js";
21
+ import "./chunk-YA2ZYCJY.js";
22
+ import "./chunk-B3MGJBFI.js";
23
+ import "./chunk-2IC5FRD7.js";
24
+ import "./chunk-EMCIC2JA.js";
25
+ import "./chunk-MG7CUN6R.js";
26
+ import "./chunk-BU6VUXWG.js";
27
+ import "./chunk-3F7HQ3KS.js";
28
+ import "./chunk-R36RWYXE.js";
29
+ import "./chunk-OBVXDVLE.js";
30
+ import "./chunk-D4HWMWGE.js";
31
+ import "./chunk-JQ43NVFU.js";
32
+ import "./chunk-JK5WXW4S.js";
37
33
  import "./chunk-EMA2XENR.js";
38
- import "./chunk-77MBK46T.js";
39
- import "./chunk-ASEXQRA7.js";
40
- import "./chunk-4ERMPDHV.js";
34
+ import "./chunk-WWAXJKX3.js";
35
+ import "./chunk-FEXPWYU7.js";
36
+ import "./chunk-2QY3DC3H.js";
41
37
  import "./chunk-YJTXRH5Y.js";
42
38
  import "./chunk-ZBMANLYH.js";
43
- import "./chunk-KYVOTHG7.js";
44
- import "./chunk-T7YVY2BV.js";
39
+ import "./chunk-4KI4HHID.js";
40
+ import "./chunk-YILT3CSO.js";
45
41
  import "./chunk-BTSFTGIL.js";
46
42
  import "./chunk-PVCB7RUZ.js";
47
43
  import "./chunk-SCMRM6NL.js";
48
44
  import "./chunk-HDYUBRMF.js";
49
45
  import "./chunk-7JJFC6CT.js";
50
- import "./chunk-DX5KZEMK.js";
46
+ import "./chunk-47GYABZW.js";
51
47
  import "./chunk-62OAECEQ.js";
52
48
  import "./chunk-NBDZMMG2.js";
53
- import "./chunk-4YKVHCQC.js";
54
- import "./chunk-SMARDKAC.js";
55
- import "./chunk-X6KXNHUO.js";
56
- import "./chunk-SOR7OCYP.js";
57
- import "./chunk-YECHJJJF.js";
58
- import "./chunk-QU2VRCMM.js";
59
- import "./chunk-AMURQAJX.js";
49
+ import "./chunk-TGVQMKVH.js";
50
+ import "./chunk-5UA4TNJJ.js";
51
+ import "./chunk-5BKQVP56.js";
52
+ import "./chunk-6XYFYLN7.js";
53
+ import "./chunk-VSOVZ5JI.js";
54
+ import "./chunk-A636Z2TG.js";
55
+ import "./chunk-KVEL4EFI.js";
60
56
  import "./chunk-MSOAX3GC.js";
61
- import "./chunk-CVNCSMVU.js";
62
- import "./chunk-6ZLRRC74.js";
63
- import "./chunk-3JVSOBHU.js";
64
- import "./chunk-6LCKF5KH.js";
57
+ import "./chunk-PVQBD3TA.js";
58
+ import "./chunk-VQDSIHAR.js";
59
+ import "./chunk-AX5ZG5O5.js";
60
+ import "./chunk-24Q4O34E.js";
65
61
  import "./chunk-REWOZIA4.js";
66
62
  import "./chunk-6IEBD27U.js";
67
63
  import "./chunk-ZKC5UNGD.js";
68
64
  import "./chunk-YOHO4DVT.js";
69
65
  import "./chunk-2CTZW6JQ.js";
70
66
  import "./chunk-5U5ULQX2.js";
71
- import "./chunk-ZUFHAHTE.js";
67
+ import "./chunk-HKR56VNF.js";
72
68
  export {
73
69
  BUILTIN_TOOL_DESCRIPTIONS,
74
70
  OFF_ONLY_TOOLS,
@@ -891,4 +891,4 @@ export {
891
891
  parseFileContent,
892
892
  parseFilesContent
893
893
  };
894
- //# sourceMappingURL=chunk-6LCKF5KH.js.map
894
+ //# sourceMappingURL=chunk-24Q4O34E.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  COMMAND_OUTPUT_MAX_BYTES,
3
3
  normalizeCommandOutput
4
- } from "./chunk-ZUFHAHTE.js";
4
+ } from "./chunk-HKR56VNF.js";
5
5
 
6
6
  // src/git.ts
7
7
  import { spawn } from "node:child_process";
@@ -373,4 +373,4 @@ function runGit(args, cwd, signal) {
373
373
  export {
374
374
  gitTool
375
375
  };
376
- //# sourceMappingURL=chunk-AQ5YBURX.js.map
376
+ //# sourceMappingURL=chunk-2IC5FRD7.js.map
@@ -10,8 +10,9 @@ import {
10
10
  } from "./chunk-2CTZW6JQ.js";
11
11
  import {
12
12
  isBinaryBuffer,
13
+ makeRootRelativizer,
13
14
  safeResolveReal
14
- } from "./chunk-ZUFHAHTE.js";
15
+ } from "./chunk-HKR56VNF.js";
15
16
 
16
17
  // src/grep.ts
17
18
  import { spawn } from "node:child_process";
@@ -34,7 +35,7 @@ var grepTool = {
34
35
  name: "grep",
35
36
  category: "Search",
36
37
  description: "Search exact file contents using a regular expression. Use index-backed `codebase-search` first for symbol or concept discovery when it is live. Prefers ripgrep for speed and features when available.",
37
- usageHint: 'EXACT-TEXT AND REGEX SEARCH:\n\n- When `codebase-search` is live, use it first for symbols and concepts; use `grep` for exact text, regexes, unsupported content, and concrete usage sites.\n- `pattern` is a regular expression.\n- Use `output_mode: "content"` (default) to get matching lines with context.\n- Use `"files_with_matches"` when you only need the list of files.\n- Use `"count"` for quick statistics.\n- `glob` and `path` let you narrow the search scope significantly.\n- Always prefer this over `bash grep` when searching code.',
38
+ usageHint: 'EXACT-TEXT AND REGEX SEARCH:\n\n- When `codebase-search` is live, use it first for symbols and concepts; use `grep` for exact text, regexes, unsupported content, and concrete usage sites.\n- `pattern` is a regular expression.\n- Use `output_mode: "content"` (default) to get matching lines with context.\n- Use `"files_with_matches"` when you only need the list of files.\n- Use `"count"` for quick statistics.\n- `glob` and `path` let you narrow the search scope significantly.\n- Always prefer this over `bash grep` when searching code.\n- Result paths are relative to the project root.',
38
39
  selection: {
39
40
  doNotUseWhen: "you only need to locate files by name or path pattern.",
40
41
  useInstead: ["glob"]
@@ -109,16 +110,17 @@ var grepTool = {
109
110
  });
110
111
  }
111
112
  const signal = opts?.signal ?? ctx.signal ?? new AbortController().signal;
113
+ const relativize = makeRootRelativizer(ctx.cwd);
112
114
  const rgAvailable = await detectRg();
113
115
  if (rgAvailable) {
114
116
  try {
115
- yield* runRgStream(input, base, mode, limit, signal);
117
+ yield* runRgStream(input, base, mode, limit, signal, relativize);
116
118
  return;
117
119
  } catch {
118
120
  }
119
121
  }
120
122
  yield { type: "log", text: "Falling back to native grep\u2026" };
121
- const out = await runNative(input, base, mode, limit, signal);
123
+ const out = await runNative(input, base, mode, limit, signal, relativize);
122
124
  yield { type: "final", output: out };
123
125
  }
124
126
  };
@@ -146,7 +148,7 @@ function detectRg() {
146
148
  });
147
149
  return rgAvailabilityCache;
148
150
  }
149
- async function* runRgStream(input, base, mode, limit, signal) {
151
+ async function* runRgStream(input, base, mode, limit, signal, relativize) {
150
152
  if (signal.aborted) {
151
153
  yield {
152
154
  type: "final",
@@ -281,8 +283,9 @@ async function* runRgStream(input, base, mode, limit, signal) {
281
283
  totalLines++;
282
284
  if (mode === "count") totalCount += parseRgCountLine(line);
283
285
  if (matches.length < limit) {
284
- matches.push(line);
285
- pendingBatch.push(line);
286
+ const shortened = relativize(line);
287
+ matches.push(shortened);
288
+ pendingBatch.push(shortened);
286
289
  batchSinceFlush++;
287
290
  }
288
291
  }
@@ -302,8 +305,9 @@ async function* runRgStream(input, base, mode, limit, signal) {
302
305
  totalLines++;
303
306
  if (mode === "count") totalCount += parseRgCountLine(line);
304
307
  if (matches.length < limit) {
305
- matches.push(line);
306
- pendingBatch.push(line);
308
+ const shortened = relativize(line);
309
+ matches.push(shortened);
310
+ pendingBatch.push(shortened);
307
311
  }
308
312
  }
309
313
  }
@@ -349,7 +353,7 @@ function parseRgCountLine(line) {
349
353
  const n = Number.parseInt(line.slice(idx + 1), 10);
350
354
  return Number.isFinite(n) ? n : 0;
351
355
  }
352
- async function runNative(input, base, mode, limit, signal) {
356
+ async function runNative(input, base, mode, limit, signal, relativize) {
353
357
  if (signal.aborted) {
354
358
  return {
355
359
  matches: [],
@@ -423,9 +427,9 @@ async function runNative(input, base, mode, limit, signal) {
423
427
  fileHits++;
424
428
  total++;
425
429
  if (mode === "content") {
426
- if (matches.length < limit) matches.push(`${full}:${lineNumber}:${ln}`);
430
+ if (matches.length < limit) matches.push(`${relativize(full)}:${lineNumber}:${ln}`);
427
431
  } else if (mode === "files_with_matches") {
428
- if (fileHits === 1 && matches.length < limit) matches.push(full);
432
+ if (fileHits === 1 && matches.length < limit) matches.push(relativize(full));
429
433
  break;
430
434
  }
431
435
  if (countOnlyFirstHit || mode === "content" && matches.length >= limit) {
@@ -443,16 +447,16 @@ async function runNative(input, base, mode, limit, signal) {
443
447
  fileHits++;
444
448
  total++;
445
449
  if (mode === "content") {
446
- if (matches.length < limit) matches.push(`${full}:${lineNumber}:${ln}`);
450
+ if (matches.length < limit) matches.push(`${relativize(full)}:${lineNumber}:${ln}`);
447
451
  } else if (mode === "files_with_matches") {
448
- if (matches.length < limit) matches.push(full);
452
+ if (matches.length < limit) matches.push(relativize(full));
449
453
  }
450
454
  }
451
455
  }
452
456
  if (fileHits > 0) {
453
457
  if (mode === "count") {
454
458
  if (matches.length < limit) {
455
- matches.push(`${full}:${fileHits}`);
459
+ matches.push(`${relativize(full)}:${fileHits}`);
456
460
  } else {
457
461
  countTruncated = true;
458
462
  }
@@ -522,4 +526,4 @@ export {
522
526
  __resetRgDetectionForTests,
523
527
  __setRgAvailableForTests
524
528
  };
525
- //# sourceMappingURL=chunk-4ERMPDHV.js.map
529
+ //# sourceMappingURL=chunk-2QY3DC3H.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-YJTXRH5Y.js";
4
4
  import {
5
5
  safeResolveReal
6
- } from "./chunk-ZUFHAHTE.js";
6
+ } from "./chunk-HKR56VNF.js";
7
7
 
8
8
  // src/logs.ts
9
9
  import { spawn } from "node:child_process";
@@ -299,4 +299,4 @@ function parseLine(line) {
299
299
  export {
300
300
  logsTool
301
301
  };
302
- //# sourceMappingURL=chunk-VU3QBYL4.js.map
302
+ //# sourceMappingURL=chunk-2ZWQIVEW.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  safeResolveReal
3
- } from "./chunk-ZUFHAHTE.js";
3
+ } from "./chunk-HKR56VNF.js";
4
4
 
5
5
  // src/tree.ts
6
6
  import * as fs from "node:fs/promises";
@@ -248,4 +248,4 @@ export {
248
248
  MAX_TREE_OUTPUT_BYTES,
249
249
  treeTool
250
250
  };
251
- //# sourceMappingURL=chunk-JDOO4P6Z.js.map
251
+ //# sourceMappingURL=chunk-3F7HQ3KS.js.map
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-NBDZMMG2.js";
6
6
  import {
7
7
  truncateMiddle
8
- } from "./chunk-ZUFHAHTE.js";
8
+ } from "./chunk-HKR56VNF.js";
9
9
 
10
10
  // src/fetch.ts
11
11
  import { FetchError, ToolError, ToolValidationError } from "@wrongstack/core/types";
@@ -281,4 +281,4 @@ function prettyJson(s) {
281
281
  export {
282
282
  fetchTool
283
283
  };
284
- //# sourceMappingURL=chunk-DX5KZEMK.js.map
284
+ //# sourceMappingURL=chunk-47GYABZW.js.map
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-5U5ULQX2.js";
18
18
  import {
19
19
  normalizeCommandOutput
20
- } from "./chunk-ZUFHAHTE.js";
20
+ } from "./chunk-HKR56VNF.js";
21
21
 
22
22
  // src/bash.ts
23
23
  import { spawn } from "node:child_process";
@@ -1093,4 +1093,4 @@ export {
1093
1093
  checkAndBlockKillCommand,
1094
1094
  bashTool
1095
1095
  };
1096
- //# sourceMappingURL=chunk-KYVOTHG7.js.map
1096
+ //# sourceMappingURL=chunk-4KI4HHID.js.map
@@ -251,7 +251,9 @@ function applySessionKanbanBoardToTodos(context, board, options) {
251
251
  ).map((task) => sessionTodoFromTask(task, board));
252
252
  const allCompleted = projectedTodos.length > 0 && projectedTodos.every((todo) => todo.status === "completed");
253
253
  const effectiveTodos = allCompleted ? [] : projectedTodos;
254
- if (sameTodos(context.todos, effectiveTodos)) return [...context.todos];
254
+ if (sameTodos(context.todos, projectedTodos) || sameTodos(context.todos, effectiveTodos)) {
255
+ return [...context.todos];
256
+ }
255
257
  options.suppressedTodoMirrors.add(context);
256
258
  try {
257
259
  context.state.replaceTodos(projectedTodos);
@@ -279,7 +281,11 @@ function applyManagedKanbanBoardToTodos(context, board, suppressedTodoMirrors2,
279
281
  (task) => task.status !== "archived" && task.mergedIntoTaskId === void 0 && (!task.childTaskIds || task.childTaskIds.length === 0)
280
282
  )
281
283
  ).map((task) => managedTodoFromTask(task, board));
282
- if (sameTodos(context.todos, projectedTodos)) return [...context.todos];
284
+ const allCompleted = projectedTodos.length > 0 && projectedTodos.every((todo) => todo.status === "completed");
285
+ const effectiveTodos = allCompleted ? [] : projectedTodos;
286
+ if (sameTodos(context.todos, projectedTodos) || sameTodos(context.todos, effectiveTodos)) {
287
+ return [...context.todos];
288
+ }
283
289
  suppressedTodoMirrors2.add(context);
284
290
  try {
285
291
  context.state.replaceTodos(projectedTodos);
@@ -369,6 +375,16 @@ async function applySessionKanbanTaskToSource(context, task, suppressedTodoMirro
369
375
  // src/session-kanban.ts
370
376
  var SESSION_BOARD_TAG = "session-work";
371
377
  var MIRROR_DISABLED_ENV = "WRONGSTACK_KANBAN_TASK_MIRROR";
378
+ var PURGE_AFTER_ARCHIVE_DAYS_ENV = "WRONGSTACK_KANBAN_ARCHIVE_PURGE_DAYS";
379
+ function sessionBoardRetention() {
380
+ const raw = Number.parseFloat(process.env[PURGE_AFTER_ARCHIVE_DAYS_ENV] ?? "");
381
+ const purgeDays = Number.isFinite(raw) && raw > 0 ? raw : void 0;
382
+ return {
383
+ mode: "archive_after_ttl",
384
+ ttlMs: 7 * 24 * 60 * 60 * 1e3,
385
+ ...purgeDays !== void 0 ? { purgeAfterArchiveMs: Math.round(purgeDays * 24 * 60 * 60 * 1e3) } : {}
386
+ };
387
+ }
372
388
  var SESSION_KANBAN_COLUMNS = DEFAULT_COLUMNS.map((column) => ({
373
389
  ...column
374
390
  }));
@@ -464,7 +480,7 @@ async function ensureSessionKanbanBoard(projectRoot, sessionId) {
464
480
  columns: SESSION_KANBAN_COLUMNS,
465
481
  generatedBy: `session-kanban:${sessionId}`,
466
482
  kind: "session_mirror",
467
- retention: { mode: "archive_after_ttl", ttlMs: 7 * 24 * 60 * 60 * 1e3 }
483
+ retention: sessionBoardRetention()
468
484
  });
469
485
  }
470
486
  if (!sameColumns(board.columns) || !board.tags?.includes(SESSION_BOARD_TAG)) {
@@ -640,10 +656,11 @@ function queueLatestMirror(projectRoot, sessionId, graph, sourceSystem) {
640
656
  const pending = pendingMirrors.get(key);
641
657
  if (pending) {
642
658
  pendingMirrors.delete(key);
659
+ const carried = pending.reconciliationGraph ? completedReconciliationGraph(pending.graph, [pending.reconciliationGraph]) : void 0;
643
660
  queueLatestMirror(
644
661
  pending.projectRoot,
645
662
  pending.sessionId,
646
- pending.graph,
663
+ carried ?? pending.graph,
647
664
  pending.sourceSystem
648
665
  );
649
666
  }
@@ -997,4 +1014,4 @@ export {
997
1014
  applyManagedKanbanBoardToTodos2 as applyManagedKanbanBoardToTodos,
998
1015
  applySessionKanbanTaskToSource2 as applySessionKanbanTaskToSource
999
1016
  };
1000
- //# sourceMappingURL=chunk-X6KXNHUO.js.map
1017
+ //# sourceMappingURL=chunk-5BKQVP56.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  applySessionKanbanTaskToSource,
3
3
  taskFileToSerializedGraph
4
- } from "./chunk-X6KXNHUO.js";
4
+ } from "./chunk-5BKQVP56.js";
5
5
 
6
6
  // src/kanban.ts
7
7
  import { stripLifecycleIssues as stripLifecycleIssues2 } from "@wrongstack/kanban";
@@ -2118,4 +2118,4 @@ export {
2118
2118
  recordKanbanVerificationEvidence,
2119
2119
  kanbanTool
2120
2120
  };
2121
- //# sourceMappingURL=chunk-SMARDKAC.js.map
2121
+ //# sourceMappingURL=chunk-5UA4TNJJ.js.map
@@ -1363,6 +1363,24 @@ var browserTools = [
1363
1363
  ];
1364
1364
  for (const tool of browserTools) tool.icon = "web";
1365
1365
  for (const tool of browserTools) tool.timeoutMs ??= 6e4;
1366
+ var BROWSER_TOOL_NAMES = Object.freeze(browserTools.map((t) => t.name));
1367
+ function enableBrowserSuite(registry) {
1368
+ let count = 0;
1369
+ for (const name of BROWSER_TOOL_NAMES) {
1370
+ if (registry.enable(name)) count++;
1371
+ }
1372
+ return count;
1373
+ }
1374
+ function disableBrowserSuite(registry) {
1375
+ let count = 0;
1376
+ for (const name of BROWSER_TOOL_NAMES) {
1377
+ if (registry.disable(name, "user")) count++;
1378
+ }
1379
+ return count;
1380
+ }
1381
+ function isBrowserSuiteEnabled(registry) {
1382
+ return BROWSER_TOOL_NAMES.every((name) => !registry.isDisabled(name) && registry.get(name) !== void 0);
1383
+ }
1366
1384
  async function shutdownBrowserTools() {
1367
1385
  const active = [...managers.values()];
1368
1386
  managers.clear();
@@ -1396,6 +1414,10 @@ export {
1396
1414
  browserUploadTool,
1397
1415
  browserCloseTool,
1398
1416
  browserTools,
1417
+ BROWSER_TOOL_NAMES,
1418
+ enableBrowserSuite,
1419
+ disableBrowserSuite,
1420
+ isBrowserSuiteEnabled,
1399
1421
  shutdownBrowserTools
1400
1422
  };
1401
- //# sourceMappingURL=chunk-SOR7OCYP.js.map
1423
+ //# sourceMappingURL=chunk-6XYFYLN7.js.map