mlgym-deploy 3.3.0 → 3.3.1
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/index.js +193 -69
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import crypto from 'crypto';
|
|
|
17
17
|
const execAsync = promisify(exec);
|
|
18
18
|
|
|
19
19
|
// Current version of this MCP server - INCREMENT FOR WORKFLOW FIXES
|
|
20
|
-
const CURRENT_VERSION = '3.3.
|
|
20
|
+
const CURRENT_VERSION = '3.3.1'; // Updated help with plain English examples showing what users say vs tool calls
|
|
21
21
|
const PACKAGE_NAME = 'mlgym-deploy';
|
|
22
22
|
|
|
23
23
|
// Debug logging configuration - ENABLED BY DEFAULT
|
|
@@ -2833,127 +2833,186 @@ async function showHelp(args) {
|
|
|
2833
2833
|
║ Complete Deployment Platform for GitLab + Coolify ║
|
|
2834
2834
|
╚═══════════════════════════════════════════════════════════════════════╝
|
|
2835
2835
|
|
|
2836
|
+
HOW TO USE THIS GUIDE:
|
|
2837
|
+
Users speak in plain English. When they say "deploy to mlgym" or "show me
|
|
2838
|
+
the status", the AI translates this to the appropriate tool call.
|
|
2839
|
+
|
|
2840
|
+
Examples show both what users say AND the tool call that gets executed.
|
|
2841
|
+
|
|
2836
2842
|
📦 DEPLOYMENT TOOLS
|
|
2837
2843
|
───────────────────────────────────────────────────────────────────────
|
|
2838
2844
|
|
|
2839
|
-
🚀 mlgym_deploy
|
|
2840
|
-
|
|
2845
|
+
🚀 mlgym_deploy - Deploy your application
|
|
2846
|
+
What users say:
|
|
2847
|
+
• "Deploy to mlgym"
|
|
2848
|
+
• "Deploy this project to mlgym"
|
|
2849
|
+
• "I want to deploy my app"
|
|
2850
|
+
• "Push this to production"
|
|
2841
2851
|
|
|
2842
|
-
|
|
2852
|
+
Tool call:
|
|
2843
2853
|
mlgym_deploy({
|
|
2844
2854
|
project_name: "my-app",
|
|
2845
2855
|
project_description: "My application",
|
|
2846
|
-
email: "user@example.com", // optional if already
|
|
2847
|
-
password: "password123" // optional if already
|
|
2856
|
+
email: "user@example.com", // optional if already logged in
|
|
2857
|
+
password: "password123" // optional if already logged in
|
|
2848
2858
|
})
|
|
2849
2859
|
|
|
2850
|
-
📊 mlgym_status
|
|
2851
|
-
|
|
2860
|
+
📊 mlgym_status - Check deployment status
|
|
2861
|
+
What users say:
|
|
2862
|
+
• "Show me the status"
|
|
2863
|
+
• "What's deployed?"
|
|
2864
|
+
• "Am I logged in?"
|
|
2865
|
+
• "Check if my project is configured"
|
|
2852
2866
|
|
|
2853
|
-
|
|
2854
|
-
mlgym_status({
|
|
2867
|
+
Tool call:
|
|
2868
|
+
mlgym_status({
|
|
2869
|
+
local_path: "." // optional, defaults to current directory
|
|
2870
|
+
})
|
|
2855
2871
|
|
|
2856
|
-
📝 mlgym_deploy_logs
|
|
2857
|
-
|
|
2872
|
+
📝 mlgym_deploy_logs - View deployment logs
|
|
2873
|
+
What users say:
|
|
2874
|
+
• "Show me the deployment logs"
|
|
2875
|
+
• "What happened in the last deployment?"
|
|
2876
|
+
• "Why did my deployment fail?"
|
|
2877
|
+
• "Show the build logs"
|
|
2858
2878
|
|
|
2859
|
-
|
|
2879
|
+
Tool call:
|
|
2860
2880
|
mlgym_deploy_logs({
|
|
2861
2881
|
project_name: "my-app",
|
|
2862
|
-
depth: 3 // number of deployments
|
|
2882
|
+
depth: 3 // optional, number of recent deployments
|
|
2863
2883
|
})
|
|
2864
2884
|
|
|
2865
2885
|
⚙️ CONFIGURATION TOOLS
|
|
2866
2886
|
───────────────────────────────────────────────────────────────────────
|
|
2867
2887
|
|
|
2868
|
-
🔧 mlgym_set_env_vars
|
|
2869
|
-
|
|
2888
|
+
🔧 mlgym_set_env_vars - Set environment variables
|
|
2889
|
+
What users say:
|
|
2890
|
+
• "Set the database URL"
|
|
2891
|
+
• "Add these environment variables"
|
|
2892
|
+
• "Configure my API keys"
|
|
2893
|
+
• "I need to set DATABASE_URL and STRIPE_KEY"
|
|
2870
2894
|
|
|
2871
|
-
|
|
2895
|
+
Tool call:
|
|
2872
2896
|
mlgym_set_env_vars({
|
|
2873
2897
|
project_name: "my-app",
|
|
2874
2898
|
variables: {
|
|
2875
|
-
DATABASE_URL: "postgresql
|
|
2876
|
-
|
|
2899
|
+
DATABASE_URL: "postgresql://user:pass@host:5432/db",
|
|
2900
|
+
STRIPE_KEY: "sk_live_123...",
|
|
2901
|
+
NODE_ENV: "production"
|
|
2877
2902
|
}
|
|
2878
2903
|
})
|
|
2879
2904
|
|
|
2880
|
-
❤️ mlgym_set_health_check
|
|
2881
|
-
|
|
2905
|
+
❤️ mlgym_set_health_check - Configure health monitoring
|
|
2906
|
+
What users say:
|
|
2907
|
+
• "Set up a health check"
|
|
2908
|
+
• "Monitor my /health endpoint"
|
|
2909
|
+
• "Check if my app is alive every 30 seconds"
|
|
2910
|
+
• "Enable health checks on /api/health"
|
|
2882
2911
|
|
|
2883
|
-
|
|
2912
|
+
Tool call:
|
|
2884
2913
|
mlgym_set_health_check({
|
|
2885
2914
|
project_name: "my-app",
|
|
2886
2915
|
enabled: true,
|
|
2887
|
-
path: "/health",
|
|
2888
|
-
method: "GET",
|
|
2889
|
-
return_code: 200,
|
|
2890
|
-
interval:
|
|
2916
|
+
path: "/health", // endpoint to check
|
|
2917
|
+
method: "GET", // HTTP method
|
|
2918
|
+
return_code: 200, // expected status code
|
|
2919
|
+
interval: 30 // check every 30 seconds
|
|
2891
2920
|
})
|
|
2892
2921
|
|
|
2893
|
-
🌐 mlgym_set_domain
|
|
2894
|
-
|
|
2922
|
+
🌐 mlgym_set_domain - Set custom domain
|
|
2923
|
+
What users say:
|
|
2924
|
+
• "Use my custom domain"
|
|
2925
|
+
• "Point myapp.com to this deployment"
|
|
2926
|
+
• "Set the domain to app.example.com"
|
|
2927
|
+
• "Change the URL to www.mysite.com"
|
|
2895
2928
|
|
|
2896
|
-
|
|
2929
|
+
Tool call:
|
|
2897
2930
|
mlgym_set_domain({
|
|
2898
2931
|
project_name: "my-app",
|
|
2899
|
-
domain: "myapp.example.com"
|
|
2932
|
+
domain: "myapp.example.com" // your custom domain
|
|
2900
2933
|
})
|
|
2901
2934
|
|
|
2902
|
-
📜 mlgym_set_deployment_commands
|
|
2903
|
-
|
|
2935
|
+
📜 mlgym_set_deployment_commands - Configure build commands
|
|
2936
|
+
What users say:
|
|
2937
|
+
• "Run migrations before deploying"
|
|
2938
|
+
• "Seed the database after deployment"
|
|
2939
|
+
• "Execute npm run build before starting"
|
|
2940
|
+
• "Run these commands during deployment"
|
|
2904
2941
|
|
|
2905
|
-
|
|
2942
|
+
Tool call:
|
|
2906
2943
|
mlgym_set_deployment_commands({
|
|
2907
2944
|
project_name: "my-app",
|
|
2908
|
-
pre_command: "npm run migrate",
|
|
2909
|
-
post_command: "npm run seed"
|
|
2945
|
+
pre_command: "npm run migrate", // runs before deployment
|
|
2946
|
+
post_command: "npm run seed" // runs after deployment
|
|
2910
2947
|
})
|
|
2911
2948
|
|
|
2912
|
-
⚙️ mlgym_set_options
|
|
2913
|
-
|
|
2949
|
+
⚙️ mlgym_set_options - Configure deployment options
|
|
2950
|
+
What users say:
|
|
2951
|
+
• "Disable build cache"
|
|
2952
|
+
• "Turn off the build cache"
|
|
2953
|
+
• "Don't use cached builds"
|
|
2954
|
+
• "Force a fresh build"
|
|
2914
2955
|
|
|
2915
|
-
|
|
2956
|
+
Tool call:
|
|
2916
2957
|
mlgym_set_options({
|
|
2917
2958
|
project_name: "my-app",
|
|
2918
|
-
disable_build_cache: true
|
|
2959
|
+
disable_build_cache: true // force fresh builds
|
|
2919
2960
|
})
|
|
2920
2961
|
|
|
2921
2962
|
🎬 DEPLOYMENT MANAGEMENT
|
|
2922
2963
|
───────────────────────────────────────────────────────────────────────
|
|
2923
2964
|
|
|
2924
|
-
▶️ mlgym_deploy_manual
|
|
2925
|
-
|
|
2965
|
+
▶️ mlgym_deploy_manual - Trigger deployment manually
|
|
2966
|
+
What users say:
|
|
2967
|
+
• "Deploy now"
|
|
2968
|
+
• "Trigger a deployment"
|
|
2969
|
+
• "Redeploy my application"
|
|
2970
|
+
• "Start a new deployment"
|
|
2926
2971
|
|
|
2927
|
-
|
|
2928
|
-
mlgym_deploy_manual({
|
|
2972
|
+
Tool call:
|
|
2973
|
+
mlgym_deploy_manual({
|
|
2974
|
+
project_name: "my-app"
|
|
2975
|
+
})
|
|
2929
2976
|
|
|
2930
|
-
⏪ mlgym_rollback
|
|
2931
|
-
|
|
2977
|
+
⏪ mlgym_rollback - Rollback to previous version
|
|
2978
|
+
What users say:
|
|
2979
|
+
• "Rollback my deployment"
|
|
2980
|
+
• "Go back to the previous version"
|
|
2981
|
+
• "Undo the last deployment"
|
|
2982
|
+
• "Revert to deployment #123"
|
|
2932
2983
|
|
|
2933
|
-
|
|
2984
|
+
Tool call:
|
|
2934
2985
|
mlgym_rollback({
|
|
2935
2986
|
project_name: "my-app",
|
|
2936
|
-
deployment_id: 123 // optional, uses previous if
|
|
2987
|
+
deployment_id: 123 // optional, uses previous if omitted
|
|
2937
2988
|
})
|
|
2938
2989
|
|
|
2939
2990
|
👤 USER MANAGEMENT
|
|
2940
2991
|
───────────────────────────────────────────────────────────────────────
|
|
2941
2992
|
|
|
2942
|
-
➕ mlgym_user_create
|
|
2943
|
-
|
|
2993
|
+
➕ mlgym_user_create - Create new account
|
|
2994
|
+
What users say:
|
|
2995
|
+
• "Create a new account"
|
|
2996
|
+
• "Sign me up"
|
|
2997
|
+
• "Register a new user"
|
|
2998
|
+
• "I need an account"
|
|
2944
2999
|
|
|
2945
|
-
|
|
3000
|
+
Tool call:
|
|
2946
3001
|
mlgym_user_create({
|
|
2947
3002
|
email: "user@example.com",
|
|
2948
3003
|
name: "John Doe",
|
|
2949
3004
|
password: "SecurePass123!",
|
|
2950
|
-
accept_terms: true
|
|
3005
|
+
accept_terms: true // must be true
|
|
2951
3006
|
})
|
|
2952
3007
|
|
|
2953
|
-
🔐 mlgym_auth_login
|
|
2954
|
-
|
|
3008
|
+
🔐 mlgym_auth_login - Login to existing account
|
|
3009
|
+
What users say:
|
|
3010
|
+
• "Login"
|
|
3011
|
+
• "Log me in"
|
|
3012
|
+
• "Authenticate with my credentials"
|
|
3013
|
+
• "Sign in to my account"
|
|
2955
3014
|
|
|
2956
|
-
|
|
3015
|
+
Tool call:
|
|
2957
3016
|
mlgym_auth_login({
|
|
2958
3017
|
email: "user@example.com",
|
|
2959
3018
|
password: "SecurePass123!"
|
|
@@ -2962,17 +3021,25 @@ async function showHelp(args) {
|
|
|
2962
3021
|
❓ HELP
|
|
2963
3022
|
───────────────────────────────────────────────────────────────────────
|
|
2964
3023
|
|
|
2965
|
-
📖 mlgym_help
|
|
2966
|
-
|
|
3024
|
+
📖 mlgym_help - Display this help
|
|
3025
|
+
What users say:
|
|
3026
|
+
• "Help"
|
|
3027
|
+
• "Show me what I can do"
|
|
3028
|
+
• "What commands are available?"
|
|
3029
|
+
• "How do I use mlgym?"
|
|
2967
3030
|
|
|
2968
|
-
|
|
3031
|
+
Tool call:
|
|
2969
3032
|
mlgym_help()
|
|
2970
3033
|
|
|
2971
3034
|
╔═══════════════════════════════════════════════════════════════════════╗
|
|
2972
|
-
║
|
|
3035
|
+
║ COMMON WORKFLOW EXAMPLES ║
|
|
2973
3036
|
╚═══════════════════════════════════════════════════════════════════════╝
|
|
2974
3037
|
|
|
2975
|
-
1️⃣ Complete
|
|
3038
|
+
1️⃣ First Time User - Complete Deployment:
|
|
3039
|
+
|
|
3040
|
+
User: "Deploy to mlgym"
|
|
3041
|
+
|
|
3042
|
+
AI executes:
|
|
2976
3043
|
mlgym_deploy({
|
|
2977
3044
|
project_name: "my-app",
|
|
2978
3045
|
project_description: "My new app",
|
|
@@ -2981,22 +3048,79 @@ async function showHelp(args) {
|
|
|
2981
3048
|
})
|
|
2982
3049
|
|
|
2983
3050
|
2️⃣ Set Environment Variables:
|
|
3051
|
+
|
|
3052
|
+
User: "Set the database URL for my app"
|
|
3053
|
+
|
|
3054
|
+
AI executes:
|
|
2984
3055
|
mlgym_set_env_vars({
|
|
2985
3056
|
project_name: "my-app",
|
|
2986
|
-
variables: {
|
|
3057
|
+
variables: {
|
|
3058
|
+
DATABASE_URL: "postgresql://user:pass@host:5432/db"
|
|
3059
|
+
}
|
|
2987
3060
|
})
|
|
2988
3061
|
|
|
2989
|
-
3️⃣ Configure
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
3062
|
+
3️⃣ Configure Health Check:
|
|
3063
|
+
|
|
3064
|
+
User: "Monitor my /health endpoint every 30 seconds"
|
|
3065
|
+
|
|
3066
|
+
AI executes:
|
|
3067
|
+
mlgym_set_health_check({
|
|
3068
|
+
project_name: "my-app",
|
|
3069
|
+
enabled: true,
|
|
3070
|
+
path: "/health",
|
|
3071
|
+
interval: 30
|
|
3072
|
+
})
|
|
3073
|
+
|
|
3074
|
+
4️⃣ Set Custom Domain:
|
|
3075
|
+
|
|
3076
|
+
User: "Point myapp.com to this deployment"
|
|
3077
|
+
|
|
3078
|
+
AI executes:
|
|
3079
|
+
mlgym_set_domain({
|
|
3080
|
+
project_name: "my-app",
|
|
3081
|
+
domain: "myapp.com"
|
|
3082
|
+
})
|
|
3083
|
+
|
|
3084
|
+
5️⃣ Manually Trigger Deployment:
|
|
3085
|
+
|
|
3086
|
+
User: "Deploy now"
|
|
3087
|
+
|
|
3088
|
+
AI executes:
|
|
3089
|
+
mlgym_deploy_manual({
|
|
3090
|
+
project_name: "my-app"
|
|
3091
|
+
})
|
|
3092
|
+
|
|
3093
|
+
6️⃣ Check Deployment Logs:
|
|
3094
|
+
|
|
3095
|
+
User: "Show me the last 5 deployments"
|
|
3096
|
+
|
|
3097
|
+
AI executes:
|
|
3098
|
+
mlgym_deploy_logs({
|
|
3099
|
+
project_name: "my-app",
|
|
3100
|
+
depth: 5
|
|
3101
|
+
})
|
|
3102
|
+
|
|
3103
|
+
7️⃣ Rollback if Something Breaks:
|
|
3104
|
+
|
|
3105
|
+
User: "Rollback to the previous version"
|
|
3106
|
+
|
|
3107
|
+
AI executes:
|
|
3108
|
+
mlgym_rollback({
|
|
3109
|
+
project_name: "my-app"
|
|
3110
|
+
})
|
|
3111
|
+
|
|
3112
|
+
╔═══════════════════════════════════════════════════════════════════════╗
|
|
3113
|
+
║ QUICK TIPS ║
|
|
3114
|
+
╚═══════════════════════════════════════════════════════════════════════╝
|
|
2993
3115
|
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
3116
|
+
💡 Users speak naturally - AI translates to tool calls
|
|
3117
|
+
💡 Authentication is cached - login once, deploy many times
|
|
3118
|
+
💡 All tools work with project_name to identify the application
|
|
3119
|
+
💡 Most parameters are optional with sensible defaults
|
|
2997
3120
|
|
|
2998
|
-
📚
|
|
2999
|
-
|
|
3121
|
+
📚 Documentation: https://mlgym.info
|
|
3122
|
+
🌐 Backend: https://backend.eu.ezb.net
|
|
3123
|
+
📊 Dashboard: https://platform.mlgym.info
|
|
3000
3124
|
`;
|
|
3001
3125
|
|
|
3002
3126
|
return {
|
package/package.json
CHANGED