@evomap/evolver 1.89.20 → 2.0.0-beta.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.
Files changed (231) hide show
  1. package/README.md +27 -564
  2. package/bin/evolver-llm-proxy.js +3 -0
  3. package/bin/evolver-mcp.js +2 -0
  4. package/bin/evolver-proxy.js +3 -0
  5. package/bin/evolver.js +4 -0
  6. package/index.js +1 -3586
  7. package/package.json +32 -62
  8. package/CONTRIBUTING.md +0 -19
  9. package/LICENSE +0 -641
  10. package/README.ja-JP.md +0 -521
  11. package/README.ko-KR.md +0 -520
  12. package/README.zh-CN.md +0 -531
  13. package/SKILL.md +0 -365
  14. package/assets/cover.png +0 -0
  15. package/assets/gep/genes.seed.json +0 -496
  16. package/conformance/savings-core/constants.json +0 -30
  17. package/conformance/savings-core/golden-vectors.json +0 -333
  18. package/scripts/a2a_export.js +0 -63
  19. package/scripts/a2a_ingest.js +0 -79
  20. package/scripts/a2a_promote.js +0 -118
  21. package/scripts/analyze_by_skill.js +0 -121
  22. package/scripts/build_binaries.js +0 -479
  23. package/scripts/check-changelog.js +0 -166
  24. package/scripts/extract_log.js +0 -85
  25. package/scripts/generate_history.js +0 -75
  26. package/scripts/gep_append_event.js +0 -96
  27. package/scripts/gep_personality_report.js +0 -234
  28. package/scripts/human_report.js +0 -147
  29. package/scripts/recall-verify-report.js +0 -234
  30. package/scripts/recover_loop.js +0 -61
  31. package/scripts/refresh_stars_badge.js +0 -168
  32. package/scripts/seed-merchants.js +0 -91
  33. package/scripts/skill2recipes.js +0 -118
  34. package/scripts/suggest_version.js +0 -89
  35. package/scripts/validate-modules.js +0 -38
  36. package/scripts/validate-suite.js +0 -78
  37. package/skills/_meta/SKILL.md +0 -41
  38. package/skills/index.json +0 -14
  39. package/src/adapters/claudeCode.js +0 -194
  40. package/src/adapters/codex.js +0 -216
  41. package/src/adapters/cursor.js +0 -91
  42. package/src/adapters/hookAdapter.js +0 -469
  43. package/src/adapters/kiro.js +0 -195
  44. package/src/adapters/opencode.js +0 -326
  45. package/src/adapters/scripts/_lockPaths.js +0 -74
  46. package/src/adapters/scripts/_memoryFiltering.js +0 -35
  47. package/src/adapters/scripts/_runtimePaths.js +0 -440
  48. package/src/adapters/scripts/evolver-session-end.js +0 -321
  49. package/src/adapters/scripts/evolver-session-start.js +0 -587
  50. package/src/adapters/scripts/evolver-signal-detect.js +0 -98
  51. package/src/adapters/scripts/evolver-task-recall.js +0 -173
  52. package/src/atp/atpExecute.js +0 -283
  53. package/src/atp/atpTaskPickup.js +0 -233
  54. package/src/atp/autoBuyer.js +0 -382
  55. package/src/atp/autoDeliver.js +0 -215
  56. package/src/atp/cli.js +0 -354
  57. package/src/atp/cliAutobuyPrompt.js +0 -154
  58. package/src/atp/consumerAgent.js +0 -157
  59. package/src/atp/defaultHandler.js +0 -69
  60. package/src/atp/heartbeatSignalsHandler.js +0 -254
  61. package/src/atp/hubClient.js +0 -317
  62. package/src/atp/index.js +0 -38
  63. package/src/atp/merchantAgent.js +0 -118
  64. package/src/atp/protocol.js +0 -41
  65. package/src/atp/questionComposer.js +0 -133
  66. package/src/atp/serviceHelper.js +0 -92
  67. package/src/canary.js +0 -13
  68. package/src/config.js +0 -351
  69. package/src/evolve/guards.js +0 -1
  70. package/src/evolve/pipeline/collect.js +0 -1
  71. package/src/evolve/pipeline/dispatch.js +0 -1
  72. package/src/evolve/pipeline/enrich.js +0 -1
  73. package/src/evolve/pipeline/hub.js +0 -1
  74. package/src/evolve/pipeline/select.js +0 -1
  75. package/src/evolve/pipeline/signals.js +0 -1
  76. package/src/evolve/utils.js +0 -1
  77. package/src/evolve.js +0 -1
  78. package/src/experiment/agentRunner.js +0 -229
  79. package/src/experiment/cli.js +0 -159
  80. package/src/experiment/comparison.js +0 -233
  81. package/src/experiment/metrics.js +0 -75
  82. package/src/forceUpdate.js +0 -991
  83. package/src/gep/a2a.js +0 -173
  84. package/src/gep/a2aProtocol.js +0 -1
  85. package/src/gep/analyzer.js +0 -35
  86. package/src/gep/antiAbuseTelemetry.js +0 -1
  87. package/src/gep/assetCallLog.js +0 -197
  88. package/src/gep/assetStore.js +0 -723
  89. package/src/gep/assets.js +0 -36
  90. package/src/gep/autoDistillConv.js +0 -1
  91. package/src/gep/autoDistillLlm.js +0 -1
  92. package/src/gep/bridge.js +0 -138
  93. package/src/gep/candidateEval.js +0 -1
  94. package/src/gep/candidates.js +0 -1
  95. package/src/gep/claimNudge.js +0 -121
  96. package/src/gep/cliContracts.js +0 -1190
  97. package/src/gep/contentHash.js +0 -1
  98. package/src/gep/conversationDistiller.js +0 -1
  99. package/src/gep/conversationSniffer.js +0 -1
  100. package/src/gep/crypto.js +0 -1
  101. package/src/gep/curriculum.js +0 -1
  102. package/src/gep/deviceId.js +0 -1
  103. package/src/gep/directoryClient.js +0 -115
  104. package/src/gep/envFingerprint.js +0 -1
  105. package/src/gep/epigenetics.js +0 -1
  106. package/src/gep/execBridge.js +0 -1
  107. package/src/gep/executionTrace.js +0 -291
  108. package/src/gep/explore.js +0 -1
  109. package/src/gep/featureFlags.js +0 -121
  110. package/src/gep/gitOps.js +0 -265
  111. package/src/gep/hash.js +0 -1
  112. package/src/gep/hostErrorClassifier.js +0 -34
  113. package/src/gep/hubFetch.js +0 -1
  114. package/src/gep/hubReview.js +0 -1
  115. package/src/gep/hubSearch.js +0 -1
  116. package/src/gep/hubVerify.js +0 -1
  117. package/src/gep/idleScheduler.js +0 -400
  118. package/src/gep/issueReporter.js +0 -416
  119. package/src/gep/learningSignals.js +0 -1
  120. package/src/gep/llmReview.js +0 -92
  121. package/src/gep/localStateAwareness.js +0 -243
  122. package/src/gep/mailboxTransport.js +0 -119
  123. package/src/gep/memoryGraph.js +0 -1
  124. package/src/gep/memoryGraphAdapter.js +0 -1
  125. package/src/gep/mutation.js +0 -1
  126. package/src/gep/narrativeMemory.js +0 -1
  127. package/src/gep/oauthLogin.js +0 -181
  128. package/src/gep/openPRRegistry.js +0 -1
  129. package/src/gep/paths.js +0 -522
  130. package/src/gep/personality.js +0 -1
  131. package/src/gep/policyCheck.js +0 -1
  132. package/src/gep/portable.js +0 -103
  133. package/src/gep/privacyClient.js +0 -235
  134. package/src/gep/prompt.js +0 -1
  135. package/src/gep/questionGenerator.js +0 -518
  136. package/src/gep/recallInject.js +0 -1
  137. package/src/gep/recallVerifier.js +0 -1
  138. package/src/gep/reflection.js +0 -1
  139. package/src/gep/sanitize.js +0 -264
  140. package/src/gep/savingsCore.js +0 -1
  141. package/src/gep/schemas/capsule.js +0 -170
  142. package/src/gep/schemas/gene.js +0 -154
  143. package/src/gep/schemas/index.js +0 -8
  144. package/src/gep/schemas/protocol.js +0 -51
  145. package/src/gep/schemas/task.js +0 -74
  146. package/src/gep/selector.js +0 -1
  147. package/src/gep/selfPR.js +0 -469
  148. package/src/gep/signals.js +0 -776
  149. package/src/gep/skill2gep.js +0 -1056
  150. package/src/gep/skill2gepAudit.js +0 -303
  151. package/src/gep/skill2recipes.js +0 -511
  152. package/src/gep/skillDistiller.js +0 -1
  153. package/src/gep/skillPublisher.js +0 -358
  154. package/src/gep/solidify.js +0 -1
  155. package/src/gep/strategy.js +0 -1
  156. package/src/gep/taskReceiver.js +0 -575
  157. package/src/gep/tokenSavings.js +0 -1
  158. package/src/gep/trajectoryExport.js +0 -1
  159. package/src/gep/validationReport.js +0 -55
  160. package/src/gep/validator/index.js +0 -411
  161. package/src/gep/validator/reporter.js +0 -210
  162. package/src/gep/validator/sandboxExecutor.js +0 -480
  163. package/src/gep/validator/stakeBootstrap.js +0 -357
  164. package/src/gep/workspaceKeychain.js +0 -1
  165. package/src/ops/cleanup.js +0 -80
  166. package/src/ops/commentary.js +0 -60
  167. package/src/ops/health_check.js +0 -104
  168. package/src/ops/index.js +0 -11
  169. package/src/ops/innovation.js +0 -67
  170. package/src/ops/lifecycle.js +0 -798
  171. package/src/ops/self_repair.js +0 -76
  172. package/src/ops/skills_monitor.js +0 -147
  173. package/src/ops/trigger.js +0 -33
  174. package/src/proxy/clientSettings.js +0 -405
  175. package/src/proxy/envelope.js +0 -59
  176. package/src/proxy/extensions/dmHandler.js +0 -45
  177. package/src/proxy/extensions/sessionHandler.js +0 -141
  178. package/src/proxy/extensions/skillUpdater.js +0 -64
  179. package/src/proxy/extensions/traceControl.js +0 -1
  180. package/src/proxy/index.js +0 -1395
  181. package/src/proxy/inject.js +0 -1
  182. package/src/proxy/lifecycle/manager.js +0 -1568
  183. package/src/proxy/mailbox/state.js +0 -207
  184. package/src/proxy/mailbox/store.js +0 -590
  185. package/src/proxy/router/cache_passthrough.js +0 -26
  186. package/src/proxy/router/features.js +0 -84
  187. package/src/proxy/router/gemini_route.js +0 -154
  188. package/src/proxy/router/messages_route.js +0 -535
  189. package/src/proxy/router/model_router.js +0 -113
  190. package/src/proxy/router/models_route.js +0 -52
  191. package/src/proxy/router/ollama_route.js +0 -103
  192. package/src/proxy/router/responses_route.js +0 -170
  193. package/src/proxy/router/vertex_route.js +0 -110
  194. package/src/proxy/server/http.js +0 -363
  195. package/src/proxy/server/routes.js +0 -558
  196. package/src/proxy/server/settings.js +0 -115
  197. package/src/proxy/sync/engine.js +0 -179
  198. package/src/proxy/sync/inbound.js +0 -211
  199. package/src/proxy/sync/outbound.js +0 -320
  200. package/src/proxy/task/monitor.js +0 -131
  201. package/src/proxy/trace/extractor.js +0 -1
  202. package/src/proxy/trace/usage.js +0 -1
  203. package/src/webui/client/clientJs/assets.js +0 -111
  204. package/src/webui/client/clientJs/bootstrap.js +0 -92
  205. package/src/webui/client/clientJs/common.js +0 -77
  206. package/src/webui/client/clientJs/i18n.js +0 -366
  207. package/src/webui/client/clientJs/index.js +0 -35
  208. package/src/webui/client/clientJs/interactions.js +0 -351
  209. package/src/webui/client/clientJs/overview.js +0 -152
  210. package/src/webui/client/clientJs/personality.js +0 -285
  211. package/src/webui/client/clientJs/pipelines.js +0 -330
  212. package/src/webui/client/indexHtml.js +0 -221
  213. package/src/webui/client/static.js +0 -23
  214. package/src/webui/client/stylesCss.js +0 -639
  215. package/src/webui/client/vendor/README.md +0 -15
  216. package/src/webui/client/vendor/echarts.min.js +0 -45
  217. package/src/webui/index.js +0 -14
  218. package/src/webui/observer/assets.js +0 -146
  219. package/src/webui/observer/index.js +0 -37
  220. package/src/webui/observer/interactions.js +0 -127
  221. package/src/webui/observer/jsonl.js +0 -75
  222. package/src/webui/observer/paths.js +0 -46
  223. package/src/webui/observer/personality.js +0 -43
  224. package/src/webui/observer/pipelineEvents.js +0 -58
  225. package/src/webui/observer/redact.js +0 -63
  226. package/src/webui/observer/runs.js +0 -356
  227. package/src/webui/observer/safety.js +0 -57
  228. package/src/webui/observer/skills.js +0 -70
  229. package/src/webui/observer/status.js +0 -71
  230. package/src/webui/server/http.js +0 -138
  231. package/src/webui/server/routes.js +0 -41
