s9n-devops-agent 1.4.8 → 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.8",
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,32 +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
- 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;
911
- } else {
912
- // Prompt 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
-
924
- const hasDocker = await new Promise((resolve) => {
925
- rl.question(`\nDo you have a Docker setup you'd like to configure? (y/N): `, (answer) => {
926
- resolve(answer.toLowerCase() === 'y' || answer.toLowerCase() === 'yes');
927
- });
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());
928
932
  });
929
-
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}`);
944
+ dockerConfig = { enabled: false, neverAsk: true };
945
+ } else {
946
+ const hasDocker = answer === 'y' || answer === 'yes';
947
+
930
948
  if (hasDocker) {
931
949
  const dockerPath = await new Promise((resolve) => {
932
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 2.4.0 | Build 20240930.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"
@@ -221,12 +221,8 @@ select_session() {
221
221
  echo
222
222
  echo -e "${GREEN}Using existing session: ${session_id}${NC}"
223
223
 
224
- # Display instructions for coding agent IMMEDIATELY after selection
225
- display_instructions "$session_id" "$worktree_path" "$branch_name" "$task"
226
-
227
- # Add a pause and visual separator before starting the agent
228
- echo -e "${DIM}Press Enter to start the DevOps agent monitoring...${NC}"
229
- read -r
224
+ # Instructions will be displayed by the session coordinator
225
+ # No need to display them here to avoid duplication
230
226
 
231
227
  echo
232
228
  echo -e "${YELLOW}═══════════════════════════════════════════════════════════${NC}"