@kraftapps-ai/kai 1.2.0 → 1.3.0

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/kai +49 -0
  2. package/package.json +1 -1
package/kai CHANGED
@@ -47,6 +47,55 @@ Add your project-specific context here. The more you provide, the better Kai per
47
47
  EOF
48
48
  fi
49
49
 
50
+ # ── Ensure Playwright MCP is available ────────────────
51
+
52
+ playwright_available=false
53
+
54
+ # Check if Playwright MCP is configured anywhere
55
+ for config in \
56
+ ".mcp.json" \
57
+ ".claude/settings.local.json" \
58
+ "$HOME/.claude/settings.local.json" \
59
+ "$HOME/.claude/settings.json"; do
60
+ if [ -f "$config" ] && grep -q "playwright" "$config" 2>/dev/null; then
61
+ playwright_available=true
62
+ break
63
+ fi
64
+ done
65
+
66
+ # Check Claude Code plugins
67
+ if [ "$playwright_available" = false ]; then
68
+ for plugin_dir in "$HOME/.claude/plugins"/*/external_plugins/playwright/; do
69
+ if [ -f "${plugin_dir}.mcp.json" ]; then
70
+ playwright_available=true
71
+ break
72
+ fi
73
+ done
74
+ fi
75
+
76
+ if [ "$playwright_available" = false ]; then
77
+ echo "Setting up Playwright browser testing..."
78
+ mkdir -p .playwright-mcp
79
+
80
+ # Add to project-level MCP config
81
+ if [ -f ".mcp.json" ]; then
82
+ # Merge with existing config
83
+ if ! grep -q "playwright" .mcp.json 2>/dev/null; then
84
+ jq '. + {"playwright": {"command": "npx", "args": ["@playwright/mcp@latest"]}}' .mcp.json > .mcp.json.tmp && mv .mcp.json.tmp .mcp.json
85
+ fi
86
+ else
87
+ cat > .mcp.json << 'MCPEOF'
88
+ {
89
+ "playwright": {
90
+ "command": "npx",
91
+ "args": ["@playwright/mcp@latest"]
92
+ }
93
+ }
94
+ MCPEOF
95
+ fi
96
+ echo " Playwright MCP configured in .mcp.json"
97
+ fi
98
+
50
99
  # ── Create the implementation loop script ─────────────
51
100
 
52
101
  cat > "$LOOP_SCRIPT" << 'LOOPEOF'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kraftapps-ai/kai",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Autonomous AI developer loop for Claude Code",
5
5
  "bin": {
6
6
  "kai": "kai"