s9n-devops-agent 2.0.5 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "s9n-devops-agent",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
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",
@@ -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
- // Pause before continuing
1294
- console.log(`${CONFIG.colors.dim}Press Enter to start the DevOps agent monitoring...${CONFIG.colors.reset}`);
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
- // Status info
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;
@@ -1960,11 +1975,12 @@ The DevOps agent is monitoring this worktree for changes.
1960
1975
 
1961
1976
  async function main() {
1962
1977
  // Display copyright and license information immediately
1978
+ const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8'));
1963
1979
  console.log();
1964
1980
  console.log("=".repeat(70));
1965
1981
  console.log();
1966
1982
  console.log(" CS_DevOpsAgent - Intelligent Git Automation System");
1967
- console.log(" Version 1.7.2 | Build 20251010.03");
1983
+ console.log(` Version ${packageJson.version} | Build ${new Date().toISOString().split('T')[0].replace(/-/g, '')}`);
1968
1984
  console.log(" ");
1969
1985
  console.log(" Copyright (c) 2024 SecondBrain Labs");
1970
1986
  console.log(" Author: Sachin Dev Duggal");
@@ -1999,8 +2015,84 @@ async function main() {
1999
2015
  // Start agent for a session
2000
2016
  const sessionId = args[1];
2001
2017
  if (!sessionId) {
2002
- console.error('Usage: start <session-id>');
2003
- process.exit(1);
2018
+ // No session ID provided - show interactive menu
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
+
2033
+ console.log('What would you like to do?\n');
2034
+ console.log(` ${CONFIG.colors.green}1${CONFIG.colors.reset} - Create a new session`);
2035
+ console.log(` ${CONFIG.colors.green}2${CONFIG.colors.reset} - Close a session`);
2036
+ console.log(` ${CONFIG.colors.green}q${CONFIG.colors.reset} - Quit\n`);
2037
+
2038
+ let rl = readline.createInterface({
2039
+ input: process.stdin,
2040
+ output: process.stdout
2041
+ });
2042
+
2043
+ const choice = await new Promise(resolve => {
2044
+ rl.question('Enter your choice: ', resolve);
2045
+ });
2046
+ rl.close();
2047
+
2048
+ switch(choice) {
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 });
2083
+ break;
2084
+ }
2085
+ case '2':
2086
+ await coordinator.selectAndCloseSession();
2087
+ break;
2088
+ case 'q':
2089
+ case 'Q':
2090
+ console.log('Goodbye!');
2091
+ break;
2092
+ default:
2093
+ console.log(`${CONFIG.colors.red}Invalid choice${CONFIG.colors.reset}`);
2094
+ }
2095
+ break;
2004
2096
  }
2005
2097
  await coordinator.startAgent(sessionId);
2006
2098
  break;