@softerist/heuristic-mcp 2.1.42 → 2.1.43

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.
@@ -4,7 +4,6 @@ import util from 'util';
4
4
  import path from 'path';
5
5
  import os from 'os';
6
6
  import fs from 'fs/promises';
7
- import { fileURLToPath } from 'url';
8
7
 
9
8
  const execPromise = util.promisify(exec);
10
9
 
@@ -87,21 +86,6 @@ function getGlobalCacheDir() {
87
86
  return process.env.XDG_CACHE_HOME || path.join(os.homedir(), '.cache');
88
87
  }
89
88
 
90
- function quoteArg(value) {
91
- const safe = value ? String(value).replace(/"/g, '\\"') : '';
92
- return `"${safe}"`;
93
- }
94
-
95
- function buildConsoleCommand(workspaceDir = null) {
96
- const nodeBin = process.execPath;
97
- const scriptPath = fileURLToPath(new URL('../index.js', import.meta.url));
98
- const workspace = workspaceDir || process.cwd();
99
- const envPrefix = process.platform === 'win32'
100
- ? 'set SMART_CODING_VERBOSE=true &&'
101
- : 'SMART_CODING_VERBOSE=true';
102
- return `${envPrefix} ${quoteArg(nodeBin)} ${quoteArg(scriptPath)} --workspace ${quoteArg(workspace)}`;
103
- }
104
-
105
89
  export async function status() {
106
90
  try {
107
91
  const home = os.homedir();
@@ -274,8 +258,3 @@ export async function status() {
274
258
  console.error(`[Lifecycle] Failed to check status: ${error.message}`);
275
259
  }
276
260
  }
277
-
278
- export async function logs() {
279
- console.log(`[Logs] Console logs: ${buildConsoleCommand()}`);
280
- await status();
281
- }
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
- import { stop, start, status, logs } from "./features/lifecycle.js";
3
+ import { stop, start, status } from "./features/lifecycle.js";
4
4
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
5
5
  import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
6
6
  import { pipeline } from "@xenova/transformers";
@@ -36,7 +36,13 @@ try {
36
36
 
37
37
 
38
38
  // Parse workspace from command line arguments
39
- const args = process.argv.slice(2);
39
+ let args = process.argv.slice(2);
40
+ const hadLogs = args.includes('--logs');
41
+ if (hadLogs) {
42
+ process.env.SMART_CODING_VERBOSE = 'true';
43
+ args = args.filter(arg => arg !== '--logs');
44
+ console.log('[Logs] Starting server with verbose console output (Ctrl+C to stop)...');
45
+ }
40
46
 
41
47
  if (args.includes('--stop')) {
42
48
  await stop();
@@ -53,10 +59,6 @@ if (args.includes('--status')) {
53
59
  process.exit(0);
54
60
  }
55
61
 
56
- if (args.includes('--logs')) {
57
- await logs();
58
- process.exit(0);
59
- }
60
62
 
61
63
  // Check if --register flag is present
62
64
  if (args.includes('--register')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softerist/heuristic-mcp",
3
- "version": "2.1.42",
3
+ "version": "2.1.43",
4
4
  "description": "An enhanced MCP server providing intelligent semantic code search with find-similar-code, recency ranking, and improved chunking. Fork of smart-coding-mcp.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "repository": {
42
42
  "type": "git",
43
- "url": "https://github.com/softerist/heuristic-mcp"
43
+ "url": "git+https://github.com/softerist/heuristic-mcp.git"
44
44
  },
45
45
  "homepage": "https://github.com/softerist/heuristic-mcp#readme",
46
46
  "license": "MIT",