s9n-devops-agent 2.0.6 → 2.0.8

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.6",
3
+ "version": "2.0.8",
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",
@@ -282,9 +282,25 @@ class SessionCoordinator {
282
282
 
283
283
  if (updatedSections.length > 0) {
284
284
  console.log(`${CONFIG.colors.dim}Sections with updates: ${updatedSections.join(', ')}${CONFIG.colors.reset}`);
285
- const result = await houseRulesManager.updateHouseRules();
286
- if (result.updated) {
287
- console.log(`${CONFIG.colors.green}✓${CONFIG.colors.reset} Updated ${result.totalChanges} section(s)`);
285
+ console.log(`${CONFIG.colors.dim}Your custom rules will be preserved.${CONFIG.colors.reset}`);
286
+
287
+ const rl = readline.createInterface({
288
+ input: process.stdin,
289
+ output: process.stdout
290
+ });
291
+
292
+ const answer = await new Promise(resolve => {
293
+ rl.question(`\nUpdate house rules now? (Y/n): `, resolve);
294
+ });
295
+ rl.close();
296
+
297
+ if (answer.toLowerCase() !== 'n' && answer.toLowerCase() !== 'no') {
298
+ const result = await houseRulesManager.updateHouseRules();
299
+ if (result.updated) {
300
+ console.log(`${CONFIG.colors.green}✓${CONFIG.colors.reset} Updated ${result.totalChanges} section(s)`);
301
+ }
302
+ } else {
303
+ console.log(`${CONFIG.colors.dim}Skipped house rules update. Run 'npm run house-rules:update' later.${CONFIG.colors.reset}`);
288
304
  }
289
305
  }
290
306
  }
@@ -1260,6 +1276,22 @@ The DevOps agent will automatically:
1260
1276
  console.log(`Please switch to this directory before making any changes:`);
1261
1277
  console.log(`cd "${instructions.worktreePath}"`);
1262
1278
  console.log(``);
1279
+
1280
+ // Add house rules reference prominently at the top
1281
+ const houseRulesExists = fs.existsSync(houseRulesPath);
1282
+ if (houseRulesExists) {
1283
+ console.log(`📋 IMPORTANT - READ PROJECT RULES FIRST:`);
1284
+ console.log(`Before making any changes, read the house rules file at:`);
1285
+ console.log(`${houseRulesPath}`);
1286
+ console.log(``);
1287
+ console.log(`The house rules contain:`);
1288
+ console.log(`- Project coding conventions and standards`);
1289
+ console.log(`- Required commit message formats`);
1290
+ console.log(`- File coordination protocols`);
1291
+ console.log(`- Branch naming and workflow rules`);
1292
+ console.log(``);
1293
+ }
1294
+
1263
1295
  console.log(`⚠️ FILE COORDINATION (MANDATORY):`);
1264
1296
  console.log(`Shared coordination directory: local_deploy/.file-coordination/`);
1265
1297
  console.log(``);
@@ -1277,25 +1309,31 @@ The DevOps agent will automatically:
1277
1309
  console.log(``);
1278
1310
  console.log(`Write commit messages to: .devops-commit-${sessionId}.msg`);
1279
1311
  console.log(`The DevOps agent will automatically commit and push changes.`);
1280
- console.log(``);
1281
-
1282
- // Add house rules reference
1283
- const houseRulesExists = fs.existsSync(houseRulesPath);
1284
- if (houseRulesExists) {
1285
- console.log(`📋 IMPORTANT: Review project conventions and rules:`);
1286
- console.log(`Read the house rules at: ${houseRulesPath}`);
1287
- }
1288
1312
  console.log();
1289
1313
 
1290
1314
  console.log(`${CONFIG.colors.yellow}══════════════════════════════════════════════════════════════${CONFIG.colors.reset}`);
1291
1315
  console.log();
1316
+ 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}`);
1317
+ console.log();
1318
+ }
1319
+
1320
+ /**
1321
+ * Wait for user confirmation after showing instructions
1322
+ */
1323
+ async waitForConfirmation(sessionId) {
1324
+ const rl = readline.createInterface({
1325
+ input: process.stdin,
1326
+ output: process.stdout
1327
+ });
1292
1328
 
1293
- // Pause before continuing
1294
- console.log(`${CONFIG.colors.dim}Press Enter to start the DevOps agent monitoring...${CONFIG.colors.reset}`);
1329
+ await new Promise(resolve => {
1330
+ rl.question(`${CONFIG.colors.green}Press Enter once you've copied and pasted the instructions to your agent...${CONFIG.colors.reset} `, resolve);
1331
+ });
1332
+ rl.close();
1295
1333
 
