s9n-devops-agent 1.5.0 → 1.5.2
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 +1 -1
- package/src/session-coordinator.js +15 -11
- package/start-devops-session.sh +3 -31
package/package.json
CHANGED
|
@@ -1067,12 +1067,15 @@ class SessionCoordinator {
|
|
|
1067
1067
|
const instructionsFile = path.join(this.instructionsPath, `${sessionId}.md`);
|
|
1068
1068
|
fs.writeFileSync(instructionsFile, instructions.markdown);
|
|
1069
1069
|
|
|
1070
|
-
//
|
|
1071
|
-
|
|
1070
|
+
// DON'T display instructions here - they will be shown after agent starts
|
|
1071
|
+
// to avoid showing them before the agent's interactive commands
|
|
1072
1072
|
|
|
1073
1073
|
// Create session config in worktree
|
|
1074
1074
|
this.createWorktreeConfig(worktreePath, lockData);
|
|
1075
1075
|
|
|
1076
|
+
// Store instructions in lockData so createAndStart can access them
|
|
1077
|
+
lockData.instructions = instructions;
|
|
1078
|
+
|
|
1076
1079
|
return {
|
|
1077
1080
|
sessionId,
|
|
1078
1081
|
worktreePath,
|
|
@@ -1565,20 +1568,21 @@ The DevOps agent is monitoring this worktree for changes.
|
|
|
1565
1568
|
|
|
1566
1569
|
console.log(`\n${CONFIG.colors.yellow}Starting agent for session ${session.sessionId}...${CONFIG.colors.reset}`);
|
|
1567
1570
|
|
|
1568
|
-
// Start the agent
|
|
1571
|
+
// Start the agent
|
|
1569
1572
|
await this.startAgent(session.sessionId);
|
|
1570
1573
|
|
|
1571
1574
|
// Wait for agent to initialize and show its interactive commands
|
|
1572
1575
|
await new Promise(resolve => setTimeout(resolve, 3000));
|
|
1573
1576
|
|
|
1574
|
-
//
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
const
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1577
|
+
// NOW display instructions AFTER the agent's interactive commands have been shown
|
|
1578
|
+
// Read the lock file to get the stored instructions
|
|
1579
|
+
const lockFile = path.join(this.locksPath, `${session.sessionId}.lock`);
|
|
1580
|
+
const lockData = JSON.parse(fs.readFileSync(lockFile, 'utf8'));
|
|
1581
|
+
|
|
1582
|
+
if (lockData.instructions) {
|
|
1583
|
+
console.log('\n'); // Add spacing
|
|
1584
|
+
this.displayInstructions(lockData.instructions, session.sessionId, options.task || 'development');
|
|
1585
|
+
}
|
|
1582
1586
|
|
|
1583
1587
|
return session;
|
|
1584
1588
|
}
|
package/start-devops-session.sh
CHANGED
|
@@ -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.
|
|
44
|
+
echo " Version 1.5.2 | Build 20251009.4"
|
|
45
45
|
echo " "
|
|
46
46
|
echo " Copyright (c) 2024 SecondBrain Labs"
|
|
47
47
|
echo " Author: Sachin Dev Duggal"
|
|
@@ -62,36 +62,8 @@ show_header() {
|
|
|
62
62
|
echo
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
#
|
|
66
|
-
|
|
67
|
-
local session_id="$1"
|
|
68
|
-
local worktree_path="$2"
|
|
69
|
-
local branch_name="$3"
|
|
70
|
-
local task="$4"
|
|
71
|
-
|
|
72
|
-
echo
|
|
73
|
-
echo -e "${BG_GREEN}${BOLD} Instructions for Your Coding Agent ${NC}"
|
|
74
|
-
echo
|
|
75
|
-
echo -e "${YELLOW}══════════════════════════════════════════════════════════════${NC}"
|
|
76
|
-
echo -e "${BOLD}COPY AND PASTE THIS ENTIRE BLOCK INTO YOUR CODING AGENT BEFORE YOUR PROMPT:${NC}"
|
|
77
|
-
echo -e "${YELLOW}──────────────────────────────────────────────────────────────${NC}"
|
|
78
|
-
echo
|
|
79
|
-
echo "I'm working in a DevOps-managed session with the following setup:"
|
|
80
|
-
echo "- Session ID: ${session_id}"
|
|
81
|
-
echo "- Working Directory: ${worktree_path}"
|
|
82
|
-
echo "- Task: ${task}"
|
|
83
|
-
echo ""
|
|
84
|
-
echo "Please switch to this directory before making any changes:"
|
|
85
|
-
echo "cd \"${worktree_path}\""
|
|
86
|
-
echo ""
|
|
87
|
-
echo "Write commit messages to: .devops-commit-${session_id}.msg"
|
|
88
|
-
echo "The DevOps agent will automatically commit and push changes."
|
|
89
|
-
echo
|
|
90
|
-
echo -e "${YELLOW}══════════════════════════════════════════════════════════════${NC}"
|
|
91
|
-
echo
|
|
92
|
-
echo -e "${GREEN}✓ DevOps agent will monitor for changes${NC}"
|
|
93
|
-
echo
|
|
94
|
-
}
|
|
65
|
+
# NOTE: display_instructions function removed - session coordinator handles this now
|
|
66
|
+
# to prevent duplicate copy-paste instructions
|
|
95
67
|
|
|
96
68
|
# Function to list existing sessions
|
|
97
69
|
list_sessions() {
|