s9n-devops-agent 1.4.9 → 1.5.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "s9n-devops-agent",
3
- "version": "1.4.9",
3
+ "version": "1.5.0",
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",
@@ -879,7 +879,7 @@ class SessionCoordinator {
879
879
  // Check for Docker configuration and ask about restart preference
880
880
  let dockerConfig = null;
881
881
 
882
- // Check if user has already set "Never ask" preference
882
+ // Check if user has already set "Never ask" preference (ONCE, at the top)
883
883
  const projectSettings = this.loadProjectSettings();
884
884
  if (projectSettings.dockerConfig && projectSettings.dockerConfig.neverAsk === true) {
885
885
  // User selected 'Never' - skip Docker configuration entirely
@@ -888,6 +888,7 @@ class SessionCoordinator {
888
888
  const dockerInfo = hasDockerConfiguration(process.cwd());
889
889
 
890
890
  if (dockerInfo.hasCompose || dockerInfo.hasDockerfile) {
891
+ // Docker detected - show what we found and ask about restart preferences
891
892
  console.log(`\n${CONFIG.colors.yellow}Docker Configuration Detected${CONFIG.colors.reset}`);
892
893
 
893
894
  if (dockerInfo.hasCompose) {
@@ -901,36 +902,49 @@ class SessionCoordinator {
901
902
  console.log(`${CONFIG.colors.dim}Found Dockerfile${CONFIG.colors.reset}`);
902
903
  }
903
904
 
905
+ // promptForDockerConfig already handles Y/N/A/Never options
904
906
  dockerConfig = await this.promptForDockerConfig();
907
+ } else if (projectSettings.dockerConfig && projectSettings.dockerConfig.alwaysEnabled) {
908
+ // Use saved configuration even if Docker not auto-detected
909
+ console.log(`\n${CONFIG.colors.dim}Using saved Docker configuration${CONFIG.colors.reset}`);
910
+ dockerConfig = projectSettings.dockerConfig;
905
911
  } else {
906
- // No Docker configuration found - check saved preference first
907
- // CRITICAL: Check neverAsk before any prompting
908
- if (projectSettings.dockerConfig && projectSettings.dockerConfig.neverAsk === true) {
909
- // User selected 'Never' - skip Docker configuration entirely
912
+ // No Docker detected and no saved preference - ask user
913
+ const rl = readline.createInterface({
914
+ input: process.stdin,
915
+ output: process.stdout
916
+ });
917
+
918
+ console.log(`\n${CONFIG.colors.yellow}No Docker Configuration Found${CONFIG.colors.reset}`);
919
+ console.log(`${CONFIG.colors.dim}I couldn't find any docker-compose files in:${CONFIG.colors.reset}`);
920
+ console.log(`${CONFIG.colors.dim} • Project directory${CONFIG.colors.reset}`);
921
+ console.log(`${CONFIG.colors.dim} • Parent directory${CONFIG.colors.reset}`);
922
+ console.log(`${CONFIG.colors.dim} • Parent/Infrastructure or parent/infrastructure${CONFIG.colors.reset}`);
923
+ console.log();
924
+ console.log(`${CONFIG.colors.bright}Options:${CONFIG.colors.reset}`);
925
+ console.log(` ${CONFIG.colors.green}Y${CONFIG.colors.reset}) Yes - I have a Docker setup to configure`);
926
+ console.log(` ${CONFIG.colors.red}N${CONFIG.colors.reset}) No - Skip for this session`);
927
+ console.log(` ${CONFIG.colors.magenta}Never${CONFIG.colors.reset}) Never ask again (permanently disable)`);
928
+
929
+ const answer = await new Promise((resolve) => {
930
+ rl.question(`\nDo you have a Docker setup? (Y/N/Never) [N]: `, (ans) => {
931
+ resolve(ans.trim().toLowerCase());
932
+ });
933
+ });
934
+
935
+ // Handle 'Never' option
936
+ if (answer === 'never' || answer === 'nev') {
937
+ rl.close();
938
+ projectSettings.dockerConfig = {
939
+ enabled: false,
940
+ neverAsk: true
941
+ };
942
+ this.saveProjectSettings(projectSettings);
943
+ console.log(`${CONFIG.colors.dim}Docker configuration disabled permanently. Edit local_deploy/project-settings.json to change.${CONFIG.colors.reset}`);
910
944
  dockerConfig = { enabled: false, neverAsk: true };
911
- } else if (projectSettings.dockerConfig && projectSettings.dockerConfig.alwaysEnabled) {
912
- // Use saved configuration even if Docker not auto-detected
913
- console.log(`\n${CONFIG.colors.dim}Using saved Docker configuration${CONFIG.colors.reset}`);
914
- dockerConfig = projectSettings.dockerConfig;
915
945
  } else {
916
- // Prompt user
917
- const rl = readline.createInterface({
918
- input: process.stdin,
919
- output: process.stdout
920
- });
921
-
922
- console.log(`\n${CONFIG.colors.yellow}No Docker Configuration Found${CONFIG.colors.reset}`);
923
- console.log(`${CONFIG.colors.dim}I couldn't find any docker-compose files in:${CONFIG.colors.reset}`);
924
- console.log(`${CONFIG.colors.dim} • Project directory${CONFIG.colors.reset}`);
925
- console.log(`${CONFIG.colors.dim} • Parent directory${CONFIG.colors.reset}`);
926
- console.log(`${CONFIG.colors.dim} • Parent/Infrastructure or parent/infrastructure${CONFIG.colors.reset}`);
927
-
928
- const hasDocker = await new Promise((resolve) => {
929
- rl.question(`\nDo you have a Docker setup you'd like to configure? (y/N): `, (answer) => {
930
- resolve(answer.toLowerCase() === 'y' || answer.toLowerCase() === 'yes');
931
- });
932
- });
933
-
946
+ const hasDocker = answer === 'y' || answer === 'yes';
947
+
934
948
  if (hasDocker) {
935
949
  const dockerPath = await new Promise((resolve) => {
936
950
  rl.question(`\nEnter the full path to your docker-compose file: `, (answer) => {
@@ -41,7 +41,7 @@ show_copyright() {
41
41
  echo "======================================================================"
42
42
  echo
43
43
  echo " CS_DevOpsAgent - Intelligent Git Automation System"
44
- echo " Version 1.4.9 | Build 20251009.1"
44
+ echo " Version 1.5.0 | Build 20251009.2"
45
45
  echo " "
46
46
  echo " Copyright (c) 2024 SecondBrain Labs"
47
47
  echo " Author: Sachin Dev Duggal"