vcode-cli 1.0.2 → 1.0.4

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.
@@ -44,13 +44,18 @@ export async function start(opts = {}) {
44
44
  const serverScript = path.join(process.cwd(), 'lib', 'server.js');
45
45
  const serverExists = fs.existsSync(serverScript);
46
46
 
47
+ const globalLibDir = path.join(path.dirname(process.execPath), '..', 'lib', 'node_modules', 'vcode-cli');
48
+ const globalServerScript = path.join(globalLibDir, 'lib', 'server.js');
49
+ const finalServerScript = serverExists ? serverScript : (fs.existsSync(globalServerScript) ? globalServerScript : null);
50
+
47
51
  // Start the WebSocket server automatically if not already running
48
52
  let serverProcess = null;
49
53
 
50
- if (autoStartServer && serverExists) {
54
+ if (autoStartServer && finalServerScript) {
55
+ console.log(chalk.gray(` Server script: ${finalServerScript}`));
51
56
  console.log(chalk.gray(' Starting V Code WebSocket server...'));
52
57
 
53
- serverProcess = spawn('node', [serverScript], {
58
+ serverProcess = spawn('node', [finalServerScript], {
54
59
  stdio: 'inherit',
55
60
  detached: false
56
61
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vcode-cli",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "type": "module",
5
5
  "description": "Connect your local machine to Vynthen V Code — a powerful AI code agent with full system control, secure keychain auth, and human-in-the-loop permissions.",
6
6
  "main": "bin/vcode.js",