@evomap/evolver 1.88.0 → 1.88.1
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 +86 -0
- package/package.json +1 -1
- 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/autoDistillConv.js +1 -0
- package/src/gep/autoDistillLlm.js +1 -0
- package/src/gep/bridge.js +69 -2
- package/src/gep/candidateEval.js +1 -1
- package/src/gep/candidates.js +1 -1
- package/src/gep/contentHash.js +1 -1
- package/src/gep/conversationSniffer.js +1 -0
- 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 -0
- 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/recallVerifier.js +1 -1
- package/src/gep/reflection.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/workspaceKeychain.js +1 -1
- package/src/proxy/index.js +24 -5
package/index.js
CHANGED
|
@@ -1332,6 +1332,7 @@ async function main() {
|
|
|
1332
1332
|
// Hoist module refs used inside the loop to avoid repeated module lookups per cycle
|
|
1333
1333
|
const idleScheduler = require('./src/gep/idleScheduler');
|
|
1334
1334
|
const { shouldDistillFromFailures: shouldDF, autoDistillFromFailures: autoDF } = require('./src/gep/skillDistiller');
|
|
1335
|
+
const { autoDistillLlm } = require('./src/gep/autoDistillLlm'); // P3: autonomous LLM distillation (shadow-first, off by default)
|
|
1335
1336
|
const { tryExplore } = require('./src/gep/explore');
|
|
1336
1337
|
|
|
1337
1338
|
let currentSleepMs = minSleepMs;
|
|
@@ -1454,6 +1455,21 @@ async function main() {
|
|
|
1454
1455
|
} catch (e) {
|
|
1455
1456
|
if (isVerbose) console.warn('[OMLS] Distill error: ' + (e.message || e));
|
|
1456
1457
|
}
|
|
1458
|
+
// P3: autonomous LLM-quality distillation of SUCCESS capsules.
|
|
1459
|
+
// Default off; shadow logs a candidate; enforce upserts (after a
|
|
1460
|
+
// real run-green gate). Reuses the P1 exec bridge under the hood.
|
|
1461
|
+
if ((process.env.EVOLVER_AUTO_DISTILL_LLM || 'off') !== 'off') {
|
|
1462
|
+
try {
|
|
1463
|
+
const llmRes = await autoDistillLlm();
|
|
1464
|
+
if (llmRes && llmRes.ok && llmRes.gene) {
|
|
1465
|
+
console.log('[OMLS] Idle-window LLM distillation enforced gene: ' + llmRes.gene.id);
|
|
1466
|
+
} else if (llmRes && llmRes.reason === 'shadow_logged') {
|
|
1467
|
+
console.log('[OMLS] LLM distillation shadow candidate: ' + (llmRes.candidate && llmRes.candidate.id));
|
|
1468
|
+
}
|
|
1469
|
+
} catch (e) {
|
|
1470
|
+
if (isVerbose) console.warn('[OMLS] LLM distill error (non-fatal): ' + (e.message || e));
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1457
1473
|
}
|
|
1458
1474
|
if (schedule.should_explore) {
|
|
1459
1475
|
try {
|
|
@@ -1465,6 +1481,22 @@ async function main() {
|
|
|
1465
1481
|
if (isVerbose) console.warn('[OMLS] Explore error: ' + (e.message || e));
|
|
1466
1482
|
}
|
|
1467
1483
|
}
|
|
1484
|
+
// P2: conversation capability -> distilled gene (shadow-only v1).
|
|
1485
|
+
// Deliberately OUTSIDE the should_distill guard: should_distill is
|
|
1486
|
+
// true only at aggressive/deep intensity, but headless/air-gapped
|
|
1487
|
+
// hosts fall back to 'normal', which would make P2 a dead feature.
|
|
1488
|
+
// A freshly-discovered capability is time-relevant; gate it solely on
|
|
1489
|
+
// its own flag + the per-slug cooldown + a non-empty queue (all of
|
|
1490
|
+
// which already bound spend). Default off => zero behavior change.
|
|
1491
|
+
if ((process.env.EVOLVER_CONV_DISTILL_ENABLED || 'off') !== 'off') {
|
|
1492
|
+
try {
|
|
1493
|
+
const { autoDistillConversation } = require('./src/gep/autoDistillConv');
|
|
1494
|
+
const convRes = await autoDistillConversation();
|
|
1495
|
+
if (convRes && convRes.ok) console.log('[P2] conv-distill ' + convRes.mode + ' candidate: ' + (convRes.gene_id || convRes.reason));
|
|
1496
|
+
} catch (e) {
|
|
1497
|
+
if (isVerbose) console.warn('[P2] conv-distill error (non-fatal): ' + (e.message || e));
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1468
1500
|
if (isVerbose && schedule.idle_seconds >= 0) {
|
|
1469
1501
|
console.log(`[OMLS] idle=${schedule.idle_seconds}s intensity=${schedule.intensity} multiplier=${omlsMultiplier}`);
|
|
1470
1502
|
}
|
|
@@ -1691,6 +1723,60 @@ async function main() {
|
|
|
1691
1723
|
console.error('[SOLIDIFY] Error:', error);
|
|
1692
1724
|
process.exit(2);
|
|
1693
1725
|
}
|
|
1726
|
+
} else if (command === 'exec') {
|
|
1727
|
+
// node index.js exec --harness=claude-code [--once] [--max-cycles N]
|
|
1728
|
+
// P1 auto-exec bridge: run the Brain, scrape its sessions_spawn(...), spawn
|
|
1729
|
+
// the Hand (headless claude) to apply + solidify. Shadow-first opt-in.
|
|
1730
|
+
if (String(process.env.EVOLVE_EXEC_BRIDGE || '').toLowerCase() !== 'true') {
|
|
1731
|
+
console.error('[exec] EVOLVE_EXEC_BRIDGE is not "true". The auto-exec bridge is opt-in. Refusing.');
|
|
1732
|
+
process.exit(2);
|
|
1733
|
+
}
|
|
1734
|
+
const getFlag = (n) => {
|
|
1735
|
+
const i = args.findIndex(a => a === `--${n}` || a.startsWith(`--${n}=`));
|
|
1736
|
+
if (i === -1) return undefined;
|
|
1737
|
+
const h = args[i];
|
|
1738
|
+
if (h.includes('=')) return h.split('=').slice(1).join('='); // --n=value
|
|
1739
|
+
// bare --n: if the next token is a value (not another --flag), consume it
|
|
1740
|
+
// (#179 r6: support `--max-cycles N` space-separated, not just =N). A
|
|
1741
|
+
// trailing bare flag with no following value stays boolean true (e.g. --once).
|
|
1742
|
+
const next = args[i + 1];
|
|
1743
|
+
return (next !== undefined && !next.startsWith('--')) ? next : true;
|
|
1744
|
+
};
|
|
1745
|
+
const harness = String(getFlag('harness') || 'claude-code');
|
|
1746
|
+
const once = getFlag('once') === true;
|
|
1747
|
+
// #179 r7: validate --max-cycles. Number('foo')||0 silently became 0 =
|
|
1748
|
+
// unbounded daemon — a typo must fail fast, not run forever. Absent flag =>
|
|
1749
|
+
// 0 (intentional unbounded). A present value must be a non-negative integer.
|
|
1750
|
+
const rawMaxCycles = getFlag('max-cycles');
|
|
1751
|
+
let maxCycles = 0;
|
|
1752
|
+
if (rawMaxCycles !== undefined && rawMaxCycles !== true) {
|
|
1753
|
+
const n = Number(rawMaxCycles);
|
|
1754
|
+
if (!Number.isInteger(n) || n < 0) {
|
|
1755
|
+
console.error(`[exec] invalid --max-cycles '${rawMaxCycles}' (expected a non-negative integer; 0 or omit = unbounded)`);
|
|
1756
|
+
process.exit(2);
|
|
1757
|
+
}
|
|
1758
|
+
maxCycles = n;
|
|
1759
|
+
} else if (rawMaxCycles === true) {
|
|
1760
|
+
console.error('[exec] --max-cycles requires a value (e.g. --max-cycles 5 or --max-cycles=5)');
|
|
1761
|
+
process.exit(2);
|
|
1762
|
+
}
|
|
1763
|
+
if (!['claude-code', 'openclaw'].includes(harness)) {
|
|
1764
|
+
console.error(`[exec] unknown --harness '${harness}' (expected claude-code | openclaw)`);
|
|
1765
|
+
process.exit(2);
|
|
1766
|
+
}
|
|
1767
|
+
try {
|
|
1768
|
+
const { runExecBridge } = require('./src/gep/execBridge');
|
|
1769
|
+
const res = await runExecBridge({ harness, once, maxCycles });
|
|
1770
|
+
console.log(`[exec] done: cycles=${res.cycles} lastOutcome=${res.lastOutcome}`);
|
|
1771
|
+
// Exit 0 only on a genuine success. A bounded/daemon run that ended in
|
|
1772
|
+
// hand_failed/brain_failed/no_spawn must report non-zero to shells & CI
|
|
1773
|
+
// (Bugbot #179: do not exit 0 on failure just because cycles>0).
|
|
1774
|
+
process.exit(res.lastOutcome === 'success' ? 0 : 1);
|
|
1775
|
+
} catch (error) {
|
|
1776
|
+
console.error('[exec] bridge error:', error && error.message ? error.message : error);
|
|
1777
|
+
process.exit(1);
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1694
1780
|
} else if (command === 'distill') {
|
|
1695
1781
|
const responseFileFlag = args.find(a => typeof a === 'string' && a.startsWith('--response-file='));
|
|
1696
1782
|
if (!responseFileFlag) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evomap/evolver",
|
|
3
|
-
"version": "1.88.
|
|
3
|
+
"version": "1.88.1",
|
|
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": {
|