@evomap/evolver 1.69.14 → 1.69.16
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/index.js +10 -1
- package/package.json +1 -1
- package/src/atp/hubClient.js +94 -10
- 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/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/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/personality.js +1 -1
- package/src/gep/policyCheck.js +1 -1
- 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/proxy/index.js +38 -12
- package/src/proxy/server/routes.js +67 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{"type":"CapabilityCandidate","id":"cand_b9a66a5c","title":"Harden session log detection and fallback behavior","source":"signals","created_at":"2026-04-22T11:
|
|
2
|
-
{"type":"CapabilityCandidate","id":"cand_b9a66a5c","title":"Harden session log detection and fallback behavior","source":"signals","created_at":"2026-04-22T11:
|
|
3
|
-
{"type":"CapabilityCandidate","id":"cand_b9a66a5c","title":"Harden session log detection and fallback behavior","source":"signals","created_at":"2026-04-22T11:
|
|
1
|
+
{"type":"CapabilityCandidate","id":"cand_b9a66a5c","title":"Harden session log detection and fallback behavior","source":"signals","created_at":"2026-04-22T11:22:20.060Z","signals":["memory_missing","user_missing","session_logs_missing"],"tags":["memory_missing","user_missing","session_logs_missing","area:memory"],"shape":{"title":"Harden session log detection and fallback behavior","input":"Recent session transcript + memory snippets + user instructions","output":"A safe, auditable evolution patch guided by GEP assets","invariants":"Protocol order, small reversible patches, validation, append-only events","params":"Signals: memory_missing, user_missing, session_logs_missing","failure_points":"Missing signals, over-broad changes, skipped validation, missing knowledge solidification","evidence":"Signal present: session_logs_missing"}}
|
|
2
|
+
{"type":"CapabilityCandidate","id":"cand_b9a66a5c","title":"Harden session log detection and fallback behavior","source":"signals","created_at":"2026-04-22T11:22:21.928Z","signals":["memory_missing","user_missing","session_logs_missing"],"tags":["memory_missing","user_missing","session_logs_missing","area:memory"],"shape":{"title":"Harden session log detection and fallback behavior","input":"Recent session transcript + memory snippets + user instructions","output":"A safe, auditable evolution patch guided by GEP assets","invariants":"Protocol order, small reversible patches, validation, append-only events","params":"Signals: memory_missing, user_missing, session_logs_missing","failure_points":"Missing signals, over-broad changes, skipped validation, missing knowledge solidification","evidence":"Signal present: session_logs_missing"}}
|
|
3
|
+
{"type":"CapabilityCandidate","id":"cand_b9a66a5c","title":"Harden session log detection and fallback behavior","source":"signals","created_at":"2026-04-22T11:22:23.784Z","signals":["memory_missing","user_missing","session_logs_missing"],"tags":["memory_missing","user_missing","session_logs_missing","area:memory"],"shape":{"title":"Harden session log detection and fallback behavior","input":"Recent session transcript + memory snippets + user instructions","output":"A safe, auditable evolution patch guided by GEP assets","invariants":"Protocol order, small reversible patches, validation, append-only events","params":"Signals: memory_missing, user_missing, session_logs_missing","failure_points":"Missing signals, over-broad changes, skipped validation, missing knowledge solidification","evidence":"Signal present: session_logs_missing"}}
|
package/index.js
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
// Load .env BEFORE any internal require so that a2aProtocol and ATP
|
|
3
|
+
// modules see A2A_NODE_SECRET / A2A_NODE_ID / A2A_HUB_URL at first
|
|
4
|
+
// access and never fall back to a stale persisted/cached secret.
|
|
5
|
+
// Reported in #460.
|
|
6
|
+
try {
|
|
7
|
+
const _path = require('path');
|
|
8
|
+
const { getRepoRoot: _getRepoRoot } = require('./src/gep/paths');
|
|
9
|
+
require('dotenv').config({ path: _path.join(_getRepoRoot(), '.env') });
|
|
10
|
+
} catch (e) { /* dotenv is optional */ }
|
|
11
|
+
|
|
2
12
|
const evolve = require('./src/evolve');
|
|
3
13
|
const { solidify } = require('./src/gep/solidify');
|
|
4
14
|
const path = require('path');
|
|
5
15
|
const { getRepoRoot } = require('./src/gep/paths');
|
|
6
|
-
try { require('dotenv').config({ path: path.join(getRepoRoot(), '.env') }); } catch (e) { console.warn('[Evolver] Warning: dotenv not found or failed to load .env'); }
|
|
7
16
|
const fs = require('fs');
|
|
8
17
|
const { spawn } = require('child_process');
|
|
9
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evomap/evolver",
|
|
3
|
-
"version": "1.69.
|
|
3
|
+
"version": "1.69.16",
|
|
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": {
|
package/src/atp/hubClient.js
CHANGED
|
@@ -1,8 +1,70 @@
|
|
|
1
1
|
// ATP (Agent Transaction Protocol) Hub Client
|
|
2
2
|
// Wraps /a2a/atp/* endpoints for evolver-based agents.
|
|
3
|
-
//
|
|
3
|
+
//
|
|
4
|
+
// Routing rules (#460 Bug 2):
|
|
5
|
+
// - When EVOMAP_PROXY=1 (or A2A_TRANSPORT=mailbox) AND a local proxy is
|
|
6
|
+
// running (settings.json contains proxy.url), all ATP requests are
|
|
7
|
+
// forwarded to the proxy's /atp/* passthrough routes so the proxy is the
|
|
8
|
+
// single egress point (matches mailbox/task/session behavior).
|
|
9
|
+
// - Otherwise, requests go directly to the Hub via the legacy _hubPost /
|
|
10
|
+
// _hubGet path, preserving the 1.69.x and earlier behavior for users who
|
|
11
|
+
// never started the proxy.
|
|
12
|
+
//
|
|
13
|
+
// The proxy overrides sender_id with its own node_id, so callers must be on
|
|
14
|
+
// the same node as the running proxy. This is enforced server-side (proxy is
|
|
15
|
+
// bound to 127.0.0.1).
|
|
4
16
|
|
|
17
|
+
const http = require('http');
|
|
5
18
|
const { getHubUrl, buildHubHeaders, getNodeId } = require('../gep/a2aProtocol');
|
|
19
|
+
const { getProxyUrl } = require('../proxy/server/settings');
|
|
20
|
+
|
|
21
|
+
function _isProxyMode() {
|
|
22
|
+
if (process.env.EVOMAP_PROXY === '1') return true;
|
|
23
|
+
if (process.env.A2A_TRANSPORT === 'mailbox') return true;
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function _proxyRequest(method, path, body, timeoutMs) {
|
|
28
|
+
const proxyUrl = getProxyUrl();
|
|
29
|
+
if (!proxyUrl) return Promise.resolve({ ok: false, error: 'proxy_not_running' });
|
|
30
|
+
|
|
31
|
+
const url = new URL(path, proxyUrl);
|
|
32
|
+
const timeout = timeoutMs || require('../config').HTTP_TRANSPORT_TIMEOUT_MS;
|
|
33
|
+
|
|
34
|
+
return new Promise(function (resolve) {
|
|
35
|
+
const payload = body ? JSON.stringify(body) : '';
|
|
36
|
+
const headers = { 'Content-Type': 'application/json' };
|
|
37
|
+
if (payload) headers['Content-Length'] = Buffer.byteLength(payload);
|
|
38
|
+
|
|
39
|
+
const req = http.request(
|
|
40
|
+
{
|
|
41
|
+
hostname: url.hostname,
|
|
42
|
+
port: url.port,
|
|
43
|
+
path: url.pathname + (url.search || ''),
|
|
44
|
+
method: method,
|
|
45
|
+
headers: headers,
|
|
46
|
+
timeout: timeout,
|
|
47
|
+
},
|
|
48
|
+
function (res) {
|
|
49
|
+
const chunks = [];
|
|
50
|
+
res.on('data', function (c) { chunks.push(c); });
|
|
51
|
+
res.on('end', function () {
|
|
52
|
+
const raw = Buffer.concat(chunks).toString();
|
|
53
|
+
if (res.statusCode >= 200 && res.statusCode < 300) {
|
|
54
|
+
try { resolve({ ok: true, data: JSON.parse(raw) }); }
|
|
55
|
+
catch (_) { resolve({ ok: true, data: { raw: raw } }); }
|
|
56
|
+
} else {
|
|
57
|
+
resolve({ ok: false, status: res.statusCode, error: raw.slice(0, 400) });
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
req.on('error', function (err) { resolve({ ok: false, error: err.message }); });
|
|
63
|
+
req.on('timeout', function () { req.destroy(); resolve({ ok: false, error: 'proxy_timeout' }); });
|
|
64
|
+
if (payload) req.write(payload);
|
|
65
|
+
req.end();
|
|
66
|
+
});
|
|
67
|
+
}
|
|
6
68
|
|
|
7
69
|
function _hubPost(pathSuffix, body, timeoutMs) {
|
|
8
70
|
const hubUrl = getHubUrl();
|
|
@@ -39,6 +101,23 @@ function _hubGet(pathSuffix, timeoutMs) {
|
|
|
39
101
|
.catch(function (err) { return { ok: false, error: err.message }; });
|
|
40
102
|
}
|
|
41
103
|
|
|
104
|
+
// Dispatcher: choose proxy or direct hub based on env + proxy availability.
|
|
105
|
+
// proxyPath is the path relative to proxy root (e.g. '/atp/order').
|
|
106
|
+
// hubPath is the path relative to hub root (e.g. '/a2a/atp/order').
|
|
107
|
+
function _post(proxyPath, hubPath, body, timeoutMs) {
|
|
108
|
+
if (_isProxyMode() && getProxyUrl()) {
|
|
109
|
+
return _proxyRequest('POST', proxyPath, body, timeoutMs);
|
|
110
|
+
}
|
|
111
|
+
return _hubPost(hubPath, body, timeoutMs);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function _get(proxyPath, hubPath, timeoutMs) {
|
|
115
|
+
if (_isProxyMode() && getProxyUrl()) {
|
|
116
|
+
return _proxyRequest('GET', proxyPath, null, timeoutMs);
|
|
117
|
+
}
|
|
118
|
+
return _hubGet(hubPath, timeoutMs);
|
|
119
|
+
}
|
|
120
|
+
|
|
42
121
|
/**
|
|
43
122
|
* POST /a2a/atp/order -- place an ATP order with routing
|
|
44
123
|
* @param {object} opts
|
|
@@ -52,7 +131,7 @@ function _hubGet(pathSuffix, timeoutMs) {
|
|
|
52
131
|
*/
|
|
53
132
|
function placeOrder(opts) {
|
|
54
133
|
const nodeId = getNodeId();
|
|
55
|
-
return
|
|
134
|
+
return _post('/atp/order', '/a2a/atp/order', {
|
|
56
135
|
sender_id: nodeId,
|
|
57
136
|
capabilities: opts.capabilities,
|
|
58
137
|
budget: Math.max(1, Math.round(Number(opts.budget) || 10)),
|
|
@@ -71,7 +150,7 @@ function placeOrder(opts) {
|
|
|
71
150
|
*/
|
|
72
151
|
function submitDelivery(orderId, proofPayload) {
|
|
73
152
|
const nodeId = getNodeId();
|
|
74
|
-
return
|
|
153
|
+
return _post('/atp/deliver', '/a2a/atp/deliver', {
|
|
75
154
|
sender_id: nodeId,
|
|
76
155
|
order_id: orderId,
|
|
77
156
|
proof_payload: proofPayload || {},
|
|
@@ -85,7 +164,7 @@ function submitDelivery(orderId, proofPayload) {
|
|
|
85
164
|
*/
|
|
86
165
|
function verifyDelivery(orderId, action) {
|
|
87
166
|
const nodeId = getNodeId();
|
|
88
|
-
return
|
|
167
|
+
return _post('/atp/verify', '/a2a/atp/verify', {
|
|
89
168
|
sender_id: nodeId,
|
|
90
169
|
order_id: orderId,
|
|
91
170
|
action: action || 'confirm',
|
|
@@ -98,7 +177,7 @@ function verifyDelivery(orderId, action) {
|
|
|
98
177
|
*/
|
|
99
178
|
function settleOrder(orderId) {
|
|
100
179
|
const nodeId = getNodeId();
|
|
101
|
-
return
|
|
180
|
+
return _post('/atp/settle', '/a2a/atp/settle', {
|
|
102
181
|
sender_id: nodeId,
|
|
103
182
|
order_id: orderId,
|
|
104
183
|
});
|
|
@@ -111,7 +190,7 @@ function settleOrder(orderId) {
|
|
|
111
190
|
*/
|
|
112
191
|
function disputeOrder(orderId, reason) {
|
|
113
192
|
const nodeId = getNodeId();
|
|
114
|
-
return
|
|
193
|
+
return _post('/atp/dispute', '/a2a/atp/dispute', {
|
|
115
194
|
sender_id: nodeId,
|
|
116
195
|
order_id: orderId,
|
|
117
196
|
reason: reason,
|
|
@@ -124,7 +203,8 @@ function disputeOrder(orderId, reason) {
|
|
|
124
203
|
*/
|
|
125
204
|
function getMerchantTier(nodeId) {
|
|
126
205
|
const nid = nodeId || getNodeId();
|
|
127
|
-
|
|
206
|
+
const q = '?node_id=' + encodeURIComponent(nid);
|
|
207
|
+
return _get('/atp/merchant/tier' + q, '/a2a/atp/merchant/tier' + q);
|
|
128
208
|
}
|
|
129
209
|
|
|
130
210
|
/**
|
|
@@ -132,7 +212,8 @@ function getMerchantTier(nodeId) {
|
|
|
132
212
|
* @param {string} orderId
|
|
133
213
|
*/
|
|
134
214
|
function getOrderStatus(orderId) {
|
|
135
|
-
|
|
215
|
+
const suffix = '/' + encodeURIComponent(orderId);
|
|
216
|
+
return _get('/atp/order' + suffix, '/a2a/atp/order' + suffix);
|
|
136
217
|
}
|
|
137
218
|
|
|
138
219
|
/**
|
|
@@ -148,14 +229,15 @@ function listProofs(opts) {
|
|
|
148
229
|
if (opts && opts.role) params.set('role', opts.role);
|
|
149
230
|
if (opts && opts.status) params.set('status', opts.status);
|
|
150
231
|
if (opts && opts.limit) params.set('limit', String(opts.limit));
|
|
151
|
-
|
|
232
|
+
const q = '?' + params.toString();
|
|
233
|
+
return _get('/atp/proofs' + q, '/a2a/atp/proofs' + q);
|
|
152
234
|
}
|
|
153
235
|
|
|
154
236
|
/**
|
|
155
237
|
* GET /a2a/atp/policy -- get ATP policy config
|
|
156
238
|
*/
|
|
157
239
|
function getAtpPolicy() {
|
|
158
|
-
return
|
|
240
|
+
return _get('/atp/policy', '/a2a/atp/policy');
|
|
159
241
|
}
|
|
160
242
|
|
|
161
243
|
module.exports = {
|
|
@@ -168,4 +250,6 @@ module.exports = {
|
|
|
168
250
|
getOrderStatus,
|
|
169
251
|
listProofs,
|
|
170
252
|
getAtpPolicy,
|
|
253
|
+
// exported for tests only
|
|
254
|
+
_isProxyMode: _isProxyMode,
|
|
171
255
|
};
|