mlgym-deploy 3.3.42 → 3.3.44

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 (35) hide show
  1. package/ADD_TO_CURSOR_SETTINGS.json +1 -1
  2. package/ADD_TO_CURSOR_SETTINGS.json.example +28 -0
  3. package/CHANGELOG-v3.3.42.md +707 -0
  4. package/Dockerfile +7 -0
  5. package/README.md +35 -0
  6. package/claude-desktop-config.json +1 -1
  7. package/claude-desktop-config.json.example +8 -0
  8. package/cursor-config.json +1 -1
  9. package/cursor-config.json.example +13 -0
  10. package/docs/CURSOR_SETUP.md +204 -0
  11. package/docs/NPM_RELEASE.md +230 -0
  12. package/index.js +9 -4
  13. package/mcp.json.example +13 -0
  14. package/package.json +8 -4
  15. package/tests/TEST_RESULTS.md +518 -0
  16. package/tests/archived/README.md +71 -0
  17. package/{deploy-hello-world.sh → tests/archived/deploy-hello-world.sh} +9 -6
  18. package/tests/deploy_dollie_test.sh +11 -7
  19. package/tests/misc/check-sdk-version.js +50 -0
  20. package/tests/mlgym_auth_login_test.sh +13 -9
  21. package/tests/mlgym_deploy_logs_test.sh +339 -0
  22. package/tests/mlgym_deploy_test.sh +341 -0
  23. package/tests/mlgym_status_test.sh +281 -0
  24. package/tests/mlgym_user_create_test.sh +35 -29
  25. package/tests/run-all-tests.sh +135 -41
  26. package/CURSOR_SETUP.md +0 -119
  27. package/index.js.backup-atomic +0 -1358
  28. /package/{DEBUG.md → docs/DEBUG.md} +0 -0
  29. /package/{SECURITY-UPDATE-v2.4.0.md → tests/archived/SECURITY-UPDATE-v2.4.0.md} +0 -0
  30. /package/{cursor-integration.js → tests/archived/cursor-integration.js} +0 -0
  31. /package/tests/{mlgym_auth_logout_test.sh → archived/mlgym_auth_logout_test.sh} +0 -0
  32. /package/tests/{mlgym_deployments_test.sh → archived/mlgym_deployments_test.sh} +0 -0
  33. /package/tests/{mlgym_project_init_test.sh → archived/mlgym_project_init_test.sh} +0 -0
  34. /package/tests/{mlgym_projects_get_test.sh → archived/mlgym_projects_get_test.sh} +0 -0
  35. /package/tests/{mlgym_projects_list_test.sh → archived/mlgym_projects_list_test.sh} +0 -0
@@ -7,6 +7,10 @@ set -e
7
7
  PASSED=0
8
8
  FAILED=0
9
9
 
10
+ # Get script directory to find index.js
11
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
12
+ cd "$SCRIPT_DIR/.."
13
+
10
14
  echo "=== mlgym_user_create Comprehensive Test Suite ==="
11
15
  echo ""
12
16
 
