@zibby/core 0.1.6 → 0.1.8

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@zibby/core",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Core test automation engine with multi-agent and multi-MCP support",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -80,11 +80,9 @@
80
80
  "dotenv": "^16.4.0",
81
81
  "handlebars": "^4.7.8",
82
82
  "zod": "^3.23.0",
83
+ "@zibby/mcp-browser": "^0.1.0",
83
84
  "zod-to-json-schema": "^3.25.1"
84
85
  },
85
- "optionalDependencies": {
86
- "@zibby/mcp-browser": "*"
87
- },
88
86
  "peerDependencies": {
89
87
  "@playwright/test": ">=1.49.0",
90
88
  "playwright": ">=1.49.0"
@@ -24,27 +24,39 @@ fi
24
24
 
25
25
  echo " Using Node: $NODE_PATH"
26
26
 
27
- # Step 3: Install Zibby MCP Browser (forked Playwright MCP with stable ID support)
27
+ # Step 3: Find Zibby MCP Browser (stable IDs + event recording)
28
28
  echo "Setting up Zibby MCP Browser..."
29
- ZIBBY_MCP_DIR="$SCRIPT_DIR/../../mcps/browser"
30
- ZIBBY_MCP_BIN="$ZIBBY_MCP_DIR/bin/mcp-browser-zibby.js"
31
-
32
- if [ -f "$ZIBBY_MCP_BIN" ]; then
33
- # Install dependencies (skip if already resolvable via workspace hoisting)
34
- if [ ! -d "$ZIBBY_MCP_DIR/node_modules" ]; then
35
- if "$NODE_PATH" -e "require.resolve('@playwright/mcp', {paths:['$ZIBBY_MCP_DIR']})" 2>/dev/null; then
36
- echo " ✅ Dependencies available"
37
- else
38
- echo " 📥 Installing dependencies..."
39
- (cd "$ZIBBY_MCP_DIR" && npm install --silent > /dev/null 2>&1) || echo " ⚠️ Could not install dependencies"
40
- fi
29
+
30
+ # Resolve @zibby/mcp-browser from node_modules (works in workspace, global, and npx installs)
31
+ ZIBBY_MCP_PKG=$("$NODE_PATH" -e "try{console.log(require.resolve('@zibby/mcp-browser/package.json',{paths:['$SCRIPT_DIR/..']}))}catch{}" 2>/dev/null)
32
+ if [ -n "$ZIBBY_MCP_PKG" ]; then
33
+ ZIBBY_MCP_BIN="$(dirname "$ZIBBY_MCP_PKG")/bin/mcp-browser-zibby.js"
34
+ fi
35
+
36
+ # Fallback: try workspace path (dev only)
37
+ if [ -z "$ZIBBY_MCP_BIN" ] || [ ! -f "$ZIBBY_MCP_BIN" ]; then
38
+ ZIBBY_MCP_DIR="$SCRIPT_DIR/../../mcps/browser"
39
+ if [ -f "$ZIBBY_MCP_DIR/bin/mcp-browser-zibby.js" ]; then
40
+ ZIBBY_MCP_BIN="$ZIBBY_MCP_DIR/bin/mcp-browser-zibby.js"
41
41
  fi
42
- echo "Zibby MCP Browser ready"
43
- else
44
- echo "Zibby MCP Browser not found at $ZIBBY_MCP_BIN"
42
+ fi
43
+
44
+ # Final fallback: official @playwright/mcp (no stable IDs or event recording)
45
+ if [ -z "$ZIBBY_MCP_BIN" ] || [ ! -f "$ZIBBY_MCP_BIN" ]; then
46
+ PLAYWRIGHT_MCP_PKG=$("$NODE_PATH" -e "try{console.log(require.resolve('@playwright/mcp/package.json',{paths:['$SCRIPT_DIR/..']}))}catch{}" 2>/dev/null)
47
+ if [ -n "$PLAYWRIGHT_MCP_PKG" ]; then
48
+ ZIBBY_MCP_BIN="$(dirname "$PLAYWRIGHT_MCP_PKG")/cli.js"
49
+ echo " ⚠️ Using @playwright/mcp (official) — stable IDs and event recording unavailable"
50
+ fi
51
+ fi
52
+
53
+ if [ -z "$ZIBBY_MCP_BIN" ] || [ ! -f "$ZIBBY_MCP_BIN" ]; then
54
+ echo "❌ No Playwright MCP found. Run: npm install @zibby/mcp-browser"
45
55
  exit 1
46
56
  fi
47
57
 
58
+ echo " ✅ Zibby MCP Browser ready"
59
+
48
60
  # Install ffmpeg for video recording
49
61
  echo "🎬 Installing ffmpeg for video recording..."
50
62
  if command -v playwright &> /dev/null 2>&1; then