s9n-devops-agent 1.4.5 → 1.4.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
|
@@ -114,8 +114,13 @@ import { execa } from "execa";
|
|
|
114
114
|
import readline from "node:readline";
|
|
115
115
|
import { stdin as input, stdout as output } from 'node:process';
|
|
116
116
|
import { execSync } from 'child_process';
|
|
117
|
+
import { createRequire } from 'module';
|
|
117
118
|
import { restartDockerContainers } from './docker-utils.js';
|
|
118
119
|
|
|
120
|
+
// Import CommonJS module (FileCoordinator)
|
|
121
|
+
const require = createRequire(import.meta.url);
|
|
122
|
+
const FileCoordinator = require('./file-coordinator.cjs');
|
|
123
|
+
|
|
119
124
|
// ============================================================================
|
|
120
125
|
// CONFIGURATION SECTION - All settings can be overridden via environment vars
|
|
121
126
|
// ============================================================================
|
|
@@ -1352,7 +1357,7 @@ function saveProjectSettings(settings, settingsPath) {
|
|
|
1352
1357
|
// Display copyright and license information immediately
|
|
1353
1358
|
console.log("\n" + "=".repeat(70));
|
|
1354
1359
|
console.log(" CS_DevOpsAgent - Intelligent Git Automation System");
|
|
1355
|
-
console.log(" Version
|
|
1360
|
+
console.log(" Version 1.4.7 | Build 20251008.1");
|
|
1356
1361
|
console.log(" \n Copyright (c) 2024 SecondBrain Labs");
|
|
1357
1362
|
console.log(" Author: Sachin Dev Duggal");
|
|
1358
1363
|
console.log(" \n Licensed under the MIT License");
|
|
@@ -1569,6 +1574,24 @@ console.log();
|
|
|
1569
1574
|
}
|
|
1570
1575
|
dlog(`watcher: ${evt} ${p}`);
|
|
1571
1576
|
|
|
1577
|
+
// ========== FILE COORDINATION CHECK ==========
|
|
1578
|
+
// Check for undeclared file edits whenever a non-message file changes
|
|
1579
|
+
if (!isMsg && sessionId && (evt === 'add' || evt === 'change')) {
|
|
1580
|
+
try {
|
|
1581
|
+
const coordinator = new FileCoordinator(sessionId, process.cwd(), repoRoot);
|
|
1582
|
+
const conflictCheck = await coordinator.detectUndeclaredEdits();
|
|
1583
|
+
|
|
1584
|
+
if (conflictCheck.hasConflicts) {
|
|
1585
|
+
const reportPath = coordinator.createConflictReport(conflictCheck);
|
|
1586
|
+
// Don't block the watcher, but alert the user
|
|
1587
|
+
console.log(`\n⚠️ File coordination warning: See ${reportPath}\n`);
|
|
1588
|
+
}
|
|
1589
|
+
} catch (err) {
|
|
1590
|
+
// Don't break the watcher if coordination check fails
|
|
1591
|
+
dlog('File coordination check error:', err.message);
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1572
1595
|
// ========== SPECIAL HANDLING FOR MESSAGE FILE ==========
|
|
1573
1596
|
// When .claude-commit-msg changes, wait a bit then commit
|
|
1574
1597
|
if (TRIGGER_ON_MSG && isMsg) {
|
|
@@ -599,7 +599,7 @@ ${endMarker}`;
|
|
|
599
599
|
setupHouseRules(withStructure = false) {
|
|
600
600
|
// Determine source and target paths
|
|
601
601
|
const agentRoot = path.join(__dirname, '..');
|
|
602
|
-
const sourceFileName = withStructure ? 'houserules_structured.md' : '
|
|
602
|
+
const sourceFileName = withStructure ? 'houserules_structured.md' : 'houserules.md';
|
|
603
603
|
const sourcePath = path.join(agentRoot, sourceFileName);
|
|
604
604
|
const targetPath = path.join(this.projectRoot, 'houserules.md');
|
|
605
605
|
|
|
@@ -111,6 +111,17 @@ class SessionCoordinator {
|
|
|
111
111
|
}
|
|
112
112
|
});
|
|
113
113
|
|
|
114
|
+
// Ensure file-coordination directory
|
|
115
|
+
const fileCoordinationDir = path.join(this.repoRoot, 'local_deploy', '.file-coordination');
|
|
116
|
+
const activeEditsDir = path.join(fileCoordinationDir, 'active-edits');
|
|
117
|
+
const completedEditsDir = path.join(fileCoordinationDir, 'completed-edits');
|
|
118
|
+
|
|
119
|
+
[fileCoordinationDir, activeEditsDir, completedEditsDir].forEach(dir => {
|
|
120
|
+
if (!fs.existsSync(dir)) {
|
|
121
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
|
|
114
125
|
// Ensure global settings directory in home folder
|
|
115
126
|
if (!fs.existsSync(this.globalSettingsDir)) {
|
|
116
127
|
fs.mkdirSync(this.globalSettingsDir, { recursive: true });
|
|
@@ -1743,7 +1754,7 @@ async function main() {
|
|
|
1743
1754
|
console.log("=".repeat(70));
|
|
1744
1755
|
console.log();
|
|
1745
1756
|
console.log(" CS_DevOpsAgent - Intelligent Git Automation System");
|
|
1746
|
-
console.log(" Version
|
|
1757
|
+
console.log(" Version 1.4.7 | Build 20251008.1");
|
|
1747
1758
|
console.log(" ");
|
|
1748
1759
|
console.log(" Copyright (c) 2024 SecondBrain Labs");
|
|
1749
1760
|
console.log(" Author: Sachin Dev Duggal");
|