s9n-devops-agent 1.5.2 → 1.5.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "s9n-devops-agent",
3
- "version": "1.5.2",
3
+ "version": "1.5.4",
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",
@@ -1484,6 +1484,16 @@ The DevOps agent is monitoring this worktree for changes.
1484
1484
  silent: false
1485
1485
  });
1486
1486
 
1487
+ // Wait for agent to initialize and display its interactive commands
1488
+ // Then show the copy-paste instructions
1489
+ setTimeout(async () => {
1490
+ console.log('\n'); // Add spacing
1491
+
1492
+ // Generate and display instructions
1493
+ const instructions = this.generateClaudeInstructions(sessionData);
1494
+ this.displayInstructions(instructions, sessionId, sessionData.task);
1495
+ }, 3000); // Wait 3 seconds for agent to show interactive commands
1496
+
1487
1497
  child.on('exit', (code) => {
1488
1498
  console.log(`${CONFIG.colors.yellow}Agent exited with code: ${code}${CONFIG.colors.reset}`);
1489
1499
 
@@ -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.5.2 | Build 20251009.4"
44
+ echo " Version 1.5.4 | Build 20251009.6"
45
45
  echo " "
46
46
  echo " Copyright (c) 2024 SecondBrain Labs"
47
47
  echo " Author: Sachin Dev Duggal"
@@ -183,13 +183,36 @@ select_session() {
183
183
  return 0
184
184
  elif [[ "$choice" =~ ^[0-9]+$ ]] && [[ "$choice" -ge 1 ]] && [[ "$choice" -le "${#session_files[@]}" ]]; then
185
185
  # Use existing session
186
+ # In zsh, arrays are 1-indexed, so $choice maps directly
186
187
  local selected_file="${session_files[$choice]}"
188
+
189
+ # Validate that the file exists
190
+ if [[ ! -f "$selected_file" ]]; then
191
+ echo -e "${RED}Error: Session file not found: $selected_file${NC}"
192
+ return 1
193
+ fi
194
+
187
195
  local session_data=$(cat "$selected_file")
196
+
197
+ # Validate session data was read
198
+ if [[ -z "$session_data" ]]; then
199
+ echo -e "${RED}Error: Could not read session data from: $selected_file${NC}"
200
+ return 1
201
+ fi
202
+
188
203
  local session_id=$(echo "$session_data" | grep -o '"sessionId"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*: *"\([^"]*\)".*/\1/')
189
204
  local worktree_path=$(echo "$session_data" | grep -o '"worktreePath"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*: *"\([^"]*\)".*/\1/')
190
205
  local task=$(echo "$session_data" | grep -o '"task"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*: *"\([^"]*\)".*/\1/')
191
206
  local branch_name=$(echo "$session_data" | grep -o '"branchName"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*: *"\([^"]*\)".*/\1/')
192
207
 
208
+ # Validate we got a session ID
209
+ if [[ -z "$session_id" ]]; then
210
+ echo -e "${RED}Error: Could not extract session ID from file: $selected_file${NC}"
211
+ echo -e "${YELLOW}File contents:${NC}"
212
+ cat "$selected_file"
213
+ return 1
214
+ fi
215
+
193
216
  echo
194
217
  echo -e "${GREEN}Using existing session: ${session_id}${NC}"
195
218