@wrongstack/tools 1.0.2 → 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.
- package/README.md +0 -6
- package/dist/_util.d.ts +18 -0
- package/dist/_win32-resolve.d.ts +1 -6
- package/dist/audit.js +6 -6
- package/dist/bash.js +3 -3
- package/dist/browser/index.d.ts +1 -1
- package/dist/browser/index.js +9 -1
- package/dist/browser/tools.d.ts +14 -0
- package/dist/builtin.d.ts +16 -13
- package/dist/builtin.js +43 -47
- package/dist/{chunk-DL2ARI4S.js → chunk-24Q4O34E.js} +5 -5
- package/dist/{chunk-AQ5YBURX.js → chunk-2IC5FRD7.js} +2 -2
- package/dist/{chunk-4ERMPDHV.js → chunk-2QY3DC3H.js} +20 -16
- package/dist/{chunk-VU3QBYL4.js → chunk-2ZWQIVEW.js} +2 -2
- package/dist/{chunk-JDOO4P6Z.js → chunk-3F7HQ3KS.js} +2 -2
- package/dist/{chunk-MJSJWXBF.js → chunk-47GYABZW.js} +15 -3
- package/dist/{chunk-6H4ERJP7.js → chunk-4KI4HHID.js} +3 -3
- package/dist/{chunk-X6KXNHUO.js → chunk-5BKQVP56.js} +22 -5
- package/dist/{chunk-KE7A76VC.js → chunk-5U5ULQX2.js} +4 -14
- package/dist/{chunk-SMARDKAC.js → chunk-5UA4TNJJ.js} +2 -2
- package/dist/{chunk-SOR7OCYP.js → chunk-6XYFYLN7.js} +23 -1
- package/dist/{chunk-KVTEIUND.js → chunk-A636Z2TG.js} +3 -3
- package/dist/{chunk-52UXXQMP.js → chunk-AX5ZG5O5.js} +3 -3
- package/dist/{chunk-7HL23T3T.js → chunk-BU6VUXWG.js} +2 -2
- package/dist/{chunk-WEEVSWQB.js → chunk-C64UUXTA.js} +4 -4
- package/dist/{chunk-4WPBS45A.js → chunk-D4HWMWGE.js} +4 -4
- package/dist/{chunk-DRRY6SCM.js → chunk-EMA2XENR.js} +2 -2
- package/dist/{chunk-TU5MTW2S.js → chunk-EMCIC2JA.js} +3 -3
- package/dist/{chunk-ASEXQRA7.js → chunk-FEXPWYU7.js} +7 -5
- package/dist/{chunk-ZUFHAHTE.js → chunk-HKR56VNF.js} +15 -2
- package/dist/{chunk-7N5U2RAU.js → chunk-JK5WXW4S.js} +3 -3
- package/dist/{chunk-T3SMFF5Q.js → chunk-JQ43NVFU.js} +2 -2
- package/dist/{chunk-7XUEPBNT.js → chunk-KVEL4EFI.js} +3 -3
- package/dist/{chunk-VZGPASGD.js → chunk-MG7CUN6R.js} +2 -2
- package/dist/{chunk-NFX2IUQA.js → chunk-NERS6GBT.js} +3 -3
- package/dist/{chunk-5KS24LTS.js → chunk-NKOTOW6X.js} +3 -3
- package/dist/{chunk-NJX2RXKJ.js → chunk-OBVXDVLE.js} +12 -4
- package/dist/{chunk-HWXIRVKH.js → chunk-OSXM3O3J.js} +29 -15
- package/dist/{chunk-LQSOU63Z.js → chunk-OZVGRDCM.js} +3 -3
- package/dist/{chunk-TI5COGLY.js → chunk-PVQBD3TA.js} +46 -6
- package/dist/{chunk-3D5DJWOE.js → chunk-R36RWYXE.js} +12 -4
- package/dist/{chunk-3AU6CZWL.js → chunk-REWOZIA4.js} +2 -2
- package/dist/{chunk-QA6IASYX.js → chunk-S6E2AM4U.js} +4 -4
- package/dist/{chunk-UCXFTCAI.js → chunk-T34DVSAE.js} +236 -177
- package/dist/{chunk-FBUP524S.js → chunk-TGVQMKVH.js} +15 -4
- package/dist/{chunk-MBR5VAB5.js → chunk-VQDSIHAR.js} +40 -2
- package/dist/{chunk-UOYRAS4J.js → chunk-VSOVZ5JI.js} +4 -4
- package/dist/{chunk-RV7BVTDG.js → chunk-WKXL5XHU.js} +2 -2
- package/dist/{chunk-DKHMPKDG.js → chunk-WWAXJKX3.js} +4 -4
- package/dist/{chunk-24T5XIJU.js → chunk-YA2ZYCJY.js} +4 -4
- package/dist/{chunk-MGPR7VG3.js → chunk-YILT3CSO.js} +3 -3
- package/dist/{chunk-6GOZTS6F.js → chunk-YJQQ5F5J.js} +4 -4
- package/dist/{chunk-EL2NJXSK.js → chunk-YZLOYJGN.js} +2 -2
- package/dist/{chunk-O6BY43ZB.js → chunk-ZETZHHV5.js} +4 -4
- package/dist/clarify.d.ts +18 -3
- package/dist/codebase-index/codebase-search-tool.d.ts +2 -3
- package/dist/codebase-index/index.js +9 -9
- package/dist/codebase-index/parser-worker-script.js +3 -3
- package/dist/codebase-index/project-server-endpoint.d.ts +33 -0
- package/dist/codebase-index/project-server.js +5 -5
- package/dist/codebase-index/worker.js +4 -4
- package/dist/diff.js +2 -2
- package/dist/e2e.js +2 -2
- package/dist/edit.js +8 -8
- package/dist/exec.js +3 -3
- package/dist/fetch.js +2 -2
- package/dist/format.js +6 -6
- package/dist/git.js +2 -2
- package/dist/glob.js +2 -2
- package/dist/{go-parser-QIEXU3P2.js → go-parser-EMKTAAD3.js} +2 -2
- package/dist/grep.js +2 -2
- package/dist/index.d.ts +2 -8
- package/dist/index.js +68 -84
- package/dist/install.js +6 -6
- package/dist/json.js +2 -2
- package/dist/kanban.js +2 -2
- package/dist/languages/index.js +4 -4
- package/dist/{legacy-bridge-YXANP5QB.js → legacy-bridge-XM2GV665.js} +6 -6
- package/dist/lint.js +6 -6
- package/dist/logs.js +2 -2
- package/dist/outdated.js +3 -3
- package/dist/pack.js +44 -48
- package/dist/{parser-dispatch-37FT3EXQ.js → parser-dispatch-IF75EZFB.js} +4 -4
- package/dist/patch.js +8 -8
- package/dist/plan.js +4 -4
- package/dist/{py-parser-6GJTGUXK.js → py-parser-DDG53RXI.js} +3 -3
- package/dist/read-url-content.d.ts +17 -0
- package/dist/read.js +8 -8
- package/dist/replace.js +8 -8
- package/dist/session-kanban.js +1 -1
- package/dist/task.js +4 -4
- package/dist/test.js +6 -6
- package/dist/todo.js +3 -3
- package/dist/tool-search.js +1 -1
- package/dist/tool-tier.d.ts +12 -2
- package/dist/tool-tier.js +45 -49
- package/dist/tree.js +2 -2
- package/dist/typecheck.js +6 -6
- package/dist/win32.js +1 -1
- package/dist/write.js +8 -8
- package/package.json +5 -21
- package/dist/batch-tool-use.d.ts +0 -24
- package/dist/batch-tool-use.js +0 -7
- package/dist/chunk-7ODZTPCU.js +0 -128
- package/dist/chunk-CHEK3ASV.js +0 -183
- package/dist/chunk-KLJZ4WV4.js +0 -213
- package/dist/chunk-VBF2YXUW.js +0 -203
- package/dist/document.d.ts +0 -25
- package/dist/document.js +0 -8
- package/dist/scaffold.d.ts +0 -23
- package/dist/scaffold.js +0 -10
- package/dist/set-working-dir.d.ts +0 -17
- package/dist/tool-help.d.ts +0 -21
- 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/_win32-resolve.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { buildWin32CmdShimInvocation, type Win32CmdShimInvocation, } from '@wrongstack/core/utils';
|
|
1
2
|
/**
|
|
2
3
|
* On Windows, Node.js `spawn()` without a shell does NOT resolve .cmd/.bat
|
|
3
4
|
* extensions through PATHEXT — it only auto-resolves .exe. Most Node.js CLI
|
|
@@ -28,15 +29,9 @@ export declare function resolveWin32Command(cmd: string): string;
|
|
|
28
29
|
* diagnostic. We never throw from here.
|
|
29
30
|
*/
|
|
30
31
|
export declare function resolvePowerShell(cmd: string): string;
|
|
31
|
-
export interface Win32CmdShimInvocation {
|
|
32
|
-
command: string;
|
|
33
|
-
args: string[];
|
|
34
|
-
windowsVerbatimArguments: true;
|
|
35
|
-
}
|
|
36
32
|
/**
|
|
37
33
|
* Throw if any argument contains a cmd.exe command-injection metacharacter.
|
|
38
34
|
* Call this ONLY on the Windows `.cmd`/`.bat` shim path. A no-op for safe args.
|
|
39
35
|
*/
|
|
40
36
|
export declare function assertSafeWin32ShellArgs(args: readonly unknown[]): void;
|
|
41
|
-
export declare function buildWin32CmdShimInvocation(command: string, args?: readonly string[]): Win32CmdShimInvocation;
|
|
42
37
|
//# sourceMappingURL=_win32-resolve.d.ts.map
|
package/dist/audit.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
auditTool
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-C64UUXTA.js";
|
|
4
|
+
import "./chunk-JQ43NVFU.js";
|
|
5
|
+
import "./chunk-JK5WXW4S.js";
|
|
6
|
+
import "./chunk-EMA2XENR.js";
|
|
7
7
|
import "./chunk-SCMRM6NL.js";
|
|
8
8
|
import "./chunk-HDYUBRMF.js";
|
|
9
9
|
import "./chunk-7JJFC6CT.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-5U5ULQX2.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-
|
|
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
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-5U5ULQX2.js";
|
|
10
|
+
import "./chunk-HKR56VNF.js";
|
|
11
11
|
export {
|
|
12
12
|
bashTool
|
|
13
13
|
};
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -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
|
package/dist/browser/index.js
CHANGED
|
@@ -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-
|
|
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,
|
package/dist/browser/tools.d.ts
CHANGED
|
@@ -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
|
-
*
|
|
19
|
-
*
|
|
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
|
-
*
|
|
31
|
-
* edits, shell, search,
|
|
32
|
-
* available at every tier so token saving does not
|
|
33
|
-
* scans. Saves ~3500-5500 tokens vs full mode by
|
|
34
|
-
* schemas from direct provider exposure;
|
|
35
|
-
*
|
|
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
|
|
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 (
|
|
63
|
-
*
|
|
64
|
-
*
|
|
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-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-T34DVSAE.js";
|
|
10
|
+
import "./chunk-WKXL5XHU.js";
|
|
11
|
+
import "./chunk-OSXM3O3J.js";
|
|
12
12
|
import "./chunk-XRNN44QY.js";
|
|
13
|
-
import "./chunk-5KS24LTS.js";
|
|
14
|
-
import "./chunk-LQSOU63Z.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-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
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";
|
|
33
|
+
import "./chunk-EMA2XENR.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-
|
|
44
|
-
import "./chunk-
|
|
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-
|
|
46
|
+
import "./chunk-47GYABZW.js";
|
|
51
47
|
import "./chunk-62OAECEQ.js";
|
|
52
48
|
import "./chunk-NBDZMMG2.js";
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
55
|
-
import "./chunk-
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
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-
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import "./chunk-
|
|
64
|
-
import "./chunk-
|
|
65
|
-
import "./chunk-
|
|
57
|
+
import "./chunk-PVQBD3TA.js";
|
|
58
|
+
import "./chunk-VQDSIHAR.js";
|
|
59
|
+
import "./chunk-AX5ZG5O5.js";
|
|
60
|
+
import "./chunk-24Q4O34E.js";
|
|
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
|
-
import "./chunk-
|
|
71
|
-
import "./chunk-
|
|
66
|
+
import "./chunk-5U5ULQX2.js";
|
|
67
|
+
import "./chunk-HKR56VNF.js";
|
|
72
68
|
export {
|
|
73
69
|
BUILTIN_TOOL_DESCRIPTIONS,
|
|
74
70
|
OFF_ONLY_TOOLS,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolvePythonBinary
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-REWOZIA4.js";
|
|
4
4
|
import {
|
|
5
5
|
parseParserBatchOutput,
|
|
6
6
|
recordParserSubprocess,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-ZKC5UNGD.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveWin32Command
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-5U5ULQX2.js";
|
|
12
12
|
|
|
13
13
|
// src/codebase-index/import-extractor.ts
|
|
14
14
|
var IMPORT_MAX_FILE_CHARS = 512 * 1024;
|
|
@@ -830,11 +830,11 @@ async function dispatch(file, content, lang) {
|
|
|
830
830
|
return parseSymbols({ file, content, lang });
|
|
831
831
|
}
|
|
832
832
|
case "go": {
|
|
833
|
-
const { parseSymbols } = await import("./go-parser-
|
|
833
|
+
const { parseSymbols } = await import("./go-parser-EMKTAAD3.js");
|
|
834
834
|
return parseSymbols({ file, content, lang: "go" });
|
|
835
835
|
}
|
|
836
836
|
case "py": {
|
|
837
|
-
const { parseSymbols } = await import("./py-parser-
|
|
837
|
+
const { parseSymbols } = await import("./py-parser-DDG53RXI.js");
|
|
838
838
|
return parseSymbols({ file, content, lang: "py" });
|
|
839
839
|
}
|
|
840
840
|
case "rs": {
|
|
@@ -891,4 +891,4 @@ export {
|
|
|
891
891
|
parseFileContent,
|
|
892
892
|
parseFilesContent
|
|
893
893
|
};
|
|
894
|
-
//# sourceMappingURL=chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
285
|
-
|
|
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
|
-
|
|
306
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
302
|
+
//# sourceMappingURL=chunk-2ZWQIVEW.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
safeResolveReal
|
|
3
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
8
|
+
} from "./chunk-HKR56VNF.js";
|
|
9
9
|
|
|
10
10
|
// src/fetch.ts
|
|
11
11
|
import { FetchError, ToolError, ToolValidationError } from "@wrongstack/core/types";
|
|
@@ -30,7 +30,19 @@ var fetchTool = {
|
|
|
30
30
|
category: "Network",
|
|
31
31
|
description: "Fetch a URL and return its content. HTML pages are automatically converted to clean markdown. This tool has strong SSRF protections (private IPs, localhost, and cloud metadata endpoints are blocked by default).",
|
|
32
32
|
usageHint: "Use this when you need external information (documentation, API responses, web pages, etc.).\n\nSecurity notes:\n- Only HTTPS is allowed by default.\n- Internal/private networks are blocked unless explicitly enabled via environment variable.\n- Redirects are followed but re-validated at each hop.\n- Output is capped (128KB by default) to avoid flooding context.\nPrefer this over raw `bash curl` or `bash wget`.",
|
|
33
|
-
permission:
|
|
33
|
+
// H-9 (AT-02): `fetch` was `permission:'auto'` with `mutating:false`, so
|
|
34
|
+
// the `tool.permission === 'auto' && !isMutating` branch at
|
|
35
|
+
// `permission-policy.ts:408-424` returned `{permission:'auto'}` for
|
|
36
|
+
// every call, in every mode (YOLO or not) — a complete, prompt-free
|
|
37
|
+
// exfiltration primitive when chained with the equally-unprompted
|
|
38
|
+
// `read` of `.env`/`~/.ssh/*` (sensitive-read gate is `!effectiveYolo`
|
|
39
|
+
// and therefore also skipped under the shipped default). Promoting to
|
|
40
|
+
// `permission:'confirm'` is the narrowest change that closes the
|
|
41
|
+
// exfiltration path: it prompts the user, and an "always" answer is
|
|
42
|
+
// persisted to `trust.json` against the URL subject declared below.
|
|
43
|
+
// The SSRF guard (`guardedFetch`) still constrains where the request
|
|
44
|
+
// can land; this change just ensures the *whether* is no longer silent.
|
|
45
|
+
permission: "confirm",
|
|
34
46
|
mutating: false,
|
|
35
47
|
capabilities: ["net.outbound"],
|
|
36
48
|
icon: "web",
|
|
@@ -269,4 +281,4 @@ function prettyJson(s) {
|
|
|
269
281
|
export {
|
|
270
282
|
fetchTool
|
|
271
283
|
};
|
|
272
|
-
//# sourceMappingURL=chunk-
|
|
284
|
+
//# sourceMappingURL=chunk-47GYABZW.js.map
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
} from "./chunk-HDYUBRMF.js";
|
|
15
15
|
import {
|
|
16
16
|
resolvePowerShell
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5U5ULQX2.js";
|
|
18
18
|
import {
|
|
19
19
|
normalizeCommandOutput
|
|
20
|
-
} from "./chunk-
|
|
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-
|
|
1096
|
+
//# sourceMappingURL=chunk-4KI4HHID.js.map
|