s9n-devops-agent 1.0.0 → 1.1.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/README.md +5 -5
- package/package.json +1 -1
- package/src/session-coordinator.js +10 -9
- package/start-devops-session.sh +11 -6
package/README.md
CHANGED
|
@@ -96,9 +96,9 @@ s9n-devops-agent start
|
|
|
96
96
|
s9n-devops-agent create --task "implement-api"
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
### Working with AI
|
|
99
|
+
### Working with AI Development Agents
|
|
100
100
|
|
|
101
|
-
When you start a session, you'll receive instructions to paste into your AI
|
|
101
|
+
When you start a session, you'll receive instructions to paste into your AI development agent (Claude, Cursor, Cline, GitHub Copilot, etc.):
|
|
102
102
|
|
|
103
103
|
```
|
|
104
104
|
I'm working in a DevOps-managed session with the following setup:
|
|
@@ -186,9 +186,9 @@ Configuration is stored in:
|
|
|
186
186
|
# Enter task: implement-authentication
|
|
187
187
|
```
|
|
188
188
|
|
|
189
|
-
2. **Copy Instructions to AI
|
|
190
|
-
- The tool provides instructions to paste into Claude
|
|
191
|
-
- The AI works in the isolated worktree
|
|
189
|
+
2. **Copy Instructions to AI Development Agent**:
|
|
190
|
+
- The tool provides instructions to paste into your AI agent (Claude, Cursor, Cline, etc.)
|
|
191
|
+
- The AI agent works in the isolated worktree
|
|
192
192
|
|
|
193
193
|
3. **AI Makes Changes**:
|
|
194
194
|
- AI writes code in the worktree directory
|
package/package.json
CHANGED
|
@@ -629,7 +629,7 @@ class SessionCoordinator {
|
|
|
629
629
|
fs.writeFileSync(instructionsFile, instructions.markdown);
|
|
630
630
|
|
|
631
631
|
// Display instructions
|
|
632
|
-
this.displayInstructions(instructions, sessionId, task);
|
|
632
|
+
this.displayInstructions(instructions, sessionId, task, agentType);
|
|
633
633
|
|
|
634
634
|
// Create session config in worktree
|
|
635
635
|
this.createWorktreeConfig(worktreePath, lockData);
|
|
@@ -650,7 +650,7 @@ class SessionCoordinator {
|
|
|
650
650
|
}
|
|
651
651
|
|
|
652
652
|
/**
|
|
653
|
-
* Generate instructions for
|
|
653
|
+
* Generate instructions for the specified AI development agent
|
|
654
654
|
*/
|
|
655
655
|
generateClaudeInstructions(sessionData) {
|
|
656
656
|
const { sessionId, worktreePath, branchName, task } = sessionData;
|
|
@@ -677,7 +677,7 @@ INSTRUCTIONS:
|
|
|
677
677
|
- **Worktree Path:** \`${worktreePath}\`
|
|
678
678
|
- **Branch:** \`${branchName}\`
|
|
679
679
|
|
|
680
|
-
## Instructions for
|
|
680
|
+
## Instructions for ${sessionData.agentType.charAt(0).toUpperCase() + sessionData.agentType.slice(1)}
|
|
681
681
|
|
|
682
682
|
### Step 1: Navigate to Your Worktree
|
|
683
683
|
\`\`\`bash
|
|
@@ -731,12 +731,13 @@ The DevOps agent will automatically:
|
|
|
731
731
|
/**
|
|
732
732
|
* Display instructions in a user-friendly format
|
|
733
733
|
*/
|
|
734
|
-
displayInstructions(instructions, sessionId, task) {
|
|
735
|
-
|
|
734
|
+
displayInstructions(instructions, sessionId, task, agentType = 'your AI agent') {
|
|
735
|
+
const agentName = agentType.charAt(0).toUpperCase() + agentType.slice(1);
|
|
736
|
+
console.log(`\n${CONFIG.colors.bgGreen}${CONFIG.colors.bright} Instructions for ${agentName} ${CONFIG.colors.reset}\n`);
|
|
736
737
|
|
|
737
738
|
// Clean separator
|
|
738
739
|
console.log(`${CONFIG.colors.yellow}══════════════════════════════════════════════════════════════${CONFIG.colors.reset}`);
|
|
739
|
-
console.log(`${CONFIG.colors.bright}COPY AND PASTE THIS ENTIRE BLOCK INTO
|
|
740
|
+
console.log(`${CONFIG.colors.bright}COPY AND PASTE THIS ENTIRE BLOCK INTO ${agentName.toUpperCase()} BEFORE YOUR PROMPT:${CONFIG.colors.reset}`);
|
|
740
741
|
console.log(`${CONFIG.colors.yellow}──────────────────────────────────────────────────────────────${CONFIG.colors.reset}`);
|
|
741
742
|
console.log();
|
|
742
743
|
|
|
@@ -1192,9 +1193,9 @@ ${CONFIG.colors.blue}Examples:${CONFIG.colors.reset}
|
|
|
1192
1193
|
|
|
1193
1194
|
${CONFIG.colors.yellow}Typical Workflow:${CONFIG.colors.reset}
|
|
1194
1195
|
1. Run: ${CONFIG.colors.green}node session-coordinator.js create-and-start${CONFIG.colors.reset}
|
|
1195
|
-
2. Copy the displayed instructions to Claude
|
|
1196
|
-
3.
|
|
1197
|
-
4.
|
|
1196
|
+
2. Copy the displayed instructions to your AI development agent (Claude, Cursor, Cline, etc.)
|
|
1197
|
+
3. The AI agent navigates to the worktree and starts working
|
|
1198
|
+
4. DevOps agent automatically commits and pushes changes
|
|
1198
1199
|
`);
|
|
1199
1200
|
}
|
|
1200
1201
|
}
|
package/start-devops-session.sh
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# This script provides a user-friendly way to start DevOps agent sessions.
|
|
8
8
|
# It handles the complete workflow:
|
|
9
9
|
# 1. Ask if using existing session or creating new
|
|
10
|
-
# 2. If new, creates session and generates instructions for
|
|
10
|
+
# 2. If new, creates session and generates instructions for the AI development agent
|
|
11
11
|
# 3. Starts the DevOps agent monitoring the appropriate worktree
|
|
12
12
|
#
|
|
13
13
|
# ============================================================================
|
|
@@ -62,12 +62,13 @@ display_instructions() {
|
|
|
62
62
|
local worktree_path="$2"
|
|
63
63
|
local branch_name="$3"
|
|
64
64
|
local task="$4"
|
|
65
|
+
local agent_type="${5:-AI Development Agent}"
|
|
65
66
|
|
|
66
67
|
echo
|
|
67
|
-
echo -e "${BG_GREEN}${BOLD} Instructions for
|
|
68
|
+
echo -e "${BG_GREEN}${BOLD} Instructions for ${agent_type} ${NC}"
|
|
68
69
|
echo
|
|
69
70
|
echo -e "${YELLOW}══════════════════════════════════════════════════════════════${NC}"
|
|
70
|
-
echo -e "${BOLD}COPY AND PASTE THIS ENTIRE BLOCK INTO
|
|
71
|
+
echo -e "${BOLD}COPY AND PASTE THIS ENTIRE BLOCK INTO YOUR AI AGENT BEFORE YOUR PROMPT:${NC}"
|
|
71
72
|
echo -e "${YELLOW}──────────────────────────────────────────────────────────────${NC}"
|
|
72
73
|
echo
|
|
73
74
|
echo "I'm working in a DevOps-managed session with the following setup:"
|
|
@@ -215,8 +216,12 @@ select_session() {
|
|
|
215
216
|
echo
|
|
216
217
|
echo -e "${GREEN}Using existing session: ${session_id}${NC}"
|
|
217
218
|
|
|
218
|
-
#
|
|
219
|
-
|
|
219
|
+
# Extract agent type from session data
|
|
220
|
+
local agent_type=$(echo "$session_data" | grep -o '"agentType"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*: *"\([^"]*\)".*/\1/')
|
|
221
|
+
[[ -z "$agent_type" ]] && agent_type="AI Agent"
|
|
222
|
+
|
|
223
|
+
# Display instructions for the AI agent IMMEDIATELY after selection
|
|
224
|
+
display_instructions "$session_id" "$worktree_path" "$branch_name" "$task" "$agent_type"
|
|
220
225
|
|
|
221
226
|
# Add a pause and visual separator before starting the agent
|
|
222
227
|
echo -e "${DIM}Press Enter to start the DevOps agent monitoring...${NC}"
|
|
@@ -260,7 +265,7 @@ main() {
|
|
|
260
265
|
echo
|
|
261
266
|
echo "This tool will:"
|
|
262
267
|
echo " 1. Help you create or select a session"
|
|
263
|
-
echo " 2. Generate instructions for
|
|
268
|
+
echo " 2. Generate instructions for your AI development agent"
|
|
264
269
|
echo " 3. Start the DevOps agent to monitor changes"
|
|
265
270
|
echo
|
|
266
271
|
|