vibe-annotations-server 0.1.5 → 0.1.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/package.json CHANGED
@@ -1,38 +1,57 @@
1
1
  {
2
2
  "name": "vibe-annotations-server",
3
- "version": "0.1.5",
4
- "description": "MCP server for Vibe Annotations - AI-powered localhost development feedback",
5
- "main": "index.js",
3
+ "version": "0.1.7",
4
+ "description": "Global MCP server for Vibe Annotations browser extension",
5
+ "main": "lib/server.js",
6
+ "type": "module",
6
7
  "bin": {
7
- "vibe-annotations-server": "./index.js"
8
+ "vibe-annotations-server": "./bin/cli.js"
8
9
  },
10
+ "files": [
11
+ "bin/",
12
+ "lib/",
13
+ "README.md"
14
+ ],
9
15
  "scripts": {
10
- "test": "node index.js --version"
16
+ "start": "node lib/server.js",
17
+ "dev": "node --watch lib/server.js",
18
+ "prepublishOnly": "npm test",
19
+ "test": "echo \"No tests specified\" && exit 0"
11
20
  },
12
21
  "keywords": [
13
22
  "mcp",
14
- "model-context-protocol",
23
+ "vibe",
15
24
  "annotations",
25
+ "sse",
26
+ "http",
27
+ "claude-code",
16
28
  "localhost",
17
- "development",
18
- "ai-tools",
19
- "claude",
20
- "cursor",
21
- "windsurf",
22
- "chrome-extension"
29
+ "development"
23
30
  ],
24
31
  "author": "Raphaël Régnier",
25
32
  "license": "MIT",
33
+ "engines": {
34
+ "node": ">=18.0.0"
35
+ },
36
+ "dependencies": {
37
+ "@modelcontextprotocol/sdk": "^1.0.0",
38
+ "chalk": "^5.3.0",
39
+ "commander": "^11.1.0",
40
+ "cors": "^2.8.5",
41
+ "express": "^4.18.2",
42
+ "node-persist": "^3.1.3",
43
+ "vibe-annotations-server": "^0.1.6"
44
+ },
26
45
  "repository": {
27
46
  "type": "git",
28
- "url": "git+https://github.com/RaphaelRegnier/vibe-annotations-server.git"
47
+ "url": "git+https://github.com/RaphaelRegnier/vibe-annotations.git",
48
+ "directory": "annotations-server"
29
49
  },
50
+ "homepage": "https://github.com/RaphaelRegnier/vibe-annotations#readme",
30
51
  "bugs": {
31
52
  "url": "https://github.com/RaphaelRegnier/vibe-annotations/issues"
32
53
  },
33
- "homepage": "https://github.com/RaphaelRegnier/vibe-annotations",
34
- "engines": {
35
- "node": ">=14.0.0"
36
- },
37
- "preferGlobal": true
38
- }
54
+ "publishConfig": {
55
+ "access": "public"
56
+ }
57
+ }
package/index.js DELETED
@@ -1,186 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const { execSync, spawn } = require('child_process');
4
- const path = require('path');
5
- const fs = require('fs');
6
-
7
- const GITHUB_REPO = 'git+https://github.com/RaphaelRegnier/vibe-annotations-server.git';
8
- const COMMAND_NAME = 'vibe-annotations-server';
9
-
10
- // Colors for terminal output
11
- const colors = {
12
- reset: '\x1b[0m',
13
- bright: '\x1b[1m',
14
- dim: '\x1b[2m',
15
- green: '\x1b[32m',
16
- yellow: '\x1b[33m',
17
- blue: '\x1b[34m',
18
- cyan: '\x1b[36m'
19
- };
20
-
21
- function log(message, color = '') {
22
- console.log(`${color}${message}${colors.reset}`);
23
- }
24
-
25
- function checkIfInstalled() {
26
- try {
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');
30
- } catch {
31
- return false;
32
- }
33
- }
34
-
35
- function getInstalledVersion() {
36
- try {
37
- const output = execSync(`${COMMAND_NAME} --version`, { encoding: 'utf8' });
38
- return output.trim();
39
- } catch {
40
- return null;
41
- }
42
- }
43
-
44
- function installFromGitHub() {
45
- log('📦 Installing vibe-annotations-server from GitHub...', colors.cyan);
46
- try {
47
- execSync(`npm install -g ${GITHUB_REPO}`, { stdio: 'inherit' });
48
- log('✅ Successfully installed vibe-annotations-server!', colors.green);
49
- return true;
50
- } catch (error) {
51
- log('❌ Failed to install. Please try manually:', colors.yellow);
52
- log(` npm install -g ${GITHUB_REPO}`, colors.dim);
53
- return false;
54
- }
55
- }
56
-
57
- function uninstallServer() {
58
- log('🗑️ Uninstalling vibe-annotations-server...', colors.cyan);
59
-
60
- // First try to stop the server if it's running
61
- try {
62
- log(' Stopping server first...', colors.dim);
63
- execSync(`${COMMAND_NAME} stop`, { stdio: 'ignore', timeout: 5000 });
64
- } catch {
65
- // Server might not be running or stop command failed, continue
66
- log(' (Server stop completed or not running)', colors.dim);
67
- }
68
-
69
- // Check if server is currently installed
70
- if (!checkIfInstalled()) {
71
- log('ℹ️ vibe-annotations-server is not globally installed', colors.yellow);
72
- return true;
73
- }
74
-
75
- // Attempt to uninstall
76
- try {
77
- execSync('npm uninstall -g vibe-annotations-server', { stdio: 'inherit' });
78
-
79
- // Verify uninstallation worked
80
- if (!checkIfInstalled()) {
81
- log('✅ Successfully uninstalled vibe-annotations-server!', colors.green);
82
- log(' Server command is no longer available', colors.dim);
83
- return true;
84
- } else {
85
- log('⚠️ Uninstall command ran, but server still appears to be installed', colors.yellow);
86
- return false;
87
- }
88
- } catch (error) {
89
- log('❌ Failed to uninstall. Please try manually:', colors.yellow);
90
- log(' npm uninstall -g vibe-annotations-server', colors.dim);
91
- return false;
92
- }
93
- }
94
-
95
- let childProcess = null;
96
-
97
- function runCommand(args) {
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' });
111
-
112
- childProcess.on('error', (error) => {
113
- if (error.code === 'ENOENT') {
114
- log('❌ Command not found. Installation may have failed.', colors.yellow);
115
- } else {
116
- log(`❌ Error: ${error.message}`, colors.yellow);
117
- }
118
- });
119
-
120
- childProcess.on('exit', (code) => {
121
- childProcess = null;
122
- process.exit(code || 0);
123
- });
124
- }
125
-
126
- function main() {
127
- const args = process.argv.slice(2);
128
-
129
- // Show version for this wrapper
130
- if (args.includes('--wrapper-version')) {
131
- const packageJson = require('./package.json');
132
- log(`npm wrapper version: ${packageJson.version}`, colors.dim);
133
- return;
134
- }
135
-
136
- // Handle uninstall command
137
- if (args[0] === 'uninstall') {
138
- log('🌟 Vibe Annotations Server - Uninstall', colors.bright);
139
- const success = uninstallServer();
140
- process.exit(success ? 0 : 1);
141
- }
142
-
143
- log('🌟 Vibe Annotations Server', colors.bright);
144
-
145
- // Check if vibe-annotations-server is installed
146
- if (!checkIfInstalled()) {
147
- log('📋 First time setup detected...', colors.blue);
148
-
149
- // Install from GitHub
150
- if (!installFromGitHub()) {
151
- process.exit(1);
152
- }
153
- } else {
154
- // Show installed version
155
- const version = getInstalledVersion();
156
- if (version) {
157
- log(` Version: ${version}`, colors.dim);
158
- }
159
- }
160
-
161
- // If no arguments provided, default to 'start'
162
- const finalArgs = args.length === 0 ? ['start'] : args;
163
-
164
- // Run the actual command
165
- log('🚀 Starting server...', colors.cyan);
166
- runCommand(finalArgs);
167
- }
168
-
169
- // Set up signal handlers
170
- const signals = ['SIGINT', 'SIGTERM', 'SIGHUP'];
171
- signals.forEach(signal => {
172
- process.on(signal, () => {
173
- if (childProcess) {
174
- // Forward signal to child process
175
- childProcess.kill(signal);
176
- } else {
177
- // No child process, exit gracefully
178
- if (signal === 'SIGINT') {
179
- log('\n👋 Shutting down...', colors.yellow);
180
- }
181
- process.exit(0);
182
- }
183
- });
184
- });
185
-
186
- main();