@linghun/tools 0.1.5 → 0.1.7
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/{chunk-PNXZO2UE.js → chunk-PLAQPN4W.js} +15 -15
- package/dist/{chunk-XGK6YYZO.js → chunk-QBA6B5OX.js} +15 -15
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +435 -111
- package/dist/tools/Read/ReadTool.js +2 -2
- package/dist/tools/prompts.js +15 -15
- package/dist/tools/ui.js +15 -15
- package/package.json +1 -1
- package/dist/{chunk-TZ6QK52L.js → chunk-RBHQ5WNR.js} +3 -3
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
WriteTool
|
|
3
|
+
} from "./chunk-I3Z4OKMS.js";
|
|
4
|
+
import {
|
|
5
|
+
GrepTool
|
|
6
|
+
} from "./chunk-AZCQL24J.js";
|
|
4
7
|
import {
|
|
5
8
|
WebFetchTool
|
|
6
9
|
} from "./chunk-LGZOG7IQ.js";
|
|
7
10
|
import {
|
|
8
|
-
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
WriteTool
|
|
12
|
-
} from "./chunk-I3Z4OKMS.js";
|
|
13
|
-
import {
|
|
14
|
-
ReadTool
|
|
15
|
-
} from "./chunk-TZ6QK52L.js";
|
|
11
|
+
WebSearchTool
|
|
12
|
+
} from "./chunk-4EZHIDZ6.js";
|
|
16
13
|
import {
|
|
17
14
|
ReadSnippetsTool
|
|
18
15
|
} from "./chunk-GI5XI4HN.js";
|
|
@@ -20,20 +17,23 @@ import {
|
|
|
20
17
|
SourcePackTool
|
|
21
18
|
} from "./chunk-A6FUAM64.js";
|
|
22
19
|
import {
|
|
23
|
-
|
|
24
|
-
} from "./chunk-
|
|
20
|
+
TodoTool
|
|
21
|
+
} from "./chunk-MFHY7PBM.js";
|
|
25
22
|
import {
|
|
26
23
|
MultiEditTool
|
|
27
24
|
} from "./chunk-VJDLOFCF.js";
|
|
25
|
+
import {
|
|
26
|
+
ReadTool
|
|
27
|
+
} from "./chunk-RBHQ5WNR.js";
|
|
28
28
|
import {
|
|
29
29
|
EditTool
|
|
30
30
|
} from "./chunk-WLQ7DGMG.js";
|
|
31
|
-
import {
|
|
32
|
-
DiffTool
|
|
33
|
-
} from "./chunk-7ZOADACP.js";
|
|
34
31
|
import {
|
|
35
32
|
GlobTool
|
|
36
33
|
} from "./chunk-Z3H6SZBS.js";
|
|
34
|
+
import {
|
|
35
|
+
DiffTool
|
|
36
|
+
} from "./chunk-7ZOADACP.js";
|
|
37
37
|
import {
|
|
38
38
|
BashTool
|
|
39
39
|
} from "./chunk-2DIXRINW.js";
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
WriteTool
|
|
3
|
+
} from "./chunk-I3Z4OKMS.js";
|
|
4
|
+
import {
|
|
5
|
+
GrepTool
|
|
6
|
+
} from "./chunk-AZCQL24J.js";
|
|
4
7
|
import {
|
|
5
8
|
WebFetchTool
|
|
6
9
|
} from "./chunk-LGZOG7IQ.js";
|
|
7
10
|
import {
|
|
8
|
-
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
WriteTool
|
|
12
|
-
} from "./chunk-I3Z4OKMS.js";
|
|
13
|
-
import {
|
|
14
|
-
ReadTool
|
|
15
|
-
} from "./chunk-TZ6QK52L.js";
|
|
11
|
+
WebSearchTool
|
|
12
|
+
} from "./chunk-4EZHIDZ6.js";
|
|
16
13
|
import {
|
|
17
14
|
ReadSnippetsTool
|
|
18
15
|
} from "./chunk-GI5XI4HN.js";
|
|
@@ -20,20 +17,23 @@ import {
|
|
|
20
17
|
SourcePackTool
|
|
21
18
|
} from "./chunk-A6FUAM64.js";
|
|
22
19
|
import {
|
|
23
|
-
|
|
24
|
-
} from "./chunk-
|
|
20
|
+
TodoTool
|
|
21
|
+
} from "./chunk-MFHY7PBM.js";
|
|
25
22
|
import {
|
|
26
23
|
MultiEditTool
|
|
27
24
|
} from "./chunk-VJDLOFCF.js";
|
|
25
|
+
import {
|
|
26
|
+
ReadTool
|
|
27
|
+
} from "./chunk-RBHQ5WNR.js";
|
|
28
28
|
import {
|
|
29
29
|
EditTool
|
|
30
30
|
} from "./chunk-WLQ7DGMG.js";
|
|
31
|
-
import {
|
|
32
|
-
DiffTool
|
|
33
|
-
} from "./chunk-7ZOADACP.js";
|
|
34
31
|
import {
|
|
35
32
|
GlobTool
|
|
36
33
|
} from "./chunk-Z3H6SZBS.js";
|
|
34
|
+
import {
|
|
35
|
+
DiffTool
|
|
36
|
+
} from "./chunk-7ZOADACP.js";
|
|
37
37
|
import {
|
|
38
38
|
BashTool
|
|
39
39
|
} from "./chunk-2DIXRINW.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -102,8 +102,10 @@ export type DiffSummary = {
|
|
|
102
102
|
export type PatchHunk = {
|
|
103
103
|
oldStart: number;
|
|
104
104
|
newStart: number;
|
|
105
|
+
contextBefore?: string[];
|
|
105
106
|
oldLines: string[];
|
|
106
107
|
newLines: string[];
|
|
108
|
+
contextAfter?: string[];
|
|
107
109
|
oldLineCount: number;
|
|
108
110
|
newLineCount: number;
|
|
109
111
|
truncated?: boolean;
|
|
@@ -167,6 +169,16 @@ export type BashInput = {
|
|
|
167
169
|
runInBackground?: boolean;
|
|
168
170
|
run_in_background?: boolean;
|
|
169
171
|
};
|
|
172
|
+
type BashDiagnosticType = "missing_command" | "missing_python_module" | "timeout" | "no_output" | "prompt" | "provider_or_network";
|
|
173
|
+
type BashDiagnosticSeverity = "info" | "recoverable" | "blocking";
|
|
174
|
+
type BashDiagnostic = {
|
|
175
|
+
type: BashDiagnosticType;
|
|
176
|
+
severity: BashDiagnosticSeverity;
|
|
177
|
+
evidence: string;
|
|
178
|
+
suggestion: string;
|
|
179
|
+
command?: string;
|
|
180
|
+
fallback?: string;
|
|
181
|
+
};
|
|
170
182
|
export type TodoInput = {
|
|
171
183
|
action: "list";
|
|
172
184
|
} | {
|
|
@@ -239,6 +251,18 @@ type ShellCommandAdapter = {
|
|
|
239
251
|
adapter: "native" | "powershell-adapted" | "blocked";
|
|
240
252
|
logCommand?: string;
|
|
241
253
|
};
|
|
254
|
+
type CommandDomain = "host" | "explicit_shell" | "remote_shell" | "ambiguous";
|
|
255
|
+
type CommandClassification = {
|
|
256
|
+
domain: CommandDomain;
|
|
257
|
+
program: string;
|
|
258
|
+
hostArgs: string[];
|
|
259
|
+
remotePayload?: string;
|
|
260
|
+
hasHostPipeline: boolean;
|
|
261
|
+
confidence: "high" | "medium" | "low";
|
|
262
|
+
};
|
|
263
|
+
export declare function __testCreateBashOutcomeDiagnostics(command: string, outcome: "completed" | "timeout" | "cancelled"): BashDiagnostic[];
|
|
264
|
+
export declare function __testCreateBashPromptDiagnostic(tail: string): BashDiagnostic | undefined;
|
|
265
|
+
export declare function __testClassifyWindowsShellCommand(command: string): CommandClassification;
|
|
242
266
|
export declare function adaptShellCommand(command: string): ShellCommandAdapter;
|
|
243
267
|
export declare function adaptShellCommandForPlatform(command: string, platform: NodeJS.Platform): ShellCommandAdapter;
|
|
244
268
|
declare function globToRegExp(pattern: string): RegExp;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAKvD,OAAO,EACL,KAAK,cAAc,EAIpB,MAAM,mBAAmB,CAAC;AAS3B,YAAY,EACV,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,MAAM,QAAQ,GAAG,KAAK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
|
2
|
+
formatFetchOutput,
|
|
3
|
+
webFetch
|
|
4
|
+
} from "./chunk-4UHQWBFA.js";
|
|
1
5
|
import {
|
|
2
6
|
applyDomainFilter,
|
|
3
7
|
bingSearch,
|
|
4
8
|
formatSearchOutput
|
|
5
9
|
} from "./chunk-EPIB4FSE.js";
|
|
6
10
|
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} from "./chunk-4UHQWBFA.js";
|
|
11
|
+
interpretCommandResult
|
|
12
|
+
} from "./chunk-FI4YPDFE.js";
|
|
10
13
|
import {
|
|
11
14
|
createTool
|
|
12
15
|
} from "./chunk-MMJX44V6.js";
|
|
13
16
|
import {
|
|
14
17
|
toolPrompts
|
|
15
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-QBA6B5OX.js";
|
|
16
19
|
import {
|
|
17
20
|
toolUserFacingNames
|
|
18
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-PLAQPN4W.js";
|
|
22
|
+
import "./chunk-I3Z4OKMS.js";
|
|
23
|
+
import "./chunk-AZCQL24J.js";
|
|
24
|
+
import "./chunk-HUIZOB4A.js";
|
|
25
|
+
import "./chunk-MK3YP2VR.js";
|
|
26
|
+
import "./chunk-LGZOG7IQ.js";
|
|
19
27
|
import "./chunk-4EZHIDZ6.js";
|
|
20
28
|
import "./chunk-YR4HWOR2.js";
|
|
21
29
|
import "./chunk-VAFW24RN.js";
|
|
22
|
-
import "./chunk-LGZOG7IQ.js";
|
|
23
|
-
import "./chunk-MFHY7PBM.js";
|
|
24
|
-
import "./chunk-SZFZPQGL.js";
|
|
25
|
-
import "./chunk-XZWSO5CM.js";
|
|
26
|
-
import "./chunk-I3Z4OKMS.js";
|
|
27
30
|
import "./chunk-PS2ZOFZ6.js";
|
|
28
31
|
import "./chunk-NPKLGVDQ.js";
|
|
29
|
-
import "./chunk-TZ6QK52L.js";
|
|
30
|
-
import "./chunk-K3YDFDLP.js";
|
|
31
32
|
import "./chunk-GI5XI4HN.js";
|
|
32
|
-
import "./chunk-WEWXKRKL.js";
|
|
33
33
|
import "./chunk-A6FUAM64.js";
|
|
34
34
|
import "./chunk-YCO6C7KF.js";
|
|
35
|
+
import "./chunk-MFHY7PBM.js";
|
|
36
|
+
import "./chunk-SZFZPQGL.js";
|
|
37
|
+
import "./chunk-XZWSO5CM.js";
|
|
35
38
|
import "./chunk-ZYAEUABC.js";
|
|
36
39
|
import "./chunk-SWK6XRZQ.js";
|
|
37
|
-
import "./chunk-AZCQL24J.js";
|
|
38
|
-
import "./chunk-HUIZOB4A.js";
|
|
39
|
-
import "./chunk-MK3YP2VR.js";
|
|
40
40
|
import "./chunk-VJDLOFCF.js";
|
|
41
41
|
import "./chunk-3RP665TH.js";
|
|
42
42
|
import "./chunk-IOC3BSPT.js";
|
|
43
|
+
import "./chunk-RBHQ5WNR.js";
|
|
43
44
|
import "./chunk-HNIVNZIS.js";
|
|
45
|
+
import "./chunk-K3YDFDLP.js";
|
|
46
|
+
import "./chunk-WEWXKRKL.js";
|
|
44
47
|
import "./chunk-WLQ7DGMG.js";
|
|
45
48
|
import "./chunk-SQP6SJRP.js";
|
|
46
49
|
import "./chunk-BRG64AEC.js";
|
|
47
|
-
import "./chunk-7ZOADACP.js";
|
|
48
|
-
import "./chunk-H5OOD2OS.js";
|
|
49
|
-
import "./chunk-IQP3XE32.js";
|
|
50
50
|
import "./chunk-Z3H6SZBS.js";
|
|
51
51
|
import "./chunk-ITBZHMZQ.js";
|
|
52
52
|
import "./chunk-2U4BZXAI.js";
|
|
53
|
+
import "./chunk-7ZOADACP.js";
|
|
54
|
+
import "./chunk-H5OOD2OS.js";
|
|
55
|
+
import "./chunk-IQP3XE32.js";
|
|
53
56
|
import "./chunk-2DIXRINW.js";
|
|
54
|
-
import {
|
|
55
|
-
interpretCommandResult
|
|
56
|
-
} from "./chunk-FI4YPDFE.js";
|
|
57
57
|
import "./chunk-PKMIDA5A.js";
|
|
58
58
|
import "./chunk-GAWMEMXB.js";
|
|
59
59
|
|
|
@@ -61,7 +61,7 @@ import "./chunk-GAWMEMXB.js";
|
|
|
61
61
|
import { spawn } from "child_process";
|
|
62
62
|
import { createHash, randomUUID } from "crypto";
|
|
63
63
|
import { closeSync, createWriteStream, openSync } from "fs";
|
|
64
|
-
import { mkdir, readFile, readdir, stat, writeFile } from "fs/promises";
|
|
64
|
+
import { mkdir, appendFile, readFile, readdir, stat, writeFile } from "fs/promises";
|
|
65
65
|
import { basename, dirname, isAbsolute, join, relative, resolve } from "path";
|
|
66
66
|
var toolRegistryStatus = "ready";
|
|
67
67
|
var DEFAULT_LIMIT = 200;
|
|
@@ -75,6 +75,8 @@ var SOURCE_PACK_MAX_LIMIT = 12;
|
|
|
75
75
|
var SOURCE_PACK_CONTEXT_LINES = 8;
|
|
76
76
|
var SOURCE_PACK_MAX_TERMS = 6;
|
|
77
77
|
var BASH_PREVIEW_LIMIT = 3e4;
|
|
78
|
+
var BASH_OUTPUT_TRUNCATION_NOTICE = "\n...\uFF08\u8F93\u51FA\u5DF2\u622A\u65AD\uFF0C\u5B8C\u6574\u65E5\u5FD7\u89C1 fullOutputPath\uFF09";
|
|
79
|
+
var BASH_DETAILS_TAIL_LINES = 80;
|
|
78
80
|
var BASH_TIMEOUT_MS = 12e4;
|
|
79
81
|
var MAX_TODO_ITEMS = 100;
|
|
80
82
|
var SEARCH_EXCLUDED_DIR_NAMES = ["node_modules", "dist", ".git", ".codebase-memory"];
|
|
@@ -430,11 +432,12 @@ function normalizeToolOutput(output, tool) {
|
|
|
430
432
|
}
|
|
431
433
|
const preview = `${output.text.slice(0, tool.lifecycle.maxResultSizeChars)}
|
|
432
434
|
...\uFF08\u8F93\u51FA\u5DF2\u622A\u65AD\uFF0C\u5B8C\u6574\u5185\u5BB9\u89C1 details/fullOutputPath \u6216 transcript\uFF09`;
|
|
435
|
+
const details = output.truncated ? output.details : output.details ?? output.text;
|
|
433
436
|
return {
|
|
434
437
|
...output,
|
|
435
438
|
text: preview,
|
|
436
439
|
preview: output.preview ?? preview,
|
|
437
|
-
details
|
|
440
|
+
details,
|
|
438
441
|
truncated: true
|
|
439
442
|
};
|
|
440
443
|
}
|
|
@@ -654,15 +657,22 @@ async function readTool(input, context) {
|
|
|
654
657
|
const offset = Math.max(input.offset ?? 0, 0);
|
|
655
658
|
const limit = Math.max(input.limit ?? DEFAULT_LIMIT, 1);
|
|
656
659
|
const selected = lines.slice(offset, offset + limit);
|
|
657
|
-
const
|
|
660
|
+
const windowTruncated = offset > 0 || offset + limit < lines.length;
|
|
658
661
|
const textLines = selected.map((line, index) => `${offset + index + 1} ${line}`);
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
662
|
+
let text = textLines.join("\n");
|
|
663
|
+
const budgetTruncated = text.length > DEFAULT_TOOL_TEXT_LIMIT;
|
|
664
|
+
if (windowTruncated || budgetTruncated) {
|
|
665
|
+
const marker = `...\uFF08\u53EA\u663E\u793A\u8BFB\u53D6\u7A97\u53E3\uFF1A\u9009\u4E2D ${selected.length} \u884C / \u5168\u6587 ${lines.length} \u884C\uFF1B\u4E0D\u662F\u5B8C\u6574\u6587\u4EF6\uFF09`;
|
|
666
|
+
if (budgetTruncated) {
|
|
667
|
+
text = `${text.slice(0, DEFAULT_TOOL_TEXT_LIMIT - marker.length - 1)}
|
|
668
|
+
${marker}`;
|
|
669
|
+
} else {
|
|
670
|
+
text = `${text}
|
|
671
|
+
${marker}`;
|
|
672
|
+
}
|
|
663
673
|
}
|
|
664
674
|
return {
|
|
665
|
-
text
|
|
675
|
+
text,
|
|
666
676
|
data: {
|
|
667
677
|
path: relativePath(context.workspaceRoot, filePath),
|
|
668
678
|
lines: selected.length,
|
|
@@ -673,7 +683,7 @@ async function readTool(input, context) {
|
|
|
673
683
|
hash: hashText(content),
|
|
674
684
|
newline: detectNewlineStyle(content)
|
|
675
685
|
},
|
|
676
|
-
truncated
|
|
686
|
+
truncated: windowTruncated || budgetTruncated
|
|
677
687
|
};
|
|
678
688
|
}
|
|
679
689
|
async function readSnippetsTool(input, context) {
|
|
@@ -1056,37 +1066,36 @@ outputPath: ${fullOutputPath}`,
|
|
|
1056
1066
|
}
|
|
1057
1067
|
};
|
|
1058
1068
|
}
|
|
1069
|
+
const commandForLog = adapted.logCommand ?? adapted.command;
|
|
1070
|
+
const adapterLines = adapted.command === input.command && adapted.adapter === "native" ? [] : [
|
|
1071
|
+
`adapter ${adapted.adapter}`,
|
|
1072
|
+
`original command ${summarizeOriginalShellCommand(input.command)}`
|
|
1073
|
+
];
|
|
1059
1074
|
const result = await runShell(
|
|
1060
1075
|
adapted.command,
|
|
1061
1076
|
context.workspaceRoot,
|
|
1062
1077
|
timeoutMs,
|
|
1078
|
+
fullOutputPath,
|
|
1079
|
+
[`$ ${sanitizeSecrets(commandForLog)}`, ...adapterLines],
|
|
1063
1080
|
context.abortSignal,
|
|
1064
1081
|
(stream, text) => void context.onProgress?.({ toolName: "Bash", stream, text }),
|
|
1065
|
-
context.trackChildProcess
|
|
1082
|
+
context.trackChildProcess,
|
|
1083
|
+
createBashNoOutputHint(input.command)
|
|
1066
1084
|
);
|
|
1067
|
-
const adapterLines = adapted.command === input.command && adapted.adapter === "native" ? [] : [
|
|
1068
|
-
`adapter ${adapted.adapter}`,
|
|
1069
|
-
`original command ${summarizeOriginalShellCommand(input.command)}`
|
|
1070
|
-
];
|
|
1071
|
-
const commandForLog = adapted.logCommand ?? adapted.command;
|
|
1072
|
-
const sanitizedShellOutput = sanitizeSecrets(result.output);
|
|
1073
1085
|
const cmdInterpretation = interpretCommandResult(input.command, result.exitCode);
|
|
1074
|
-
const
|
|
1075
|
-
|
|
1076
|
-
|
|
1086
|
+
const diagnostics = createBashOutcomeDiagnostics(input.command, result.outcome);
|
|
1087
|
+
const trailerLines = [
|
|
1088
|
+
"",
|
|
1077
1089
|
`exit code ${result.exitCode}`,
|
|
1078
1090
|
`outcome ${result.outcome}`,
|
|
1079
|
-
...cmdInterpretation.message ? [`returnCodeInterpretation: ${cmdInterpretation.message}`] : []
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
const
|
|
1087
|
-
const preview = truncated ? `${fullText.slice(0, BASH_PREVIEW_LIMIT)}
|
|
1088
|
-
...\uFF08\u8F93\u51FA\u5DF2\u622A\u65AD\uFF0C\u5B8C\u6574\u65E5\u5FD7\u89C1 fullOutputPath\uFF09` : fullText;
|
|
1089
|
-
const details = createBashDetails(fullOutputPath, fullText);
|
|
1091
|
+
...cmdInterpretation.message ? [`returnCodeInterpretation: ${cmdInterpretation.message}`] : []
|
|
1092
|
+
];
|
|
1093
|
+
await appendFileToPath(fullOutputPath, `${trailerLines.join("\n")}
|
|
1094
|
+
`);
|
|
1095
|
+
result.capture.appendLogOnly(`${trailerLines.join("\n")}
|
|
1096
|
+
`);
|
|
1097
|
+
const preview = result.capture.getPreview(BASH_OUTPUT_TRUNCATION_NOTICE);
|
|
1098
|
+
const details = createBashDetails(fullOutputPath, result.capture);
|
|
1090
1099
|
const data = adapted.adapter === "native" ? { exitCode: result.exitCode, outcome: result.outcome } : { exitCode: result.exitCode, outcome: result.outcome, adapter: adapted.adapter };
|
|
1091
1100
|
const outputData = {
|
|
1092
1101
|
...data,
|
|
@@ -1094,6 +1103,7 @@ outputPath: ${fullOutputPath}`,
|
|
|
1094
1103
|
...cmdInterpretation.isError === false && result.exitCode !== 0 ? { isError: false } : {},
|
|
1095
1104
|
...diagnostics.length > 0 ? { diagnostics } : {}
|
|
1096
1105
|
};
|
|
1106
|
+
const truncated = result.capture.isTruncated();
|
|
1097
1107
|
return {
|
|
1098
1108
|
text: preview,
|
|
1099
1109
|
details,
|
|
@@ -1102,15 +1112,53 @@ outputPath: ${fullOutputPath}`,
|
|
|
1102
1112
|
fullOutputPath
|
|
1103
1113
|
};
|
|
1104
1114
|
}
|
|
1105
|
-
function createBashDetails(fullOutputPath,
|
|
1115
|
+
function createBashDetails(fullOutputPath, capture) {
|
|
1106
1116
|
return [
|
|
1107
1117
|
`fullOutputPath: ${fullOutputPath}`,
|
|
1108
1118
|
"--- summary",
|
|
1109
|
-
...
|
|
1119
|
+
...capture.getSummaryLines(8),
|
|
1110
1120
|
"--- tail",
|
|
1111
|
-
...
|
|
1121
|
+
...capture.getTailLines(BASH_DETAILS_TAIL_LINES)
|
|
1112
1122
|
].join("\n");
|
|
1113
1123
|
}
|
|
1124
|
+
function createBashOutputCapture() {
|
|
1125
|
+
let outputPreview = "";
|
|
1126
|
+
let outputChars = 0;
|
|
1127
|
+
let summaryText = "";
|
|
1128
|
+
let tailText = "";
|
|
1129
|
+
const summaryCharLimit = 8e3;
|
|
1130
|
+
const tailCharLimit = 64e3;
|
|
1131
|
+
const appendLogText = (text) => {
|
|
1132
|
+
if (!text) return;
|
|
1133
|
+
if (summaryText.length < summaryCharLimit) {
|
|
1134
|
+
summaryText += text.slice(0, summaryCharLimit - summaryText.length);
|
|
1135
|
+
}
|
|
1136
|
+
tailText = `${tailText}${text}`;
|
|
1137
|
+
if (tailText.length > tailCharLimit) {
|
|
1138
|
+
tailText = tailText.slice(tailText.length - tailCharLimit);
|
|
1139
|
+
}
|
|
1140
|
+
};
|
|
1141
|
+
const appendOutputText = (text) => {
|
|
1142
|
+
if (!text) return;
|
|
1143
|
+
outputChars += text.length;
|
|
1144
|
+
if (outputPreview.length < BASH_PREVIEW_LIMIT) {
|
|
1145
|
+
outputPreview += text.slice(0, BASH_PREVIEW_LIMIT - outputPreview.length);
|
|
1146
|
+
}
|
|
1147
|
+
appendLogText(text);
|
|
1148
|
+
};
|
|
1149
|
+
return {
|
|
1150
|
+
appendOutput: appendOutputText,
|
|
1151
|
+
appendSystem: appendOutputText,
|
|
1152
|
+
appendLogOnly: appendLogText,
|
|
1153
|
+
getPreview: (truncationNotice) => outputChars > BASH_PREVIEW_LIMIT ? `${outputPreview.slice(0, Math.max(0, BASH_PREVIEW_LIMIT - truncationNotice.length))}${truncationNotice}` : outputPreview,
|
|
1154
|
+
getSummaryLines: (limit) => summaryText.split(/\r?\n/u).slice(0, limit),
|
|
1155
|
+
getTailLines: (limit) => tailLines(tailText, limit),
|
|
1156
|
+
isTruncated: () => outputChars > BASH_PREVIEW_LIMIT
|
|
1157
|
+
};
|
|
1158
|
+
}
|
|
1159
|
+
async function appendFileToPath(path, text) {
|
|
1160
|
+
await appendFile(path, text, "utf8");
|
|
1161
|
+
}
|
|
1114
1162
|
var BINARY_HINT_EXTENSIONS = [
|
|
1115
1163
|
".bin",
|
|
1116
1164
|
".elf",
|
|
@@ -1597,53 +1645,251 @@ function isHeadlessBenchContext(context) {
|
|
|
1597
1645
|
const record = context;
|
|
1598
1646
|
return record.headlessBench?.enabled === true || record.isHeadlessBench === true;
|
|
1599
1647
|
}
|
|
1600
|
-
function createBashOutcomeDiagnostics(outcome) {
|
|
1601
|
-
if (outcome
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1648
|
+
function createBashOutcomeDiagnostics(command, outcome) {
|
|
1649
|
+
if (outcome !== "timeout") return [];
|
|
1650
|
+
const diagnostics = [
|
|
1651
|
+
{
|
|
1652
|
+
type: "timeout",
|
|
1653
|
+
severity: "recoverable",
|
|
1654
|
+
evidence: "Bash outcome timeout",
|
|
1655
|
+
suggestion: "Run the smallest focused check first and avoid repeating long blind commands."
|
|
1656
|
+
}
|
|
1657
|
+
];
|
|
1658
|
+
const remoteShellDiagnostic = createRemoteShellNoOutputDiagnostic(command);
|
|
1659
|
+
if (remoteShellDiagnostic) diagnostics.push(remoteShellDiagnostic);
|
|
1660
|
+
return diagnostics;
|
|
1661
|
+
}
|
|
1662
|
+
function createRemoteShellNoOutputDiagnostic(command) {
|
|
1663
|
+
const classification = classifyWindowsShellCommand(command);
|
|
1664
|
+
if (classification.domain !== "remote_shell" && !isRemoteShellProgram(classification.program)) {
|
|
1665
|
+
return void 0;
|
|
1666
|
+
}
|
|
1667
|
+
return {
|
|
1668
|
+
type: "no_output",
|
|
1669
|
+
severity: "recoverable",
|
|
1670
|
+
evidence: `Remote shell command timed out or stayed silent: ${classification.program}`,
|
|
1671
|
+
suggestion: "Check device authorization, remote command interactivity, quote boundaries, and whether host-level pipes should be moved inside the quoted remote payload."
|
|
1672
|
+
};
|
|
1673
|
+
}
|
|
1674
|
+
function createBashNoOutputHint(command) {
|
|
1675
|
+
const classification = classifyWindowsShellCommand(command);
|
|
1676
|
+
if (classification.domain !== "remote_shell" && !isRemoteShellProgram(classification.program)) {
|
|
1677
|
+
return void 0;
|
|
1610
1678
|
}
|
|
1611
|
-
return
|
|
1679
|
+
return "\u8FDC\u7AEF/\u8BBE\u5907\u547D\u4EE4\u957F\u65F6\u95F4\u65E0\u8F93\u51FA\u65F6\uFF0C\u4F18\u5148\u68C0\u67E5\u8BBE\u5907\u6388\u6743\u3001\u4EA4\u4E92\u5F0F\u7B49\u5F85\u3001quote \u8FB9\u754C\uFF0C\u4EE5\u53CA\u5BBF\u4E3B\u5C42\u7BA1\u7EBF\u662F\u5426\u8BEF\u653E\u5728\u8FDC\u7AEF payload \u5916\u3002";
|
|
1612
1680
|
}
|
|
1613
1681
|
function tailLines(text, limit) {
|
|
1614
1682
|
const lines = text.split(/\r?\n/u);
|
|
1615
1683
|
return lines.slice(Math.max(0, lines.length - limit));
|
|
1616
1684
|
}
|
|
1685
|
+
function __testCreateBashOutcomeDiagnostics(command, outcome) {
|
|
1686
|
+
return createBashOutcomeDiagnostics(command, outcome);
|
|
1687
|
+
}
|
|
1688
|
+
function __testCreateBashPromptDiagnostic(tail) {
|
|
1689
|
+
return createBashPromptDiagnostic(tail);
|
|
1690
|
+
}
|
|
1691
|
+
function __testClassifyWindowsShellCommand(command) {
|
|
1692
|
+
return classifyWindowsShellCommand(command);
|
|
1693
|
+
}
|
|
1617
1694
|
function adaptShellCommand(command) {
|
|
1618
1695
|
return adaptShellCommandForPlatform(command, process.platform);
|
|
1619
1696
|
}
|
|
1620
1697
|
function adaptShellCommandForPlatform(command, platform) {
|
|
1621
1698
|
if (platform !== "win32") return { command, adapter: "native" };
|
|
1622
1699
|
if (isExplicitPowerShellCommand(command)) return { command, adapter: "native" };
|
|
1623
|
-
const
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1700
|
+
const classification = classifyWindowsShellCommand(command);
|
|
1701
|
+
for (const adapter of WINDOWS_SHELL_ADAPTER_REGISTRY) {
|
|
1702
|
+
const adapted = adapter.adapt(command, classification);
|
|
1703
|
+
if (adapted) return adapted;
|
|
1704
|
+
}
|
|
1705
|
+
return { command, adapter: "native" };
|
|
1706
|
+
}
|
|
1707
|
+
var WINDOWS_SHELL_ADAPTER_REGISTRY = [
|
|
1708
|
+
{
|
|
1709
|
+
name: "DiagnosticAdapter",
|
|
1710
|
+
adapt: (_command, classification) => {
|
|
1711
|
+
if (classification.domain !== "ambiguous" || !isRemoteShellProgram(classification.program)) {
|
|
1712
|
+
return void 0;
|
|
1713
|
+
}
|
|
1714
|
+
return createBlockedPowerShellAdapter(
|
|
1715
|
+
"Ambiguous remote shell command on Windows: host-level pipeline detected outside the remote payload; quote the remote command or use a PowerShell-safe host pipeline."
|
|
1716
|
+
);
|
|
1717
|
+
}
|
|
1718
|
+
},
|
|
1719
|
+
{
|
|
1720
|
+
name: "RemoteShellAdapter",
|
|
1721
|
+
adapt: (command, classification) => classification.domain === "remote_shell" ? { command, adapter: "native" } : void 0
|
|
1722
|
+
},
|
|
1723
|
+
{
|
|
1724
|
+
name: "BlockedWriteAdapter",
|
|
1725
|
+
adapt: (command) => blockWindowsShellFileWriteCommand(command)
|
|
1726
|
+
},
|
|
1727
|
+
{
|
|
1728
|
+
name: "ExplicitShellAdapter",
|
|
1729
|
+
adapt: (command, classification) => classification.domain === "explicit_shell" ? { command, adapter: "native" } : void 0
|
|
1730
|
+
},
|
|
1731
|
+
{
|
|
1732
|
+
name: "NodeHereDocAdapter",
|
|
1733
|
+
adapt: (command) => convertNodeHereDocForPowerShell(command)
|
|
1734
|
+
},
|
|
1735
|
+
{
|
|
1736
|
+
name: "NativePowerShellAdapter",
|
|
1737
|
+
adapt: (command) => convertNativePowerShellCommand(command)
|
|
1738
|
+
},
|
|
1739
|
+
{
|
|
1740
|
+
name: "UnsupportedMultilineAdapter",
|
|
1741
|
+
adapt: (command) => looksLikeUnsupportedUnixMultiline(command) ? createBlockedPowerShellAdapter(
|
|
1631
1742
|
"Unsupported multi-line Unix shell syntax on Windows PowerShell; use PowerShell-safe commands or Node one-liners."
|
|
1632
|
-
)
|
|
1743
|
+
) : void 0
|
|
1744
|
+
},
|
|
1745
|
+
{
|
|
1746
|
+
name: "UnsupportedPosixAdapter",
|
|
1747
|
+
adapt: (command) => blockUnsupportedPosixShellSyntax(command)
|
|
1748
|
+
},
|
|
1749
|
+
{
|
|
1750
|
+
name: "WindowsPipelineAdapter",
|
|
1751
|
+
adapt: (command) => {
|
|
1752
|
+
const converted = convertUnixPipelineForPowerShell(command);
|
|
1753
|
+
return converted ? { command: converted, adapter: "powershell-adapted" } : void 0;
|
|
1754
|
+
}
|
|
1755
|
+
},
|
|
1756
|
+
{
|
|
1757
|
+
name: "WindowsReadOnlyAdapter",
|
|
1758
|
+
adapt: (command) => convertUnixReadOnlyCommandForPowerShell(command)
|
|
1759
|
+
},
|
|
1760
|
+
{
|
|
1761
|
+
name: "UnsupportedPipelineAdapter",
|
|
1762
|
+
adapt: (command) => looksLikeUnsupportedUnixPipeline(command) ? createBlockedPowerShellAdapter(
|
|
1763
|
+
"Unsupported Unix pipeline on Windows PowerShell; use PowerShell-safe commands or Node one-liners."
|
|
1764
|
+
) : void 0
|
|
1765
|
+
},
|
|
1766
|
+
{
|
|
1767
|
+
name: "UnsupportedReadOnlyAdapter",
|
|
1768
|
+
adapt: (command) => blockUnsupportedUnixReadOnlyCommand(command)
|
|
1633
1769
|
}
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
const
|
|
1637
|
-
|
|
1638
|
-
const
|
|
1639
|
-
|
|
1640
|
-
if (
|
|
1641
|
-
|
|
1642
|
-
|
|
1770
|
+
];
|
|
1771
|
+
function classifyWindowsShellCommand(command) {
|
|
1772
|
+
const tokens = tokenizeShellCommandWords(command);
|
|
1773
|
+
const hasHostPipeline = hasUnquotedShellPipe(command);
|
|
1774
|
+
const program = tokens?.[0]?.toLowerCase() ?? "";
|
|
1775
|
+
const hostArgs = tokens?.slice(1) ?? [];
|
|
1776
|
+
if (!tokens || !program) {
|
|
1777
|
+
return { domain: "ambiguous", program, hostArgs, hasHostPipeline, confidence: "low" };
|
|
1778
|
+
}
|
|
1779
|
+
const remote = classifyRemoteShellCommand(program, hostArgs, hasHostPipeline);
|
|
1780
|
+
if (remote) return remote;
|
|
1781
|
+
if (isExplicitShellProgram(program)) {
|
|
1782
|
+
return {
|
|
1783
|
+
domain: "explicit_shell",
|
|
1784
|
+
program,
|
|
1785
|
+
hostArgs,
|
|
1786
|
+
hasHostPipeline,
|
|
1787
|
+
confidence: hasHostPipeline ? "medium" : "high"
|
|
1788
|
+
};
|
|
1643
1789
|
}
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1790
|
+
return { domain: "host", program, hostArgs, hasHostPipeline, confidence: "high" };
|
|
1791
|
+
}
|
|
1792
|
+
function classifyRemoteShellCommand(program, hostArgs, hasHostPipeline) {
|
|
1793
|
+
if (program === "adb" && hostArgs[0]?.toLowerCase() === "shell") {
|
|
1794
|
+
return remoteShellClassification(program, hostArgs, hostArgs.slice(1).join(" "), hasHostPipeline);
|
|
1795
|
+
}
|
|
1796
|
+
if (program === "ssh" && hostArgs.length >= 2) {
|
|
1797
|
+
return remoteShellClassification(program, hostArgs, hostArgs.slice(1).join(" "), hasHostPipeline);
|
|
1798
|
+
}
|
|
1799
|
+
if (program === "docker" && hostArgs.some((arg) => arg.toLowerCase() === "exec")) {
|
|
1800
|
+
return remoteShellClassification(program, hostArgs, hostArgs.join(" "), hasHostPipeline);
|
|
1801
|
+
}
|
|
1802
|
+
return void 0;
|
|
1803
|
+
}
|
|
1804
|
+
function remoteShellClassification(program, hostArgs, remotePayload, hasHostPipeline) {
|
|
1805
|
+
if (hasHostPipeline) {
|
|
1806
|
+
return {
|
|
1807
|
+
domain: "ambiguous",
|
|
1808
|
+
program,
|
|
1809
|
+
hostArgs,
|
|
1810
|
+
remotePayload,
|
|
1811
|
+
hasHostPipeline,
|
|
1812
|
+
confidence: "medium"
|
|
1813
|
+
};
|
|
1814
|
+
}
|
|
1815
|
+
return {
|
|
1816
|
+
domain: "remote_shell",
|
|
1817
|
+
program,
|
|
1818
|
+
hostArgs,
|
|
1819
|
+
remotePayload,
|
|
1820
|
+
hasHostPipeline,
|
|
1821
|
+
confidence: "high"
|
|
1822
|
+
};
|
|
1823
|
+
}
|
|
1824
|
+
function isRemoteShellProgram(program) {
|
|
1825
|
+
return program === "adb" || program === "docker" || program === "ssh";
|
|
1826
|
+
}
|
|
1827
|
+
function isExplicitShellProgram(program) {
|
|
1828
|
+
return /^(?:powershell(?:\.exe)?|pwsh(?:\.exe)?|cmd(?:\.exe)?|bash|sh)$/iu.test(program);
|
|
1829
|
+
}
|
|
1830
|
+
function hasUnquotedShellPipe(command) {
|
|
1831
|
+
return scanShellCommand(command, (_char, quoted) => !quoted && _char === "|");
|
|
1832
|
+
}
|
|
1833
|
+
function tokenizeShellCommandWords(command) {
|
|
1834
|
+
const trimmed = command.trim();
|
|
1835
|
+
if (!trimmed) return void 0;
|
|
1836
|
+
const tokens = [];
|
|
1837
|
+
let current = "";
|
|
1838
|
+
let quote;
|
|
1839
|
+
for (let index = 0; index < trimmed.length; index += 1) {
|
|
1840
|
+
const char = trimmed[index];
|
|
1841
|
+
if (!char) continue;
|
|
1842
|
+
if (quote) {
|
|
1843
|
+
if (char === quote) {
|
|
1844
|
+
quote = void 0;
|
|
1845
|
+
continue;
|
|
1846
|
+
}
|
|
1847
|
+
current += char;
|
|
1848
|
+
continue;
|
|
1849
|
+
}
|
|
1850
|
+
if (char === "'" || char === '"') {
|
|
1851
|
+
quote = char;
|
|
1852
|
+
continue;
|
|
1853
|
+
}
|
|
1854
|
+
if (/\s/u.test(char)) {
|
|
1855
|
+
if (current) {
|
|
1856
|
+
tokens.push(current);
|
|
1857
|
+
current = "";
|
|
1858
|
+
}
|
|
1859
|
+
continue;
|
|
1860
|
+
}
|
|
1861
|
+
if (char === "|") {
|
|
1862
|
+
if (current) {
|
|
1863
|
+
tokens.push(current);
|
|
1864
|
+
current = "";
|
|
1865
|
+
}
|
|
1866
|
+
tokens.push(char);
|
|
1867
|
+
continue;
|
|
1868
|
+
}
|
|
1869
|
+
current += char;
|
|
1870
|
+
}
|
|
1871
|
+
if (quote) return void 0;
|
|
1872
|
+
if (current) tokens.push(current);
|
|
1873
|
+
return tokens.length > 0 ? tokens : void 0;
|
|
1874
|
+
}
|
|
1875
|
+
function scanShellCommand(command, predicate) {
|
|
1876
|
+
let quote;
|
|
1877
|
+
for (let index = 0; index < command.length; index += 1) {
|
|
1878
|
+
const char = command[index];
|
|
1879
|
+
if (!char) continue;
|
|
1880
|
+
if (quote) {
|
|
1881
|
+
if (char === quote) quote = void 0;
|
|
1882
|
+
if (predicate(char, true)) return true;
|
|
1883
|
+
continue;
|
|
1884
|
+
}
|
|
1885
|
+
if (char === "'" || char === '"') {
|
|
1886
|
+
quote = char;
|
|
1887
|
+
if (predicate(char, true)) return true;
|
|
1888
|
+
continue;
|
|
1889
|
+
}
|
|
1890
|
+
if (predicate(char, false)) return true;
|
|
1891
|
+
}
|
|
1892
|
+
return false;
|
|
1647
1893
|
}
|
|
1648
1894
|
function isExplicitPowerShellCommand(command) {
|
|
1649
1895
|
return /^(?:powershell(?:\.exe)?|pwsh(?:\.exe)?)\b/iu.test(command.trim());
|
|
@@ -2159,6 +2405,7 @@ function createEditOutput(context, operation, filePath, before, after, readGuard
|
|
|
2159
2405
|
};
|
|
2160
2406
|
}
|
|
2161
2407
|
var STRUCTURED_PATCH_LINE_LIMIT = 120;
|
|
2408
|
+
var STRUCTURED_PATCH_CONTEXT_LINES = 3;
|
|
2162
2409
|
function createStructuredPatch(path, before, after) {
|
|
2163
2410
|
const beforeLines = splitPatchLines(before);
|
|
2164
2411
|
const afterLines = splitPatchLines(after);
|
|
@@ -2181,11 +2428,21 @@ function createPatchHunk(beforeLines, afterLines) {
|
|
|
2181
2428
|
const oldLines = beforeLines.slice(prefix, beforeLines.length - suffix);
|
|
2182
2429
|
const newLines = afterLines.slice(prefix, afterLines.length - suffix);
|
|
2183
2430
|
if (oldLines.length === 0 && newLines.length === 0) return void 0;
|
|
2431
|
+
const contextBefore = beforeLines.slice(
|
|
2432
|
+
Math.max(0, prefix - STRUCTURED_PATCH_CONTEXT_LINES),
|
|
2433
|
+
prefix
|
|
2434
|
+
);
|
|
2435
|
+
const contextAfter = beforeLines.slice(
|
|
2436
|
+
beforeLines.length - suffix,
|
|
2437
|
+
Math.min(beforeLines.length - suffix + STRUCTURED_PATCH_CONTEXT_LINES, beforeLines.length)
|
|
2438
|
+
);
|
|
2184
2439
|
return {
|
|
2185
2440
|
oldStart: oldLines.length > 0 ? prefix + 1 : prefix,
|
|
2186
2441
|
newStart: newLines.length > 0 ? prefix + 1 : prefix,
|
|
2442
|
+
contextBefore,
|
|
2187
2443
|
oldLines: oldLines.slice(0, STRUCTURED_PATCH_LINE_LIMIT),
|
|
2188
2444
|
newLines: newLines.slice(0, STRUCTURED_PATCH_LINE_LIMIT),
|
|
2445
|
+
contextAfter,
|
|
2189
2446
|
oldLineCount: oldLines.length,
|
|
2190
2447
|
newLineCount: newLines.length,
|
|
2191
2448
|
truncated: oldLines.length > STRUCTURED_PATCH_LINE_LIMIT || newLines.length > STRUCTURED_PATCH_LINE_LIMIT
|
|
@@ -2556,9 +2813,8 @@ async function runRipgrep(args, context, limit, mapLine = (line) => line) {
|
|
|
2556
2813
|
context.abortSignal?.removeEventListener("abort", abort);
|
|
2557
2814
|
resolvePromise(value);
|
|
2558
2815
|
};
|
|
2559
|
-
child.stdout.setEncoding("utf8");
|
|
2560
2816
|
child.stdout.on("data", (chunk) => {
|
|
2561
|
-
pending += chunk;
|
|
2817
|
+
pending += decodeShellChunk(chunk);
|
|
2562
2818
|
const parts = pending.split(/\r?\n/u);
|
|
2563
2819
|
pending = parts.pop() ?? "";
|
|
2564
2820
|
for (const line of parts) {
|
|
@@ -2573,9 +2829,8 @@ async function runRipgrep(args, context, limit, mapLine = (line) => line) {
|
|
|
2573
2829
|
}
|
|
2574
2830
|
}
|
|
2575
2831
|
});
|
|
2576
|
-
child.stderr.setEncoding("utf8");
|
|
2577
2832
|
child.stderr.on("data", (chunk) => {
|
|
2578
|
-
stderr += chunk;
|
|
2833
|
+
stderr += decodeShellChunk(chunk);
|
|
2579
2834
|
});
|
|
2580
2835
|
child.on("error", () => finish(null));
|
|
2581
2836
|
child.on("close", (code) => {
|
|
@@ -2610,7 +2865,7 @@ function globToRegExp(pattern) {
|
|
|
2610
2865
|
}
|
|
2611
2866
|
return new RegExp(result);
|
|
2612
2867
|
}
|
|
2613
|
-
function runShell(command, cwd, timeoutMs, signal, onProgress, trackChildProcess) {
|
|
2868
|
+
function runShell(command, cwd, timeoutMs, fullOutputPath, headerLines, signal, onProgress, trackChildProcess, noOutputHint) {
|
|
2614
2869
|
return new Promise((resolvePromise) => {
|
|
2615
2870
|
const detached = process.platform !== "win32";
|
|
2616
2871
|
const child = spawn(command, { cwd, shell: true, windowsHide: true, detached });
|
|
@@ -2620,22 +2875,43 @@ function runShell(command, cwd, timeoutMs, signal, onProgress, trackChildProcess
|
|
|
2620
2875
|
label: `Bash:${command.slice(0, 80)}`,
|
|
2621
2876
|
retainAfterExit: detached
|
|
2622
2877
|
});
|
|
2623
|
-
|
|
2878
|
+
const capture = createBashOutputCapture();
|
|
2879
|
+
let logWrite = writeFile(fullOutputPath, `${headerLines.join("\n")}
|
|
2880
|
+
|
|
2881
|
+
`, "utf8");
|
|
2882
|
+
capture.appendLogOnly(`${headerLines.join("\n")}
|
|
2883
|
+
|
|
2884
|
+
`);
|
|
2885
|
+
const appendSanitizedChunk = (text, countAsOutput) => {
|
|
2886
|
+
const sanitized = sanitizeSecrets(text);
|
|
2887
|
+
if (countAsOutput) {
|
|
2888
|
+
capture.appendOutput(sanitized);
|
|
2889
|
+
} else {
|
|
2890
|
+
capture.appendLogOnly(sanitized);
|
|
2891
|
+
}
|
|
2892
|
+
logWrite = logWrite.then(() => appendFileToPath(fullOutputPath, sanitized));
|
|
2893
|
+
};
|
|
2624
2894
|
let settled = false;
|
|
2625
2895
|
let forcedKillTimer;
|
|
2896
|
+
let heartbeatTimer;
|
|
2897
|
+
let lastOutputTime = Date.now();
|
|
2898
|
+
const heartbeatMs = getForegroundBashHeartbeatMs();
|
|
2626
2899
|
let stoppingOutcome;
|
|
2627
2900
|
let childClosed = false;
|
|
2628
|
-
const finish = (exitCode,
|
|
2901
|
+
const finish = (exitCode, outcome = "completed") => {
|
|
2629
2902
|
if (settled) {
|
|
2630
2903
|
return;
|
|
2631
2904
|
}
|
|
2632
2905
|
settled = true;
|
|
2633
2906
|
clearTimeout(timer);
|
|
2907
|
+
if (heartbeatTimer) {
|
|
2908
|
+
clearTimeout(heartbeatTimer);
|
|
2909
|
+
}
|
|
2634
2910
|
if (forcedKillTimer && outcome === "completed") {
|
|
2635
2911
|
clearTimeout(forcedKillTimer);
|
|
2636
2912
|
}
|
|
2637
2913
|
signal?.removeEventListener("abort", onAbort);
|
|
2638
|
-
resolvePromise({ exitCode,
|
|
2914
|
+
void logWrite.finally(() => resolvePromise({ exitCode, capture, outcome }));
|
|
2639
2915
|
};
|
|
2640
2916
|
const waitForChildClose = () => new Promise((resolveClose) => {
|
|
2641
2917
|
if (childClosed || child.exitCode !== null || child.signalCode !== null) {
|
|
@@ -2669,10 +2945,9 @@ function runShell(command, cwd, timeoutMs, signal, onProgress, trackChildProcess
|
|
|
2669
2945
|
}, 1e3);
|
|
2670
2946
|
};
|
|
2671
2947
|
const onAbort = async () => {
|
|
2672
|
-
const message = "\n\u5DE5\u5177\u8C03\u7528\u5DF2\u53D6\u6D88\uFF0C\u6B63\u5728\u7EC8\u6B62\u5B50\u8FDB\u7A0B\u3002";
|
|
2673
|
-
|
|
2674
|
-
onProgress?.("system",
|
|
2675
|
-
`);
|
|
2948
|
+
const message = "\n\u5DE5\u5177\u8C03\u7528\u5DF2\u53D6\u6D88\uFF0C\u6B63\u5728\u7EC8\u6B62\u5B50\u8FDB\u7A0B\u3002\n";
|
|
2949
|
+
appendSanitizedChunk(message, true);
|
|
2950
|
+
onProgress?.("system", message);
|
|
2676
2951
|
stoppingOutcome = "cancelled";
|
|
2677
2952
|
if (process.platform === "win32") {
|
|
2678
2953
|
await requestStop(true);
|
|
@@ -2680,17 +2955,17 @@ function runShell(command, cwd, timeoutMs, signal, onProgress, trackChildProcess
|
|
|
2680
2955
|
void requestStop(false);
|
|
2681
2956
|
scheduleForceStop();
|
|
2682
2957
|
}
|
|
2683
|
-
finish(1,
|
|
2958
|
+
finish(1, "cancelled");
|
|
2684
2959
|
};
|
|
2685
2960
|
const timer = setTimeout(() => {
|
|
2686
2961
|
void handleTimeout();
|
|
2687
2962
|
}, timeoutMs);
|
|
2688
2963
|
const handleTimeout = async () => {
|
|
2689
2964
|
const message = `
|
|
2690
|
-
\u547D\u4EE4\u8D85\u65F6\uFF1A\u8D85\u8FC7 ${timeoutMs}ms\uFF0C\u5DF2\u5C1D\u8BD5\u7EC8\u6B62\u5B50\u8FDB\u7A0B\u3002
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2965
|
+
\u547D\u4EE4\u8D85\u65F6\uFF1A\u8D85\u8FC7 ${timeoutMs}ms\uFF0C\u5DF2\u5C1D\u8BD5\u7EC8\u6B62\u5B50\u8FDB\u7A0B\u3002
|
|
2966
|
+
`;
|
|
2967
|
+
appendSanitizedChunk(message, true);
|
|
2968
|
+
onProgress?.("system", message);
|
|
2694
2969
|
stoppingOutcome = "timeout";
|
|
2695
2970
|
if (process.platform === "win32") {
|
|
2696
2971
|
await requestStop(true);
|
|
@@ -2698,21 +2973,45 @@ function runShell(command, cwd, timeoutMs, signal, onProgress, trackChildProcess
|
|
|
2698
2973
|
void requestStop(false);
|
|
2699
2974
|
scheduleForceStop();
|
|
2700
2975
|
}
|
|
2701
|
-
finish(1,
|
|
2976
|
+
finish(1, "timeout");
|
|
2702
2977
|
};
|
|
2703
2978
|
if (signal?.aborted) {
|
|
2704
|
-
onAbort();
|
|
2979
|
+
void onAbort();
|
|
2705
2980
|
return;
|
|
2706
2981
|
}
|
|
2707
2982
|
signal?.addEventListener("abort", onAbort, { once: true });
|
|
2983
|
+
const markOutput = () => {
|
|
2984
|
+
lastOutputTime = Date.now();
|
|
2985
|
+
if (heartbeatTimer) {
|
|
2986
|
+
clearTimeout(heartbeatTimer);
|
|
2987
|
+
}
|
|
2988
|
+
heartbeatTimer = setTimeout(reportHeartbeat, heartbeatMs);
|
|
2989
|
+
};
|
|
2990
|
+
const reportHeartbeat = () => {
|
|
2991
|
+
if (settled) return;
|
|
2992
|
+
const idleMs = Date.now() - lastOutputTime;
|
|
2993
|
+
if (idleMs >= heartbeatMs) {
|
|
2994
|
+
const hint = noOutputHint ? ` ${noOutputHint}` : "";
|
|
2995
|
+
const message = `
|
|
2996
|
+
[bash] \u547D\u4EE4\u4ECD\u5728\u8FD0\u884C\uFF0C\u5DF2 ${Math.round(idleMs / 1e3)}s \u65E0\u8F93\u51FA\u3002${hint}\u5B8C\u6574\u65E5\u5FD7\uFF1A${fullOutputPath}
|
|
2997
|
+
`;
|
|
2998
|
+
appendSanitizedChunk(message, true);
|
|
2999
|
+
onProgress?.("system", message);
|
|
3000
|
+
lastOutputTime = Date.now();
|
|
3001
|
+
}
|
|
3002
|
+
heartbeatTimer = setTimeout(reportHeartbeat, heartbeatMs);
|
|
3003
|
+
};
|
|
3004
|
+
markOutput();
|
|
2708
3005
|
child.stdout.on("data", (chunk) => {
|
|
2709
3006
|
const text = decodeShellChunk(chunk);
|
|
2710
|
-
|
|
3007
|
+
markOutput();
|
|
3008
|
+
appendSanitizedChunk(text, true);
|
|
2711
3009
|
onProgress?.("stdout", text);
|
|
2712
3010
|
});
|
|
2713
3011
|
child.stderr.on("data", (chunk) => {
|
|
2714
3012
|
const text = decodeShellChunk(chunk);
|
|
2715
|
-
|
|
3013
|
+
markOutput();
|
|
3014
|
+
appendSanitizedChunk(text, true);
|
|
2716
3015
|
onProgress?.("stderr", text);
|
|
2717
3016
|
});
|
|
2718
3017
|
child.on("close", (code) => {
|
|
@@ -2723,11 +3022,14 @@ function runShell(command, cwd, timeoutMs, signal, onProgress, trackChildProcess
|
|
|
2723
3022
|
finish(code ?? 1);
|
|
2724
3023
|
});
|
|
2725
3024
|
child.on("error", (error) => {
|
|
2726
|
-
|
|
3025
|
+
appendSanitizedChunk(`\u547D\u4EE4\u6267\u884C\u5931\u8D25\uFF1A${error.message}
|
|
3026
|
+
`, true);
|
|
3027
|
+
finish(1);
|
|
2727
3028
|
});
|
|
2728
3029
|
});
|
|
2729
3030
|
}
|
|
2730
3031
|
var STALL_THRESHOLD_MS = 45e3;
|
|
3032
|
+
var DEFAULT_FOREGROUND_BASH_HEARTBEAT_MS = 3e4;
|
|
2731
3033
|
var PROMPT_PATTERNS = [
|
|
2732
3034
|
/\(y\/n\)\s*$/i,
|
|
2733
3035
|
/\[y\/n\]\s*$/i,
|
|
@@ -2739,10 +3041,25 @@ var PROMPT_PATTERNS = [
|
|
|
2739
3041
|
/passphrase[:\s]*$/i,
|
|
2740
3042
|
/\?\s*$/
|
|
2741
3043
|
];
|
|
3044
|
+
function getForegroundBashHeartbeatMs() {
|
|
3045
|
+
const raw = process.env.LINGHUN_BASH_HEARTBEAT_MS;
|
|
3046
|
+
if (!raw) return DEFAULT_FOREGROUND_BASH_HEARTBEAT_MS;
|
|
3047
|
+
const parsed = Number(raw);
|
|
3048
|
+
return Number.isFinite(parsed) && parsed > 0 ? Math.max(10, parsed) : DEFAULT_FOREGROUND_BASH_HEARTBEAT_MS;
|
|
3049
|
+
}
|
|
2742
3050
|
function looksLikePrompt(tail) {
|
|
2743
3051
|
const lastLine = tail.split(/\r?\n/).filter(Boolean).pop() ?? "";
|
|
2744
3052
|
return PROMPT_PATTERNS.some((re) => re.test(lastLine));
|
|
2745
3053
|
}
|
|
3054
|
+
function createBashPromptDiagnostic(tail) {
|
|
3055
|
+
if (!looksLikePrompt(tail)) return void 0;
|
|
3056
|
+
return {
|
|
3057
|
+
type: "prompt",
|
|
3058
|
+
severity: "recoverable",
|
|
3059
|
+
evidence: "Bash output ended with an interactive prompt.",
|
|
3060
|
+
suggestion: "Provide input explicitly, rerun with non-interactive flags, or cancel and use a safer command."
|
|
3061
|
+
};
|
|
3062
|
+
}
|
|
2746
3063
|
async function runBackgroundBash(opts) {
|
|
2747
3064
|
const {
|
|
2748
3065
|
taskId,
|
|
@@ -2818,8 +3135,12 @@ async function runBackgroundBash(opts) {
|
|
|
2818
3135
|
stallTimer = setTimeout(checkStall, STALL_THRESHOLD_MS);
|
|
2819
3136
|
};
|
|
2820
3137
|
const checkStall = () => {
|
|
2821
|
-
if (Date.now() - lastOutputTime >= STALL_THRESHOLD_MS
|
|
2822
|
-
const
|
|
3138
|
+
if (Date.now() - lastOutputTime >= STALL_THRESHOLD_MS) {
|
|
3139
|
+
const diagnostic = createBashPromptDiagnostic(tailBuffer);
|
|
3140
|
+
if (!diagnostic) return;
|
|
3141
|
+
const msg = `
|
|
3142
|
+
[stall watchdog] ${diagnostic.evidence} ${diagnostic.suggestion}
|
|
3143
|
+
`;
|
|
2823
3144
|
fileStream.write(msg);
|
|
2824
3145
|
onProgress?.("system", msg);
|
|
2825
3146
|
}
|
|
@@ -3051,6 +3372,9 @@ var __testCanSafelyAliasPythonCommand = canSafelyAliasPythonCommand;
|
|
|
3051
3372
|
var __testRunBackgroundBash = runBackgroundBash;
|
|
3052
3373
|
export {
|
|
3053
3374
|
__testCanSafelyAliasPythonCommand,
|
|
3375
|
+
__testClassifyWindowsShellCommand,
|
|
3376
|
+
__testCreateBashOutcomeDiagnostics,
|
|
3377
|
+
__testCreateBashPromptDiagnostic,
|
|
3054
3378
|
__testDecodeShellChunk,
|
|
3055
3379
|
__testGlobToRegExp,
|
|
3056
3380
|
__testParseBashCommandIntent,
|
package/dist/tools/prompts.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toolPrompts
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-QBA6B5OX.js";
|
|
4
|
+
import "../chunk-I3Z4OKMS.js";
|
|
5
|
+
import "../chunk-AZCQL24J.js";
|
|
6
|
+
import "../chunk-HUIZOB4A.js";
|
|
7
|
+
import "../chunk-MK3YP2VR.js";
|
|
8
|
+
import "../chunk-LGZOG7IQ.js";
|
|
4
9
|
import "../chunk-4EZHIDZ6.js";
|
|
5
10
|
import "../chunk-YR4HWOR2.js";
|
|
6
11
|
import "../chunk-VAFW24RN.js";
|
|
7
|
-
import "../chunk-LGZOG7IQ.js";
|
|
8
|
-
import "../chunk-MFHY7PBM.js";
|
|
9
|
-
import "../chunk-SZFZPQGL.js";
|
|
10
|
-
import "../chunk-XZWSO5CM.js";
|
|
11
|
-
import "../chunk-I3Z4OKMS.js";
|
|
12
12
|
import "../chunk-PS2ZOFZ6.js";
|
|
13
13
|
import "../chunk-NPKLGVDQ.js";
|
|
14
|
-
import "../chunk-TZ6QK52L.js";
|
|
15
|
-
import "../chunk-K3YDFDLP.js";
|
|
16
14
|
import "../chunk-GI5XI4HN.js";
|
|
17
|
-
import "../chunk-WEWXKRKL.js";
|
|
18
15
|
import "../chunk-A6FUAM64.js";
|
|
19
16
|
import "../chunk-YCO6C7KF.js";
|
|
17
|
+
import "../chunk-MFHY7PBM.js";
|
|
18
|
+
import "../chunk-SZFZPQGL.js";
|
|
19
|
+
import "../chunk-XZWSO5CM.js";
|
|
20
20
|
import "../chunk-ZYAEUABC.js";
|
|
21
21
|
import "../chunk-SWK6XRZQ.js";
|
|
22
|
-
import "../chunk-AZCQL24J.js";
|
|
23
|
-
import "../chunk-HUIZOB4A.js";
|
|
24
|
-
import "../chunk-MK3YP2VR.js";
|
|
25
22
|
import "../chunk-VJDLOFCF.js";
|
|
26
23
|
import "../chunk-3RP665TH.js";
|
|
27
24
|
import "../chunk-IOC3BSPT.js";
|
|
25
|
+
import "../chunk-RBHQ5WNR.js";
|
|
28
26
|
import "../chunk-HNIVNZIS.js";
|
|
27
|
+
import "../chunk-K3YDFDLP.js";
|
|
28
|
+
import "../chunk-WEWXKRKL.js";
|
|
29
29
|
import "../chunk-WLQ7DGMG.js";
|
|
30
30
|
import "../chunk-SQP6SJRP.js";
|
|
31
31
|
import "../chunk-BRG64AEC.js";
|
|
32
|
-
import "../chunk-7ZOADACP.js";
|
|
33
|
-
import "../chunk-H5OOD2OS.js";
|
|
34
|
-
import "../chunk-IQP3XE32.js";
|
|
35
32
|
import "../chunk-Z3H6SZBS.js";
|
|
36
33
|
import "../chunk-ITBZHMZQ.js";
|
|
37
34
|
import "../chunk-2U4BZXAI.js";
|
|
35
|
+
import "../chunk-7ZOADACP.js";
|
|
36
|
+
import "../chunk-H5OOD2OS.js";
|
|
37
|
+
import "../chunk-IQP3XE32.js";
|
|
38
38
|
import "../chunk-2DIXRINW.js";
|
|
39
39
|
import "../chunk-PKMIDA5A.js";
|
|
40
40
|
import "../chunk-GAWMEMXB.js";
|
package/dist/tools/ui.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toolUserFacingNames
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-PLAQPN4W.js";
|
|
4
|
+
import "../chunk-I3Z4OKMS.js";
|
|
5
|
+
import "../chunk-AZCQL24J.js";
|
|
6
|
+
import "../chunk-HUIZOB4A.js";
|
|
7
|
+
import "../chunk-MK3YP2VR.js";
|
|
8
|
+
import "../chunk-LGZOG7IQ.js";
|
|
4
9
|
import "../chunk-4EZHIDZ6.js";
|
|
5
10
|
import "../chunk-YR4HWOR2.js";
|
|
6
11
|
import "../chunk-VAFW24RN.js";
|
|
7
|
-
import "../chunk-LGZOG7IQ.js";
|
|
8
|
-
import "../chunk-MFHY7PBM.js";
|
|
9
|
-
import "../chunk-SZFZPQGL.js";
|
|
10
|
-
import "../chunk-XZWSO5CM.js";
|
|
11
|
-
import "../chunk-I3Z4OKMS.js";
|
|
12
12
|
import "../chunk-PS2ZOFZ6.js";
|
|
13
13
|
import "../chunk-NPKLGVDQ.js";
|
|
14
|
-
import "../chunk-TZ6QK52L.js";
|
|
15
|
-
import "../chunk-K3YDFDLP.js";
|
|
16
14
|
import "../chunk-GI5XI4HN.js";
|
|
17
|
-
import "../chunk-WEWXKRKL.js";
|
|
18
15
|
import "../chunk-A6FUAM64.js";
|
|
19
16
|
import "../chunk-YCO6C7KF.js";
|
|
17
|
+
import "../chunk-MFHY7PBM.js";
|
|
18
|
+
import "../chunk-SZFZPQGL.js";
|
|
19
|
+
import "../chunk-XZWSO5CM.js";
|
|
20
20
|
import "../chunk-ZYAEUABC.js";
|
|
21
21
|
import "../chunk-SWK6XRZQ.js";
|
|
22
|
-
import "../chunk-AZCQL24J.js";
|
|
23
|
-
import "../chunk-HUIZOB4A.js";
|
|
24
|
-
import "../chunk-MK3YP2VR.js";
|
|
25
22
|
import "../chunk-VJDLOFCF.js";
|
|
26
23
|
import "../chunk-3RP665TH.js";
|
|
27
24
|
import "../chunk-IOC3BSPT.js";
|
|
25
|
+
import "../chunk-RBHQ5WNR.js";
|
|
28
26
|
import "../chunk-HNIVNZIS.js";
|
|
27
|
+
import "../chunk-K3YDFDLP.js";
|
|
28
|
+
import "../chunk-WEWXKRKL.js";
|
|
29
29
|
import "../chunk-WLQ7DGMG.js";
|
|
30
30
|
import "../chunk-SQP6SJRP.js";
|
|
31
31
|
import "../chunk-BRG64AEC.js";
|
|
32
|
-
import "../chunk-7ZOADACP.js";
|
|
33
|
-
import "../chunk-H5OOD2OS.js";
|
|
34
|
-
import "../chunk-IQP3XE32.js";
|
|
35
32
|
import "../chunk-Z3H6SZBS.js";
|
|
36
33
|
import "../chunk-ITBZHMZQ.js";
|
|
37
34
|
import "../chunk-2U4BZXAI.js";
|
|
35
|
+
import "../chunk-7ZOADACP.js";
|
|
36
|
+
import "../chunk-H5OOD2OS.js";
|
|
37
|
+
import "../chunk-IQP3XE32.js";
|
|
38
38
|
import "../chunk-2DIXRINW.js";
|
|
39
39
|
import "../chunk-PKMIDA5A.js";
|
|
40
40
|
import "../chunk-GAWMEMXB.js";
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
userFacingName
|
|
3
|
-
} from "./chunk-K3YDFDLP.js";
|
|
4
1
|
import {
|
|
5
2
|
prompt
|
|
6
3
|
} from "./chunk-HNIVNZIS.js";
|
|
4
|
+
import {
|
|
5
|
+
userFacingName
|
|
6
|
+
} from "./chunk-K3YDFDLP.js";
|
|
7
7
|
|
|
8
8
|
// src/tools/Read/ReadTool.ts
|
|
9
9
|
var ReadTool = { name: "Read", prompt, userFacingName };
|