@evomap/evolver 1.89.20 → 1.90.0
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/index.js +85 -1
- package/package.json +1 -1
- package/src/adapters/claudeCode.js +3 -3
- package/src/adapters/codex.js +2 -2
- package/src/adapters/kiro.js +2 -2
- package/src/adapters/opencode.js +2 -2
- package/src/evolve/guards.js +1 -1
- package/src/evolve/pipeline/collect.js +1 -1
- package/src/evolve/pipeline/dispatch.js +1 -1
- package/src/evolve/pipeline/enrich.js +1 -1
- package/src/evolve/pipeline/hub.js +1 -1
- package/src/evolve/pipeline/select.js +1 -1
- package/src/evolve/pipeline/signals.js +1 -1
- package/src/evolve/utils.js +1 -1
- package/src/evolve.js +1 -1
- package/src/gep/a2aProtocol.js +1 -1
- package/src/gep/antiAbuseTelemetry.js +1 -1
- package/src/gep/autoDistillConv.js +1 -1
- package/src/gep/autoDistillLlm.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/conversationDistiller.js +1 -1
- package/src/gep/conversationSniffer.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/envFingerprint.js +1 -1
- package/src/gep/epigenetics.js +1 -1
- package/src/gep/execBridge.js +1 -1
- package/src/gep/explore.js +1 -1
- package/src/gep/hash.js +1 -1
- package/src/gep/hubFetch.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/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/openPRRegistry.js +1 -1
- package/src/gep/personality.js +1 -1
- package/src/gep/policyCheck.js +1 -1
- package/src/gep/prompt.js +1 -1
- package/src/gep/recallInject.js +1 -1
- package/src/gep/recallVerifier.js +1 -1
- package/src/gep/reflection.js +1 -1
- package/src/gep/savingsCore.js +1 -1
- package/src/gep/selector.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/tokenSavings.js +1 -1
- package/src/gep/trajectoryExport.js +1 -1
- package/src/gep/workspaceKeychain.js +1 -1
- package/src/proxy/extensions/traceControl.js +1 -1
- package/src/proxy/inject.js +1 -1
- package/src/proxy/mailbox/store.js +14 -2
- package/src/proxy/sync/outbound.js +44 -3
- package/src/proxy/trace/extractor.js +1 -1
- package/src/proxy/trace/usage.js +1 -1
- package/src/solo/breaker.js +25 -0
- package/src/solo/gitGuard.js +65 -0
- package/skills/_meta/SKILL.md +0 -41
- package/skills/index.json +0 -14
package/index.js
CHANGED
|
@@ -833,7 +833,32 @@ function refuseHelloIfDaemonRunning(toolLabel) {
|
|
|
833
833
|
async function main() {
|
|
834
834
|
const args = process.argv.slice(2);
|
|
835
835
|
const command = args[0];
|
|
836
|
-
|
|
836
|
+
// Solo mode (--solo): the "constrained wild" profile. Implies loop (a solo
|
|
837
|
+
// run IS a Mad Dog loop) but hard-cuts the network + ATP, snapshots the
|
|
838
|
+
// target repo each cycle and rolls back on failure, and circuit-breaks on
|
|
839
|
+
// repeated failures instead of blind-respawning. It is a NEW side path — the
|
|
840
|
+
// wild --mad-dog / controlled-daemon behavior below is untouched when isSolo
|
|
841
|
+
// is false.
|
|
842
|
+
const isSolo = args.includes('--solo');
|
|
843
|
+
const isLoop = args.includes('--loop') || args.includes('--mad-dog') || isSolo;
|
|
844
|
+
// Solo lockdown: hard-cut network + autonomous spend at the SOURCE, in-process,
|
|
845
|
+
// before any module reads these envs. The block-level `if (!isSolo)` gates
|
|
846
|
+
// below are belt-and-suspenders for the startup path; THIS is what also closes
|
|
847
|
+
// the in-cycle paths (src/evolve/guards.js starts autoBuyer/autoDeliver from
|
|
848
|
+
// inside evolve.run()) and the validator daemon (network + staked credits).
|
|
849
|
+
// These are overwrites, not defaults — a user cannot re-enable ATP/hub/validator
|
|
850
|
+
// under --solo by setting the env themselves. That is the "no escape valve" the
|
|
851
|
+
// boss pinned. Numeric knobs (e.g. EVOLVER_SOLO_MAX_FAILS) stay tunable; the
|
|
852
|
+
// four safety cuts do not.
|
|
853
|
+
if (isSolo) {
|
|
854
|
+
process.env.A2A_HUB_URL = '';
|
|
855
|
+
process.env.EVOMAP_HUB_URL = '';
|
|
856
|
+
process.env.EVOLVER_ATP = 'off'; // getAtpMode() → 'off'
|
|
857
|
+
process.env.EVOLVER_ATP_AUTOBUY = 'off'; // getConsent() → disabled (env wins over ack)
|
|
858
|
+
process.env.EVOLVER_ATP_AUTODELIVER = 'off';
|
|
859
|
+
process.env.EVOLVER_VALIDATOR_ENABLED = 'false';
|
|
860
|
+
process.env.EVOMAP_PROXY = '0';
|
|
861
|
+
}
|
|
837
862
|
const isVerbose = args.includes('--verbose') || args.includes('-v') ||
|
|
838
863
|
String(process.env.EVOLVER_VERBOSE || '').toLowerCase() === 'true';
|
|
839
864
|
if (isVerbose) process.env.EVOLVER_VERBOSE = 'true';
|
|
@@ -1414,6 +1439,9 @@ async function main() {
|
|
|
1414
1439
|
const progressUpdateMs = parseMs(process.env.EVOLVER_PROGRESS_UPDATE_MS, 60000); // 1 min default
|
|
1415
1440
|
|
|
1416
1441
|
// Start hub heartbeat (keeps node alive independently of evolution cycles)
|
|
1442
|
+
if (isSolo) {
|
|
1443
|
+
console.log('[Solo] 断网模式:不连 hub,不启心跳/SSE/proxy/validator,仅本地自进化。');
|
|
1444
|
+
} else {
|
|
1417
1445
|
try {
|
|
1418
1446
|
if (process.env.EVOMAP_PROXY === '1' || process.env.A2A_TRANSPORT === 'mailbox') {
|
|
1419
1447
|
const { startProxy } = require('./src/proxy');
|
|
@@ -1464,6 +1492,7 @@ async function main() {
|
|
|
1464
1492
|
} catch (e) {
|
|
1465
1493
|
console.warn('[Heartbeat] Failed to start: ' + (e.message || e));
|
|
1466
1494
|
}
|
|
1495
|
+
}
|
|
1467
1496
|
|
|
1468
1497
|
// RecallVerify worker: starts once per process; drains the publish-
|
|
1469
1498
|
// verification queue with backoff. unref'd so it never blocks exit.
|
|
@@ -1478,6 +1507,9 @@ async function main() {
|
|
|
1478
1507
|
// Validator daemon: independent timer that fetches and executes
|
|
1479
1508
|
// validation tasks regardless of the main evolve loop's idle gating.
|
|
1480
1509
|
// Honors EVOLVER_VALIDATOR_ENABLED and the persisted feature flag.
|
|
1510
|
+
// Solo: skip entirely — the validator uses network + staked credits, and
|
|
1511
|
+
// its daemon timer arms even when disabled, so don't even construct it.
|
|
1512
|
+
if (!isSolo) {
|
|
1481
1513
|
try {
|
|
1482
1514
|
const { startValidatorDaemon } = require('./src/gep/validator');
|
|
1483
1515
|
if (startValidatorDaemon()) {
|
|
@@ -1486,6 +1518,7 @@ async function main() {
|
|
|
1486
1518
|
} catch (vdErr) {
|
|
1487
1519
|
console.warn('[ValidatorDaemon] failed to start: ' + (vdErr && vdErr.message || vdErr));
|
|
1488
1520
|
}
|
|
1521
|
+
}
|
|
1489
1522
|
|
|
1490
1523
|
// OAuth token auto-refresh: if a device-flow OAuth token is present,
|
|
1491
1524
|
// keep it fresh in the background so long-running `evolver run` loops
|
|
@@ -1501,6 +1534,9 @@ async function main() {
|
|
|
1501
1534
|
}
|
|
1502
1535
|
|
|
1503
1536
|
// ATP: auto-start merchant agent if enabled
|
|
1537
|
+
if (isSolo) {
|
|
1538
|
+
console.log('[Solo] 禁 ATP:不加载自治交易模块,不碰花钱通道。');
|
|
1539
|
+
} else {
|
|
1504
1540
|
try {
|
|
1505
1541
|
const { defaultHandler, merchantAgent } = require('./src/atp');
|
|
1506
1542
|
const atpMode = defaultHandler.getAtpMode();
|
|
@@ -1607,6 +1643,7 @@ async function main() {
|
|
|
1607
1643
|
} catch (autoBuyInitErr) {
|
|
1608
1644
|
console.warn('[ATP-AutoBuyer] Init failed: ' + (autoBuyInitErr && autoBuyInitErr.message || autoBuyInitErr));
|
|
1609
1645
|
}
|
|
1646
|
+
}
|
|
1610
1647
|
|
|
1611
1648
|
// Hoist module refs used inside the loop to avoid repeated module lookups per cycle
|
|
1612
1649
|
const idleScheduler = require('./src/gep/idleScheduler');
|
|
@@ -1614,6 +1651,22 @@ async function main() {
|
|
|
1614
1651
|
const { autoDistillLlm } = require('./src/gep/autoDistillLlm'); // P3: autonomous LLM distillation (shadow-first, off by default)
|
|
1615
1652
|
const { tryExplore } = require('./src/gep/explore');
|
|
1616
1653
|
|
|
1654
|
+
// Solo-mode setup (--solo): git safety net + circuit breaker. repoRoot is
|
|
1655
|
+
// the TARGET project being evolved (getRepoRoot), NOT evolver's own source.
|
|
1656
|
+
const gitGuard = isSolo ? require('./src/solo/gitGuard') : null;
|
|
1657
|
+
const soloBreaker = isSolo ? require('./src/solo/breaker') : null;
|
|
1658
|
+
const soloRepoRoot = isSolo ? require('./src/gep/paths').getRepoRoot() : null;
|
|
1659
|
+
const soloMaxConsecutiveFailures = Math.max(1, parseMs(process.env.EVOLVER_SOLO_MAX_FAILS, 5) || 5);
|
|
1660
|
+
let soloBreakerState = { consecutiveFailures: 0 };
|
|
1661
|
+
if (isSolo) {
|
|
1662
|
+
console.log('════════════════════════════════════════════════════════');
|
|
1663
|
+
console.log('[Solo] Mad Dog · 受约束的野性模式已启动');
|
|
1664
|
+
console.log('[Solo] 兜底四道:断网 · 禁ATP · 每 cycle git 快照/失败回滚 · 连续失败熔断');
|
|
1665
|
+
console.log('[Solo] 默认免人审。目标仓:' + soloRepoRoot);
|
|
1666
|
+
console.log('[Solo] 无 hub 审计,仅本地 git 可追溯。');
|
|
1667
|
+
console.log('════════════════════════════════════════════════════════');
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1617
1670
|
let currentSleepMs = minSleepMs;
|
|
1618
1671
|
let cycleCount = 0;
|
|
1619
1672
|
|
|
@@ -1630,6 +1683,9 @@ async function main() {
|
|
|
1630
1683
|
|
|
1631
1684
|
const t0 = Date.now();
|
|
1632
1685
|
let ok = false;
|
|
1686
|
+
// Solo: snapshot the target repo before the cycle self-modifies it, so
|
|
1687
|
+
// a failed cycle can be rolled back to this exact point.
|
|
1688
|
+
const soloSnap = isSolo ? gitGuard.snapshot(soloRepoRoot) : null;
|
|
1633
1689
|
// Issue #19: write progress at cycle start, refresh it every
|
|
1634
1690
|
// progressUpdateMs (default 60s) while evolve.run() is active, and
|
|
1635
1691
|
// wrap evolve.run() with Promise.race(timeout) so a hung internal
|
|
@@ -1715,6 +1771,23 @@ async function main() {
|
|
|
1715
1771
|
}
|
|
1716
1772
|
const dt = Date.now() - t0;
|
|
1717
1773
|
|
|
1774
|
+
// Solo: on a failed cycle, roll the target repo back to the pre-cycle
|
|
1775
|
+
// snapshot (undo the broken self-edit) and advance the circuit breaker;
|
|
1776
|
+
// a good cycle resets it. The breaker trip (exit) is enforced just
|
|
1777
|
+
// before the suicide block below.
|
|
1778
|
+
if (isSolo) {
|
|
1779
|
+
const b = soloBreaker.step(soloBreakerState, ok, soloMaxConsecutiveFailures);
|
|
1780
|
+
soloBreakerState = b.state;
|
|
1781
|
+
if (!ok) {
|
|
1782
|
+
const rolledBack = gitGuard.rollbackTo(soloRepoRoot, soloSnap);
|
|
1783
|
+
if (rolledBack) {
|
|
1784
|
+
console.warn('[Solo] cycle 失败,已 git 回滚目标仓到 ' + String(soloSnap).slice(0, 12) + ' (连续失败 ' + soloBreakerState.consecutiveFailures + '/' + soloMaxConsecutiveFailures + ')');
|
|
1785
|
+
} else {
|
|
1786
|
+
console.error('[Solo] cycle 失败且回滚未成功(无快照或 git 出错)。连续失败 ' + soloBreakerState.consecutiveFailures + '/' + soloMaxConsecutiveFailures);
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1718
1791
|
// Adaptive sleep: treat very fast cycles as "idle", backoff; otherwise reset to min.
|
|
1719
1792
|
if (!ok || dt < idleThresholdMs) {
|
|
1720
1793
|
currentSleepMs = Math.min(maxSleepMs, Math.max(minSleepMs, currentSleepMs * 2));
|
|
@@ -1790,6 +1863,17 @@ async function main() {
|
|
|
1790
1863
|
if (isVerbose) console.warn('[OMLS] Scheduler error: ' + (e.message || e));
|
|
1791
1864
|
}
|
|
1792
1865
|
|
|
1866
|
+
// Solo circuit breaker: replace the wild loop's blind sleep-and-retry
|
|
1867
|
+
// with a hard stop after N consecutive failures. Stopping (exit 1) —
|
|
1868
|
+
// rather than respawning — is the point: a solo run that keeps failing
|
|
1869
|
+
// must not thrash forever. An external supervisor may restart it, but
|
|
1870
|
+
// the process itself refuses to blind-loop.
|
|
1871
|
+
if (isSolo && soloBreakerState.consecutiveFailures >= soloMaxConsecutiveFailures) {
|
|
1872
|
+
console.error('[Solo] 连续失败 ' + soloBreakerState.consecutiveFailures + ' 次达阈值,熔断停机(非盲重生)。');
|
|
1873
|
+
releaseLock();
|
|
1874
|
+
process.exit(1);
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1793
1877
|
// Suicide check (memory leak protection). On Windows the
|
|
1794
1878
|
// in-process respawn opens a cmd popup (Issue #528), so by default
|
|
1795
1879
|
// we delegate to an external supervisor by exiting with a non-zero
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evomap/evolver",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.90.0",
|
|
4
4
|
"description": "A GEP-powered self-evolution engine for AI agents. Features automated log analysis and Genome Evolution Protocol (GEP) for auditable, reusable evolution assets.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -78,13 +78,13 @@ function buildClaudeMdSection() {
|
|
|
78
78
|
## Evolution Memory (Evolver)
|
|
79
79
|
|
|
80
80
|
This project uses evolver for self-evolution. Hooks automatically:
|
|
81
|
-
1.
|
|
81
|
+
1. Run quietly at session start and load recent evolution memory when useful
|
|
82
82
|
2. Detect evolution signals during file edits
|
|
83
83
|
3. Record outcomes at session end
|
|
84
|
-
4. (Opt-in) Surface matching distilled capabilities for each prompt
|
|
84
|
+
4. (Opt-in) Surface matching distilled capabilities for each prompt - set
|
|
85
85
|
\`EVOLVER_RECALL_MODE=shadow\` to preview, \`enforce\` to inject (default off).
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
Use Evolver context only when it is directly relevant. Do not narrate routine Evolver checks, hook status, or empty recall/search results to the user.
|
|
88
88
|
Signals: log_error, perf_bottleneck, user_feature_request, capability_gap, deployment_issue, test_failure.`;
|
|
89
89
|
}
|
|
90
90
|
|
package/src/adapters/codex.js
CHANGED
|
@@ -90,11 +90,11 @@ function buildAgentsMdSection() {
|
|
|
90
90
|
## Evolution Memory (Evolver)
|
|
91
91
|
|
|
92
92
|
This project uses evolver for self-evolution. Hooks automatically:
|
|
93
|
-
1.
|
|
93
|
+
1. Run quietly at session start and load recent evolution memory when useful
|
|
94
94
|
2. Detect evolution signals during file edits
|
|
95
95
|
3. Record outcomes at session end
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
Use Evolver context only when it is directly relevant. Do not narrate routine Evolver checks, hook status, or empty recall/search results to the user.
|
|
98
98
|
Signals: log_error, perf_bottleneck, user_feature_request, capability_gap, deployment_issue, test_failure.`;
|
|
99
99
|
}
|
|
100
100
|
|
package/src/adapters/kiro.js
CHANGED
|
@@ -67,11 +67,11 @@ function buildAgentsMdSection() {
|
|
|
67
67
|
## Evolution Memory (Evolver)
|
|
68
68
|
|
|
69
69
|
This project uses evolver for self-evolution. Hooks automatically:
|
|
70
|
-
1.
|
|
70
|
+
1. Run quietly on prompt submit and load recent evolution memory when useful
|
|
71
71
|
2. Detect evolution signals during file edits
|
|
72
72
|
3. Record outcomes at session end
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
Use Evolver context only when it is directly relevant. Do not narrate routine Evolver checks, hook status, or empty recall/search results to the user.
|
|
75
75
|
Signals: log_error, perf_bottleneck, user_feature_request, capability_gap, deployment_issue, test_failure.`;
|
|
76
76
|
}
|
|
77
77
|
|
package/src/adapters/opencode.js
CHANGED
|
@@ -82,11 +82,11 @@ function buildAgentsMdSection() {
|
|
|
82
82
|
## Evolution Memory (Evolver)
|
|
83
83
|
|
|
84
84
|
This project uses evolver for self-evolution. Hooks automatically:
|
|
85
|
-
1.
|
|
85
|
+
1. Run quietly at session start and load recent evolution memory when useful
|
|
86
86
|
2. Detect evolution signals during file edits
|
|
87
87
|
3. Record outcomes at session end
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
Use Evolver context only when it is directly relevant. Do not narrate routine Evolver checks, hook status, or empty recall/search results to the user.
|
|
90
90
|
Signals: log_error, perf_bottleneck, user_feature_request, capability_gap, deployment_issue, test_failure.`;
|
|
91
91
|
}
|
|
92
92
|
|