@evomap/evolver 1.89.11 → 1.89.12
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 +1367 -0
- package/README.md +90 -537
- package/README.public.md +578 -0
- package/SECURITY.md +108 -0
- package/assets/gep/events.jsonl +3 -0
- package/examples/atp-consumer-quickstart.md +100 -0
- package/examples/hello-world.md +38 -0
- package/package.json +6 -18
- package/proxy-package.json +39 -0
- package/public.manifest.json +145 -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/gep/a2aProtocol.js +4463 -1
- package/src/gep/antiAbuseTelemetry.js +233 -1
- 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/conversationDistiller.js +270 -0
- 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 +712 -1
- package/src/gep/explore.js +289 -1
- package/src/gep/hash.js +15 -1
- package/src/gep/hubFetch.js +608 -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 +1449 -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/questionGenerator.js +103 -0
- package/src/gep/recallInject.js +409 -1
- package/src/gep/recallVerifier.js +318 -1
- package/src/gep/reflection.js +177 -1
- package/src/gep/savingsCore.js +112 -1
- 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 +95 -1
- package/src/gep/workspaceKeychain.js +174 -1
- package/src/proxy/extensions/traceControl.js +109 -1
- package/src/proxy/inject.js +52 -1
- package/src/proxy/lifecycle/manager.js +108 -7
- package/src/proxy/server/routes.js +31 -0
- package/src/proxy/server/settings.js +6 -2
- package/src/proxy/sync/engine.js +31 -15
- package/src/proxy/sync/inbound.js +87 -9
- package/src/proxy/sync/outbound.js +57 -4
- package/src/proxy/trace/extractor.js +1403 -1
- package/src/proxy/trace/usage.js +105 -1
- package/CONTRIBUTING.md +0 -19
- package/assets/cover.png +0 -0
- 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/refresh_stars_badge.js +0 -168
- 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/assets/gep/{genes.seed.json → genes.json} +0 -0
- /package/{skills → bundled-skills}/_meta/SKILL.md +0 -0
|
@@ -19,9 +19,31 @@ const { getEvolutionDir } = require('./paths');
|
|
|
19
19
|
const QUESTION_STATE_FILE = path.join(getEvolutionDir(), 'question_generator_state.json');
|
|
20
20
|
const MIN_INTERVAL_MS = 30 * 60 * 1000; // standard path: at most once per 30 minutes
|
|
21
21
|
const URGENT_INTERVAL_MS = 5 * 60 * 1000; // urgent path: at most once per 5 minutes
|
|
22
|
+
const EXPLORE_INTERVAL_MS = 6 * 60 * 60 * 1000; // exploration path: at most once per 6 hours
|
|
22
23
|
const MAX_QUESTIONS_PER_CYCLE = 3;
|
|
23
24
|
const MAX_URGENT_QUESTIONS = 2;
|
|
24
25
|
|
|
26
|
+
// Problem-signal triggers used by the standard strategies. Their presence means
|
|
27
|
+
// the agent is "stuck"; the exploration (healthy-agent) strategy stays out of
|
|
28
|
+
// the way when any of these fire, and is filtered out of a question's topic
|
|
29
|
+
// anchor so a curiosity question never reads like a distress signal.
|
|
30
|
+
var PROBLEM_SIGNALS = [
|
|
31
|
+
'recurring_error', 'high_failure_ratio', 'capability_gap', 'unsupported_input_type',
|
|
32
|
+
'evolution_saturation', 'force_steady_state', 'consecutive_failure_streak',
|
|
33
|
+
'user_feature_request', 'perf_bottleneck', 'hub_search_miss_with_problem',
|
|
34
|
+
'repair_loop_detected', 'force_innovation_after_repair_loop',
|
|
35
|
+
'plateau_pivot_required', 'plateau_pivot_suggested',
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
// Common words stripped before ranking topic keywords for exploration questions.
|
|
39
|
+
var EXPLORE_STOPWORDS = new Set([
|
|
40
|
+
'the', 'and', 'for', 'that', 'this', 'with', 'from', 'have', 'what', 'your',
|
|
41
|
+
'agent', 'about', 'into', 'then', 'than', 'they', 'them', 'their', 'there',
|
|
42
|
+
'here', 'will', 'would', 'could', 'should', 'been', 'were', 'using', 'used',
|
|
43
|
+
'cycle', 'evolution', 'error', 'errors', 'failed', 'failure', 'null', 'undefined',
|
|
44
|
+
'true', 'false', 'console', 'return', 'function', 'const', 'value', 'result',
|
|
45
|
+
]);
|
|
46
|
+
|
|
25
47
|
// Infrastructure / user-local failures that the ecosystem cannot resolve.
|
|
26
48
|
// Keep in sync with the hub-side bounty spam guard so the two gates never
|
|
27
49
|
// disagree about what is worth asking the community.
|
|
@@ -84,6 +106,64 @@ function extractRecentGeneIds(recentEvents, count) {
|
|
|
84
106
|
return Array.from(new Set(ids));
|
|
85
107
|
}
|
|
86
108
|
|
|
109
|
+
// Pull a few salient domain keywords from the agent's recent work (session
|
|
110
|
+
// transcript + memory). Deterministic frequency ranking, no NLP dependency.
|
|
111
|
+
// Returns up to `max` distinctive lowercase terms, or [] when there is nothing
|
|
112
|
+
// substantive -- used to ground exploration questions in the agent's real
|
|
113
|
+
// activity so they are specific (and clear the hub relevance gate), not generic.
|
|
114
|
+
function extractTopicKeywords(transcript, memory, max) {
|
|
115
|
+
var text = (String(transcript || '') + ' ' + String(memory || '')).toLowerCase();
|
|
116
|
+
var words = text.match(/[a-z][a-z0-9_-]{4,}/g) || [];
|
|
117
|
+
var freq = {};
|
|
118
|
+
for (var i = 0; i < words.length; i++) {
|
|
119
|
+
var w = words[i];
|
|
120
|
+
if (EXPLORE_STOPWORDS.has(w)) continue;
|
|
121
|
+
freq[w] = (freq[w] || 0) + 1;
|
|
122
|
+
}
|
|
123
|
+
var ranked = Object.keys(freq)
|
|
124
|
+
.filter(function (w) { return freq[w] >= 2; })
|
|
125
|
+
.sort(function (a, b) { return freq[b] - freq[a]; });
|
|
126
|
+
return ranked.slice(0, max || 5);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Exploration strategy: a healthy, productively-running agent proactively asks
|
|
130
|
+
// the network how to extend itself -- complementary capabilities, reusable
|
|
131
|
+
// patterns, or adjacent high-value problems. This is the path that keeps organic
|
|
132
|
+
// bounty demand flowing when no problem signals are firing (problem strategies
|
|
133
|
+
// only fire when the agent is stuck). Anchored on the agent's real recent work
|
|
134
|
+
// so the question is specific, not noise; returns null when there is no anchor.
|
|
135
|
+
function buildExplorationCandidate(signals, recentEvents, transcript, memory) {
|
|
136
|
+
var topicSignals = (signals || []).filter(function (s) {
|
|
137
|
+
s = String(s || '');
|
|
138
|
+
if (!/^[a-z][a-z0-9_]{3,40}$/i.test(s)) return false;
|
|
139
|
+
if (s.indexOf('errsig') === 0 || s.indexOf('ban_gene') === 0 || s.indexOf('recurring_') === 0) return false;
|
|
140
|
+
return !PROBLEM_SIGNALS.some(function (p) { return s === p || s.indexOf(p) === 0; });
|
|
141
|
+
}).slice(0, 4);
|
|
142
|
+
|
|
143
|
+
var keywords = extractTopicKeywords(transcript, memory, 5);
|
|
144
|
+
var genes = extractRecentGeneIds(recentEvents, 5);
|
|
145
|
+
|
|
146
|
+
// Require real work artifacts (domain keywords from the transcript/memory, or
|
|
147
|
+
// recent genes) to ground the question. A bare signal name is too thin an
|
|
148
|
+
// anchor to make a useful bounty, so topic signals only enrich the tags.
|
|
149
|
+
if (keywords.length === 0 && genes.length === 0) return null;
|
|
150
|
+
|
|
151
|
+
var focus = keywords.length > 0 ? keywords.slice(0, 5).join(', ') : genes.join(', ');
|
|
152
|
+
var question = 'A productively-running agent working on ' + focus
|
|
153
|
+
+ ' wants to extend its capabilities. What reusable patterns, automation genes, '
|
|
154
|
+
+ 'or complementary tools in this area would be most valuable to build next, and '
|
|
155
|
+
+ 'what adjacent high-value problems is the ecosystem not yet solving well here?';
|
|
156
|
+
|
|
157
|
+
return {
|
|
158
|
+
question: question,
|
|
159
|
+
amount: 0,
|
|
160
|
+
signals: ['capability_frontier', 'exploration', 'proactive_curiosity']
|
|
161
|
+
.concat(keywords.slice(0, 2))
|
|
162
|
+
.concat(topicSignals.slice(0, 2)),
|
|
163
|
+
priority: 0,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
|
|
87
167
|
// ---------------------------------------------------------------------------
|
|
88
168
|
// Standard strategies (cycle-start, rate-limited by MIN_INTERVAL_MS)
|
|
89
169
|
// ---------------------------------------------------------------------------
|
|
@@ -323,6 +403,21 @@ function generateQuestions(opts) {
|
|
|
323
403
|
}
|
|
324
404
|
|
|
325
405
|
var candidates = buildStandardCandidates(signals, recentEvents, transcript, memory);
|
|
406
|
+
|
|
407
|
+
// Exploration (healthy-agent) path: add a low-priority proactive question on a
|
|
408
|
+
// slower cadence (EXPLORE_INTERVAL_MS) so a smoothly-running agent -- which
|
|
409
|
+
// trips none of the problem strategies above -- still seeds organic bounty
|
|
410
|
+
// demand. Disable with EVOLVER_EXPLORATION_QUESTIONS=0.
|
|
411
|
+
var exploreEligible = process.env.EVOLVER_EXPLORATION_QUESTIONS !== '0';
|
|
412
|
+
if (exploreEligible && state.lastExploreAt) {
|
|
413
|
+
var exElapsed = Date.now() - new Date(state.lastExploreAt).getTime();
|
|
414
|
+
if (exElapsed < EXPLORE_INTERVAL_MS) exploreEligible = false;
|
|
415
|
+
}
|
|
416
|
+
if (exploreEligible) {
|
|
417
|
+
var exploration = buildExplorationCandidate(signals, recentEvents, transcript, memory);
|
|
418
|
+
if (exploration) candidates.push(exploration);
|
|
419
|
+
}
|
|
420
|
+
|
|
326
421
|
if (candidates.length === 0) return [];
|
|
327
422
|
|
|
328
423
|
candidates.sort(function(a, b) { return b.priority - a.priority; });
|
|
@@ -337,6 +432,12 @@ function generateQuestions(opts) {
|
|
|
337
432
|
|
|
338
433
|
if (filtered.length === 0) return [];
|
|
339
434
|
|
|
435
|
+
// Advance the exploration cooldown only if an exploration question actually
|
|
436
|
+
// went out, so problem questions never consume the slower exploration budget.
|
|
437
|
+
var explorationSent = filtered.some(function (q) {
|
|
438
|
+
return Array.isArray(q.signals) && q.signals.indexOf('exploration') !== -1;
|
|
439
|
+
});
|
|
440
|
+
|
|
340
441
|
var newRecentQuestions = recentQTexts.concat(filtered.map(function(q) { return q.question; }));
|
|
341
442
|
if (newRecentQuestions.length > 30) {
|
|
342
443
|
newRecentQuestions = newRecentQuestions.slice(-30);
|
|
@@ -344,6 +445,7 @@ function generateQuestions(opts) {
|
|
|
344
445
|
writeState({
|
|
345
446
|
lastAskedAt: new Date().toISOString(),
|
|
346
447
|
lastUrgentAt: state.lastUrgentAt || null,
|
|
448
|
+
lastExploreAt: explorationSent ? new Date().toISOString() : (state.lastExploreAt || null),
|
|
347
449
|
recentQuestions: newRecentQuestions,
|
|
348
450
|
});
|
|
349
451
|
|
|
@@ -404,6 +506,7 @@ function generateUrgentQuestions(opts) {
|
|
|
404
506
|
writeState({
|
|
405
507
|
lastAskedAt: state.lastAskedAt || null,
|
|
406
508
|
lastUrgentAt: new Date().toISOString(),
|
|
509
|
+
lastExploreAt: state.lastExploreAt || null,
|
|
407
510
|
recentQuestions: newRecentQuestions,
|
|
408
511
|
});
|
|
409
512
|
|