@n0zer0d4y/vulcan-file-ops 1.2.5 → 1.2.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/cli.js CHANGED
@@ -6,8 +6,14 @@
6
6
  // EXCEPTION: --help and --version flags should always output to console
7
7
  // even when stdin/stdout are piped (e.g., in scripts or CI environments)
8
8
  const isHelpOrVersion = process.argv.some((arg) => arg === "--help" || arg === "-h" || arg === "--version" || arg === "-v");
9
+ // MCP mode detection: suppress console if ANY of these are true:
10
+ // 1. stdin is piped/redirected (not a TTY) - MCP clients pipe JSON-RPC via stdin
11
+ // 2. stdout is piped/redirected (not a TTY) - MCP clients read JSON-RPC from stdout
12
+ // 3. argv contains "mcp" or "stdio" - explicit MCP mode indicator
13
+ // Using OR (||) instead of AND (&&) because MCP clients may only pipe one direction
9
14
  const isMCP = !isHelpOrVersion &&
10
- ((!process.stdin.isTTY && !process.stdout.isTTY) ||
15
+ (!process.stdin.isTTY ||
16
+ !process.stdout.isTTY ||
11
17
  process.argv.some((arg) => arg.includes("mcp") || arg.includes("stdio")));
12
18
  if (isMCP) {
13
19
  // Suppress all console methods (but NOT stdout/stderr streams - MCP SDK needs those)
@@ -8,8 +8,14 @@
8
8
  // See: RCA-Claude-Desktop-MCP-Toggle-Failure-2026-01-31.md
9
9
  // Check for CLI info flags BEFORE suppression - these should always work
10
10
  const _isHelpOrVersion = process.argv.some((arg) => arg === "--help" || arg === "-h" || arg === "--version" || arg === "-v");
11
+ // MCP mode detection: suppress console if ANY of these are true:
12
+ // 1. stdin is piped/redirected (not a TTY) - MCP clients pipe JSON-RPC via stdin
13
+ // 2. stdout is piped/redirected (not a TTY) - MCP clients read JSON-RPC from stdout
14
+ // 3. argv contains "mcp" or "stdio" - explicit MCP mode indicator
15
+ // Using OR (||) instead of AND (&&) because MCP clients may only pipe one direction
11
16
  const _mcpMode = !_isHelpOrVersion &&
12
- ((!process.stdin.isTTY && !process.stdout.isTTY) ||
17
+ (!process.stdin.isTTY ||
18
+ !process.stdout.isTTY ||
13
19
  process.argv.some((arg) => arg.includes("mcp") || arg.includes("stdio")));
14
20
  if (_mcpMode) {
15
21
  const noop = () => { };
@@ -341,7 +347,8 @@ async function initializeDirectories() {
341
347
  // Priority 2: Load from .env file
342
348
  try {
343
349
  const envPath = path.join(process.cwd(), ".env");
344
- dotenv.config({ path: envPath });
350
+ // CRITICAL: quiet: true prevents dotenv from logging to stdout which corrupts MCP JSON-RPC
351
+ dotenv.config({ path: envPath, quiet: true });
345
352
  if (process.env.APPROVED_COMMANDS) {
346
353
  finalApprovedCommands = process.env.APPROVED_COMMANDS.split(",")
347
354
  .map((c) => c.trim())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@n0zer0d4y/vulcan-file-ops",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "mcpName": "io.github.n0zer0d4y/vulcan-file-ops",
5
5
  "description": "MCP server for AI assistants: read, write, edit, and manage files securely on local filesystem.",
6
6
  "license": "MIT",
@@ -65,7 +65,7 @@
65
65
  "lint": "npm run lint:json"
66
66
  },
67
67
  "dependencies": {
68
- "@modelcontextprotocol/sdk": "^1.25.2",
68
+ "@modelcontextprotocol/sdk": "1.20.0",
69
69
  "@turbodocx/html-to-docx": "^1.16.0",
70
70
  "diff": "^8.0.3",
71
71
  "docx": "^9.5.1",