s9n-devops-agent 2.0.6 → 2.0.7
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 +69 -12
package/package.json
CHANGED
|
@@ -1289,13 +1289,27 @@ The DevOps agent will automatically:
|
|
|
1289
1289
|
|
|
1290
1290
|
console.log(`${CONFIG.colors.yellow}══════════════════════════════════════════════════════════════${CONFIG.colors.reset}`);
|
|
1291
1291
|
console.log();
|
|
1292
|
+
console.log(`${CONFIG.colors.bright}${CONFIG.colors.bgYellow} IMPORTANT ${CONFIG.colors.reset} ${CONFIG.colors.yellow}Copy the text above and paste it into your coding agent${CONFIG.colors.reset}`);
|
|
1293
|
+
console.log();
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
/**
|
|
1297
|
+
* Wait for user confirmation after showing instructions
|
|
1298
|
+
*/
|
|
1299
|
+
async waitForConfirmation(sessionId) {
|
|
1300
|
+
const rl = readline.createInterface({
|
|
1301
|
+
input: process.stdin,
|
|
1302
|
+
output: process.stdout
|
|
1303
|
+
});
|
|
1292
1304
|
|
|
1293
|
-
|
|
1294
|
-
|
|
1305
|
+
await new Promise(resolve => {
|
|
1306
|
+
rl.question(`${CONFIG.colors.green}Press Enter once you've copied and pasted the instructions to your agent...${CONFIG.colors.reset} `, resolve);
|
|
1307
|
+
});
|
|
1308
|
+
rl.close();
|
|
1295
1309
|
|
|
1296
|
-
|
|
1297
|
-
console.log(`${CONFIG.colors.green}✓ DevOps agent is starting...${CONFIG.colors.reset}`);
|
|
1310
|
+
console.log(`\n${CONFIG.colors.green}✓ DevOps agent is starting...${CONFIG.colors.reset}`);
|
|
1298
1311
|
console.log(`${CONFIG.colors.dim}Full instructions saved to: ${CONFIG.instructionsDir}/${sessionId}.md${CONFIG.colors.reset}`);
|
|
1312
|
+
console.log();
|
|
1299
1313
|
}
|
|
1300
1314
|
|
|
1301
1315
|
/**
|
|
@@ -1636,6 +1650,7 @@ The DevOps agent is monitoring this worktree for changes.
|
|
|
1636
1650
|
if (lockData.instructions) {
|
|
1637
1651
|
console.log('\n'); // Add spacing
|
|
1638
1652
|
this.displayInstructions(lockData.instructions, session.sessionId, options.task || 'development');
|
|
1653
|
+
await this.waitForConfirmation(session.sessionId);
|
|
1639
1654
|
}
|
|
1640
1655
|
|
|
1641
1656
|
return session;
|
|
@@ -2002,13 +2017,25 @@ async function main() {
|
|
|
2002
2017
|
if (!sessionId) {
|
|
2003
2018
|
// No session ID provided - show interactive menu
|
|
2004
2019
|
console.log(`${CONFIG.colors.bright}DevOps Agent Session Manager${CONFIG.colors.reset}\n`);
|
|
2020
|
+
|
|
2021
|
+
// Show existing sessions first
|
|
2022
|
+
const locks = fs.existsSync(coordinator.locksPath) ?
|
|
2023
|
+
fs.readdirSync(coordinator.locksPath).filter(f => f.endsWith('.lock')) : [];
|
|
2024
|
+
|
|
2025
|
+
if (locks.length > 0) {
|
|
2026
|
+
console.log(`${CONFIG.colors.blue}Active Sessions:${CONFIG.colors.reset}`);
|
|
2027
|
+
coordinator.listSessions();
|
|
2028
|
+
console.log();
|
|
2029
|
+
} else {
|
|
2030
|
+
console.log(`${CONFIG.colors.dim}No active sessions${CONFIG.colors.reset}\n`);
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2005
2033
|
console.log('What would you like to do?\n');
|
|
2006
2034
|
console.log(` ${CONFIG.colors.green}1${CONFIG.colors.reset} - Create a new session`);
|
|
2007
|
-
console.log(` ${CONFIG.colors.green}2${CONFIG.colors.reset} -
|
|
2008
|
-
console.log(` ${CONFIG.colors.green}3${CONFIG.colors.reset} - Close a session`);
|
|
2035
|
+
console.log(` ${CONFIG.colors.green}2${CONFIG.colors.reset} - Close a session`);
|
|
2009
2036
|
console.log(` ${CONFIG.colors.green}q${CONFIG.colors.reset} - Quit\n`);
|
|
2010
2037
|
|
|
2011
|
-
|
|
2038
|
+
let rl = readline.createInterface({
|
|
2012
2039
|
input: process.stdin,
|
|
2013
2040
|
output: process.stdout
|
|
2014
2041
|
});
|
|
@@ -2019,13 +2046,43 @@ async function main() {
|
|
|
2019
2046
|
rl.close();
|
|
2020
2047
|
|
|
2021
2048
|
switch(choice) {
|
|
2022
|
-
case '1':
|
|
2023
|
-
|
|
2049
|
+
case '1': {
|
|
2050
|
+
// Prompt for agent type
|
|
2051
|
+
rl = readline.createInterface({
|
|
2052
|
+
input: process.stdin,
|
|
2053
|
+
output: process.stdout
|
|
2054
|
+
});
|
|
2055
|
+
|
|
2056
|
+
console.log(`\n${CONFIG.colors.blue}Select Agent Type:${CONFIG.colors.reset}`);
|
|
2057
|
+
console.log(` 1) Claude (default)`);
|
|
2058
|
+
console.log(` 2) Cline`);
|
|
2059
|
+
console.log(` 3) Cursor`);
|
|
2060
|
+
console.log(` 4) Copilot`);
|
|
2061
|
+
console.log(` 5) Custom\n`);
|
|
2062
|
+
|
|
2063
|
+
const agentChoice = await new Promise(resolve => {
|
|
2064
|
+
rl.question('Agent [1]: ', resolve);
|
|
2065
|
+
});
|
|
2066
|
+
|
|
2067
|
+
let agent = 'claude';
|
|
2068
|
+
switch(agentChoice.trim() || '1') {
|
|
2069
|
+
case '1': agent = 'claude'; break;
|
|
2070
|
+
case '2': agent = 'cline'; break;
|
|
2071
|
+
case '3': agent = 'cursor'; break;
|
|
2072
|
+
case '4': agent = 'copilot'; break;
|
|
2073
|
+
case '5':
|
|
2074
|
+
const customAgent = await new Promise(resolve => {
|
|
2075
|
+
rl.question('Enter agent name: ', resolve);
|
|
2076
|
+
});
|
|
2077
|
+
agent = customAgent.trim() || 'claude';
|
|
2078
|
+
break;
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
rl.close();
|
|
2082
|
+
await coordinator.createAndStart({ agent });
|
|
2024
2083
|
break;
|
|
2084
|
+
}
|
|
2025
2085
|
case '2':
|
|
2026
|
-
coordinator.listSessions();
|
|
2027
|
-
break;
|
|
2028
|
-
case '3':
|
|
2029
2086
|
await coordinator.selectAndCloseSession();
|
|
2030
2087
|
break;
|
|
2031
2088
|
case 'q':
|