@wrongstack/tools 1.0.7 → 1.0.9
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/_win32-resolve.d.ts +5 -0
- package/dist/audit.js +5 -5
- package/dist/bash.js +2 -2
- package/dist/browser/index.js +1 -1
- package/dist/builtin.js +41 -41
- package/dist/{chunk-N3OTTQNC.js → chunk-2OCAAFAT.js} +44 -25
- package/dist/{chunk-5MP76C72.js → chunk-2UVAIS5O.js} +24 -29
- package/dist/{chunk-SIIOHBNY.js → chunk-3RRK33YM.js} +2 -2
- package/dist/{chunk-M2W36JT7.js → chunk-4CE3RKEP.js} +6 -3
- package/dist/{chunk-QJARSK2G.js → chunk-4SUGLJLO.js} +11 -3
- package/dist/{chunk-AH7J5HWL.js → chunk-5RBUYFRV.js} +15 -7
- package/dist/{chunk-WKLUOXR4.js → chunk-7GOE2ZTZ.js} +2 -2
- package/dist/{chunk-O6AGFJBO.js → chunk-7V33PHT6.js} +49 -77
- package/dist/{chunk-CAF4L6KN.js → chunk-C3WP6ZOT.js} +36 -48
- package/dist/{chunk-KMXPP32M.js → chunk-C6ZOXNXV.js} +13 -3
- package/dist/{chunk-EGT5QLCB.js → chunk-D6RQZMZS.js} +123 -255
- package/dist/{chunk-S6CGSFLX.js → chunk-DBG7UQGK.js} +10 -3
- package/dist/{chunk-2W4XTULI.js → chunk-DLZCOEVG.js} +50 -8
- package/dist/{chunk-NL45OWEO.js → chunk-DOAHONOS.js} +7 -12
- package/dist/{chunk-3LQJXJDM.js → chunk-E7A4SLKR.js} +2 -2
- package/dist/{chunk-JB5JLY7V.js → chunk-ENE22I5W.js} +387 -394
- package/dist/{chunk-SEONDNLN.js → chunk-G7CYW5EP.js} +2 -2
- package/dist/{chunk-YPSIG23D.js → chunk-HV7RWDCL.js} +3 -3
- package/dist/{chunk-TU6UVATU.js → chunk-HYHE4VNA.js} +3 -3
- package/dist/{chunk-HIRVCXLP.js → chunk-IE4KDAOB.js} +3 -3
- package/dist/{chunk-YA2ZYCJY.js → chunk-JPK2HHBK.js} +1 -1
- package/dist/{chunk-7E55DAFW.js → chunk-KHUCKLOR.js} +12 -7
- package/dist/{chunk-R3HIZVFS.js → chunk-KPDCKSN5.js} +23 -3
- package/dist/{chunk-B3MGJBFI.js → chunk-KS2OEZWV.js} +23 -47
- package/dist/{chunk-UI3ZJIG3.js → chunk-LKLIQUCW.js} +14 -8
- package/dist/{chunk-62OAECEQ.js → chunk-LLSFOUZF.js} +8 -8
- package/dist/{chunk-YZQSUL5G.js → chunk-M4ZHHCCW.js} +14 -6
- package/dist/{chunk-IXIS7RSG.js → chunk-MRXWOOOR.js} +29 -47
- package/dist/{chunk-C4DSQBTT.js → chunk-NEYUPZL6.js} +3 -3
- package/dist/{chunk-6XYFYLN7.js → chunk-O2MHULBO.js} +13 -8
- package/dist/{chunk-B62LKMWQ.js → chunk-OKZJJDOG.js} +86 -188
- package/dist/{chunk-JKFIDWQG.js → chunk-ON6ET5ER.js} +52 -9
- package/dist/{chunk-KF7GMVNU.js → chunk-OUERRFEM.js} +32 -11
- package/dist/{chunk-4DK5WZGR.js → chunk-OXO773CW.js} +127 -196
- package/dist/{chunk-GF4JHLCO.js → chunk-PWZUHZP7.js} +2 -2
- package/dist/{chunk-CLJXKFVS.js → chunk-QA37PFYL.js} +29 -68
- package/dist/{chunk-A3LNNBYO.js → chunk-QAWI3RSK.js} +41 -83
- package/dist/{chunk-ZMCV3XOV.js → chunk-SPNXDTCJ.js} +29 -63
- package/dist/{chunk-H2VB7GCR.js → chunk-ULI2J6TX.js} +27 -14
- package/dist/{chunk-EMA2XENR.js → chunk-UVYRQKPZ.js} +4 -3
- package/dist/{chunk-2NTHMZV3.js → chunk-VMJY6FYJ.js} +693 -276
- package/dist/{chunk-KPR53VKZ.js → chunk-WEUEU53R.js} +2 -2
- package/dist/{chunk-ZOUG3KKS.js → chunk-XPVYZ2S6.js} +2 -2
- package/dist/{chunk-5U5ULQX2.js → chunk-XZLVJD56.js} +5 -1
- package/dist/{chunk-HCPSVK7J.js → chunk-YKSOSI2N.js} +47 -31
- package/dist/codebase-index/codebase-ast-replace-tool.d.ts +5 -6
- package/dist/codebase-index/codebase-context-tool.d.ts +4 -6
- package/dist/codebase-index/codebase-impact-analysis-tool.d.ts +1 -2
- package/dist/codebase-index/codebase-incoming-calls-tool.d.ts +0 -2
- package/dist/codebase-index/codebase-index-tool.d.ts +0 -2
- package/dist/codebase-index/codebase-invariant-check-tool.d.ts +1 -2
- package/dist/codebase-index/codebase-outgoing-calls-tool.d.ts +0 -2
- package/dist/codebase-index/codebase-repo-map-tool.d.ts +1 -2
- package/dist/codebase-index/codebase-search-tool.d.ts +1 -1
- package/dist/codebase-index/codebase-targeted-test-tool.d.ts +1 -2
- package/dist/codebase-index/index.js +8 -8
- package/dist/codebase-index/parser-worker-script.js +3 -3
- package/dist/codebase-index/project-server.js +5 -5
- package/dist/codebase-index/worker.js +4 -4
- package/dist/design.js +1 -1
- package/dist/diff.js +1 -1
- package/dist/edit.js +7 -7
- package/dist/exec.d.ts +7 -7
- package/dist/exec.js +2 -2
- package/dist/format.js +5 -5
- package/dist/git.js +1 -1
- package/dist/glob.js +1 -1
- package/dist/{go-parser-VDPRQEGM.js → go-parser-Z4H6SR3R.js} +6 -3
- package/dist/grep.js +1 -1
- package/dist/index.js +45 -45
- package/dist/install.js +5 -5
- package/dist/json.d.ts +0 -1
- package/dist/json.js +1 -1
- package/dist/kanban-presence.d.ts +6 -0
- package/dist/kanban-serializer.d.ts +9 -1
- package/dist/kanban-split-task-handler.d.ts +1 -1
- package/dist/kanban-tool-results.d.ts +57 -2
- package/dist/kanban-tool-types.d.ts +16 -5
- package/dist/kanban.d.ts +14 -0
- package/dist/kanban.js +9 -1
- package/dist/languages/index.js +3 -3
- package/dist/{legacy-bridge-4T4OTSQP.js → legacy-bridge-BPT2S2F4.js} +5 -5
- package/dist/lint.js +5 -5
- package/dist/logs.js +1 -1
- package/dist/mode.d.ts +3 -2
- package/dist/mode.js +1 -1
- package/dist/outdated.js +2 -2
- package/dist/pack.js +42 -42
- package/dist/{parser-dispatch-4E2SDQUO.js → parser-dispatch-WG4DNBHH.js} +4 -4
- package/dist/patch.js +7 -7
- package/dist/plan.d.ts +2 -1
- package/dist/plan.js +3 -3
- package/dist/{py-parser-MAW6DHFE.js → py-parser-4PFZYAJ7.js} +3 -3
- package/dist/read.js +7 -7
- package/dist/replace.js +7 -7
- package/dist/search.d.ts +0 -6
- package/dist/search.js +1 -1
- package/dist/security-ast-scan-tool.d.ts +1 -2
- package/dist/session-shell.js +2 -2
- package/dist/task.d.ts +2 -1
- package/dist/task.js +3 -3
- package/dist/test.d.ts +8 -1
- package/dist/test.js +5 -5
- package/dist/todo.js +2 -2
- package/dist/tool-search.d.ts +2 -0
- package/dist/tool-search.js +1 -1
- package/dist/tool-tier.js +43 -43
- package/dist/tool-use.d.ts +2 -2
- package/dist/tool-use.js +1 -1
- package/dist/tree.js +1 -1
- package/dist/typecheck.js +5 -5
- package/dist/wasm/bash/tree-sitter-bash.wasm +0 -0
- package/dist/wasm/c/tree-sitter-c.wasm +0 -0
- package/dist/wasm/c_sharp/tree-sitter-c_sharp.wasm +0 -0
- package/dist/wasm/checksums.json +16 -0
- package/dist/wasm/cpp/tree-sitter-cpp.wasm +0 -0
- package/dist/wasm/elixir/tree-sitter-elixir.wasm +0 -0
- package/dist/wasm/go/tree-sitter-go.wasm +0 -0
- package/dist/wasm/java/tree-sitter-java.wasm +0 -0
- package/dist/wasm/kotlin/tree-sitter-kotlin.wasm +0 -0
- package/dist/wasm/php/tree-sitter-php.wasm +0 -0
- package/dist/wasm/python/tree-sitter-python.wasm +0 -0
- package/dist/wasm/ruby/tree-sitter-ruby.wasm +0 -0
- package/dist/wasm/rust/tree-sitter-rust.wasm +0 -0
- package/dist/wasm/swift/tree-sitter-swift.wasm +0 -0
- package/dist/wasm/tree-sitter-runtime.wasm +0 -0
- package/dist/win32.d.ts +1 -1
- package/dist/win32.js +3 -1
- package/dist/write.js +7 -7
- package/package.json +10 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
builtinTools
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OXO773CW.js";
|
|
4
4
|
|
|
5
5
|
// src/pack.ts
|
|
6
6
|
var builtinToolsPack = {
|
|
@@ -12,4 +12,4 @@ var builtinToolsPack = {
|
|
|
12
12
|
export {
|
|
13
13
|
builtinToolsPack
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
15
|
+
//# sourceMappingURL=chunk-WEUEU53R.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveIndexDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NEYUPZL6.js";
|
|
4
4
|
|
|
5
5
|
// src/codebase-index/project-server-endpoint.ts
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
@@ -158,4 +158,4 @@ export {
|
|
|
158
158
|
PROJECT_INDEX_SERVER_MAX_FRAME_CHARS,
|
|
159
159
|
encodeProjectServerMessage
|
|
160
160
|
};
|
|
161
|
-
//# sourceMappingURL=chunk-
|
|
161
|
+
//# sourceMappingURL=chunk-XPVYZ2S6.js.map
|
|
@@ -4,6 +4,9 @@ import * as path from "node:path";
|
|
|
4
4
|
import {
|
|
5
5
|
buildWin32CmdShimInvocation
|
|
6
6
|
} from "@wrongstack/core/utils";
|
|
7
|
+
function isWinCmdShim(filePath) {
|
|
8
|
+
return /\.(?:cmd|bat)$/i.test(filePath);
|
|
9
|
+
}
|
|
7
10
|
function resolveWin32Command(cmd) {
|
|
8
11
|
if (process.platform !== "win32") return cmd;
|
|
9
12
|
if (cmd.includes("/") || cmd.includes("\\") || path.extname(cmd.replace(/\//g, "\\"))) {
|
|
@@ -51,9 +54,10 @@ function assertSafeWin32ShellArgs(args) {
|
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
export {
|
|
57
|
+
isWinCmdShim,
|
|
54
58
|
resolveWin32Command,
|
|
55
59
|
resolvePowerShell,
|
|
56
60
|
assertSafeWin32ShellArgs,
|
|
57
61
|
buildWin32CmdShimInvocation
|
|
58
62
|
};
|
|
59
|
-
//# sourceMappingURL=chunk-
|
|
63
|
+
//# sourceMappingURL=chunk-XZLVJD56.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
tryLegacyPackageOperation
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-E7A4SLKR.js";
|
|
4
4
|
import {
|
|
5
5
|
spawnStream
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UVYRQKPZ.js";
|
|
7
7
|
import {
|
|
8
8
|
COMMAND_OUTPUT_MAX_BYTES,
|
|
9
9
|
detectPackageManager,
|
|
@@ -79,6 +79,11 @@ var auditTool = {
|
|
|
79
79
|
});
|
|
80
80
|
if (bridge?.outcome) {
|
|
81
81
|
const outcome = bridge.outcome;
|
|
82
|
+
if (outcome.status === "unavailable" || outcome.status === "cancelled" || outcome.status === "timed_out") {
|
|
83
|
+
throw new Error(
|
|
84
|
+
`audit: ${bridge.language} audit did not run (${outcome.status})${outcome.run?.error ? `: ${outcome.run.error}` : ""}`
|
|
85
|
+
);
|
|
86
|
+
}
|
|
82
87
|
const vulns = outcome.vulnerabilities.map((v) => ({
|
|
83
88
|
severity: v.severity,
|
|
84
89
|
package: v.package,
|
|
@@ -125,44 +130,26 @@ var auditTool = {
|
|
|
125
130
|
};
|
|
126
131
|
function parseAuditOutput(json, exitCode, opts = {}) {
|
|
127
132
|
if (!json) {
|
|
133
|
+
if (exitCode !== 0) {
|
|
134
|
+
const detail = normalizeCommandOutput(opts.rawError || "").trim();
|
|
135
|
+
throw new Error(
|
|
136
|
+
`audit: the audit command failed (exit ${exitCode}) without producing a report${detail ? `: ${detail}` : ""}`
|
|
137
|
+
);
|
|
138
|
+
}
|
|
128
139
|
return {
|
|
129
140
|
exit_code: exitCode,
|
|
130
141
|
vulnerabilities: [],
|
|
131
142
|
total: 0,
|
|
132
|
-
summary:
|
|
133
|
-
output:
|
|
143
|
+
summary: "No vulnerabilities found",
|
|
144
|
+
output: "",
|
|
134
145
|
truncated: false
|
|
135
146
|
};
|
|
136
147
|
}
|
|
137
148
|
const cappedOutput = normalizeCommandOutput(json);
|
|
138
149
|
const truncated = opts.spawnTruncated === true || Buffer.byteLength(json, "utf8") > COMMAND_OUTPUT_MAX_BYTES;
|
|
150
|
+
let data;
|
|
139
151
|
try {
|
|
140
|
-
|
|
141
|
-
let advisories = extractAdvisories(data);
|
|
142
|
-
const minRank = opts.level ? SEVERITY_RANK[opts.level] ?? 0 : 0;
|
|
143
|
-
if (minRank > 0) {
|
|
144
|
-
advisories = advisories.filter((a) => (SEVERITY_RANK[a.severity] ?? 0) >= minRank);
|
|
145
|
-
}
|
|
146
|
-
const total = advisories.length;
|
|
147
|
-
let summary;
|
|
148
|
-
if (total === 0) {
|
|
149
|
-
if (exitCode !== 0) {
|
|
150
|
-
const errObj = data.error;
|
|
151
|
-
summary = typeof errObj?.summary === "string" ? errObj.summary : typeof errObj?.code === "string" ? `Audit failed (${errObj.code})` : "Audit failed";
|
|
152
|
-
} else {
|
|
153
|
-
summary = "No vulnerabilities found";
|
|
154
|
-
}
|
|
155
|
-
} else {
|
|
156
|
-
summary = `Found ${total} vulnerabilities: ${advisories.filter((a) => a.severity === "critical").length} critical, ${advisories.filter((a) => a.severity === "high").length} high`;
|
|
157
|
-
}
|
|
158
|
-
return {
|
|
159
|
-
exit_code: exitCode,
|
|
160
|
-
vulnerabilities: advisories,
|
|
161
|
-
total,
|
|
162
|
-
summary,
|
|
163
|
-
output: cappedOutput,
|
|
164
|
-
truncated
|
|
165
|
-
};
|
|
152
|
+
data = JSON.parse(json);
|
|
166
153
|
} catch {
|
|
167
154
|
return {
|
|
168
155
|
exit_code: exitCode,
|
|
@@ -173,6 +160,35 @@ function parseAuditOutput(json, exitCode, opts = {}) {
|
|
|
173
160
|
truncated
|
|
174
161
|
};
|
|
175
162
|
}
|
|
163
|
+
let advisories = extractAdvisories(data);
|
|
164
|
+
const minRank = opts.level ? SEVERITY_RANK[opts.level] ?? 0 : 0;
|
|
165
|
+
if (minRank > 0) {
|
|
166
|
+
advisories = advisories.filter((a) => (SEVERITY_RANK[a.severity] ?? 0) >= minRank);
|
|
167
|
+
}
|
|
168
|
+
const total = advisories.length;
|
|
169
|
+
let summary;
|
|
170
|
+
if (total === 0) {
|
|
171
|
+
if (exitCode !== 0) {
|
|
172
|
+
const errObj = data["error"];
|
|
173
|
+
if (errObj && typeof errObj === "object") {
|
|
174
|
+
const reason = typeof errObj["summary"] === "string" ? errObj["summary"] : typeof errObj["code"] === "string" ? errObj["code"] : "unknown error";
|
|
175
|
+
throw new Error(`audit: the audit command failed (exit ${exitCode}): ${reason}`);
|
|
176
|
+
}
|
|
177
|
+
summary = "Audit failed";
|
|
178
|
+
} else {
|
|
179
|
+
summary = "No vulnerabilities found";
|
|
180
|
+
}
|
|
181
|
+
} else {
|
|
182
|
+
summary = `Found ${total} vulnerabilities: ${advisories.filter((a) => a.severity === "critical").length} critical, ${advisories.filter((a) => a.severity === "high").length} high`;
|
|
183
|
+
}
|
|
184
|
+
return {
|
|
185
|
+
exit_code: exitCode,
|
|
186
|
+
vulnerabilities: advisories,
|
|
187
|
+
total,
|
|
188
|
+
summary,
|
|
189
|
+
output: cappedOutput,
|
|
190
|
+
truncated
|
|
191
|
+
};
|
|
176
192
|
}
|
|
177
193
|
function extractAdvisories(data) {
|
|
178
194
|
const advisories = [];
|
|
@@ -220,4 +236,4 @@ function extractAdvisories(data) {
|
|
|
220
236
|
export {
|
|
221
237
|
auditTool
|
|
222
238
|
};
|
|
223
|
-
//# sourceMappingURL=chunk-
|
|
239
|
+
//# sourceMappingURL=chunk-YKSOSI2N.js.map
|
|
@@ -13,19 +13,18 @@ import { type MutateSymbolOptions } from './ast-symbol-mutator.js';
|
|
|
13
13
|
export interface CodebaseAstReplaceInput extends MutateSymbolOptions {
|
|
14
14
|
}
|
|
15
15
|
export interface CodebaseAstReplaceOutput {
|
|
16
|
-
status: 'ok'
|
|
16
|
+
status: 'ok';
|
|
17
17
|
file: string;
|
|
18
18
|
symbol: string;
|
|
19
|
-
originalRange
|
|
19
|
+
originalRange: {
|
|
20
20
|
startLine: number;
|
|
21
21
|
endLine: number;
|
|
22
|
-
}
|
|
23
|
-
newRange
|
|
22
|
+
};
|
|
23
|
+
newRange: {
|
|
24
24
|
startLine: number;
|
|
25
25
|
endLine: number;
|
|
26
|
-
}
|
|
26
|
+
};
|
|
27
27
|
violations?: string[] | undefined;
|
|
28
|
-
error?: string | undefined;
|
|
29
28
|
}
|
|
30
29
|
export declare const codebaseAstReplaceTool: Tool<CodebaseAstReplaceInput, CodebaseAstReplaceOutput>;
|
|
31
30
|
//# sourceMappingURL=codebase-ast-replace-tool.d.ts.map
|
|
@@ -38,15 +38,13 @@ export interface CodebaseContextOutput {
|
|
|
38
38
|
/** Files the walk reached before truncation to `limit`. */
|
|
39
39
|
totalCandidates: number;
|
|
40
40
|
/**
|
|
41
|
-
* `ok` — a ranked answer. `no-
|
|
42
|
-
* `
|
|
43
|
-
*
|
|
44
|
-
* only. `error` — the lookup itself failed; see `error`.
|
|
41
|
+
* `ok` — a ranked answer. `no-matches` — the index exists but the query
|
|
42
|
+
* matched nothing. `unranked` — symbols exist but no reference graph, so
|
|
43
|
+
* results are lexical only. A missing index or a failed lookup THROWS.
|
|
45
44
|
*/
|
|
46
|
-
indexStatus: 'ok' | 'no-
|
|
45
|
+
indexStatus: 'ok' | 'no-matches' | 'unranked';
|
|
47
46
|
/** True when a cached answer from a previous generation was served. */
|
|
48
47
|
stale?: boolean | undefined;
|
|
49
|
-
error?: string | undefined;
|
|
50
48
|
}
|
|
51
49
|
/** Install (or clear) the query-time embedding model. */
|
|
52
50
|
export declare function setContextQueryEmbedder(port: EmbeddingPort | undefined): void;
|
|
@@ -26,7 +26,7 @@ export interface ImpactCallSite {
|
|
|
26
26
|
isTest: boolean;
|
|
27
27
|
}
|
|
28
28
|
export interface ImpactAnalysisOutput {
|
|
29
|
-
status: 'ok'
|
|
29
|
+
status: 'ok';
|
|
30
30
|
symbol: string;
|
|
31
31
|
riskLevel: 'low' | 'medium' | 'high';
|
|
32
32
|
summary: string;
|
|
@@ -37,7 +37,6 @@ export interface ImpactAnalysisOutput {
|
|
|
37
37
|
recommendedActionPlan: string[];
|
|
38
38
|
/** False when the symbol could not be resolved in the index. */
|
|
39
39
|
symbolFound?: boolean;
|
|
40
|
-
error?: string | undefined;
|
|
41
40
|
}
|
|
42
41
|
export type CodebaseImpactAnalysisOutput = ImpactAnalysisOutput;
|
|
43
42
|
export declare const codebaseImpactAnalysisTool: Tool<ImpactAnalysisInput, ImpactAnalysisOutput>;
|
|
@@ -33,8 +33,6 @@ export interface IncomingCallsOutput {
|
|
|
33
33
|
* the files currently being indexed.
|
|
34
34
|
*/
|
|
35
35
|
stale?: boolean | undefined;
|
|
36
|
-
/** Non-empty when the index blocked the query (not ready, indexing, failed). */
|
|
37
|
-
indexStatus?: string | undefined;
|
|
38
36
|
/** Advisory note when the symbol was not found in the index. */
|
|
39
37
|
note?: string | undefined;
|
|
40
38
|
}
|
|
@@ -16,7 +16,5 @@ export interface CodebaseIndexOutput {
|
|
|
16
16
|
langStats: Record<string, number>;
|
|
17
17
|
durationMs: number;
|
|
18
18
|
errors: string[];
|
|
19
|
-
/** Advisory note when the indexer was skipped (e.g. another index in progress). */
|
|
20
|
-
note?: string | undefined;
|
|
21
19
|
}
|
|
22
20
|
//# sourceMappingURL=codebase-index-tool.d.ts.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Allows agents, auditors, and workflows to pre-screen candidate code modifications
|
|
5
5
|
* or compare file versions to identify breaking changes across TypeScript, Python, Go, Rust, etc.
|
|
6
6
|
*/
|
|
7
|
-
import type
|
|
7
|
+
import { type Tool } from '@wrongstack/core/types';
|
|
8
8
|
import { type InvariantViolation } from './ast-invariant-engine.js';
|
|
9
9
|
import type { SymbolLang } from './schema.js';
|
|
10
10
|
export interface CodebaseInvariantCheckInput {
|
|
@@ -17,7 +17,6 @@ export interface CodebaseInvariantCheckOutput {
|
|
|
17
17
|
valid: boolean;
|
|
18
18
|
violations: InvariantViolation[];
|
|
19
19
|
summary: string;
|
|
20
|
-
error?: string | undefined;
|
|
21
20
|
}
|
|
22
21
|
export declare const codebaseInvariantCheckTool: Tool<CodebaseInvariantCheckInput, CodebaseInvariantCheckOutput>;
|
|
23
22
|
//# sourceMappingURL=codebase-invariant-check-tool.d.ts.map
|
|
@@ -33,8 +33,6 @@ export interface OutgoingCallsOutput {
|
|
|
33
33
|
* the files currently being indexed.
|
|
34
34
|
*/
|
|
35
35
|
stale?: boolean | undefined;
|
|
36
|
-
/** Non-empty when the index blocked the query (not ready, indexing, failed). */
|
|
37
|
-
indexStatus?: string | undefined;
|
|
38
36
|
/** Advisory note when the symbol was not found, or unresolved refs exist. */
|
|
39
37
|
note?: string | undefined;
|
|
40
38
|
}
|
|
@@ -15,8 +15,7 @@ export interface CodebaseRepoMapInput {
|
|
|
15
15
|
focusFiles?: string[] | undefined;
|
|
16
16
|
}
|
|
17
17
|
export interface CodebaseRepoMapOutput extends RepoMapResult {
|
|
18
|
-
status: 'ok'
|
|
19
|
-
error?: string | undefined;
|
|
18
|
+
status: 'ok';
|
|
20
19
|
}
|
|
21
20
|
export declare const codebaseRepoMapTool: Tool<CodebaseRepoMapInput, CodebaseRepoMapOutput>;
|
|
22
21
|
//# sourceMappingURL=codebase-repo-map-tool.d.ts.map
|
|
@@ -50,7 +50,7 @@ export interface CodebaseSearchOutput {
|
|
|
50
50
|
* the files currently being indexed.
|
|
51
51
|
*/
|
|
52
52
|
stale?: boolean | undefined;
|
|
53
|
-
/**
|
|
53
|
+
/** Advisory note when a stale previous-generation answer was served. */
|
|
54
54
|
indexStatus?: string | undefined;
|
|
55
55
|
}
|
|
56
56
|
//# sourceMappingURL=codebase-search-tool.d.ts.map
|
|
@@ -18,14 +18,13 @@ export interface TargetedTestInput {
|
|
|
18
18
|
}
|
|
19
19
|
export type CodebaseTargetedTestInput = TargetedTestInput;
|
|
20
20
|
export interface TargetedTestOutput {
|
|
21
|
-
status: 'passed' | 'failed' | 'no_tests_found'
|
|
21
|
+
status: 'passed' | 'failed' | 'no_tests_found';
|
|
22
22
|
discoveredSuites: string[];
|
|
23
23
|
testsRun: number;
|
|
24
24
|
passed: number;
|
|
25
25
|
failed: number;
|
|
26
26
|
durationMs: number;
|
|
27
27
|
output: string;
|
|
28
|
-
error?: string | undefined;
|
|
29
28
|
}
|
|
30
29
|
export type CodebaseTargetedTestOutput = TargetedTestOutput;
|
|
31
30
|
export declare const codebaseTargetedTestTool: Tool<TargetedTestInput, TargetedTestOutput>;
|
|
@@ -51,9 +51,9 @@ import {
|
|
|
51
51
|
setContextQueryEmbedder,
|
|
52
52
|
writeAtlas,
|
|
53
53
|
writeProjectAtlas
|
|
54
|
-
} from "../chunk-
|
|
54
|
+
} from "../chunk-ENE22I5W.js";
|
|
55
55
|
import "../chunk-XRNN44QY.js";
|
|
56
|
-
import "../chunk-
|
|
56
|
+
import "../chunk-UVYRQKPZ.js";
|
|
57
57
|
import "../chunk-SCMRM6NL.js";
|
|
58
58
|
import "../chunk-HDYUBRMF.js";
|
|
59
59
|
import "../chunk-7JJFC6CT.js";
|
|
@@ -78,11 +78,11 @@ import {
|
|
|
78
78
|
shutdownCodebaseIndexHost,
|
|
79
79
|
shutdownCodebaseIndexServer,
|
|
80
80
|
symbolGraphService
|
|
81
|
-
} from "../chunk-
|
|
81
|
+
} from "../chunk-HYHE4VNA.js";
|
|
82
82
|
import {
|
|
83
83
|
projectIndexServerEndpoint,
|
|
84
84
|
projectIndexServerMetadataPath
|
|
85
|
-
} from "../chunk-
|
|
85
|
+
} from "../chunk-XPVYZ2S6.js";
|
|
86
86
|
import {
|
|
87
87
|
CONCEPT_RELATIONS,
|
|
88
88
|
CONTRADICTED_VISIBILITY_WEIGHT,
|
|
@@ -122,9 +122,9 @@ import {
|
|
|
122
122
|
shouldRefreshRanks,
|
|
123
123
|
toSymbolRankRows,
|
|
124
124
|
tokenise
|
|
125
|
-
} from "../chunk-
|
|
126
|
-
import "../chunk-
|
|
127
|
-
import "../chunk-
|
|
125
|
+
} from "../chunk-NEYUPZL6.js";
|
|
126
|
+
import "../chunk-KHUCKLOR.js";
|
|
127
|
+
import "../chunk-4CE3RKEP.js";
|
|
128
128
|
import "../chunk-SKRMUHTU.js";
|
|
129
129
|
import {
|
|
130
130
|
getCodebaseIndexPerfSnapshot,
|
|
@@ -139,7 +139,7 @@ import {
|
|
|
139
139
|
compileGitignore,
|
|
140
140
|
loadGitignoreMatcher
|
|
141
141
|
} from "../chunk-XHSHNOAF.js";
|
|
142
|
-
import "../chunk-
|
|
142
|
+
import "../chunk-XZLVJD56.js";
|
|
143
143
|
import "../chunk-2IAEJRLT.js";
|
|
144
144
|
export {
|
|
145
145
|
ATLAS_DIR,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseFilesContent
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-KHUCKLOR.js";
|
|
4
|
+
import "../chunk-4CE3RKEP.js";
|
|
5
5
|
import "../chunk-SKRMUHTU.js";
|
|
6
6
|
import "../chunk-ZKC5UNGD.js";
|
|
7
7
|
import "../chunk-YOHO4DVT.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-XZLVJD56.js";
|
|
9
9
|
|
|
10
10
|
// src/codebase-index/parser-worker-script.ts
|
|
11
11
|
import { parentPort, threadId } from "node:worker_threads";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
projectIndexServerBuildId,
|
|
11
11
|
projectIndexServerEndpoint,
|
|
12
12
|
projectIndexServerMetadataPath
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-XPVYZ2S6.js";
|
|
14
14
|
import {
|
|
15
15
|
contextService,
|
|
16
16
|
fileGraphService,
|
|
@@ -24,9 +24,9 @@ import {
|
|
|
24
24
|
statsService,
|
|
25
25
|
symbolGraphService,
|
|
26
26
|
vectorSearchService
|
|
27
|
-
} from "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
27
|
+
} from "../chunk-NEYUPZL6.js";
|
|
28
|
+
import "../chunk-KHUCKLOR.js";
|
|
29
|
+
import "../chunk-4CE3RKEP.js";
|
|
30
30
|
import "../chunk-SKRMUHTU.js";
|
|
31
31
|
import {
|
|
32
32
|
recordWriteQueueWait
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
isIndexablePath
|
|
36
36
|
} from "../chunk-YOHO4DVT.js";
|
|
37
37
|
import "../chunk-XHSHNOAF.js";
|
|
38
|
-
import "../chunk-
|
|
38
|
+
import "../chunk-XZLVJD56.js";
|
|
39
39
|
|
|
40
40
|
// src/codebase-index/project-server.ts
|
|
41
41
|
import { randomBytes } from "node:crypto";
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
statsService,
|
|
10
10
|
symbolGraphService,
|
|
11
11
|
vectorSearchService
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-NEYUPZL6.js";
|
|
13
|
+
import "../chunk-KHUCKLOR.js";
|
|
14
|
+
import "../chunk-4CE3RKEP.js";
|
|
15
15
|
import "../chunk-SKRMUHTU.js";
|
|
16
16
|
import "../chunk-ZKC5UNGD.js";
|
|
17
17
|
import "../chunk-YOHO4DVT.js";
|
|
18
18
|
import "../chunk-XHSHNOAF.js";
|
|
19
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-XZLVJD56.js";
|
|
20
20
|
|
|
21
21
|
// src/codebase-index/worker.ts
|
|
22
22
|
import { parentPort } from "node:worker_threads";
|
package/dist/design.js
CHANGED
package/dist/diff.js
CHANGED
package/dist/edit.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
editTool
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7GOE2ZTZ.js";
|
|
4
4
|
import "./chunk-MSOAX3GC.js";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-HYHE4VNA.js";
|
|
6
|
+
import "./chunk-XPVYZ2S6.js";
|
|
7
|
+
import "./chunk-NEYUPZL6.js";
|
|
8
|
+
import "./chunk-KHUCKLOR.js";
|
|
9
|
+
import "./chunk-4CE3RKEP.js";
|
|
10
10
|
import "./chunk-SKRMUHTU.js";
|
|
11
11
|
import "./chunk-ZKC5UNGD.js";
|
|
12
12
|
import "./chunk-YOHO4DVT.js";
|
|
13
13
|
import "./chunk-XHSHNOAF.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-XZLVJD56.js";
|
|
15
15
|
import "./chunk-2IAEJRLT.js";
|
|
16
16
|
export {
|
|
17
17
|
editTool
|
package/dist/exec.d.ts
CHANGED
|
@@ -49,16 +49,16 @@ export interface ExecOutput {
|
|
|
49
49
|
stderr: string;
|
|
50
50
|
exitCode: number;
|
|
51
51
|
truncated: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Always true on a returned result: refusals (allowlist miss, blocked args,
|
|
54
|
+
* kill guard, cwd containment, circuit breaker) THROW instead, so the
|
|
55
|
+
* executor records them as failed calls. Kept for output-shape stability.
|
|
56
|
+
*/
|
|
52
57
|
allowed: boolean;
|
|
53
58
|
/**
|
|
54
59
|
* Heuristic danger assessment of the (cmd, args) pair. Populated for every
|
|
55
|
-
* call
|
|
56
|
-
*
|
|
57
|
-
* rule set.
|
|
58
|
-
*
|
|
59
|
-
* Pre-execution error returns (allowlist miss, circuit breaker, etc.)
|
|
60
|
-
* report `level: 'safe'` because the command never actually ran; the UI
|
|
61
|
-
* should surface the error separately and not also a danger warning.
|
|
60
|
+
* call that ran so the UI/TUI can render a banner when the level is
|
|
61
|
+
* 'caution' or 'destructive'. See `_danger-detect.ts` for the rule set.
|
|
62
62
|
*/
|
|
63
63
|
danger: DangerAssessment;
|
|
64
64
|
}
|
package/dist/exec.js
CHANGED
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
isExecCommandAllowed,
|
|
8
8
|
resetDangerBypass,
|
|
9
9
|
resetExecPolicy
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QAWI3RSK.js";
|
|
11
11
|
import "./chunk-BTSFTGIL.js";
|
|
12
12
|
import "./chunk-PVCB7RUZ.js";
|
|
13
13
|
import "./chunk-SCMRM6NL.js";
|
|
14
14
|
import "./chunk-HDYUBRMF.js";
|
|
15
15
|
import "./chunk-7JJFC6CT.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-XZLVJD56.js";
|
|
17
17
|
import "./chunk-2IAEJRLT.js";
|
|
18
18
|
export {
|
|
19
19
|
configureDangerBypass,
|
package/dist/format.js
CHANGED
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
detectFixer,
|
|
3
3
|
formatTool,
|
|
4
4
|
parseFormatterCounts
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-4SUGLJLO.js";
|
|
6
|
+
import "./chunk-E7A4SLKR.js";
|
|
7
|
+
import "./chunk-G7CYW5EP.js";
|
|
8
|
+
import "./chunk-UVYRQKPZ.js";
|
|
9
9
|
import "./chunk-SCMRM6NL.js";
|
|
10
10
|
import "./chunk-HDYUBRMF.js";
|
|
11
11
|
import "./chunk-7JJFC6CT.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-XZLVJD56.js";
|
|
13
13
|
import "./chunk-2IAEJRLT.js";
|
|
14
14
|
export {
|
|
15
15
|
detectFixer,
|
package/dist/git.js
CHANGED
package/dist/glob.js
CHANGED
|
@@ -8,13 +8,14 @@ import {
|
|
|
8
8
|
} from "./chunk-YOHO4DVT.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveWin32Command
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-XZLVJD56.js";
|
|
12
12
|
|
|
13
13
|
// src/codebase-index/go-parser.ts
|
|
14
14
|
import { spawn } from "node:child_process";
|
|
15
15
|
import * as os from "node:os";
|
|
16
16
|
import * as path from "node:path";
|
|
17
17
|
import * as fs from "node:fs/promises";
|
|
18
|
+
import { StringDecoder } from "node:string_decoder";
|
|
18
19
|
async function parseSymbols(opts) {
|
|
19
20
|
const { file, content, lang } = opts;
|
|
20
21
|
try {
|
|
@@ -420,8 +421,9 @@ async function syncGoParse(filePath, content, lang) {
|
|
|
420
421
|
reject(err);
|
|
421
422
|
});
|
|
422
423
|
let stdout2 = "";
|
|
424
|
+
const stdoutDecoder = new StringDecoder("utf8");
|
|
423
425
|
proc.stdout?.on("data", (chunk) => {
|
|
424
|
-
stdout2 +=
|
|
426
|
+
stdout2 += stdoutDecoder.write(chunk);
|
|
425
427
|
});
|
|
426
428
|
proc.stderr?.resume();
|
|
427
429
|
proc.stdin?.write(content);
|
|
@@ -437,6 +439,7 @@ async function syncGoParse(filePath, content, lang) {
|
|
|
437
439
|
if (settled) return;
|
|
438
440
|
settled = true;
|
|
439
441
|
clearTimeout(timer);
|
|
442
|
+
stdout2 += stdoutDecoder.end();
|
|
440
443
|
resolve({ code: code2, stdout: stdout2 });
|
|
441
444
|
});
|
|
442
445
|
}
|
|
@@ -468,4 +471,4 @@ export {
|
|
|
468
471
|
detectLang,
|
|
469
472
|
parseSymbols
|
|
470
473
|
};
|
|
471
|
-
//# sourceMappingURL=go-parser-
|
|
474
|
+
//# sourceMappingURL=go-parser-Z4H6SR3R.js.map
|