@baitong-dev/bash-mcp 0.0.4 → 0.0.5
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/bash.js +2 -2
- package/dist/index.js +10 -4
- package/package.json +2 -2
package/dist/bash.js
CHANGED
|
@@ -196,7 +196,7 @@ async function executeBash(options) {
|
|
|
196
196
|
})) {
|
|
197
197
|
throw Error(`"${cwd}" must be in ${DEFAULT_CWD}`);
|
|
198
198
|
}
|
|
199
|
-
if (!(
|
|
199
|
+
if (!(0, mcp_helpers_1.isDirectory)(cwd)) {
|
|
200
200
|
throw Error(`"${cwd}" must be a directory`);
|
|
201
201
|
}
|
|
202
202
|
const tree = await parser().then(p => p.parse(command));
|
|
@@ -245,7 +245,7 @@ async function executeBash(options) {
|
|
|
245
245
|
? (0, mcp_helpers_1.gitBashToWindowsPath)(resolved)
|
|
246
246
|
: resolved;
|
|
247
247
|
if (!(0, mcp_helpers_1.isSubdirectory)(DEFAULT_CWD, normalized, { includeSelf: true })) {
|
|
248
|
-
const dir = (
|
|
248
|
+
const dir = (0, mcp_helpers_1.isDirectory)(normalized) ? normalized : path_1.default.dirname(normalized);
|
|
249
249
|
directories.add(dir);
|
|
250
250
|
}
|
|
251
251
|
}
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ const bash_1 = require("./bash");
|
|
|
8
8
|
const grep_1 = require("./grep");
|
|
9
9
|
const glob_1 = require("./glob");
|
|
10
10
|
const MCP_NAME = 'Bash MCP';
|
|
11
|
-
const MCP_VERSION = '0.0.
|
|
11
|
+
const MCP_VERSION = '0.0.5';
|
|
12
12
|
const server = new mcp_js_1.McpServer({
|
|
13
13
|
name: MCP_NAME,
|
|
14
14
|
version: MCP_VERSION
|
|
@@ -21,6 +21,12 @@ const server = new mcp_js_1.McpServer({
|
|
|
21
21
|
(0, ls_1.registerLsTool)(server);
|
|
22
22
|
(0, glob_1.registerGlobTool)(server);
|
|
23
23
|
(0, grep_1.registerGrepTool)(server);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
async function main() {
|
|
25
|
+
const transport = new stdio_js_1.StdioServerTransport();
|
|
26
|
+
await server.connect(transport);
|
|
27
|
+
console.error(`${MCP_NAME} Server v${MCP_VERSION} running`);
|
|
28
|
+
}
|
|
29
|
+
main().catch(error => {
|
|
30
|
+
console.error('Fatal error in main():', error);
|
|
31
|
+
process.exit(1);
|
|
32
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baitong-dev/bash-mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"bin": {
|
|
6
6
|
"@baitong-dev/bash-mcp": "./dist/index.js"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"tree-sitter-bash": "^0.25.1",
|
|
22
22
|
"web-tree-sitter": "^0.26.5",
|
|
23
23
|
"zod": "^4.3.4",
|
|
24
|
-
"@baitong-dev/mcp-helpers": "0.0.
|
|
24
|
+
"@baitong-dev/mcp-helpers": "0.0.5"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"typescript": "^5.9.2"
|