@evomap/evolver 1.89.2 → 1.89.4
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/.cursor/BUGBOT.md +182 -0
- package/.env.example +68 -0
- package/.git-commit-guard-token +1 -0
- package/.github/CODEOWNERS +63 -0
- package/.github/ISSUE_TEMPLATE/good_first_issue.md +23 -0
- package/.github/pull_request_template.md +45 -0
- package/.github/workflows/test.yml +75 -0
- package/CHANGELOG.md +1237 -0
- package/README.ja-JP.md +1 -3
- package/README.ko-KR.md +1 -3
- package/README.md +86 -530
- package/README.public.md +569 -0
- package/README.zh-CN.md +1 -3
- package/SECURITY.md +108 -0
- package/assets/gep/events.jsonl +3 -0
- package/assets/gep/genes.json +496 -0
- package/examples/atp-consumer-quickstart.md +100 -0
- package/examples/hello-world.md +38 -0
- package/index.js +44 -48
- package/package.json +6 -17
- package/proxy-package.json +39 -0
- package/public.manifest.json +143 -0
- package/src/adapters/hookAdapter.js +2 -0
- package/src/adapters/scripts/_lockPaths.js +74 -0
- package/src/adapters/scripts/evolver-session-start.js +19 -27
- package/src/config.js +23 -0
- package/src/evolve/guards.js +721 -1
- package/src/evolve/pipeline/collect.js +1283 -1
- package/src/evolve/pipeline/dispatch.js +421 -1
- package/src/evolve/pipeline/enrich.js +440 -1
- package/src/evolve/pipeline/hub.js +319 -1
- package/src/evolve/pipeline/select.js +274 -1
- package/src/evolve/pipeline/signals.js +206 -1
- package/src/evolve/utils.js +264 -1
- package/src/evolve.js +350 -1
- package/src/experiment/agentRunner.js +229 -0
- package/src/experiment/cli.js +159 -0
- package/src/experiment/comparison.js +233 -0
- package/src/experiment/metrics.js +75 -0
- package/src/forceUpdate.js +311 -30
- package/src/gep/a2aProtocol.js +4455 -1
- package/src/gep/antiAbuseTelemetry.js +233 -0
- package/src/gep/autoDistillConv.js +205 -1
- package/src/gep/autoDistillLlm.js +315 -1
- package/src/gep/candidateEval.js +92 -1
- package/src/gep/candidates.js +198 -1
- package/src/gep/contentHash.js +30 -1
- package/src/gep/conversationSniffer.js +266 -1
- package/src/gep/crypto.js +89 -1
- package/src/gep/curriculum.js +163 -1
- package/src/gep/deviceId.js +218 -1
- package/src/gep/envFingerprint.js +118 -1
- package/src/gep/epigenetics.js +31 -1
- package/src/gep/execBridge.js +711 -1
- package/src/gep/explore.js +289 -1
- package/src/gep/hash.js +15 -1
- package/src/gep/hubFetch.js +359 -1
- package/src/gep/hubReview.js +207 -1
- package/src/gep/hubSearch.js +526 -1
- package/src/gep/hubVerify.js +306 -1
- package/src/gep/learningSignals.js +89 -1
- package/src/gep/memoryGraph.js +1374 -1
- package/src/gep/memoryGraphAdapter.js +203 -1
- package/src/gep/mutation.js +203 -1
- package/src/gep/narrativeMemory.js +108 -1
- package/src/gep/openPRRegistry.js +205 -1
- package/src/gep/personality.js +423 -1
- package/src/gep/policyCheck.js +599 -1
- package/src/gep/prompt.js +836 -1
- package/src/gep/recallInject.js +409 -1
- package/src/gep/recallVerifier.js +318 -1
- package/src/gep/reflection.js +177 -1
- package/src/gep/sanitize.js +9 -0
- package/src/gep/selector.js +602 -1
- package/src/gep/skillDistiller.js +1294 -1
- package/src/gep/solidify.js +1699 -1
- package/src/gep/strategy.js +136 -1
- package/src/gep/tokenSavings.js +88 -1
- package/src/gep/validator/sandboxExecutor.js +29 -1
- package/src/gep/workspaceKeychain.js +174 -1
- package/src/proxy/extensions/traceControl.js +99 -1
- package/src/proxy/index.js +14 -5
- package/src/proxy/inject.js +52 -1
- package/src/proxy/lifecycle/manager.js +30 -0
- package/src/proxy/mailbox/store.js +2 -1
- package/src/proxy/router/messages_route.js +13 -2
- package/src/proxy/trace/extractor.js +646 -1
- package/src/proxy/trace/usage.js +105 -1
- package/CONTRIBUTING.md +0 -19
- package/assets/cover.png +0 -0
- package/assets/gep/genes.seed.json +0 -245
- package/scripts/a2a_export.js +0 -63
- package/scripts/a2a_ingest.js +0 -79
- package/scripts/a2a_promote.js +0 -118
- package/scripts/analyze_by_skill.js +0 -121
- package/scripts/build_binaries.js +0 -479
- package/scripts/check-changelog.js +0 -166
- package/scripts/extract_log.js +0 -85
- package/scripts/generate_history.js +0 -75
- package/scripts/gep_append_event.js +0 -96
- package/scripts/gep_personality_report.js +0 -234
- package/scripts/human_report.js +0 -147
- package/scripts/recall-verify-report.js +0 -234
- package/scripts/recover_loop.js +0 -61
- package/scripts/seed-merchants.js +0 -91
- package/scripts/suggest_version.js +0 -89
- package/scripts/validate-modules.js +0 -38
- package/scripts/validate-suite.js +0 -78
- package/skills/index.json +0 -14
- /package/{skills → bundled-skills}/_meta/SKILL.md +0 -0
|
@@ -265,6 +265,11 @@ function _maybeTriggerForceUpdateFromHeartbeat(forceUpdate, logger) {
|
|
|
265
265
|
let noop = false;
|
|
266
266
|
let busy = false;
|
|
267
267
|
let thrownErr = null;
|
|
268
|
+
// Structured failure object ({ ok:false, code, detail }) when the upgrader
|
|
269
|
+
// RETURNED a failure; forwarded to reportForceUpdateOutcome so the hub gets
|
|
270
|
+
// the precise branch code instead of "executeForceUpdate returned false".
|
|
271
|
+
// Hoisted out of the try because `result` is block-scoped there.
|
|
272
|
+
let failureResult = null;
|
|
268
273
|
try {
|
|
269
274
|
const mod = require('../../forceUpdate');
|
|
270
275
|
const result = mod.executeForceUpdate(forceUpdate);
|
|
@@ -286,6 +291,11 @@ function _maybeTriggerForceUpdateFromHeartbeat(forceUpdate, logger) {
|
|
|
286
291
|
// src/gep/a2aProtocol.js (search FORCE_UPDATE_BUSY).
|
|
287
292
|
busy = (result === mod.FORCE_UPDATE_BUSY);
|
|
288
293
|
updated = (result === true);
|
|
294
|
+
// Inline the failure-shape check rather than calling mod.isForceUpdateFailure:
|
|
295
|
+
// keeps this robust against partial test mocks of forceUpdate that stub
|
|
296
|
+
// executeForceUpdate but omit the helper (a missing-function throw here
|
|
297
|
+
// would otherwise demote a real success to "failed").
|
|
298
|
+
failureResult = (result && typeof result === 'object' && result.ok === false) ? result : null;
|
|
289
299
|
} catch (e) {
|
|
290
300
|
thrownErr = e;
|
|
291
301
|
try {
|
|
@@ -311,6 +321,7 @@ function _maybeTriggerForceUpdateFromHeartbeat(forceUpdate, logger) {
|
|
|
311
321
|
updated: updated,
|
|
312
322
|
noop: noop,
|
|
313
323
|
error: thrownErr,
|
|
324
|
+
failure: failureResult,
|
|
314
325
|
fromVersion: fromVersion,
|
|
315
326
|
});
|
|
316
327
|
} catch (e) {
|
|
@@ -750,6 +761,25 @@ class LifecycleManager {
|
|
|
750
761
|
},
|
|
751
762
|
};
|
|
752
763
|
|
|
764
|
+
try {
|
|
765
|
+
const cfg = require('../../config');
|
|
766
|
+
if (cfg.antiAbuseTelemetryMode && cfg.antiAbuseTelemetryMode() === 'heartbeat') {
|
|
767
|
+
const { buildHeartbeatAntiAbuseTelemetry } = require('../../gep/antiAbuseTelemetry');
|
|
768
|
+
body.meta.anti_abuse = buildHeartbeatAntiAbuseTelemetry({
|
|
769
|
+
source: 'evolver-proxy',
|
|
770
|
+
nodeId: this.nodeId,
|
|
771
|
+
envFingerprint: fp,
|
|
772
|
+
taskMeta: body.meta,
|
|
773
|
+
// This heartbeat is sent FROM the running proxy — ground truth,
|
|
774
|
+
// not env sniffing (this process usually has neither EVOMAP_PROXY
|
|
775
|
+
// nor EVOMAP_PROXY_PORT set, which would misreport false).
|
|
776
|
+
proxyPortConfigured: true,
|
|
777
|
+
});
|
|
778
|
+
}
|
|
779
|
+
} catch (e) {
|
|
780
|
+
this.logger.warn(`[AntiAbuseTelemetry] failed to build heartbeat summary: ${e && e.message || e}`);
|
|
781
|
+
}
|
|
782
|
+
|
|
753
783
|
// Attach any pending force_update outcome so the hub-side
|
|
754
784
|
// EvolverUpgradeAttempt table gets a row. Captured in a local so the
|
|
755
785
|
// post-2xx clear matches identity (rotation-safe — see
|
|
@@ -387,7 +387,7 @@ class MailboxStore {
|
|
|
387
387
|
return all.slice(skip, skip + max).map(m => ({ ...m }));
|
|
388
388
|
}
|
|
389
389
|
|
|
390
|
-
countPending({ direction, channel } = {}) {
|
|
390
|
+
countPending({ direction, channel, type } = {}) {
|
|
391
391
|
const dir = direction || 'outbound';
|
|
392
392
|
let count = 0;
|
|
393
393
|
const idList = dir === 'outbound' ? this._outbound : this._inbound;
|
|
@@ -395,6 +395,7 @@ class MailboxStore {
|
|
|
395
395
|
const msg = this._messages.get(id);
|
|
396
396
|
if (!msg || msg.status !== 'pending') continue;
|
|
397
397
|
if (channel && msg.channel !== channel) continue;
|
|
398
|
+
if (type && msg.type !== type) continue;
|
|
398
399
|
count++;
|
|
399
400
|
}
|
|
400
401
|
return count;
|
|
@@ -89,6 +89,13 @@ function canonicalizeForBedrock(modelId) {
|
|
|
89
89
|
return KNOWN_BEDROCK_ALIASES[key] || modelId;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
function supportsAdaptiveThinking(modelId) {
|
|
93
|
+
const parsed = parseClaudeId(modelId);
|
|
94
|
+
if (!parsed) return false;
|
|
95
|
+
if (parsed.major > 4) return true;
|
|
96
|
+
return parsed.major === 4 && parsed.minor >= 7;
|
|
97
|
+
}
|
|
98
|
+
|
|
92
99
|
function resolveTierModels() {
|
|
93
100
|
return {
|
|
94
101
|
cheap: process.env.EVOMAP_MODEL_CHEAP || DEFAULT_TIER_MODELS.cheap,
|
|
@@ -97,7 +104,7 @@ function resolveTierModels() {
|
|
|
97
104
|
};
|
|
98
105
|
}
|
|
99
106
|
|
|
100
|
-
function buildMessagesHandler({ anthropicProxy, logger, routerEnabled, traceStore } = {}) {
|
|
107
|
+
function buildMessagesHandler({ anthropicProxy, logger, routerEnabled, traceStore, onTraceQueued } = {}) {
|
|
101
108
|
if (typeof anthropicProxy !== 'function') {
|
|
102
109
|
throw new Error('buildMessagesHandler requires anthropicProxy(path, body, opts)');
|
|
103
110
|
}
|
|
@@ -271,6 +278,8 @@ function buildMessagesHandler({ anthropicProxy, logger, routerEnabled, traceStor
|
|
|
271
278
|
originalModel,
|
|
272
279
|
chosenModel,
|
|
273
280
|
store: traceStore,
|
|
281
|
+
logger: traceStore ? log : null,
|
|
282
|
+
onTraceQueued,
|
|
274
283
|
});
|
|
275
284
|
} catch (_) { /* best-effort trace; never break the request */ }
|
|
276
285
|
|
|
@@ -443,7 +452,8 @@ function buildMessagesHandler({ anthropicProxy, logger, routerEnabled, traceStor
|
|
|
443
452
|
event: 'router_fallback',
|
|
444
453
|
reason: 'upstream_non_json',
|
|
445
454
|
upstream_status: finalUpstream.status,
|
|
446
|
-
|
|
455
|
+
content_type: finalUpstream.headers && finalUpstream.headers['content-type'] || '',
|
|
456
|
+
response_bytes: Buffer.byteLength(raw),
|
|
447
457
|
}));
|
|
448
458
|
}
|
|
449
459
|
}
|
|
@@ -465,5 +475,6 @@ module.exports = {
|
|
|
465
475
|
parseClaudeId,
|
|
466
476
|
isIntraFamilyDowngrade,
|
|
467
477
|
canonicalizeForBedrock,
|
|
478
|
+
supportsAdaptiveThinking,
|
|
468
479
|
KNOWN_BEDROCK_ALIASES,
|
|
469
480
|
};
|