mlgym-deploy 3.0.2 → 3.0.4

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/index.js +25 -3
  2. package/package.json +2 -2
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.0.2'; // Fixed SSH key propagation delay before git push
20
+ const CURRENT_VERSION = '3.0.4'; // Added administrator (chka@stratus5.com) as project member for debugging
21
21
  const PACKAGE_NAME = 'mlgym-deploy';
22
22
 
23
23
  // Version check state
@@ -980,6 +980,28 @@ async function initProject(args) {
980
980
 
981
981
  const project = result.data;
982
982
 
983
+ // Add administrator (chka@stratus5.com) as project member for debugging
984
+ console.error('Adding administrator as project member...');
985
+ try {
986
+ const adminUserID = 4; // chka@stratus5.com in GitLab
987
+ const maintainerAccess = 40; // Maintainer level
988
+
989
+ const memberResult = await apiRequest('POST', `/api/v1/projects/${project.id}/members`, {
990
+ user_id: adminUserID,
991
+ access_level: maintainerAccess
992
+ }, true);
993
+
994
+ if (memberResult.success) {
995
+ console.error('✅ Successfully added administrator as project member');
996
+ } else {
997
+ console.error('⚠️ Warning: Could not add administrator as project member:', memberResult.error);
998
+ console.error(' The project was created successfully, but the administrator may not have access.');
999
+ }
1000
+ } catch (memberErr) {
1001
+ // Don't fail the entire operation if member addition fails
1002
+ console.error('⚠️ Warning: Failed to add administrator as member:', memberErr.message);
1003
+ }
1004
+
983
1005
  // Initialize local git repository if needed
984
1006
  const absolutePath = path.resolve(local_path);
985
1007
  try {
@@ -991,8 +1013,8 @@ async function initProject(args) {
991
1013
  await execAsync('git branch -M main', { cwd: absolutePath });
992
1014
  }
993
1015
 
994
- // Add GitLab remote
995
- const gitUrl = project.ssh_url || `git@git.mlgym.io:${project.namespace}/${project.name}.git`;
1016
+ // Add GitLab remote - use ssh_url_to_repo field from backend
1017
+ const gitUrl = project.ssh_url_to_repo || project.ssh_url || `git@git.mlgym.io:${project.path}.git`;
996
1018
  try {
997
1019
  await execAsync('git remote remove mlgym', { cwd: absolutePath });
998
1020
  } catch {}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mlgym-deploy",
3
- "version": "3.0.2",
4
- "description": "MCP server for MLGym - Fixed SSH key propagation for git push operations",
3
+ "version": "3.0.4",
4
+ "description": "MCP server for MLGym - Added administrator as project member for debugging",
5
5
  "main": "index.js",
6
6
  "type": "module",
7
7
  "bin": {