@evomap/evolver 1.69.5 → 1.69.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/assets/gep/candidates.jsonl +3 -3
- package/package.json +1 -1
- package/src/config.js +35 -5
- package/src/evolve.js +1 -1
- package/src/gep/.integrity +0 -0
- package/src/gep/a2aProtocol.js +1 -1
- package/src/gep/candidateEval.js +1 -1
- package/src/gep/candidates.js +1 -1
- package/src/gep/contentHash.js +1 -1
- package/src/gep/crypto.js +1 -1
- package/src/gep/curriculum.js +1 -1
- package/src/gep/deviceId.js +1 -1
- package/src/gep/directoryClient.js +4 -4
- package/src/gep/envFingerprint.js +1 -1
- package/src/gep/explore.js +1 -1
- package/src/gep/hubReview.js +1 -1
- package/src/gep/hubSearch.js +1 -1
- package/src/gep/hubVerify.js +1 -1
- package/src/gep/integrityCheck.js +1 -1
- package/src/gep/issueReporter.js +5 -3
- package/src/gep/learningSignals.js +1 -1
- package/src/gep/memoryGraph.js +1 -1
- package/src/gep/memoryGraphAdapter.js +1 -1
- package/src/gep/mutation.js +1 -1
- package/src/gep/narrativeMemory.js +1 -1
- package/src/gep/paths.js +35 -10
- package/src/gep/personality.js +1 -1
- package/src/gep/policyCheck.js +1 -1
- package/src/gep/privacyClient.js +2 -2
- package/src/gep/prompt.js +1 -1
- package/src/gep/reflection.js +1 -1
- package/src/gep/selector.js +1 -1
- package/src/gep/shield.js +1 -1
- package/src/gep/skillDistiller.js +1 -1
- package/src/gep/solidify.js +1 -1
- package/src/gep/strategy.js +1 -1
- package/src/gep/taskReceiver.js +6 -7
- package/src/gep/validator/index.js +2 -2
- package/src/gep/validator/reporter.js +2 -2
- package/src/gep/validator/stakeBootstrap.js +2 -2
package/src/gep/paths.js
CHANGED
|
@@ -3,6 +3,21 @@ const fs = require('fs');
|
|
|
3
3
|
|
|
4
4
|
let _cachedRepoRoot = null;
|
|
5
5
|
|
|
6
|
+
// Resolve the git repository that evolver should treat as its work area.
|
|
7
|
+
//
|
|
8
|
+
// Precedence:
|
|
9
|
+
// 1. EVOLVER_REPO_ROOT (explicit override, always wins)
|
|
10
|
+
// 2. evolver's own directory if it has a .git
|
|
11
|
+
// 3. Nearest ancestor directory that has a .git (the "host" workspace)
|
|
12
|
+
// - On by default since 1.69.6. This matches how most users install
|
|
13
|
+
// evolver (as an npm dependency or a skill under another repo):
|
|
14
|
+
// the Hand Agent writes files in the host workspace, not inside the
|
|
15
|
+
// evolver package, so git diff MUST run against the host repo.
|
|
16
|
+
// - To opt out (keep the 1.69.5 and earlier behavior of ignoring the
|
|
17
|
+
// parent git), set EVOLVER_NO_PARENT_GIT=true. The older
|
|
18
|
+
// EVOLVER_USE_PARENT_GIT=true flag is still honored for forward
|
|
19
|
+
// compatibility but is no longer required.
|
|
20
|
+
// 4. Fall back to evolver's own directory.
|
|
6
21
|
function getRepoRoot() {
|
|
7
22
|
if (_cachedRepoRoot) return _cachedRepoRoot;
|
|
8
23
|
|
|
@@ -18,20 +33,30 @@ function getRepoRoot() {
|
|
|
18
33
|
return _cachedRepoRoot;
|
|
19
34
|
}
|
|
20
35
|
|
|
36
|
+
const noParent = String(process.env.EVOLVER_NO_PARENT_GIT || '').toLowerCase() === 'true';
|
|
37
|
+
// Older flag kept for backward compatibility. Setting it to 'false'
|
|
38
|
+
// explicitly is treated as an opt-out, mirroring EVOLVER_NO_PARENT_GIT.
|
|
39
|
+
const legacyFlag = process.env.EVOLVER_USE_PARENT_GIT;
|
|
40
|
+
const legacyOptOut = typeof legacyFlag === 'string' && legacyFlag.toLowerCase() === 'false';
|
|
41
|
+
|
|
21
42
|
let dir = path.dirname(ownDir);
|
|
22
|
-
while (dir !==
|
|
43
|
+
while (dir !== path.dirname(dir)) {
|
|
23
44
|
if (fs.existsSync(path.join(dir, '.git'))) {
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
|
|
45
|
+
if (noParent || legacyOptOut) {
|
|
46
|
+
if (!process.env.EVOLVER_QUIET_PARENT_GIT) {
|
|
47
|
+
console.warn(
|
|
48
|
+
'[evolver] Detected .git in parent directory', dir,
|
|
49
|
+
'-- ignoring because EVOLVER_NO_PARENT_GIT is set.',
|
|
50
|
+
'Unset it (or set EVOLVER_REPO_ROOT) if evolution stalls with hollow_commit errors.'
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
_cachedRepoRoot = ownDir;
|
|
27
54
|
return _cachedRepoRoot;
|
|
28
55
|
}
|
|
29
|
-
|
|
30
|
-
'[evolver]
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
);
|
|
34
|
-
_cachedRepoRoot = ownDir;
|
|
56
|
+
if (!process.env.EVOLVER_QUIET_PARENT_GIT) {
|
|
57
|
+
console.log('[evolver] Using host git repository at:', dir);
|
|
58
|
+
}
|
|
59
|
+
_cachedRepoRoot = dir;
|
|
35
60
|
return _cachedRepoRoot;
|
|
36
61
|
}
|
|
37
62
|
dir = path.dirname(dir);
|