vibe-annotations-server 0.1.4 → 0.1.6

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,56 @@
1
1
  {
2
2
  "name": "vibe-annotations-server",
3
- "version": "0.1.4",
4
- "description": "MCP server for Vibe Annotations - AI-powered localhost development feedback",
5
- "main": "index.js",
3
+ "version": "0.1.6",
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
+ "express": "^4.18.2",
39
+ "cors": "^2.8.5",
40
+ "commander": "^11.1.0",
41
+ "chalk": "^5.3.0",
42
+ "node-persist": "^3.1.3"
43
+ },
26
44
  "repository": {
27
45
  "type": "git",
28
- "url": "git+https://github.com/RaphaelRegnier/vibe-annotations-server.git"
46
+ "url": "git+https://github.com/RaphaelRegnier/vibe-annotations.git",
47
+ "directory": "annotations-server"
29
48
  },
49
+ "homepage": "https://github.com/RaphaelRegnier/vibe-annotations#readme",
30
50
  "bugs": {
31
51
  "url": "https://github.com/RaphaelRegnier/vibe-annotations/issues"
32
52
  },
33
- "homepage": "https://github.com/RaphaelRegnier/vibe-annotations",
34
- "engines": {
35
- "node": ">=14.0.0"
36
- },
37
- "preferGlobal": true
38
- }
53
+ "publishConfig": {
54
+ "access": "public"
55
+ }
56
+ }
package/index.js DELETED
@@ -1,173 +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
- execSync(`which ${COMMAND_NAME}`, { stdio: 'ignore' });
28
- return true;
29
- } catch {
30
- return false;
31
- }
32
- }
33
-
34
- function getInstalledVersion() {
35
- try {
36
- const output = execSync(`${COMMAND_NAME} --version`, { encoding: 'utf8' });
37
- return output.trim();
38
- } catch {
39
- return null;
40
- }
41
- }
42
-
43
- function installFromGitHub() {
44
- log('📦 Installing vibe-annotations-server from GitHub...', colors.cyan);
45
- try {
46
- execSync(`npm install -g ${GITHUB_REPO}`, { stdio: 'inherit' });
47
- log('✅ Successfully installed vibe-annotations-server!', colors.green);
48
- return true;
49
- } catch (error) {
50
- log('❌ Failed to install. Please try manually:', colors.yellow);
51
- log(` npm install -g ${GITHUB_REPO}`, colors.dim);
52
- return false;
53
- }
54
- }
55
-
56
- function uninstallServer() {
57
- log('🗑️ Uninstalling vibe-annotations-server...', colors.cyan);
58
-
59
- // First try to stop the server if it's running
60
- try {
61
- log(' Stopping server first...', colors.dim);
62
- execSync(`${COMMAND_NAME} stop`, { stdio: 'ignore', timeout: 5000 });
63
- } catch {
64
- // Server might not be running or stop command failed, continue
65
- log(' (Server stop completed or not running)', colors.dim);
66
- }
67
-
68
- // Check if server is currently installed
69
- if (!checkIfInstalled()) {
70
- log('ℹ️ vibe-annotations-server is not globally installed', colors.yellow);
71
- return true;
72
- }
73
-
74
- // Attempt to uninstall
75
- try {
76
- execSync('npm uninstall -g vibe-annotations-server', { stdio: 'inherit' });
77
-
78
- // Verify uninstallation worked
79
- if (!checkIfInstalled()) {
80
- log('✅ Successfully uninstalled vibe-annotations-server!', colors.green);
81
- log(' Server command is no longer available', colors.dim);
82
- return true;
83
- } else {
84
- log('⚠️ Uninstall command ran, but server still appears to be installed', colors.yellow);
85
- return false;
86
- }
87
- } catch (error) {
88
- log('❌ Failed to uninstall. Please try manually:', colors.yellow);
89
- log(' npm uninstall -g vibe-annotations-server', colors.dim);
90
- return false;
91
- }
92
- }
93
-
94
- let childProcess = null;
95
-
96
- function runCommand(args) {
97
- childProcess = spawn(COMMAND_NAME, args, { stdio: 'inherit' });
98
-
99
- childProcess.on('error', (error) => {
100
- if (error.code === 'ENOENT') {
101
- log('❌ Command not found. Installation may have failed.', colors.yellow);
102
- } else {
103
- log(`❌ Error: ${error.message}`, colors.yellow);
104
- }
105
- });
106
-
107
- childProcess.on('exit', (code) => {
108
- childProcess = null;
109
- process.exit(code || 0);
110
- });
111
- }
112
-
113
- function main() {
114
- const args = process.argv.slice(2);
115
-
116
- // Show version for this wrapper
117
- if (args.includes('--wrapper-version')) {
118
- const packageJson = require('./package.json');
119
- log(`npm wrapper version: ${packageJson.version}`, colors.dim);
120
- return;
121
- }
122
-
123
- // Handle uninstall command
124
- if (args[0] === 'uninstall') {
125
- log('🌟 Vibe Annotations Server - Uninstall', colors.bright);
126
- const success = uninstallServer();
127
- process.exit(success ? 0 : 1);
128
- }
129
-
130
- log('🌟 Vibe Annotations Server', colors.bright);
131
-
132
- // Check if vibe-annotations-server is installed
133
- if (!checkIfInstalled()) {
134
- log('📋 First time setup detected...', colors.blue);
135
-
136
- // Install from GitHub
137
- if (!installFromGitHub()) {
138
- process.exit(1);
139
- }
140
- } else {
141
- // Show installed version
142
- const version = getInstalledVersion();
143
- if (version) {
144
- log(` Version: ${version}`, colors.dim);
145
- }
146
- }
147
-
148
- // If no arguments provided, default to 'start'
149
- const finalArgs = args.length === 0 ? ['start'] : args;
150
-
151
- // Run the actual command
152
- log('🚀 Starting server...', colors.cyan);
153
- runCommand(finalArgs);
154
- }
155
-
156
- // Set up signal handlers
157
- const signals = ['SIGINT', 'SIGTERM', 'SIGHUP'];
158
- signals.forEach(signal => {
159
- process.on(signal, () => {
160
- if (childProcess) {
161
- // Forward signal to child process
162
- childProcess.kill(signal);
163
- } else {
164
- // No child process, exit gracefully
165
- if (signal === 'SIGINT') {
166
- log('\n👋 Shutting down...', colors.yellow);
167
- }
168
- process.exit(0);
169
- }
170
- });
171
- });
172
-
173
- main();