s9n-devops-agent 2.0.11-dev.11 → 2.0.11-dev.3

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": "s9n-devops-agent",
3
- "version": "2.0.11-dev.11",
3
+ "version": "2.0.11-dev.3",
4
4
  "description": "CS_DevOpsAgent - Intelligent Git Automation System with multi-agent support and session management",
5
5
  "type": "module",
6
6
  "main": "src/cs-devops-agent-worker.js",
@@ -29,7 +29,7 @@
29
29
  "house-rules:status": "node src/house-rules-manager.js status",
30
30
  "house-rules:update": "node src/house-rules-manager.js update",
31
31
  "house-rules:repair": "./scripts/repair-house-rules.sh",
32
- "test": "NODE_OPTIONS=--experimental-vm-modules jest test_cases/",
32
+ "test": "jest test_cases/",
33
33
  "test:watch": "jest --watch",
34
34
  "test:coverage": "jest --coverage",
35
35
  "test:worktree": "jest test_cases/worktree/",
@@ -19,21 +19,21 @@
19
19
 
20
20
  import fs from 'fs';
21
21
  import path from 'path';
22
- import crypto from 'crypto';
23
- import readline from 'readline';
24
22
  import { fileURLToPath } from 'url';
25
23
  import { dirname } from 'path';
26
- import { spawn, execSync, exec, fork } from 'child_process';
24
+ import { spawn, execSync, exec } from 'child_process';
27
25
  import { credentialsManager } from './credentials-manager.js';
28
26
 
29
27
  // Inject credentials immediately
30
28
  credentialsManager.injectEnv();
31
29
 
32
30
  const __filename = fileURLToPath(import.meta.url);
33
- const __dirname = dirname(__filename);
34
31
  import { hasDockerConfiguration } from './docker-utils.js';
35
32
  import HouseRulesManager from './house-rules-manager.js';
36
33
 
34
+ const __filename = fileURLToPath(import.meta.url);
35
+ const __dirname = dirname(__filename);
36
+
37
37
  // ============================================================================
38
38
  // CONFIGURATION
39
39
  // ============================================================================
@@ -601,30 +601,12 @@ class SessionCoordinator {
601
601
 
602
602
  if (dockerInfo.composeFiles.length > 1) {
603
603
  console.log(`\n${CONFIG.colors.bright}Select docker-compose file:${CONFIG.colors.reset}`);
604
-
605
- // Check running containers for each compose file
606
- for (let i = 0; i < dockerInfo.composeFiles.length; i++) {
607
- const file = dockerInfo.composeFiles[i];
608
- let runningInfo = '';
609
-
610
- try {
611
- // Try to get container count for this compose file
612
- const { execSync } = await import('child_process');
613
- const result = execSync(`docker compose -f "${file.path}" ps -q 2>/dev/null | wc -l`, { encoding: 'utf8' });
614
- const count = parseInt(result.trim());
615
- if (count > 0) {
616
- runningInfo = ` ${CONFIG.colors.green}(${count} running)${CONFIG.colors.reset}`;
617
- }
618
- } catch (err) {
619
- // Ignore errors, just don't show running info
620
- }
621
-
622
- console.log(` ${i + 1}) ${file.name}${runningInfo}`);
623
- console.log(` ${CONFIG.colors.dim}${file.path}${CONFIG.colors.reset}`);
624
- }
604
+ dockerInfo.composeFiles.forEach((file, index) => {
605
+ console.log(` ${index + 1}) ${file.name}`);
606
+ });
625
607
 
626
608
  const fileChoice = await new Promise((resolve) => {
627
- rl.question(`\nChoose file (1-${dockerInfo.composeFiles.length}) [1]: `, (answer) => {
609
+ rl.question(`Choose file (1-${dockerInfo.composeFiles.length}) [1]: `, (answer) => {
628
610
  const choice = parseInt(answer) || 1;
629
611
  if (choice >= 1 && choice <= dockerInfo.composeFiles.length) {
630
612
  resolve(dockerInfo.composeFiles[choice - 1]);