@@ -1,235 +0,0 @@
1
- // ---------------------------------------------------------------------------
2
- // privacyClient -- Hub privacy computing API client.
3
- // Handles encrypted blob upload, sealed tool registration/execution,
4
- // status polling, and result retrieval.
5
- // ---------------------------------------------------------------------------
6
-
7
- const { getNodeId, buildHubHeaders, buildNodeScopedHubHeaders } = require('./a2aProtocol');
8
- const { generateKey, encrypt, decrypt, pack, unpack } = require('./crypto');
9
- const { resolveHubUrl } = require('../config');
10
- const { hubFetch } = require('./hubFetch');
11
-
12
- const PRIVACY_TIMEOUT_MS = 15000;
13
-
14
- function buildPrivacyNodeHeaders() {
15
- const buildHeaders = buildNodeScopedHubHeaders || buildHubHeaders;
16
- return buildHeaders();
17
- }
18
-
19
- function privacyUrl(path) {
20
- return `${resolveHubUrl().replace(/\/+$/, '')}/a2a/privacy${path}`;
21
- }
22
-
23
- function privacyNodeUrl(path) {
24
- const nodeId = getNodeId();
25
- if (!nodeId) return null;
26
- const sep = path.includes('?') ? '&' : '?';
27
- return privacyUrl(path) + sep + 'node_id=' + encodeURIComponent(nodeId);
28
- }
29
-
30
- /**
31
- * Submit a privacy computing task to Hub.
32
- * @param {{ title: string, body?: string, signals?: string }} opts
33
- * @returns {{ taskId: string, status: string } | null}
34
- */
35
- async function submitPrivacyTask(opts) {
36
- const nodeId = getNodeId();
37
- if (!nodeId) return null;
38
-
39
- try {
40
- const res = await hubFetch(privacyUrl('/submit'), {
41
- method: 'POST',
42
- headers: Object.assign({ 'Content-Type': 'application/json' }, buildPrivacyNodeHeaders() || {}),
43
- body: JSON.stringify({ ...opts, node_id: nodeId }),
44
- signal: AbortSignal.timeout(PRIVACY_TIMEOUT_MS),
45
- });
46
- if (!res.ok) return null;
47
- return await res.json();
48
- } catch (err) {
49
- console.warn('[PrivacyClient] submitPrivacyTask failed:', err?.message || err);
50
- return null;
51
- }
52
- }
53
-
54
- /**
55
- * Encrypt data locally and upload the encrypted blob to Hub.
56
- * Returns the blobId and the local key (caller must store the key).
57
- * @param {Buffer|string} plaintext
58
- * @param {{ privacyTaskId: string, label?: string }} opts
59
- * @returns {{ blobId: string, key: Buffer, iv: Buffer, authTag: Buffer } | null}
60
- */
61
- async function uploadEncryptedBlob(plaintext, opts) {
62
- const nodeId = getNodeId();
63
- if (!nodeId || !opts?.privacyTaskId) return null;
64
-
65
- try {
66
- const key = generateKey();
67
- const parts = encrypt(plaintext, key);
68
- const packed = pack(parts);
69
-
70
- const body = JSON.stringify({
71
- node_id: nodeId,
72
- privacy_task_id: opts.privacyTaskId,
73
- label: opts.label || 'blob',
74
- data_base64: packed.toString('base64'),
75
- encryption: 'aes-256-gcm',
76
- });
77
-
78
- const res = await hubFetch(privacyUrl('/blob/upload'), {
79
- method: 'POST',
80
- headers: Object.assign({ 'Content-Type': 'application/json' }, buildPrivacyNodeHeaders() || {}),
81
- body,
82
- signal: AbortSignal.timeout(PRIVACY_TIMEOUT_MS),
83
- });
84
- if (!res.ok) return null;
85
- const resp = await res.json();
86
- return {
87
- blobId: resp.blob_id || resp.blobId,
88
- key,
89
- iv: parts.iv,
90
- authTag: parts.authTag,
91
- };
92
- } catch (err) {
93
- console.warn('[PrivacyClient] uploadEncryptedBlob failed:', err?.message || err);
94
- return null;
95
- }
96
- }
97
-
98
- /**
99
- * Execute a sealed tool on a previously uploaded blob.
100
- * @param {{ toolId: string, blobId: string }} opts
101
- * @returns {{ resultKey?: string, resultHash?: string, error?: string } | null}
102
- */
103
- async function executeSealedTool(opts) {
104
- const nodeId = getNodeId();
105
- if (!nodeId || !opts?.toolId || !opts?.blobId) return null;
106
-
107
- try {
108
- const res = await hubFetch(privacyUrl('/tool/execute'), {
109
- method: 'POST',
110
- headers: Object.assign({ 'Content-Type': 'application/json' }, buildPrivacyNodeHeaders() || {}),
111
- body: JSON.stringify({
112
- toolId: opts.toolId,
113
- blobId: opts.blobId,
114
- node_id: nodeId,
115
- }),
116
- signal: AbortSignal.timeout(30000),
117
- });
118
- if (!res.ok) {
119
- const errBody = await res.json().catch(() => ({}));
120
- return { error: errBody.error || `http_${res.status}` };
121
- }
122
- return await res.json();
123
- } catch (err) {
124
- console.warn('[PrivacyClient] executeSealedTool failed:', err?.message || err);
125
- return { error: err?.message || 'network_error' };
126
- }
127
- }
128
-
129
- /**
130
- * Check status of a privacy task.
131
- * @param {string} taskId
132
- * @returns {{ status: string, progress?: number } | null}
133
- */
134
- async function getPrivacyStatus(taskId) {
135
- if (!taskId) return null;
136
- try {
137
- const url = privacyNodeUrl(`/status/${encodeURIComponent(taskId)}`);
138
- if (!url) return null;
139
- const res = await hubFetch(url, {
140
- headers: buildPrivacyNodeHeaders(),
141
- signal: AbortSignal.timeout(PRIVACY_TIMEOUT_MS),
142
- });
143
- if (!res.ok) return null;
144
- return await res.json();
145
- } catch {
146
- return null;
147
- }
148
- }
149
-
150
- /**
151
- * Retrieve the encrypted result of a privacy task and decrypt it locally.
152
- * @param {string} taskId
153
- * @param {Buffer} key - the original encryption key
154
- * @returns {{ plaintext: Buffer, resultHash?: string } | null}
155
- */
156
- async function getPrivacyResult(taskId, key) {
157
- if (!taskId || !key) return null;
158
- try {
159
- const url = privacyNodeUrl(`/result/${encodeURIComponent(taskId)}`);
160
- if (!url) return null;
161
- const res = await hubFetch(url, {
162
- headers: buildPrivacyNodeHeaders(),
163
- signal: AbortSignal.timeout(PRIVACY_TIMEOUT_MS),
164
- });
165
- if (!res.ok) return null;
166
- const data = await res.json();
167
- if (!data.encrypted_result_base64) return null;
168
-
169
- const packed = Buffer.from(data.encrypted_result_base64, 'base64');
170
- const parts = unpack(packed);
171
- const plaintext = decrypt(parts.ciphertext, key, parts.iv, parts.authTag);
172
- return { plaintext, resultHash: data.result_hash };
173
- } catch (err) {
174
- console.warn('[PrivacyClient] getPrivacyResult failed:', err?.message || err);
175
- return null;
176
- }
177
- }
178
-
179
- /**
180
- * List available sealed tool templates.
181
- * @returns {Array | null}
182
- */
183
- async function getToolTemplates() {
184
- try {
185
- const url = privacyNodeUrl('/tool/templates');
186
- if (!url) return null;
187
- const res = await hubFetch(url, {
188
- headers: buildPrivacyNodeHeaders(),
189
- signal: AbortSignal.timeout(PRIVACY_TIMEOUT_MS),
190
- });
191
- if (!res.ok) return null;
192
- const data = await res.json();
193
- return data.templates || data;
194
- } catch {
195
- return null;
196
- }
197
- }
198
-
199
- /**
200
- * Parse [PRIVACY_PARAMS] block from task body.
201
- * Returns { tool_id, blob_ids[] } or null if no block found.
202
- * @param {string} body
203
- * @returns {{ toolId: string, blobIds: string[] } | null}
204
- */
205
- function parsePrivacyParams(body) {
206
- if (!body || typeof body !== 'string') return null;
207
- const start = body.indexOf('[PRIVACY_PARAMS]');
208
- const end = body.indexOf('[/PRIVACY_PARAMS]');
209
- if (start === -1 || end === -1 || end <= start) return null;
210
-
211
- const block = body.substring(start + '[PRIVACY_PARAMS]'.length, end).trim();
212
- const lines = block.split('\n').map(l => l.trim()).filter(Boolean);
213
- const params = {};
214
- for (const line of lines) {
215
- const colon = line.indexOf(':');
216
- if (colon === -1) continue;
217
- const key = line.substring(0, colon).trim();
218
- const val = line.substring(colon + 1).trim();
219
- params[key] = val;
220
- }
221
-
222
- if (!params.tool_id) return null;
223
- const blobIds = (params.blob_ids || '').split(',').map(s => s.trim()).filter(Boolean);
224
- return { toolId: params.tool_id, blobIds };
225
- }
226
-
227
- module.exports = {
228
- submitPrivacyTask,
229
- uploadEncryptedBlob,
230
- executeSealedTool,
231
- getPrivacyStatus,
232
- getPrivacyResult,
233
- getToolTemplates,
234
- parsePrivacyParams,
235
- };