vibe-annotations-server 0.1.4 → 0.1.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.
Files changed (2) hide show
  1. package/index.js +16 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -24,8 +24,9 @@ function log(message, color = '') {
24
24
 
25
25
  function checkIfInstalled() {
26
26
  try {
27
- execSync(`which ${COMMAND_NAME}`, { stdio: 'ignore' });
28
- return true;
27
+ // Check if globally installed via npm
28
+ const output = execSync('npm list -g --depth=0 --parseable', { encoding: 'utf8' });
29
+ return output.includes('vibe-annotations-server');
29
30
  } catch {
30
31
  return false;
31
32
  }
@@ -94,7 +95,19 @@ function uninstallServer() {
94
95
  let childProcess = null;
95
96
 
96
97
  function runCommand(args) {
97
- childProcess = spawn(COMMAND_NAME, args, { stdio: 'inherit' });
98
+ // Use global npm bin path to ensure we run the globally installed version
99
+ let command = COMMAND_NAME;
100
+ try {
101
+ const globalBin = execSync('npm bin -g', { encoding: 'utf8' }).trim();
102
+ const globalCommand = `${globalBin}/${COMMAND_NAME}`;
103
+ if (require('fs').existsSync(globalCommand)) {
104
+ command = globalCommand;
105
+ }
106
+ } catch {
107
+ // Fallback to command name in PATH
108
+ }
109
+
110
+ childProcess = spawn(command, args, { stdio: 'inherit' });
98
111
 
99
112
  childProcess.on('error', (error) => {
100
113
  if (error.code === 'ENOENT') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibe-annotations-server",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "MCP server for Vibe Annotations - AI-powered localhost development feedback",
5
5
  "main": "index.js",
6
6
  "bin": {