@linghun/tools 0.1.6 → 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-24USSE7U.js → chunk-PLAQPN4W.js} +10 -10
- package/dist/{chunk-VVRFYPMG.js → chunk-QBA6B5OX.js} +10 -10
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +304 -54
- package/dist/tools/Read/ReadTool.js +2 -2
- package/dist/tools/Todo/TodoTool.js +2 -2
- package/dist/tools/prompts.js +12 -12
- package/dist/tools/ui.js +12 -12
- package/package.json +1 -1
- package/dist/{chunk-4567YAXM.js → chunk-MFHY7PBM.js} +3 -3
- package/dist/{chunk-TZ6QK52L.js → chunk-RBHQ5WNR.js} +3 -3
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
WriteTool
|
|
3
|
+
} from "./chunk-I3Z4OKMS.js";
|
|
4
|
+
import {
|
|
5
|
+
GrepTool
|
|
6
|
+
} from "./chunk-AZCQL24J.js";
|
|
1
7
|
import {
|
|
2
8
|
WebFetchTool
|
|
3
9
|
} from "./chunk-LGZOG7IQ.js";
|
|
4
10
|
import {
|
|
5
11
|
WebSearchTool
|
|
6
12
|
} from "./chunk-4EZHIDZ6.js";
|
|
7
|
-
import {
|
|
8
|
-
WriteTool
|
|
9
|
-
} from "./chunk-I3Z4OKMS.js";
|
|
10
|
-
import {
|
|
11
|
-
ReadTool
|
|
12
|
-
} from "./chunk-TZ6QK52L.js";
|
|
13
13
|
import {
|
|
14
14
|
ReadSnippetsTool
|
|
15
15
|
} from "./chunk-GI5XI4HN.js";
|
|
@@ -18,13 +18,13 @@ import {
|
|
|
18
18
|
} from "./chunk-A6FUAM64.js";
|
|
19
19
|
import {
|
|
20
20
|
TodoTool
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import {
|
|
23
|
-
GrepTool
|
|
24
|
-
} from "./chunk-AZCQL24J.js";
|
|
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";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
WriteTool
|
|
3
|
+
} from "./chunk-I3Z4OKMS.js";
|
|
4
|
+
import {
|
|
5
|
+
GrepTool
|
|
6
|
+
} from "./chunk-AZCQL24J.js";
|
|
1
7
|
import {
|
|
2
8
|
WebFetchTool
|
|
3
9
|
} from "./chunk-LGZOG7IQ.js";
|
|
4
10
|
import {
|
|
5
11
|
WebSearchTool
|
|
6
12
|
} from "./chunk-4EZHIDZ6.js";
|
|
7
|
-
import {
|
|
8
|
-
WriteTool
|
|
9
|
-
} from "./chunk-I3Z4OKMS.js";
|
|
10
|
-
import {
|
|
11
|
-
ReadTool
|
|
12
|
-
} from "./chunk-TZ6QK52L.js";
|
|
13
13
|
import {
|
|
14
14
|
ReadSnippetsTool
|
|
15
15
|
} from "./chunk-GI5XI4HN.js";
|
|
@@ -18,13 +18,13 @@ import {
|
|
|
18
18
|
} from "./chunk-A6FUAM64.js";
|
|
19
19
|
import {
|
|
20
20
|
TodoTool
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import {
|
|
23
|
-
GrepTool
|
|
24
|
-
} from "./chunk-AZCQL24J.js";
|
|
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";
|
package/dist/index.d.ts
CHANGED
|
@@ -169,6 +169,16 @@ export type BashInput = {
|
|
|
169
169
|
runInBackground?: boolean;
|
|
170
170
|
run_in_background?: boolean;
|
|
171
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
|
+
};
|
|
172
182
|
export type TodoInput = {
|
|
173
183
|
action: "list";
|
|
174
184
|
} | {
|
|
@@ -241,6 +251,18 @@ type ShellCommandAdapter = {
|
|
|
241
251
|
adapter: "native" | "powershell-adapted" | "blocked";
|
|
242
252
|
logCommand?: string;
|
|
243
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;
|
|
244
266
|
export declare function adaptShellCommand(command: string): ShellCommandAdapter;
|
|
245
267
|
export declare function adaptShellCommandForPlatform(command: string, platform: NodeJS.Platform): ShellCommandAdapter;
|
|
246
268
|
declare function globToRegExp(pattern: string): RegExp;
|
package/dist/index.d.ts.map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AAC;CACrD,CAAC;AAEF,iBAAe,iBAAiB,CAAC,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8K9E;AAED,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAgB/C;AA8HD,eAAO,MAAM,kBAAkB,qBAAe,CAAC;AAC/C,eAAO,MAAM,sBAAsB,yBAAmB,CAAC;AACvD,eAAO,MAAM,4BAA4B,+BAAyB,CAAC;AACnE,eAAO,MAAM,iCAAiC,oCAA8B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,eAAO,MAAM,uBAAuB,0BAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -15,35 +15,35 @@ import {
|
|
|
15
15
|
} from "./chunk-MMJX44V6.js";
|
|
16
16
|
import {
|
|
17
17
|
toolPrompts
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-QBA6B5OX.js";
|
|
19
19
|
import {
|
|
20
20
|
toolUserFacingNames
|
|
21
|
-
} 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";
|
|
22
26
|
import "./chunk-LGZOG7IQ.js";
|
|
23
|
-
import "./chunk-ZYAEUABC.js";
|
|
24
|
-
import "./chunk-SWK6XRZQ.js";
|
|
25
27
|
import "./chunk-4EZHIDZ6.js";
|
|
26
28
|
import "./chunk-YR4HWOR2.js";
|
|
27
29
|
import "./chunk-VAFW24RN.js";
|
|
28
|
-
import "./chunk-I3Z4OKMS.js";
|
|
29
30
|
import "./chunk-PS2ZOFZ6.js";
|
|
30
31
|
import "./chunk-NPKLGVDQ.js";
|
|
31
|
-
import "./chunk-TZ6QK52L.js";
|
|
32
|
-
import "./chunk-K3YDFDLP.js";
|
|
33
32
|
import "./chunk-GI5XI4HN.js";
|
|
34
|
-
import "./chunk-WEWXKRKL.js";
|
|
35
33
|
import "./chunk-A6FUAM64.js";
|
|
36
34
|
import "./chunk-YCO6C7KF.js";
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-XZWSO5CM.js";
|
|
35
|
+
import "./chunk-MFHY7PBM.js";
|
|
39
36
|
import "./chunk-SZFZPQGL.js";
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-XZWSO5CM.js";
|
|
38
|
+
import "./chunk-ZYAEUABC.js";
|
|
39
|
+
import "./chunk-SWK6XRZQ.js";
|
|
43
40
|
import "./chunk-VJDLOFCF.js";
|
|
44
41
|
import "./chunk-3RP665TH.js";
|
|
45
42
|
import "./chunk-IOC3BSPT.js";
|
|
43
|
+
import "./chunk-RBHQ5WNR.js";
|
|
46
44
|
import "./chunk-HNIVNZIS.js";
|
|
45
|
+
import "./chunk-K3YDFDLP.js";
|
|
46
|
+
import "./chunk-WEWXKRKL.js";
|
|
47
47
|
import "./chunk-WLQ7DGMG.js";
|
|
48
48
|
import "./chunk-SQP6SJRP.js";
|
|
49
49
|
import "./chunk-BRG64AEC.js";
|
|
@@ -1079,10 +1079,11 @@ outputPath: ${fullOutputPath}`,
|
|
|
1079
1079
|
[`$ ${sanitizeSecrets(commandForLog)}`, ...adapterLines],
|
|
1080
1080
|
context.abortSignal,
|
|
1081
1081
|
(stream, text) => void context.onProgress?.({ toolName: "Bash", stream, text }),
|
|
1082
|
-
context.trackChildProcess
|
|
1082
|
+
context.trackChildProcess,
|
|
1083
|
+
createBashNoOutputHint(input.command)
|
|
1083
1084
|
);
|
|
1084
1085
|
const cmdInterpretation = interpretCommandResult(input.command, result.exitCode);
|
|
1085
|
-
const diagnostics = createBashOutcomeDiagnostics(result.outcome);
|
|
1086
|
+
const diagnostics = createBashOutcomeDiagnostics(input.command, result.outcome);
|
|
1086
1087
|
const trailerLines = [
|
|
1087
1088
|
"",
|
|
1088
1089
|
`exit code ${result.exitCode}`,
|
|
@@ -1644,53 +1645,251 @@ function isHeadlessBenchContext(context) {
|
|
|
1644
1645
|
const record = context;
|
|
1645
1646
|
return record.headlessBench?.enabled === true || record.isHeadlessBench === true;
|
|
1646
1647
|
}
|
|
1647
|
-
function createBashOutcomeDiagnostics(outcome) {
|
|
1648
|
-
if (outcome
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
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;
|
|
1657
1666
|
}
|
|
1658
|
-
return
|
|
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;
|
|
1678
|
+
}
|
|
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";
|
|
1659
1680
|
}
|
|
1660
1681
|
function tailLines(text, limit) {
|
|
1661
1682
|
const lines = text.split(/\r?\n/u);
|
|
1662
1683
|
return lines.slice(Math.max(0, lines.length - limit));
|
|
1663
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
|
+
}
|
|
1664
1694
|
function adaptShellCommand(command) {
|
|
1665
1695
|
return adaptShellCommandForPlatform(command, process.platform);
|
|
1666
1696
|
}
|
|
1667
1697
|
function adaptShellCommandForPlatform(command, platform) {
|
|
1668
1698
|
if (platform !== "win32") return { command, adapter: "native" };
|
|
1669
1699
|
if (isExplicitPowerShellCommand(command)) return { command, adapter: "native" };
|
|
1670
|
-
const
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
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(
|
|
1678
1742
|
"Unsupported multi-line Unix shell syntax on Windows PowerShell; use PowerShell-safe commands or Node one-liners."
|
|
1679
|
-
)
|
|
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)
|
|
1680
1769
|
}
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
const
|
|
1684
|
-
|
|
1685
|
-
const
|
|
1686
|
-
|
|
1687
|
-
if (
|
|
1688
|
-
|
|
1689
|
-
|
|
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
|
+
};
|
|
1690
1789
|
}
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
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;
|
|
1694
1893
|
}
|
|
1695
1894
|
function isExplicitPowerShellCommand(command) {
|
|
1696
1895
|
return /^(?:powershell(?:\.exe)?|pwsh(?:\.exe)?)\b/iu.test(command.trim());
|
|
@@ -2614,9 +2813,8 @@ async function runRipgrep(args, context, limit, mapLine = (line) => line) {
|
|
|
2614
2813
|
context.abortSignal?.removeEventListener("abort", abort);
|
|
2615
2814
|
resolvePromise(value);
|
|
2616
2815
|
};
|
|
2617
|
-
child.stdout.setEncoding("utf8");
|
|
2618
2816
|
child.stdout.on("data", (chunk) => {
|
|
2619
|
-
pending += chunk;
|
|
2817
|
+
pending += decodeShellChunk(chunk);
|
|
2620
2818
|
const parts = pending.split(/\r?\n/u);
|
|
2621
2819
|
pending = parts.pop() ?? "";
|
|
2622
2820
|
for (const line of parts) {
|
|
@@ -2631,9 +2829,8 @@ async function runRipgrep(args, context, limit, mapLine = (line) => line) {
|
|
|
2631
2829
|
}
|
|
2632
2830
|
}
|
|
2633
2831
|
});
|
|
2634
|
-
child.stderr.setEncoding("utf8");
|
|
2635
2832
|
child.stderr.on("data", (chunk) => {
|
|
2636
|
-
stderr += chunk;
|
|
2833
|
+
stderr += decodeShellChunk(chunk);
|
|
2637
2834
|
});
|
|
2638
2835
|
child.on("error", () => finish(null));
|
|
2639
2836
|
child.on("close", (code) => {
|
|
@@ -2668,7 +2865,7 @@ function globToRegExp(pattern) {
|
|
|
2668
2865
|
}
|
|
2669
2866
|
return new RegExp(result);
|
|
2670
2867
|
}
|
|
2671
|
-
function runShell(command, cwd, timeoutMs, fullOutputPath, headerLines, signal, onProgress, trackChildProcess) {
|
|
2868
|
+
function runShell(command, cwd, timeoutMs, fullOutputPath, headerLines, signal, onProgress, trackChildProcess, noOutputHint) {
|
|
2672
2869
|
return new Promise((resolvePromise) => {
|
|
2673
2870
|
const detached = process.platform !== "win32";
|
|
2674
2871
|
const child = spawn(command, { cwd, shell: true, windowsHide: true, detached });
|
|
@@ -2696,6 +2893,9 @@ function runShell(command, cwd, timeoutMs, fullOutputPath, headerLines, signal,
|
|
|
2696
2893
|
};
|
|
2697
2894
|
let settled = false;
|
|
2698
2895
|
let forcedKillTimer;
|
|
2896
|
+
let heartbeatTimer;
|
|
2897
|
+
let lastOutputTime = Date.now();
|
|
2898
|
+
const heartbeatMs = getForegroundBashHeartbeatMs();
|
|
2699
2899
|
let stoppingOutcome;
|
|
2700
2900
|
let childClosed = false;
|
|
2701
2901
|
const finish = (exitCode, outcome = "completed") => {
|
|
@@ -2704,6 +2904,9 @@ function runShell(command, cwd, timeoutMs, fullOutputPath, headerLines, signal,
|
|
|
2704
2904
|
}
|
|
2705
2905
|
settled = true;
|
|
2706
2906
|
clearTimeout(timer);
|
|
2907
|
+
if (heartbeatTimer) {
|
|
2908
|
+
clearTimeout(heartbeatTimer);
|
|
2909
|
+
}
|
|
2707
2910
|
if (forcedKillTimer && outcome === "completed") {
|
|
2708
2911
|
clearTimeout(forcedKillTimer);
|
|
2709
2912
|
}
|
|
@@ -2777,13 +2980,37 @@ function runShell(command, cwd, timeoutMs, fullOutputPath, headerLines, signal,
|
|
|
2777
2980
|
return;
|
|
2778
2981
|
}
|
|
2779
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();
|
|
2780
3005
|
child.stdout.on("data", (chunk) => {
|
|
2781
3006
|
const text = decodeShellChunk(chunk);
|
|
3007
|
+
markOutput();
|
|
2782
3008
|
appendSanitizedChunk(text, true);
|
|
2783
3009
|
onProgress?.("stdout", text);
|
|
2784
3010
|
});
|
|
2785
3011
|
child.stderr.on("data", (chunk) => {
|
|
2786
3012
|
const text = decodeShellChunk(chunk);
|
|
3013
|
+
markOutput();
|
|
2787
3014
|
appendSanitizedChunk(text, true);
|
|
2788
3015
|
onProgress?.("stderr", text);
|
|
2789
3016
|
});
|
|
@@ -2802,6 +3029,7 @@ function runShell(command, cwd, timeoutMs, fullOutputPath, headerLines, signal,
|
|
|
2802
3029
|
});
|
|
2803
3030
|
}
|
|
2804
3031
|
var STALL_THRESHOLD_MS = 45e3;
|
|
3032
|
+
var DEFAULT_FOREGROUND_BASH_HEARTBEAT_MS = 3e4;
|
|
2805
3033
|
var PROMPT_PATTERNS = [
|
|
2806
3034
|
/\(y\/n\)\s*$/i,
|
|
2807
3035
|
/\[y\/n\]\s*$/i,
|
|
@@ -2813,10 +3041,25 @@ var PROMPT_PATTERNS = [
|
|
|
2813
3041
|
/passphrase[:\s]*$/i,
|
|
2814
3042
|
/\?\s*$/
|
|
2815
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
|
+
}
|
|
2816
3050
|
function looksLikePrompt(tail) {
|
|
2817
3051
|
const lastLine = tail.split(/\r?\n/).filter(Boolean).pop() ?? "";
|
|
2818
3052
|
return PROMPT_PATTERNS.some((re) => re.test(lastLine));
|
|
2819
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
|
+
}
|
|
2820
3063
|
async function runBackgroundBash(opts) {
|
|
2821
3064
|
const {
|
|
2822
3065
|
taskId,
|
|
@@ -2892,8 +3135,12 @@ async function runBackgroundBash(opts) {
|
|
|
2892
3135
|
stallTimer = setTimeout(checkStall, STALL_THRESHOLD_MS);
|
|
2893
3136
|
};
|
|
2894
3137
|
const checkStall = () => {
|
|
2895
|
-
if (Date.now() - lastOutputTime >= STALL_THRESHOLD_MS
|
|
2896
|
-
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
|
+
`;
|
|
2897
3144
|
fileStream.write(msg);
|
|
2898
3145
|
onProgress?.("system", msg);
|
|
2899
3146
|
}
|
|
@@ -3125,6 +3372,9 @@ var __testCanSafelyAliasPythonCommand = canSafelyAliasPythonCommand;
|
|
|
3125
3372
|
var __testRunBackgroundBash = runBackgroundBash;
|
|
3126
3373
|
export {
|
|
3127
3374
|
__testCanSafelyAliasPythonCommand,
|
|
3375
|
+
__testClassifyWindowsShellCommand,
|
|
3376
|
+
__testCreateBashOutcomeDiagnostics,
|
|
3377
|
+
__testCreateBashPromptDiagnostic,
|
|
3128
3378
|
__testDecodeShellChunk,
|
|
3129
3379
|
__testGlobToRegExp,
|
|
3130
3380
|
__testParseBashCommandIntent,
|
package/dist/tools/prompts.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
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";
|
|
4
8
|
import "../chunk-LGZOG7IQ.js";
|
|
5
|
-
import "../chunk-ZYAEUABC.js";
|
|
6
|
-
import "../chunk-SWK6XRZQ.js";
|
|
7
9
|
import "../chunk-4EZHIDZ6.js";
|
|
8
10
|
import "../chunk-YR4HWOR2.js";
|
|
9
11
|
import "../chunk-VAFW24RN.js";
|
|
10
|
-
import "../chunk-I3Z4OKMS.js";
|
|
11
12
|
import "../chunk-PS2ZOFZ6.js";
|
|
12
13
|
import "../chunk-NPKLGVDQ.js";
|
|
13
|
-
import "../chunk-TZ6QK52L.js";
|
|
14
|
-
import "../chunk-K3YDFDLP.js";
|
|
15
14
|
import "../chunk-GI5XI4HN.js";
|
|
16
|
-
import "../chunk-WEWXKRKL.js";
|
|
17
15
|
import "../chunk-A6FUAM64.js";
|
|
18
16
|
import "../chunk-YCO6C7KF.js";
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-XZWSO5CM.js";
|
|
17
|
+
import "../chunk-MFHY7PBM.js";
|
|
21
18
|
import "../chunk-SZFZPQGL.js";
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-XZWSO5CM.js";
|
|
20
|
+
import "../chunk-ZYAEUABC.js";
|
|
21
|
+
import "../chunk-SWK6XRZQ.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";
|
package/dist/tools/ui.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
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";
|
|
4
8
|
import "../chunk-LGZOG7IQ.js";
|
|
5
|
-
import "../chunk-ZYAEUABC.js";
|
|
6
|
-
import "../chunk-SWK6XRZQ.js";
|
|
7
9
|
import "../chunk-4EZHIDZ6.js";
|
|
8
10
|
import "../chunk-YR4HWOR2.js";
|
|
9
11
|
import "../chunk-VAFW24RN.js";
|
|
10
|
-
import "../chunk-I3Z4OKMS.js";
|
|
11
12
|
import "../chunk-PS2ZOFZ6.js";
|
|
12
13
|
import "../chunk-NPKLGVDQ.js";
|
|
13
|
-
import "../chunk-TZ6QK52L.js";
|
|
14
|
-
import "../chunk-K3YDFDLP.js";
|
|
15
14
|
import "../chunk-GI5XI4HN.js";
|
|
16
|
-
import "../chunk-WEWXKRKL.js";
|
|
17
15
|
import "../chunk-A6FUAM64.js";
|
|
18
16
|
import "../chunk-YCO6C7KF.js";
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-XZWSO5CM.js";
|
|
17
|
+
import "../chunk-MFHY7PBM.js";
|
|
21
18
|
import "../chunk-SZFZPQGL.js";
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-XZWSO5CM.js";
|
|
20
|
+
import "../chunk-ZYAEUABC.js";
|
|
21
|
+
import "../chunk-SWK6XRZQ.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";
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
userFacingName
|
|
3
|
-
} from "./chunk-XZWSO5CM.js";
|
|
4
1
|
import {
|
|
5
2
|
prompt
|
|
6
3
|
} from "./chunk-SZFZPQGL.js";
|
|
4
|
+
import {
|
|
5
|
+
userFacingName
|
|
6
|
+
} from "./chunk-XZWSO5CM.js";
|
|
7
7
|
|
|
8
8
|
// src/tools/Todo/TodoTool.ts
|
|
9
9
|
var TodoTool = { name: "Todo", prompt, userFacingName };
|
|
@@ -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 };
|