@wrongstack/tools 0.309.1 → 0.310.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.
- package/dist/_regex.d.ts +6 -34
- package/dist/bash.js +3 -3
- package/dist/builtin.d.ts +17 -14
- package/dist/builtin.js +3028 -1675
- package/dist/codebase-index/binary-frame.d.ts +57 -8
- package/dist/codebase-index/codebase-incoming-calls-tool.d.ts +6 -0
- package/dist/codebase-index/codebase-outgoing-calls-tool.d.ts +6 -0
- package/dist/codebase-index/codebase-search-tool.d.ts +15 -5
- package/dist/codebase-index/index-service.d.ts +3 -19
- package/dist/codebase-index/index.js +2735 -1415
- package/dist/codebase-index/indexer.d.ts +3 -0
- package/dist/codebase-index/parser-batch.d.ts +53 -0
- package/dist/codebase-index/parser-dispatch.d.ts +32 -0
- package/dist/codebase-index/parser-output.d.ts +14 -0
- package/dist/codebase-index/parser-worker-pool.d.ts +57 -4
- package/dist/codebase-index/parser-worker-script.d.ts +5 -2
- package/dist/codebase-index/parser-worker-script.js +4042 -0
- package/dist/codebase-index/project-server-cache.d.ts +16 -0
- package/dist/codebase-index/project-server-client.d.ts +2 -2
- package/dist/codebase-index/project-server-query-cache.d.ts +88 -0
- package/dist/codebase-index/project-server.js +2846 -1308
- package/dist/codebase-index/py-parser.d.ts +5 -0
- package/dist/codebase-index/schema.d.ts +14 -1
- package/dist/codebase-index/sqlite-runtime.d.ts +2 -2
- package/dist/codebase-index/tree-sitter/queries.d.ts +30 -3
- package/dist/codebase-index/tree-sitter/visitor.d.ts +2 -1
- package/dist/codebase-index/vector-search.d.ts +12 -0
- package/dist/codebase-index/wal-maintenance.d.ts +58 -0
- package/dist/codebase-index/worker-protocol/contracts.d.ts +44 -0
- package/dist/codebase-index/worker-protocol.d.ts +17 -1
- package/dist/codebase-index/worker.js +2300 -1020
- package/dist/codebase-index/writer-admin.d.ts +11 -0
- package/dist/codebase-index/writer-helpers.d.ts +31 -1
- package/dist/codebase-index/writer-mutations.d.ts +0 -6
- package/dist/codebase-index/writer-schema.d.ts +2 -2
- package/dist/codebase-index/writer.d.ts +15 -0
- package/dist/edit.js +2511 -1203
- package/dist/exec.js +5 -3
- package/dist/grep.js +5 -124
- package/dist/index.js +3028 -1738
- package/dist/json.js +5 -124
- package/dist/kanban.js +130 -0
- package/dist/logs.js +5 -121
- package/dist/pack.js +3028 -1675
- package/dist/patch.js +2524 -1216
- package/dist/plan.js +106 -0
- package/dist/read.js +2506 -1198
- package/dist/replace.js +2487 -1295
- package/dist/search.js +6 -2
- package/dist/session-kanban.js +24 -16
- package/dist/task.js +106 -0
- package/dist/todo.js +106 -0
- package/dist/tool-tier.d.ts +11 -0
- package/dist/tool-tier.js +3040 -1679
- package/dist/tree.js +14 -3
- package/dist/win32.js +3 -3
- package/dist/write.js +2513 -1205
- package/package.json +5 -4
package/dist/_regex.d.ts
CHANGED
|
@@ -1,39 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Compile a user-supplied regex with conservative bounds against ReDoS.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* We can't fully prevent ReDoS without an alternative engine (re2-wasm), but
|
|
11
|
-
* we can sharply limit the blast radius:
|
|
12
|
-
*
|
|
13
|
-
* 1. Cap pattern length — practically all legitimate user patterns are
|
|
14
|
-
* under 256 characters. A 4 KB pattern is almost certainly malicious
|
|
15
|
-
* or a copy-paste accident.
|
|
16
|
-
* 2. Reject patterns containing the most obvious super-linear structures.
|
|
17
|
-
* This is a coarse filter (false-positives are likely; we accept that
|
|
18
|
-
* for hostile-input contexts).
|
|
19
|
-
*
|
|
20
|
-
* Callers should additionally bound the *subject* length (e.g. by capping
|
|
21
|
-
* line size before matching).
|
|
22
|
-
*/
|
|
23
|
-
export interface CompileResult {
|
|
24
|
-
ok: true;
|
|
25
|
-
regex: RegExp;
|
|
26
|
-
}
|
|
27
|
-
export interface CompileFail {
|
|
28
|
-
ok: false;
|
|
29
|
-
reason: string;
|
|
30
|
-
}
|
|
31
|
-
export declare function compileUserRegex(pattern: string, flags: string): CompileResult | CompileFail;
|
|
32
|
-
/**
|
|
33
|
-
* Truncate a subject line to a safe length for synchronous regex eval.
|
|
34
|
-
* The cap is conservative; tools that need exact-line matching against very
|
|
35
|
-
* long lines should use ripgrep externally rather than the native walker.
|
|
4
|
+
* Canonical home since card #5: `@wrongstack/primitives/src/regex-guard.ts`.
|
|
5
|
+
* This module is now a re-export shim kept for its four importers
|
|
6
|
+
* (grep.ts, json.ts, logs.ts, replace.ts); `tools/tests/regex-guard-parity.test.ts`
|
|
7
|
+
* still pins the three historical entry points to identical verdicts —
|
|
8
|
+
* now trivially true, because all three resolve to the same code path.
|
|
36
9
|
*/
|
|
37
|
-
export
|
|
38
|
-
export declare function capSubject(line: string): string;
|
|
10
|
+
export { type CompileFail, type CompileResult, capSubject, compileUserRegex, MAX_SUBJECT_LEN, } from '@wrongstack/primitives';
|
|
39
11
|
//# sourceMappingURL=_regex.d.ts.map
|
package/dist/bash.js
CHANGED
|
@@ -1826,10 +1826,10 @@ function resolvePowerShell(cmd) {
|
|
|
1826
1826
|
if (lower !== "pwsh" && lower !== "powershell" && lower !== "pwsh.exe" && lower !== "powershell.exe") {
|
|
1827
1827
|
return resolveWin32Command(cmd);
|
|
1828
1828
|
}
|
|
1829
|
-
const primary = lower.startsWith("pwsh") ? "pwsh
|
|
1830
|
-
const fallback = lower.startsWith("pwsh") ? "powershell
|
|
1829
|
+
const primary = lower.startsWith("pwsh") ? "pwsh" : "powershell";
|
|
1830
|
+
const fallback = lower.startsWith("pwsh") ? "powershell" : "pwsh";
|
|
1831
1831
|
const resolved = resolveWin32Command(primary);
|
|
1832
|
-
if (resolved
|
|
1832
|
+
if (resolved === primary) {
|
|
1833
1833
|
const fb = resolveWin32Command(fallback);
|
|
1834
1834
|
return fb === fallback ? cmd : fb;
|
|
1835
1835
|
}
|
package/dist/builtin.d.ts
CHANGED
|
@@ -18,25 +18,28 @@ export declare const OPTIONAL_TOOLS: Tool[];
|
|
|
18
18
|
export declare const OFF_ONLY_TOOLS: Tool[];
|
|
19
19
|
/**
|
|
20
20
|
* Tier 1 (Token Saving) tool set — the absolute minimum for useful work.
|
|
21
|
-
*
|
|
22
|
-
* and utilities. Codebase index lifecycle tools stay
|
|
23
|
-
* so token saving does not force broad filesystem
|
|
24
|
-
* Saves ~3500-5500 tokens vs full mode by omitting specialized
|
|
25
|
-
* direct provider exposure; hosts may retain those tools in a
|
|
21
|
+
* 23 tools covering core file ops, indexed project discovery, structured
|
|
22
|
+
* edits, shell, search, and utilities. Codebase index lifecycle tools stay
|
|
23
|
+
* available at every tier so token saving does not force broad filesystem
|
|
24
|
+
* scans. Saves ~3500-5500 tokens vs full mode by omitting specialized
|
|
25
|
+
* schemas from direct provider exposure; hosts may retain those tools in a
|
|
26
|
+
* lazy catalog.
|
|
26
27
|
*
|
|
27
28
|
* Tier 1 tools:
|
|
28
|
-
* read, write, edit
|
|
29
|
-
* codebase-stats
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
29
|
+
* read, write, edit, clarify — file operations
|
|
30
|
+
* codebase-stats/search/index/skeleton/repo-map/impact/targeted-test/
|
|
31
|
+
* incoming-calls/outgoing-calls/ast-replace/invariant-check,
|
|
32
|
+
* security-ast-scan — indexed project discovery
|
|
33
|
+
* bash, grep, glob — shell + exact/path fallback
|
|
34
|
+
* diff, patch, json — utility
|
|
35
|
+
* search — web research
|
|
33
36
|
*/
|
|
34
37
|
export declare const TIER1_TOOLS: Tool[];
|
|
35
38
|
/**
|
|
36
39
|
* Tier 2 tool set — standard development tools useful for non-trivial work.
|
|
37
|
-
* Adds
|
|
38
|
-
* test, languageInfo, language, languagePackage, todo, plan,
|
|
39
|
-
* install, audit, design.
|
|
40
|
+
* Adds 20 tools: replace, exec, pwsh, fetch, git, tree, lint, format,
|
|
41
|
+
* typecheck, test, languageInfo, language, languagePackage, todo, plan,
|
|
42
|
+
* kanban, task, install, audit, design.
|
|
40
43
|
*
|
|
41
44
|
* These tools are used regularly during development but are not essential for
|
|
42
45
|
* every turn. Omitting them in minimal/light tier saves ~900 tokens per prompt.
|
|
@@ -44,7 +47,7 @@ export declare const TIER1_TOOLS: Tool[];
|
|
|
44
47
|
export declare const TIER2_TOOLS: Tool[];
|
|
45
48
|
/**
|
|
46
49
|
* Tier 3 tool set — specialized, administrative, and exploratory tools.
|
|
47
|
-
* Adds
|
|
50
|
+
* Adds 10 tools: outdated, logs, document, scaffold, dead-code-scan,
|
|
48
51
|
* tool-search, tool-use, batch-tool-use, tool-help, set-working-dir.
|
|
49
52
|
*
|
|
50
53
|
* These tools are situational (e.g. documentation generation, scaffolding,
|