1296
- // Status info
1297
- console.log(`${CONFIG.colors.green}✓ DevOps agent is starting...${CONFIG.colors.reset}`);
1334
+ console.log(`\n${CONFIG.colors.green}✓ DevOps agent is starting...${CONFIG.colors.reset}`);
1298
1335
  console.log(`${CONFIG.colors.dim}Full instructions saved to: ${CONFIG.instructionsDir}/${sessionId}.md${CONFIG.colors.reset}`);
1336
+ console.log();
1299
1337
  }
1300
1338
 
1301
1339
  /**
@@ -1636,6 +1674,7 @@ The DevOps agent is monitoring this worktree for changes.
1636
1674
  if (lockData.instructions) {
1637
1675
  console.log('\n'); // Add spacing
1638
1676
  this.displayInstructions(lockData.instructions, session.sessionId, options.task || 'development');
1677
+ await this.waitForConfirmation(session.sessionId);
1639
1678
  }
1640
1679
 
1641
1680
  return session;
@@ -2002,13 +2041,25 @@ async function main() {
2002
2041
  if (!sessionId) {
2003
2042
  // No session ID provided - show interactive menu
2004
2043
  console.log(`${CONFIG.colors.bright}DevOps Agent Session Manager${CONFIG.colors.reset}\n`);
2044
+
2045
+ // Show existing sessions first
2046
+ const locks = fs.existsSync(coordinator.locksPath) ?
2047
+ fs.readdirSync(coordinator.locksPath).filter(f => f.endsWith('.lock')) : [];
2048
+
2049
+ if (locks.length > 0) {
2050
+ console.log(`${CONFIG.colors.blue}Active Sessions:${CONFIG.colors.reset}`);
2051
+ coordinator.listSessions();
2052
+ console.log();
2053
+ } else {
2054
+ console.log(`${CONFIG.colors.dim}No active sessions${CONFIG.colors.reset}\n`);
2055
+ }
2056
+
2005
2057
  console.log('What would you like to do?\n');
2006
2058
  console.log(` ${CONFIG.colors.green}1${CONFIG.colors.reset} - Create a new session`);
2007
- console.log(` ${CONFIG.colors.green}2${CONFIG.colors.reset} - List existing sessions`);
2008
- console.log(` ${CONFIG.colors.green}3${CONFIG.colors.reset} - Close a session`);
2059
+ console.log(` ${CONFIG.colors.green}2${CONFIG.colors.reset} - Close a session`);
2009
2060
  console.log(` ${CONFIG.colors.green}q${CONFIG.colors.reset} - Quit\n`);
2010
2061
 
2011
- const rl = readline.createInterface({
2062
+ let rl = readline.createInterface({
2012
2063
  input: process.stdin,
2013
2064
  output: process.stdout
2014
2065
  });
@@ -2019,13 +2070,43 @@ async function main() {
2019
2070
  rl.close();
2020
2071
 
2021
2072
  switch(choice) {
2022
- case '1':
2023
- await coordinator.createAndStart({});
2073
+ case '1': {
2074
+ // Prompt for agent type
2075
+ rl = readline.createInterface({
2076
+ input: process.stdin,
2077
+ output: process.stdout
2078
+ });
2079
+
2080
+ console.log(`\n${CONFIG.colors.blue}Select Agent Type:${CONFIG.colors.reset}`);
2081
+ console.log(` 1) Claude (default)`);
2082
+ console.log(` 2) Cline`);
2083
+ console.log(` 3) Cursor`);
2084
+ console.log(` 4) Copilot`);
2085
+ console.log(` 5) Custom\n`);
2086
+
2087
+ const agentChoice = await new Promise(resolve => {
2088
+ rl.question('Agent [1]: ', resolve);
2089
+ });
2090
+
2091
+ let agent = 'claude';
2092
+ switch(agentChoice.trim() || '1') {
2093
+ case '1': agent = 'claude'; break;
2094
+ case '2': agent = 'cline'; break;
2095
+ case '3': agent = 'cursor'; break;
2096
+ case '4': agent = 'copilot'; break;
2097
+ case '5':
2098
+ const customAgent = await new Promise(resolve => {
2099
+ rl.question('Enter agent name: ', resolve);
2100
+ });
2101
+ agent = customAgent.trim() || 'claude';
2102
+ break;
2103
+ }
2104
+
2105
+ rl.close();
2106
+ await coordinator.createAndStart({ agent });
2024
2107
  break;
2108
+ }
2025
2109
  case '2':
2026
- coordinator.listSessions();
2027
- break;
2028
- case '3':
2029
2110
  await coordinator.selectAndCloseSession();
2030
2111
  break;
2031
2112
  case 'q':