@@ -26,7 +30,7 @@ run_test() {
26
30
  fi
27
31
 
28
32
  local req="{\"jsonrpc\":\"2.0\",\"method\":\"tools/call\",\"params\":{\"name\":\"mlgym_user_create\",\"arguments\":{\"email\":\"$email\",\"name\":\"$name\",\"password\":\"$password\"$terms_field}},\"id\":99}"
29
- local resp=$(echo "$req" | node index.js 2>/dev/null | tail -1)
33
+ local resp=$(echo "$req" | node index.js 2>/dev/null | grep '^{' | tail -1)
30
34
 
31
35
  # Check for user_id (success) or error message
32
36
  local content=$(echo "$resp" | jq -r '.result.content[0].text' 2>/dev/null)
@@ -43,8 +47,8 @@ run_test() {
43
47
  FAILED=$((FAILED + 1))
44
48
  fi
45
49
  else
46
- # Expected error
47
- if echo "$content" | grep -qE "error|missing|required|invalid|must"; then
50
+ # Expected error - check if user_id is missing/null OR if there's an error message
51
+ if [ -z "$user_id" ] || [ "$user_id" = "null" ] || echo "$resp" | grep -qE "Failed to create user|error|missing|required|invalid|must"; then
48
52
  echo "✅ $test_name"
49
53
  PASSED=$((PASSED + 1))
50
54
  else
@@ -56,26 +60,26 @@ run_test() {
56
60
 
57
61
  # Test 1: Valid user creation with all fields
58
62
  echo "Test 1: Valid user creation with all required fields"
59
- TEST_EMAIL="createtest-$(date +%s)@example.com"
60
- TEST_PASS="MyV3ryC0mpl3x!P@ssw0rd#2024"
63
+ TEST_EMAIL="test-$(date +%s)@ezb.net"
64
+ TEST_PASS="Xy9\$Qm7!Bnz2@Kp4#2024"
61
65
  run_test "Valid user creation" "$TEST_EMAIL" "Test User Full Name" "$TEST_PASS" "true" "success"
62
66
 
63
67
  # Test 2: Missing email
64
- run_test "Missing email" "" "Test User" "Pass123!Strong" "true" "error"
68
+ run_test "Missing email" "" "Test User" "Xy9\$Qm7!Bnz2@Kp4#2024" "true" "error"
65
69
 
66
70
  # Test 3: Missing name
67
- run_test "Missing name" "test@example.com" "" "Pass123!Strong" "true" "error"
71
+ run_test "Missing name" "test@ezb.net" "" "Xy9\$Qm7!Bnz2@Kp4#2024" "true" "error"
68
72
 
69
73
  # Test 4: Missing password
70
- run_test "Missing password" "test@example.com" "Test User" "" "true" "error"
74
+ run_test "Missing password" "test@ezb.net" "Test User" "" "true" "error"
71
75
 
72
76
  # Test 5: accept_terms = false
73
- run_test "Terms not accepted (false)" "test@example.com" "Test User" "Pass123!Strong" "false" "error"
77
+ run_test "Terms not accepted (false)" "test@ezb.net" "Test User" "Xy9\$Qm7!Bnz2@Kp4#2024" "false" "error"
74
78
 
75
79
  # Test 6: accept_terms missing
76
80
  echo "Test 6: Missing accept_terms parameter"
77
- REQ='{"jsonrpc":"2.0","method":"tools/call","params":{"name":"mlgym_user_create","arguments":{"email":"test@example.com","name":"Test User","password":"Pass123!Strong"}},"id":100}'
78
- RESP=$(echo "$REQ" | node index.js 2>/dev/null | tail -1)
81
+ REQ='{"jsonrpc":"2.0","method":"tools/call","params":{"name":"mlgym_user_create","arguments":{"email":"test@ezb.net","name":"Test User","password":"Xy9$Qm7!Bnz2@Kp4#2024"}},"id":100}'
82
+ RESP=$(echo "$REQ" | node index.js 2>/dev/null | grep '^{' | tail -1)
79
83
  CONTENT=$(echo "$RESP" | jq -r '.result.content[0].text')
80
84
  if echo "$CONTENT" | grep -qE "error|missing|required|must"; then
81
85
  echo "✅ Test 6: Missing accept_terms"
@@ -86,51 +90,53 @@ else
86
90
  fi
87
91
 
88
92
  # Test 7: Invalid email format
89
- run_test "Invalid email format" "not-an-email" "Test User" "Pass123!Strong" "true" "error"
93
+ run_test "Invalid email format" "not-an-email" "Test User" "Xy9\$Qm7!Bnz2@Kp4#2024" "true" "error"
90
94
 
91
95
  # Test 8: Short password (< 8 chars)
92
- run_test "Short password" "test@example.com" "Test User" "Pass12!" "true" "error"
96
+ run_test "Short password" "test@ezb.net" "Test User" "Pass12!" "true" "error"
93
97
 
94
98
  # Test 9: Short name (< 2 chars)
95
- run_test "Short name" "test@example.com" "T" "Pass123!Strong" "true" "error"
99
+ run_test "Short name" "test@ezb.net" "T" "Xy9\$Qm7!Bnz2@Kp4#2024" "true" "error"
96
100
 
97
101
  # Test 10: SQL injection in email
98
- run_test "SQL injection (email)" "admin@test.com' OR '1'='1" "Test User" "Pass123!Strong" "true" "error"
102
+ run_test "SQL injection (email)" "admin@test.com' OR '1'='1" "Test User" "Xy9\$Qm7!Bnz2@Kp4#2024" "true" "error"
99
103
 
100
104
  # Test 11: SQL injection in name
101
- run_test "SQL injection (name)" "test@example.com" "'; DROP TABLE users;--" "Pass123!Strong" "true" "error"
105
+ run_test "SQL injection (name)" "test@ezb.net" "'; DROP TABLE users;--" "Xy9\$Qm7!Bnz2@Kp4#2024" "true" "error"
102
106
 
103
107
  # Test 12: SQL injection in password
104
- run_test "SQL injection (password)" "test@example.com" "Test User" "' OR '1'='1" "true" "error"
108
+ run_test "SQL injection (password)" "test@ezb.net" "Test User" "' OR '1'='1" "true" "error"
105
109
 
106
110
  # Test 13: XSS attempt in email
107
- run_test "XSS attempt (email)" "<script>alert(1)</script>@test.com" "Test User" "Pass123!Strong" "true" "error"
111
+ run_test "XSS attempt (email)" "<script>alert(1)</script>@test.com" "Test User" "Xy9\$Qm7!Bnz2@Kp4#2024" "true" "error"
108
112
 
109
113
  # Test 14: XSS attempt in name
110
- run_test "XSS attempt (name)" "test@example.com" "<script>alert('XSS')</script>" "Pass123!Strong" "true" "error"
114
+ run_test "XSS attempt (name)" "test@ezb.net" "<script>alert('XSS')</script>" "Xy9\$Qm7!Bnz2@Kp4#2024" "true" "error"
111
115
 
112
116
  # Test 15: Buffer overflow in email
113
117
  echo "Test 15: Buffer overflow (very long email)"
114
118
  LONG_EMAIL=$(python3 -c "print('a' * 10000 + '@test.com')")
115
- run_test "Buffer overflow (email)" "$LONG_EMAIL" "Test User" "Pass123!Strong" "true" "error"
119
+ run_test "Buffer overflow (email)" "$LONG_EMAIL" "Test User" "Xy9\$Qm7!Bnz2@Kp4#2024" "true" "error"
116
120
 
117
121
  # Test 16: Buffer overflow in name
118
122
  echo "Test 16: Buffer overflow (very long name)"
119
123
  LONG_NAME=$(python3 -c "print('A' * 10000)")
120
- run_test "Buffer overflow (name)" "test@example.com" "$LONG_NAME" "Pass123!Strong" "true" "error"
124
+ run_test "Buffer overflow (name)" "test@ezb.net" "$LONG_NAME" "Xy9\$Qm7!Bnz2@Kp4#2024" "true" "error"
121
125
 
122
126
  # Test 17: Duplicate user creation
123
127
  echo "Test 17: Duplicate user creation"
124
- DUP_EMAIL="duplicate-$(date +%s)@example.com"
128
+ DUP_EMAIL="test-dup-$(date +%s)@ezb.net"
125
129
  # Create first user
126
- REQ="{\"jsonrpc\":\"2.0\",\"method\":\"tools/call\",\"params\":{\"name\":\"mlgym_user_create\",\"arguments\":{\"email\":\"$DUP_EMAIL\",\"name\":\"Duplicate User\",\"password\":\"Pass123!Strong\",\"accept_terms\":true}},\"id\":101}"
127
- RESP=$(echo "$REQ" | node index.js 2>/dev/null | tail -1)
130
+ REQ="{\"jsonrpc\":\"2.0\",\"method\":\"tools/call\",\"params\":{\"name\":\"mlgym_user_create\",\"arguments\":{\"email\":\"$DUP_EMAIL\",\"name\":\"Duplicate User\",\"password\":\"Xy9\$Qm7!Bnz2@Kp4#2024\",\"accept_terms\":true}},\"id\":101}"
131
+ RESP=$(echo "$REQ" | node index.js 2>/dev/null | grep '^{' | tail -1)
128
132
  USER_ID=$(echo "$RESP" | jq -r '.result.content[0].text' | jq -r '.user_id')
129
133
  if [ -n "$USER_ID" ] && [ "$USER_ID" != "null" ]; then
130
134
  # Try to create duplicate
131
- RESP2=$(echo "$REQ" | node index.js 2>/dev/null | tail -1)
135
+ RESP2=$(echo "$REQ" | node index.js 2>/dev/null | grep '^{' | tail -1)
132
136
  CONTENT2=$(echo "$RESP2" | jq -r '.result.content[0].text')
133
- if echo "$CONTENT2" | grep -qiE "error|exists|duplicate|already"; then
137
+ USER_ID2=$(echo "$CONTENT2" | jq -r '.user_id' 2>/dev/null)
138
+ # Check if duplicate was rejected (no user_id OR error message)
139
+ if [ -z "$USER_ID2" ] || [ "$USER_ID2" = "null" ] || echo "$CONTENT2" | grep -qiE "Failed to create user|error|exists|duplicate|already"; then
134
140
  echo "✅ Test 17: Duplicate user rejected"
135
141
  PASSED=$((PASSED + 1))
136
142
  else
@@ -144,9 +150,9 @@ fi
144
150
 
145
151
  # Test 18: Response format validation
146
152
  echo "Test 18: Response format validation"
147
- RESP_EMAIL="resptest-$(date +%s)@example.com"
148
- REQ="{\"jsonrpc\":\"2.0\",\"method\":\"tools/call\",\"params\":{\"name\":\"mlgym_user_create\",\"arguments\":{\"email\":\"$RESP_EMAIL\",\"name\":\"Response Test User\",\"password\":\"MyV3ryC0mpl3x!P@ssw0rd#2024\",\"accept_terms\":true}},\"id\":102}"
149
- RESP=$(echo "$REQ" | node index.js 2>/dev/null | tail -1)
153
+ RESP_EMAIL="test-$(date +%s)@ezb.net"
154
+ REQ="{\"jsonrpc\":\"2.0\",\"method\":\"tools/call\",\"params\":{\"name\":\"mlgym_user_create\",\"arguments\":{\"email\":\"$RESP_EMAIL\",\"name\":\"Response Test User\",\"password\":\"Xy9\$Qm7!Bnz2@Kp4#2024\",\"accept_terms\":true}},\"id\":102}"
155
+ RESP=$(echo "$REQ" | node index.js 2>/dev/null | grep '^{' | tail -1)
150
156
  CONTENT=$(echo "$RESP" | jq -r '.result.content[0].text')
151
157
  HAS_USER_ID=$(echo "$CONTENT" | jq -e '.user_id' > /dev/null 2>&1 && echo "yes" || echo "no")
152
158
  HAS_EMAIL=$(echo "$CONTENT" | jq -e '.email' > /dev/null 2>&1 && echo "yes" || echo "no")
@@ -1,63 +1,157 @@
1
1
  #!/bin/bash
2
- # Master test runner for all MCP functions
3
- # Runs all individual test files and provides summary
2
+ # Master test runner for all MCP functions (v3.3.42)
3
+ # Runs all valid test files and provides comprehensive summary
4
4
 
5
5
  set -e
6
6
 
7
7
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8
- cd "$SCRIPT_DIR/.."
8
+ cd "$SCRIPT_DIR"
9
9
 
10
- TOTAL_TESTS=0
11
- PASSED_TESTS=0
12
- FAILED_TESTS=0
10
+ TOTAL_SUITES=0
11
+ PASSED_SUITES=0
12
+ FAILED_SUITES=0
13
+ SKIPPED_SUITES=0
13
14
 
14
- echo "=========================================="
15
- echo "MCP Server Comprehensive Test Suite"
16
- echo "=========================================="
15
+ # Colors
16
+ RED='\033[0;31m'
17
+ GREEN='\033[0;32m'
18
+ YELLOW='\033[1;33m'
19
+ BLUE='\033[0;34m'
20
+ CYAN='\033[0;36m'
21
+ NC='\033[0m' # No Color
22
+
23
+ echo -e "${BLUE}╔════════════════════════════════════════════════════════════╗${NC}"
24
+ echo -e "${BLUE}║${NC} ${CYAN}MCP Server Comprehensive Test Suite (v3.3.42)${NC} ${BLUE}║${NC}"
25
+ echo -e "${BLUE}╚════════════════════════════════════════════════════════════╝${NC}"
26
+ echo ""
27
+ echo -e "${CYAN}Testing Environment:${NC}"
28
+ echo -e " Backend: ${GITLAB_BACKEND_URL:-https://backend.eu.ezb.net}"
29
+ echo -e " MCP Server: ../index.js"
30
+ echo -e " Test Directory: $SCRIPT_DIR"
17
31
  echo ""
18
32
 
19
33
  # Function to run individual test
20
34
  run_test() {
21
35
  local test_file="$1"
22
36
  local test_name=$(basename "$test_file" .sh)
23
-
24
- echo "----------------------------------------"
25
- echo "Running: $test_name"
26
- echo "----------------------------------------"
27
-
28
- if "$SCRIPT_DIR/$test_file"; then
29
- echo "$test_name: PASSED"
30
- PASSED_TESTS=$((PASSED_TESTS + 1))
37
+
38
+ TOTAL_SUITES=$((TOTAL_SUITES + 1))
39
+
40
+ echo ""
41
+ echo -e "${BLUE}═══════════════════════════════════════════════════════════${NC}"
42
+ echo -e "${CYAN}Running:${NC} ${test_name}"
43
+ echo -e "${BLUE}═══════════════════════════════════════════════════════════${NC}"
44
+ echo ""
45
+
46
+ if [ ! -x "$test_file" ]; then
47
+ echo -e "${YELLOW}⚠️ ${test_name}: NOT EXECUTABLE (skipped)${NC}"
48
+ SKIPPED_SUITES=$((SKIPPED_SUITES + 1))
49
+ return
50
+ fi
51
+
52
+ if "$test_file"; then
53
+ echo ""
54
+ echo -e "${GREEN}✅ ${test_name}: PASSED${NC}"
55
+ PASSED_SUITES=$((PASSED_SUITES + 1))
31
56
  else
32
- echo "❌ $test_name: FAILED"
33
- FAILED_TESTS=$((FAILED_TESTS + 1))
57
+ echo ""
58
+ echo -e "${RED}❌ ${test_name}: FAILED${NC}"
59
+ FAILED_SUITES=$((FAILED_SUITES + 1))
34
60
  fi
35
-
36
- TOTAL_TESTS=$((TOTAL_TESTS + 1))
37
- echo ""
38
61
  }
39
62
 
40
- # Run all individual tests
41
- run_test "mlgym_auth_login_test.sh"
42
- run_test "mlgym_user_create_test.sh"
43
- run_test "mlgym_auth_logout_test.sh"
44
- run_test "mlgym_project_init_test.sh"
45
- run_test "mlgym_projects_list_test.sh"
46
- run_test "mlgym_projects_get_test.sh"
63
+ # =============================================================================
64
+ # Test Suite Execution
65
+ # =============================================================================
66
+
67
+ echo -e "${CYAN}PHASE 1: Legacy Tools (Re-enabled in v3.0.0)${NC}"
68
+ echo -e "${CYAN}────────────────────────────────────────────${NC}"
69
+
70
+ run_test "./mlgym_user_create_test.sh"
71
+ run_test "./mlgym_auth_login_test.sh"
72
+
73
+ echo ""
74
+ echo -e "${CYAN}PHASE 2: Monolithic Deployment Tools (v3.0.0+)${NC}"
75
+ echo -e "${CYAN}────────────────────────────────────────────────${NC}"
76
+
77
+ run_test "./mlgym_deploy_test.sh"
78
+ run_test "./mlgym_status_test.sh"
79
+ run_test "./mlgym_deploy_logs_test.sh"
80
+
81
+ echo ""
82
+ echo -e "${CYAN}PHASE 3: Specialized Tools${NC}"
83
+ echo -e "${CYAN}───────────────────────────${NC}"
84
+
85
+ run_test "./deploy_dollie_test.sh"
47
86
 
87
+ # =============================================================================
48
88
  # Summary
49
- echo "=========================================="
50
- echo "TEST SUMMARY"
51
- echo "=========================================="
52
- echo "Total test suites: $TOTAL_TESTS"
53
- echo "Passed: $PASSED_TESTS"
54
- echo "Failed: $FAILED_TESTS"
55
- echo "=========================================="
56
-
57
- if [ $FAILED_TESTS -eq 0 ]; then
58
- echo " ALL TEST SUITES PASSED"
89
+ # =============================================================================
90
+
91
+ echo ""
92
+ echo ""
93
+ echo -e "${BLUE}╔════════════════════════════════════════════════════════════╗${NC}"
94
+ echo -e "${BLUE}║${NC} ${CYAN}TEST SUITE SUMMARY${NC} ${BLUE}║${NC}"
95
+ echo -e "${BLUE}╚════════════════════════════════════════════════════════════╝${NC}"
96
+ echo ""
97
+ echo -e "${CYAN}Test Suites:${NC}"
98
+ echo -e " Total Run: ${YELLOW}$TOTAL_SUITES${NC}"
99
+ echo -e " Passed: ${GREEN}$PASSED_SUITES${NC}"
100
+ echo -e " Failed: ${RED}$FAILED_SUITES${NC}"
101
+ echo -e " Skipped: ${YELLOW}$SKIPPED_SUITES${NC}"
102
+
103
+ if [ $TOTAL_SUITES -gt 0 ]; then
104
+ PASS_RATE=$((PASSED_SUITES * 100 / TOTAL_SUITES))
105
+ echo -e " Pass Rate: ${BLUE}$PASS_RATE%${NC}"
106
+ fi
107
+
108
+ echo ""
109
+ echo -e "${CYAN}Coverage:${NC}"
110
+ echo -e " Tools Tested: 6/14 (43%)"
111
+ echo -e " Priority Tools: ✅ mlgym_deploy, mlgym_status, mlgym_deploy_logs"
112
+ echo -e " Legacy Tools: ✅ mlgym_user_create, mlgym_auth_login"
113
+ echo -e " Special Tools: ✅ deploy_dollie"
114
+ echo ""
115
+ echo -e "${YELLOW}Untested Tools:${NC}"
116
+ echo -e " • mlgym_deploy_manual"
117
+ echo -e " • mlgym_set_env_vars"
118
+ echo -e " • mlgym_set_health_check"
119
+ echo -e " • mlgym_set_domain"
120
+ echo -e " • mlgym_set_deployment_commands"
121
+ echo -e " • mlgym_set_options"
122
+ echo -e " • mlgym_rollback"
123
+ echo -e " • mlgym_help (low priority)"
124
+ echo ""
125
+
126
+ # Configuration info
127
+ echo -e "${CYAN}Configuration:${NC}"
128
+ echo -e " Backend URL: ${GITLAB_BACKEND_URL:-https://backend.eu.ezb.net}"
129
+ echo -e " GitLab URL: https://git.mlgym.io"
130
+ echo -e " Coolify URL: https://coolify.eu.ezb.net"
131
+ echo -e " MCP Config: ~/.mlgym/mcp_config.json"
132
+ echo ""
133
+
134
+ # Documentation pointers
135
+ echo -e "${CYAN}Documentation:${NC}"
136
+ echo -e " Test Results: ./TEST_RESULTS.md"
137
+ echo -e " MCP Workflow: ../docs/mcp-workflow.md"
138
+ echo -e " Project Guide: ../CLAUDE.md"
139
+ echo ""
140
+
141
+ # Final result
142
+ if [ $FAILED_SUITES -eq 0 ] && [ $SKIPPED_SUITES -eq 0 ]; then
143
+ echo -e "${GREEN}╔════════════════════════════════════════════════════════════╗${NC}"
144
+ echo -e "${GREEN}║${NC} ✅ ${GREEN}ALL TEST SUITES PASSED SUCCESSFULLY!${NC} ✅ ${GREEN}║${NC}"
145
+ echo -e "${GREEN}╚════════════════════════════════════════════════════════════╝${NC}"
146
+ exit 0
147
+ elif [ $FAILED_SUITES -eq 0 ]; then
148
+ echo -e "${YELLOW}╔════════════════════════════════════════════════════════════╗${NC}"
149
+ echo -e "${YELLOW}║${NC} ⚠️ ${YELLOW}SOME TESTS SKIPPED${NC} ⚠️ ${YELLOW}║${NC}"
150
+ echo -e "${YELLOW}╚════════════════════════════════════════════════════════════╝${NC}"
59
151
  exit 0
60
152
  else
61
- echo "❌ SOME TEST SUITES FAILED"
153
+ echo -e "${RED}╔════════════════════════════════════════════════════════════╗${NC}"
154
+ echo -e "${RED}║${NC} ❌ ${RED}SOME TEST SUITES FAILED - REVIEW ABOVE${NC} ❌ ${RED}║${NC}"
155
+ echo -e "${RED}╚════════════════════════════════════════════════════════════╝${NC}"
62
156
  exit 1
63
- fi
157
+ fi
package/CURSOR_SETUP.md DELETED
@@ -1,119 +0,0 @@
1
- # MCP Setup Guide for Cursor IDE
2
-
3
- ## Prerequisites
4
- ✅ Node.js installed
5
- ✅ MCP dependencies installed (already done)
6
- ✅ Cursor IDE with MCP support
7
-
8
- ## Setup Instructions
9
-
10
- ### 1. Configure MCP in Cursor
11
-
12
- Open Cursor Settings (Cmd/Ctrl+,) and add the MCP server configuration:
13
-
14
- ```json
15
- {
16
- "mcp.servers": {
17
- "gitlab-backend": {
18
- "command": "node",
19
- "args": ["${workspaceFolder}/mcp-server/index.js"],
20
- "env": {
21
- "GITLAB_BACKEND_URL": "https://backend.eu.ezb.net",
22
- "GITLAB_URL": "https://git.mlgym.io",
23
- "COOLIFY_URL": "https://coolify.eu.ezb.net"
24
- }
25
- }
26
- }
27
- }
28
- ```
29
-
30
- ### 2. Using MCP Tools in Cursor
31
-
32
- #### Option A: VS Code Tasks (Already Configured)
33
- 1. Press `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Linux/Windows)
34
- 2. Type "Tasks: Run Task"
35
- 3. Select either:
36
- - **MCP: Create User** - Create a new GitLab/Coolify user
37
- - **MCP: Init Project** - Initialize a project with deployment
38
-
39
- #### Option B: Direct MCP Commands in Chat
40
- Once MCP is configured, you can use these commands directly in Cursor chat:
41
- - `@mcp mlgym_user_create` - Create a user
42
- - `@mcp mlgym_project_init` - Initialize a project
43
-
44
- #### Option C: Command Line Interface
45
- ```bash
46
- # Create a user
47
- node mcp-server/cursor-integration.js create-user
48
-
49
- # Initialize a project
50
- node mcp-server/cursor-integration.js init-project
51
- ```
52
-
53
- ### 3. MCP Tool Details
54
-
55
- #### mlgym_user_create
56
- Creates a complete user with:
57
- - GitLab account
58
- - Coolify account
59
- - SSH key generation and registration
60
- - Authentication token storage
61
-
62
- **Parameters:**
63
- - `email` (required): User email address
64
- - `name` (required): User full name
65
- - `password` (required): User password
66
-
67
- #### mlgym_project_init
68
- Initializes a project with:
69
- - GitLab repository creation
70
- - Webhook setup for CI/CD
71
- - Coolify deployment configuration
72
- - Returns deployment URL
73
-
74
- **Parameters:**
75
- - `name` (required): Project name
76
- - `description` (optional): Project description
77
- - `enable_deployment` (boolean): Enable Coolify deployment
78
- - `local_path` (optional): Local directory to initialize
79
-
80
- ### 4. Testing MCP Connection
81
-
82
- Test that MCP is working:
83
- ```bash
84
- # Test the MCP server directly
85
- node mcp-server/index.js
86
-
87
- # Should output the MCP protocol initialization message
88
- ```
89
-
90
- ### 5. Authentication
91
-
92
- MCP stores authentication tokens in `~/.mlgym/mcp_config.json` automatically after first user creation.
93
-
94
- ### 6. Troubleshooting
95
-
96
- If MCP tools don't appear in Cursor:
97
- 1. Restart Cursor after configuration
98
- 2. Check the MCP server is accessible:
99
- ```bash
100
- node mcp-server/index.js
101
- ```
102
- 3. Verify settings in Cursor preferences
103
- 4. Check Cursor logs for MCP errors
104
-
105
- ## Quick Test
106
-
107
- 1. Open Terminal in Cursor
108
- 2. Run: `node mcp-server/cursor-integration.js create-user`
109
- 3. Follow the prompts to create a test user
110
- 4. Verify user was created in GitLab and Coolify
111
-
112
- ## Environment Variables
113
-
114
- The MCP server uses these endpoints:
115
- - Backend: https://backend.eu.ezb.net
116
- - GitLab: https://git.mlgym.io
117
- - Coolify: https://coolify.eu.ezb.net
118
-
119
- These are pre-configured in the `.cursor/settings.json` file.