vibe-annotations-server 0.1.13 → 0.1.14

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/lib/server.js +14 -4
  2. package/package.json +1 -1
package/lib/server.js CHANGED
@@ -54,10 +54,20 @@ class LocalAnnotationsServer {
54
54
 
55
55
  setupExpress() {
56
56
  this.app.use(cors({
57
- origin: ['http://localhost:3000', 'http://localhost:3001', 'http://localhost:5173', 'http://localhost:8080', 'http://127.0.0.1:3000'],
58
- credentials: true
57
+ origin: (origin, cb) => {
58
+ // Allow: localhost/loopback, chrome-extension://, no origin (curl/MCP)
59
+ if (!origin
60
+ || /^https?:\/\/(localhost|127\.0\.0\.1|0\.0\.0\.0)(:\d+)?$/.test(origin)
61
+ || origin.startsWith('chrome-extension://')
62
+ || origin.endsWith('.local') || origin.endsWith('.test') || origin.endsWith('.localhost')
63
+ ) {
64
+ cb(null, origin || '*');
65
+ } else {
66
+ cb(null, false);
67
+ }
68
+ }
59
69
  }));
60
- this.app.use(express.json());
70
+ this.app.use(express.json({ limit: '5mb' }));
61
71
 
62
72
  // Health check with version info
63
73
  this.app.get('/health', (req, res) => {
@@ -357,7 +367,7 @@ class LocalAnnotationsServer {
357
367
  tools: [
358
368
  {
359
369
  name: 'read_annotations',
360
- description: 'Retrieves user-created visual annotations with pagination support. Returns annotation data with has_screenshot flag instead of full screenshot data for token efficiency. Use url parameter to filter by project. MULTI-PROJECT SAFETY: This tool detects when annotations exist across multiple localhost projects and provides warnings with specific URL filtering guidance. CRITICAL WORKFLOW: (1) First call WITHOUT url parameter to see all projects, (2) Use get_project_context tool to determine current project, (3) Call again WITH url parameter (e.g., "http://localhost:3000/*") to filter for current project only. This prevents cross-project contamination where you might implement changes in wrong codebase. Use limit and offset parameters for pagination when handling large annotation sets. Use this tool when users mention: annotations, comments, feedback, suggestions, notes, marked changes, or visual issues they\'ve identified.',
370
+ description: 'Retrieves user-created visual annotations with pagination support. Returns annotation data with has_screenshot flag instead of full screenshot data for token efficiency. Use url parameter to filter by project. MULTI-PROJECT SAFETY: This tool detects when annotations exist across multiple localhost projects and provides warnings with specific URL filtering guidance. CRITICAL WORKFLOW: (1) First call WITHOUT url parameter to see all projects, (2) Use get_project_context tool to determine current project, (3) Call again WITH url parameter (e.g., "http://localhost:3000/*") to filter for current project only. This prevents cross-project contamination where you might implement changes in wrong codebase. DESIGN CHANGES: Annotations may include pending_changes with original→new values for CSS properties. When implementing these changes, map values to the project design system (Tailwind classes, CSS variables, or design tokens) rather than using raw values. Use limit and offset parameters for pagination when handling large annotation sets. Use this tool when users mention: annotations, comments, feedback, suggestions, notes, marked changes, or visual issues they\'ve identified.',
361
371
  inputSchema: {
362
372
  type: 'object',
363
373
  properties: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibe-annotations-server",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Global MCP server for Vibe Annotations browser extension",
5
5
  "main": "lib/server.js",
6
6
  "type": "module",