multi-agents-cli 1.1.62 → 1.1.63
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/core/workflow/agent.js
CHANGED
|
@@ -82,7 +82,15 @@ const red = (s) => `${c.red}${s}${c.reset}`;
|
|
|
82
82
|
|
|
83
83
|
// ── Paths ─────────────────────────────────────────────────────────────────────
|
|
84
84
|
|
|
85
|
-
const ROOT =
|
|
85
|
+
const ROOT = (() => {
|
|
86
|
+
try {
|
|
87
|
+
const common = execSync('git rev-parse --git-common-dir', { stdio: 'pipe' }).toString().trim();
|
|
88
|
+
return common.endsWith('/.git') ? common.slice(0, -5) : require('path').resolve(common, '..');
|
|
89
|
+
} catch {
|
|
90
|
+
console.error(' Not inside a git repository.\n');
|
|
91
|
+
process.exit(1);
|
|
92
|
+
}
|
|
93
|
+
})();
|
|
86
94
|
const CONFIG_PATH = path.join(ROOT, '.scaffold', '.config.json');
|
|
87
95
|
const LOCK_PATH = path.join(ROOT, '.scaffold', '.initialized');
|
|
88
96
|
|
|
@@ -37,7 +37,15 @@ const red = (s) => `${c.red}${s}${c.reset}`;
|
|
|
37
37
|
|
|
38
38
|
// ── Paths ─────────────────────────────────────────────────────────────────────
|
|
39
39
|
|
|
40
|
-
const ROOT =
|
|
40
|
+
const ROOT = (() => {
|
|
41
|
+
try {
|
|
42
|
+
const common = execSync('git rev-parse --git-common-dir', { stdio: 'pipe' }).toString().trim();
|
|
43
|
+
return common.endsWith('/.git') ? common.slice(0, -5) : require('path').resolve(common, '..');
|
|
44
|
+
} catch {
|
|
45
|
+
console.error(' Not inside a git repository.\n');
|
|
46
|
+
process.exit(1);
|
|
47
|
+
}
|
|
48
|
+
})();
|
|
41
49
|
const CONFIG_PATH = path.join(ROOT, '.scaffold', '.config.json');
|
|
42
50
|
const LOCK_PATH = path.join(ROOT, '.scaffold', '.initialized');
|
|
43
51
|
|
package/core/workflow/reset.js
CHANGED
|
@@ -24,7 +24,15 @@ try { prompts = require('prompts'); } catch { prompts = null; }
|
|
|
24
24
|
|
|
25
25
|
// ── Self-relocate to repo root ────────────────────────────────────────────────
|
|
26
26
|
|
|
27
|
-
const ROOT =
|
|
27
|
+
const ROOT = (() => {
|
|
28
|
+
try {
|
|
29
|
+
const common = execSync('git rev-parse --git-common-dir', { stdio: 'pipe' }).toString().trim();
|
|
30
|
+
return common.endsWith('/.git') ? common.slice(0, -5) : require('path').resolve(common, '..');
|
|
31
|
+
} catch {
|
|
32
|
+
console.error(' Not inside a git repository.\n');
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
})();
|
|
28
36
|
|
|
29
37
|
// ── Colors ────────────────────────────────────────────────────────────────────
|
|
30
38
|
|
package/core/workflow/sync.js
CHANGED
|
@@ -17,7 +17,15 @@ const fs = require('fs');
|
|
|
17
17
|
const path = require('path');
|
|
18
18
|
const { execSync } = require('child_process');
|
|
19
19
|
|
|
20
|
-
const ROOT =
|
|
20
|
+
const ROOT = (() => {
|
|
21
|
+
try {
|
|
22
|
+
const common = execSync('git rev-parse --git-common-dir', { stdio: 'pipe' }).toString().trim();
|
|
23
|
+
return common.endsWith('/.git') ? common.slice(0, -5) : require('path').resolve(common, '..');
|
|
24
|
+
} catch {
|
|
25
|
+
console.error(' Not inside a git repository.\n');
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
})();
|
|
21
29
|
const TRACKING = path.join(ROOT, '.scaffold', '.tracking.json');
|
|
22
30
|
const BUILD = path.join(ROOT, 'BUILD_STATE.md');
|
|
23
31
|
|
package/package.json
CHANGED