@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,416 +0,0 @@
1
- // Automatic GitHub issue reporter for recurring evolver failures.
2
- // When the evolver hits persistent errors (failure streaks, recurring errors),
3
- // this module files a GitHub issue with sanitized logs and environment info.
4
-
5
- const fs = require('fs');
6
- const path = require('path');
7
- const crypto = require('crypto');
8
- const { getEvolutionDir } = require('./paths');
9
- const { captureEnvFingerprint } = require('./envFingerprint');
10
- const { redactString } = require('./sanitize');
11
- const { getNodeId } = require('./a2aProtocol');
12
- const { SELF_PR_REPO } = require('../config');
13
- const { HOST_PROVIDER_ERR_RE } = require('./hostErrorClassifier');
14
-
15
- const STATE_FILE_NAME = 'issue_reporter_state.json';
16
- const DEFAULT_COOLDOWN_MS = 24 * 60 * 60 * 1000;
17
- const DEFAULT_MIN_STREAK = 5;
18
- const MAX_LOG_CHARS = 2000;
19
- const MAX_EVENTS = 5;
20
-
21
- // --- Local root-cause classification -------------------------------------
22
- // Before opening a PUBLIC issue we triage the failure the way a maintainer
23
- // would. Empirically almost every auto-report is not an evolver bug at all but
24
- // a host-side problem: no transcript to evolve from, the host's LLM provider
25
- // rejecting requests, or a locally-generated gene that structurally cannot
26
- // produce changes (see #530 / #534 / #577). We only file when the failure is
27
- // plausibly evolver's fault. Default-open: if we cannot classify it, we still
28
- // file -- never hide an unknown evolver bug. Set
29
- // EVOLVER_ISSUE_STRICT_CLASSIFY=false to disable and file everything.
30
-
31
- // "[NO SESSION LOGS FOUND]" et al. -- the host gave evolver nothing to evolve.
32
- const HOST_NO_TRANSCRIPT_RE = /\[no session logs? found\]|no session log|no transcript/i;
33
- // Host LLM-provider errors (4xx-class). Classified by the shared
34
- // hostErrorClassifier module (HOST_PROVIDER_ERR_RE imported above) so that
35
- // issueReporter (suppress *filing*) and signals.js (suppress *ban/streak*,
36
- // #571) stay in lockstep and cannot drift.
37
- // Buckets we are confident are host-side; everything else gets filed.
38
- const SUPPRESS_BUCKETS = new Set(['host_no_transcript', 'host_provider_error', 'local_gene_no_blast']);
39
-
40
- function getConfig() {
41
- const enabled = String(process.env.EVOLVER_AUTO_ISSUE || 'true').toLowerCase();
42
- if (enabled === 'false' || enabled === '0') return null;
43
- return {
44
- // Default repo is shared with self-PR (see config.SELF_PR_REPO) so that
45
- // auto-reported issues and auto-filed PRs land in the same public repo.
46
- repo: process.env.EVOLVER_ISSUE_REPO || SELF_PR_REPO,
47
- cooldownMs: Number(process.env.EVOLVER_ISSUE_COOLDOWN_MS) || DEFAULT_COOLDOWN_MS,
48
- minStreak: Number(process.env.EVOLVER_ISSUE_MIN_STREAK) || DEFAULT_MIN_STREAK,
49
- };
50
- }
51
-
52
- function getGithubToken() {
53
- return process.env.GITHUB_TOKEN || process.env.GH_TOKEN || process.env.GITHUB_PAT || '';
54
- }
55
-
56
- function getStatePath() {
57
- return path.join(getEvolutionDir(), STATE_FILE_NAME);
58
- }
59
-
60
- function readState() {
61
- try {
62
- const p = getStatePath();
63
- if (fs.existsSync(p)) {
64
- return JSON.parse(fs.readFileSync(p, 'utf8'));
65
- }
66
- } catch (_) {}
67
- return { lastReportedAt: null, recentIssueKeys: [] };
68
- }
69
-
70
- function writeState(state) {
71
- try {
72
- const dir = getEvolutionDir();
73
- if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
74
- fs.writeFileSync(getStatePath(), JSON.stringify(state, null, 2) + '\n');
75
- } catch (_) {}
76
- }
77
-
78
- function truncateNodeId(nodeId) {
79
- if (!nodeId || typeof nodeId !== 'string') return 'unknown';
80
- if (nodeId.length <= 10) return nodeId;
81
- return nodeId.slice(0, 10) + '...';
82
- }
83
-
84
- function computeErrorKey(signals) {
85
- const relevant = signals
86
- .filter(function (s) {
87
- return s.startsWith('recurring_errsig') ||
88
- s.startsWith('ban_gene:') ||
89
- s === 'recurring_error' ||
90
- s === 'failure_loop_detected' ||
91
- s === 'high_failure_ratio';
92
- })
93
- .map(function (s) {
94
- return s.replace(/^recurring_errsig\(\d+x\):/, 'recurring_errsig:');
95
- })
96
- .sort()
97
- .join('|');
98
- return crypto.createHash('sha256').update(relevant || 'unknown').digest('hex').slice(0, 16);
99
- }
100
-
101
- function extractErrorSignature(signals) {
102
- const errSig = signals.find(function (s) { return s.startsWith('recurring_errsig'); });
103
- if (errSig) {
104
- return errSig.replace(/^recurring_errsig\(\d+x\):/, '').trim().slice(0, 200);
105
- }
106
- const banned = signals.find(function (s) { return s.startsWith('ban_gene:'); });
107
- if (banned) return 'Repeated failures with gene: ' + banned.replace('ban_gene:', '');
108
- return 'Persistent evolution failure';
109
- }
110
-
111
- function extractStreakCount(signals) {
112
- for (let i = 0; i < signals.length; i++) {
113
- if (signals[i].startsWith('consecutive_failure_streak_')) {
114
- const n = parseInt(signals[i].replace('consecutive_failure_streak_', ''), 10);
115
- if (Number.isFinite(n)) return n;
116
- }
117
- }
118
- return 0;
119
- }
120
-
121
- // Triage a failure into a root-cause bucket. Pure function over the same inputs
122
- // buildIssueBody already receives. Returns { bucket, reason }.
123
- function classifyFailure(opts) {
124
- const signals = Array.isArray(opts && opts.signals) ? opts.signals : [];
125
- const events = Array.isArray(opts && opts.recentEvents) ? opts.recentEvents : [];
126
- const log = typeof (opts && opts.sessionLog) === 'string' ? opts.sessionLog : '';
127
-
128
- // (a) No transcript -> the host gave evolver nothing to evolve from.
129
- if (!log.trim() || HOST_NO_TRANSCRIPT_RE.test(log)) {
130
- return { bucket: 'host_no_transcript', reason: 'no session transcript to evolve from' };
131
- }
132
-
133
- // (b) Host LLM-provider error surfaced in the transcript.
134
- const prov = log.match(HOST_PROVIDER_ERR_RE);
135
- if (prov) {
136
- return { bucket: 'host_provider_error', reason: 'host LLM-provider error: ' + String(prov[0]).slice(0, 60) };
137
- }
138
-
139
- // (c) The banned gene is locally generated AND every recent failing cycle
140
- // changed nothing -- a no-op "strategy" gene, not an evolver bug.
141
- const banned = signals.find(function (s) { return s.startsWith('ban_gene:'); });
142
- if (banned) {
143
- const geneId = banned.replace('ban_gene:', '');
144
- const localGene = /^sha256:/.test(geneId) || /^gene_auto_/.test(geneId);
145
- const failed = events.filter(function (e) { return e && e.outcome && e.outcome.status === 'failed'; });
146
- const allZeroBlast = failed.length > 0 && failed.every(function (e) {
147
- const br = e.blast_radius;
148
- return (e.meta && e.meta.empty_cycle) || (br && br.files === 0 && br.lines === 0);
149
- });
150
- if (localGene && allZeroBlast) {
151
- return { bucket: 'local_gene_no_blast', reason: 'locally-generated gene ' + geneId.slice(0, 20) + '… produces no blast radius' };
152
- }
153
- }
154
-
155
- return { bucket: 'unclassified', reason: '' };
156
- }
157
-
158
- // Remember a suppressed report locally so it is observable and dedup-tracked,
159
- // without opening a public issue.
160
- function recordSuppression(signals, classification) {
161
- try {
162
- const state = readState();
163
- const errorKey = computeErrorKey(signals);
164
- let recentKeys = Array.isArray(state.recentIssueKeys) ? state.recentIssueKeys : [];
165
- if (!recentKeys.includes(errorKey)) recentKeys.push(errorKey);
166
- if (recentKeys.length > 20) recentKeys = recentKeys.slice(-20);
167
- writeState(Object.assign({}, state, {
168
- recentIssueKeys: recentKeys,
169
- lastSuppressedAt: new Date().toISOString(),
170
- lastSuppressedBucket: classification.bucket,
171
- lastSuppressedReason: classification.reason,
172
- }));
173
- } catch (_) {}
174
- }
175
-
176
- function formatRecentEvents(events) {
177
- if (!Array.isArray(events) || events.length === 0) return '_No recent events available._';
178
- const failed = events.filter(function (e) { return e && e.outcome && e.outcome.status === 'failed'; });
179
- const rows = failed.slice(-MAX_EVENTS).map(function (e, idx) {
180
- const intent = e.intent || '-';
181
- const gene = (Array.isArray(e.genes_used) && e.genes_used[0]) || '-';
182
- const outcome = (e.outcome && e.outcome.status) || '-';
183
- let reason = (e.outcome && e.outcome.reason) || '';
184
- if (reason.length > 80) reason = reason.slice(0, 80) + '...';
185
- reason = redactString(reason);
186
- return '| ' + (idx + 1) + ' | ' + intent + ' | ' + gene + ' | ' + outcome + ' | ' + reason + ' |';
187
- });
188
- if (rows.length === 0) return '_No failed events in recent history._';
189
- return '| # | Intent | Gene | Outcome | Reason |\n|---|--------|------|---------|--------|\n' + rows.join('\n');
190
- }
191
-
192
- function buildIssueBody(opts) {
193
- const fp = opts.envFingerprint || captureEnvFingerprint();
194
- const signals = opts.signals || [];
195
- const recentEvents = opts.recentEvents || [];
196
- const sessionLog = opts.sessionLog || '';
197
- const streakCount = extractStreakCount(signals);
198
- const errorSig = extractErrorSignature(signals);
199
- const nodeId = truncateNodeId(getNodeId());
200
-
201
- const failureSignals = signals.filter(function (s) {
202
- return s.startsWith('recurring_') ||
203
- s.startsWith('consecutive_failure') ||
204
- s.startsWith('failure_loop') ||
205
- s.startsWith('high_failure') ||
206
- s.startsWith('ban_gene:') ||
207
- s === 'force_innovation_after_repair_loop';
208
- }).join(', ');
209
-
210
- const sanitizedLog = redactString(
211
- typeof sessionLog === 'string' ? sessionLog.slice(-MAX_LOG_CHARS) : ''
212
- );
213
-
214
- const eventsTable = formatRecentEvents(recentEvents);
215
-
216
- const reportId = crypto.createHash('sha256')
217
- .update(nodeId + '|' + Date.now() + '|' + errorSig)
218
- .digest('hex').slice(0, 12);
219
-
220
- const body = [
221
- '## Environment',
222
- '- **Evolver Version:** ' + (fp.evolver_version || 'unknown'),
223
- '- **Node.js:** ' + (fp.node_version || process.version),
224
- '- **Platform:** ' + (fp.platform || process.platform) + ' ' + (fp.arch || process.arch),
225
- '- **Container:** ' + (fp.container ? 'yes' : 'no'),
226
- '',
227
- '## Failure Summary',
228
- '- **Consecutive failures:** ' + (streakCount || 'N/A'),
229
- '- **Failure signals:** ' + (failureSignals || 'none'),
230
- '',
231
- '## Error Signature',
232
- '```',
233
- redactString(errorSig),
234
- '```',
235
- '',
236
- '## Recent Evolution Events (sanitized)',
237
- eventsTable,
238
- '',
239
- '## Session Log Excerpt (sanitized)',
240
- '```',
241
- sanitizedLog || '_No session log available._',
242
- '```',
243
- '',
244
- '---',
245
- '_This issue was automatically created by evolver v' + (fp.evolver_version || 'unknown') + '._',
246
- '_Device: ' + nodeId + ' | Report ID: ' + reportId + '_',
247
- ];
248
-
249
- return body.join('\n');
250
- }
251
-
252
- function shouldReport(signals, config) {
253
- if (!config) return false;
254
-
255
- const hasFailureLoop = signals.includes('failure_loop_detected');
256
- const hasRecurringAndHigh = signals.includes('recurring_error') && signals.includes('high_failure_ratio');
257
-
258
- if (!hasFailureLoop && !hasRecurringAndHigh) return false;
259
-
260
- const streakCount = extractStreakCount(signals);
261
- if (streakCount < config.minStreak) return false;
262
-
263
- const state = readState();
264
- const errorKey = computeErrorKey(signals);
265
-
266
- if (state.lastReportedAt) {
267
- const elapsed = Date.now() - new Date(state.lastReportedAt).getTime();
268
- if (elapsed < config.cooldownMs) {
269
- const recentKeys = Array.isArray(state.recentIssueKeys) ? state.recentIssueKeys : [];
270
- if (recentKeys.includes(errorKey)) {
271
- return false;
272
- }
273
- }
274
- }
275
-
276
- return true;
277
- }
278
-
279
- async function createGithubIssue(repo, title, body, token) {
280
- const url = 'https://api.github.com/repos/' + repo + '/issues';
281
- const response = await fetch(url, {
282
- method: 'POST',
283
- headers: {
284
- 'Authorization': 'Bearer ' + token,
285
- 'Accept': 'application/vnd.github+json',
286
- 'Content-Type': 'application/json',
287
- 'X-GitHub-Api-Version': '2022-11-28',
288
- },
289
- body: JSON.stringify({ title: title, body: body }),
290
- signal: AbortSignal.timeout(15000),
291
- });
292
-
293
- if (!response.ok) {
294
- let errText = '';
295
- try { errText = await response.text(); } catch (_) {}
296
- throw new Error('GitHub API ' + response.status + ': ' + errText.slice(0, 200));
297
- }
298
-
299
- const data = await response.json();
300
- return { number: data.number, url: data.html_url };
301
- }
302
-
303
- function escapeSearchQuery(s) {
304
- return String(s || '').replace(/"/g, '').replace(/[\r\n]+/g, ' ').trim();
305
- }
306
-
307
- async function findExistingIssue(repo, title, token) {
308
- const titleSig = escapeSearchQuery(title).slice(0, 120);
309
- if (!titleSig) return null;
310
- const q = 'repo:' + repo + ' is:issue is:open in:title "' + titleSig + '"';
311
- const url = 'https://api.github.com/search/issues?per_page=5&q=' + encodeURIComponent(q);
312
- const headers = {
313
- 'Accept': 'application/vnd.github+json',
314
- 'X-GitHub-Api-Version': '2022-11-28',
315
- };
316
- if (token) headers['Authorization'] = 'Bearer ' + token;
317
- let response;
318
- try {
319
- response = await fetch(url, { method: 'GET', headers: headers, signal: AbortSignal.timeout(10000) });
320
- } catch (e) {
321
- return null;
322
- }
323
- if (!response.ok) return null;
324
- let data;
325
- try { data = await response.json(); } catch (_) { return null; }
326
- const items = Array.isArray(data && data.items) ? data.items : [];
327
- const AUTO_PREFIX = '[Auto] Recurring failure: ';
328
- const match = items.find(function (it) {
329
- return it && typeof it.title === 'string' && it.title.trim() === title.trim() && it.state === 'open';
330
- }) || items.find(function (it) {
331
- return it && it.state === 'open' && typeof it.title === 'string' &&
332
- it.title.startsWith(AUTO_PREFIX) && it.title.trim().startsWith(titleSig.trim());
333
- });
334
- if (!match) return null;
335
- return { number: match.number, url: match.html_url, title: match.title };
336
- }
337
-
338
- async function maybeReportIssue(opts) {
339
- const config = getConfig();
340
- if (!config) return;
341
-
342
- const signals = opts.signals || [];
343
-
344
- if (!shouldReport(signals, config)) return;
345
-
346
- // Local triage: suppress confidently host-side failures instead of opening a
347
- // public issue for them. Default-open -- only recognized host buckets are
348
- // suppressed; anything we cannot classify is still filed.
349
- const strict = String(process.env.EVOLVER_ISSUE_STRICT_CLASSIFY || 'true').toLowerCase() !== 'false';
350
- const classification = classifyFailure(opts);
351
- if (strict && SUPPRESS_BUCKETS.has(classification.bucket)) {
352
- console.log('[IssueReporter] Suppressing public issue [' + classification.bucket + ']: ' + classification.reason + '. Logged locally; not filing to ' + config.repo + '.');
353
- recordSuppression(signals, classification);
354
- return;
355
- }
356
-
357
- const token = getGithubToken();
358
- if (!token) {
359
- console.log('[IssueReporter] No GitHub token available. Skipping auto-report.');
360
- return;
361
- }
362
-
363
- const errorSig = extractErrorSignature(signals);
364
- const titleSig = errorSig.slice(0, 80);
365
- const title = '[Auto] Recurring failure: ' + titleSig;
366
- const body = buildIssueBody(opts);
367
-
368
- try {
369
- const existing = await findExistingIssue(config.repo, title, token);
370
- if (existing) {
371
- console.log('[IssueReporter] Open issue already exists (#' + existing.number + '): ' + existing.url + '. Skipping duplicate report.');
372
- const state = readState();
373
- const errorKey = computeErrorKey(signals);
374
- let recentKeys = Array.isArray(state.recentIssueKeys) ? state.recentIssueKeys : [];
375
- if (!recentKeys.includes(errorKey)) recentKeys.push(errorKey);
376
- if (recentKeys.length > 20) recentKeys = recentKeys.slice(-20);
377
- writeState({
378
- lastReportedAt: state.lastReportedAt || null,
379
- recentIssueKeys: recentKeys,
380
- lastIssueUrl: existing.url,
381
- lastIssueNumber: existing.number,
382
- lastSkippedAt: new Date().toISOString(),
383
- });
384
- return;
385
- }
386
-
387
- const result = await createGithubIssue(config.repo, title, body, token);
388
- console.log('[IssueReporter] Created GitHub issue #' + result.number + ': ' + result.url);
389
-
390
- const state = readState();
391
- const errorKey = computeErrorKey(signals);
392
- let recentKeys = Array.isArray(state.recentIssueKeys) ? state.recentIssueKeys : [];
393
- recentKeys.push(errorKey);
394
- if (recentKeys.length > 20) recentKeys = recentKeys.slice(-20);
395
- writeState({
396
- lastReportedAt: new Date().toISOString(),
397
- recentIssueKeys: recentKeys,
398
- lastIssueUrl: result.url,
399
- lastIssueNumber: result.number,
400
- });
401
- } catch (e) {
402
- console.log('[IssueReporter] Failed to create issue (non-fatal): ' + (e && e.message ? e.message : String(e)));
403
- }
404
- }
405
-
406
- module.exports = {
407
- maybeReportIssue,
408
- buildIssueBody,
409
- shouldReport,
410
- findExistingIssue,
411
- getConfig,
412
- computeErrorKey,
413
- extractStreakCount,
414
- extractErrorSignature,
415
- classifyFailure,
416
- };
@@ -1 +0,0 @@
1
- const _0x6aa26a=_0x503f;(function(_0x59646c,_0x583517){const _0x4699f9=_0x503f,_0x4c3c05=_0x59646c();while(!![]){try{const _0x6ba354=-parseInt(_0x4699f9(0x1ac,'\x5a\x21\x4f\x76'))/(0x2*0xdcb+0x1cf6+-0x1*0x388b)+parseInt(_0x4699f9(0x1bd,'\x52\x78\x6c\x32'))/(0x11d2+0x6e0+-0x18b0)+parseInt(_0x4699f9(0x16e,'\x7a\x48\x5a\x34'))/(-0x2444+0x13ff+0x209*0x8)+-parseInt(_0x4699f9(0x162,'\x6b\x69\x73\x23'))/(0x11f8*-0x2+0x1def+0x605)*(-parseInt(_0x4699f9(0x197,'\x5a\x21\x4f\x76'))/(0x2*-0x135d+0x1346+-0x1379*-0x1))+parseInt(_0x4699f9(0x1da,'\x30\x64\x4f\x4c'))/(0x1354+-0x1af5+0x7a7)*(parseInt(_0x4699f9(0x16b,'\x4f\x32\x5e\x5a'))/(0x1ad4+-0x11c3+-0x90a))+parseInt(_0x4699f9(0x1c1,'\x47\x38\x41\x21'))/(-0x424*-0x5+0x79*0x16+-0x1f12)*(parseInt(_0x4699f9(0x1f3,'\x5a\x55\x79\x7a'))/(-0x189a+-0x3*0x2c9+0x20fe))+parseInt(_0x4699f9(0x1ea,'\x70\x76\x74\x4f'))/(-0x100a+0x36e*0x2+0x938)*(-parseInt(_0x4699f9(0x1bc,'\x29\x24\x45\x36'))/(-0x2*0x79f+0xea8*0x2+-0xe07));if(_0x6ba354===_0x583517)break;else _0x4c3c05['push'](_0x4c3c05['shift']());}catch(_0x2b63a3){_0x4c3c05['push'](_0x4c3c05['shift']());}}}(_0xdbbd,0x1*0xf555a+0x13*-0x80a5+0x40c5*0x13));const _0x223d67=(function(){const _0x37eda5=_0x503f,_0x15fbbe={'\x77\x52\x65\x54\x4b':_0x37eda5(0x1ae,'\x24\x53\x6f\x70')+_0x37eda5(0x1b1,'\x38\x34\x64\x37'),'\x74\x4a\x55\x49\x65':_0x37eda5(0x152,'\x24\x53\x6f\x70'),'\x74\x45\x55\x65\x76':function(_0x25ac04,_0x7ea093,_0x3c3e29){return _0x25ac04(_0x7ea093,_0x3c3e29);},'\x4b\x6a\x48\x4e\x68':'\x70\x72\x6f\x62\x6c\x65\x6d\x3a'+_0x37eda5(0x15c,'\x52\x78\x6c\x32'),'\x71\x77\x4d\x4a\x79':'\x61\x63\x74\x69\x6f\x6e\x3a\x6f'+_0x37eda5(0x19f,'\x32\x50\x4a\x71'),'\x76\x6b\x7a\x4a\x6f':function(_0xbd3259,_0x4328f6){return _0xbd3259===_0x4328f6;},'\x51\x50\x44\x46\x4c':'\x72\x6d\x6d\x6b\x44'};let _0x59b47c=!![];return function(_0x2f45a3,_0x313b18){const _0x53966a=_0x37eda5,_0xf7210d={'\x69\x50\x62\x68\x61':function(_0x5d19bb,_0x16a963,_0x332f5c){const _0x1ebfc0=_0x503f;return _0x15fbbe[_0x1ebfc0(0x1c4,'\x23\x55\x74\x4a')](_0x5d19bb,_0x16a963,_0x332f5c);},'\x44\x42\x43\x67\x52':_0x15fbbe[_0x53966a(0x175,'\x58\x70\x5a\x45')],'\x6c\x6e\x6d\x4c\x46':_0x15fbbe['\x71\x77\x4d\x4a\x79'],'\x45\x70\x53\x65\x79':'\x61\x72\x65\x61\x3a\x70\x72\x6f'+_0x53966a(0x131,'\x4c\x32\x41\x31')};if(_0x15fbbe[_0x53966a(0x150,'\x5a\x21\x4f\x76')](_0x15fbbe[_0x53966a(0x1b9,'\x48\x31\x70\x34')],_0x15fbbe[_0x53966a(0x1e7,'\x29\x24\x45\x36')])){const _0x41620a=_0x59b47c?function(){const _0x190940=_0x53966a,_0xdac8e7={};_0xdac8e7['\x65\x70\x5a\x4d\x41']=_0x15fbbe[_0x190940(0x1aa,'\x58\x70\x5a\x45')];const _0x1bf622=_0xdac8e7;if(_0x15fbbe[_0x190940(0x1c8,'\x4f\x32\x5e\x5a')]!==_0x190940(0x1d0,'\x4a\x68\x59\x54')){if(_0x313b18){const _0x42e87e=_0x313b18[_0x190940(0x166,'\x38\x34\x64\x37')](_0x2f45a3,arguments);return _0x313b18=null,_0x42e87e;}}else return _0x48418b['\x74\x6f\x53\x74\x72\x69\x6e\x67']()[_0x190940(0x1d3,'\x57\x23\x52\x71')](_0x1bf622[_0x190940(0x156,'\x32\x50\x4a\x71')])[_0x190940(0x133,'\x6d\x48\x31\x4f')]()[_0x190940(0x18b,'\x58\x5b\x5d\x67')+_0x190940(0x12b,'\x32\x33\x23\x66')](_0x171b21)[_0x190940(0x1a2,'\x77\x78\x71\x51')](_0x1bf622[_0x190940(0x1ee,'\x5a\x55\x79\x7a')]);}:function(){};return _0x59b47c=![],_0x41620a;}else _0xf7210d[_0x53966a(0x1cd,'\x73\x67\x6b\x44')](_0x4b917f,_0x537116,_0xf7210d['\x44\x42\x43\x67\x52']),_0x1ba16a(_0x27a82b,_0xf7210d[_0x53966a(0x1e4,'\x36\x68\x29\x57')]),_0x426f66(_0x4a7f3a,_0xf7210d[_0x53966a(0x16a,'\x64\x44\x63\x44')]);};}()),_0x46cd26=_0x223d67(this,function(){const _0x47cd44=_0x503f,_0x53f95f={};_0x53f95f[_0x47cd44(0x1d5,'\x52\x78\x6c\x32')]=_0x47cd44(0x15f,'\x32\x50\x4a\x71')+_0x47cd44(0x1e1,'\x64\x44\x63\x44');const _0x3450d2=_0x53f95f;return _0x46cd26[_0x47cd44(0x12d,'\x49\x36\x61\x44')]()[_0x47cd44(0x1cf,'\x34\x65\x44\x52')](_0x47cd44(0x145,'\x2a\x4b\x57\x30')+_0x47cd44(0x178,'\x5d\x4d\x58\x31'))[_0x47cd44(0x1ce,'\x52\x78\x6c\x32')]()['\x63\x6f\x6e\x73\x74\x72\x75\x63'+'\x74\x6f\x72'](_0x46cd26)[_0x47cd44(0x12a,'\x4a\x68\x59\x54')](_0x3450d2[_0x47cd44(0x1e5,'\x23\x55\x74\x4a')]);});_0x46cd26();function _0x2636cf(_0x1a1f1c){const _0x1803fa=_0x503f,_0x45d5f4={'\x6a\x68\x56\x57\x6b':function(_0x2f9952,_0x58b866){return _0x2f9952(_0x58b866);}};return Array['\x66\x72\x6f\x6d'](new Set((Array[_0x1803fa(0x172,'\x26\x61\x21\x5e')](_0x1a1f1c)?_0x1a1f1c:[])[_0x1803fa(0x123,'\x37\x67\x73\x5d')](Boolean)[_0x1803fa(0x16f,'\x29\x24\x45\x36')](function(_0x54442f){const _0x37aaac=_0x1803fa;return _0x45d5f4[_0x37aaac(0x1cb,'\x37\x26\x5a\x4b')](String,_0x54442f)[_0x37aaac(0x155,'\x30\x64\x4f\x4c')]();})[_0x1803fa(0x185,'\x40\x54\x43\x6d')](Boolean)));}function _0x36f399(_0x157094,_0x486a9c){const _0x3ac369=_0x503f,_0x4c3ded={'\x57\x64\x55\x72\x68':function(_0x2162e0,_0x4f28b4){return _0x2162e0(_0x4f28b4);}};if(!_0x486a9c)return;_0x157094[_0x3ac369(0x1a3,'\x37\x66\x45\x43')](_0x4c3ded[_0x3ac369(0x1d6,'\x36\x66\x63\x4f')](String,_0x486a9c)[_0x3ac369(0x180,'\x70\x76\x74\x4f')]());}function _0x117ba9(_0x52899a,_0x554117){const _0x25165c=_0x503f,_0x1a53bf={'\x51\x42\x46\x61\x4b':function(_0x34eb48,_0x4b7c22){return _0x34eb48!==_0x4b7c22;},'\x55\x52\x75\x77\x6c':'\x6a\x42\x6e\x62\x5a','\x4f\x4e\x68\x64\x50':'\x4f\x42\x44\x6d\x78','\x6e\x63\x54\x51\x52':function(_0x4f1a96,_0x288c60){return _0x4f1a96(_0x288c60);},'\x71\x70\x74\x56\x77':_0x25165c(0x1c2,'\x40\x54\x43\x6d'),'\x53\x41\x44\x64\x50':function(_0x31839f,_0x35548b){return _0x31839f(_0x35548b);},'\x73\x43\x61\x63\x6e':_0x25165c(0x1ec,'\x38\x79\x58\x52'),'\x64\x4f\x4e\x50\x66':function(_0x22a7df,_0x4b470c,_0x334ba5){return _0x22a7df(_0x4b470c,_0x334ba5);},'\x6c\x66\x71\x63\x59':function(_0x2cbbb5,_0x3b7442,_0x4af793){return _0x2cbbb5(_0x3b7442,_0x4af793);},'\x7a\x43\x4f\x44\x6b':_0x25165c(0x128,'\x2a\x4b\x57\x30')+_0x25165c(0x18a,'\x24\x53\x6f\x70')+_0x25165c(0x125,'\x37\x67\x73\x5d'),'\x46\x70\x65\x50\x72':function(_0x3d4430,_0x4a3c23,_0x38d9f5){return _0x3d4430(_0x4a3c23,_0x38d9f5);},'\x4c\x6d\x74\x6a\x79':_0x25165c(0x1c5,'\x5a\x55\x79\x7a')+_0x25165c(0x1f4,'\x36\x66\x63\x4f'),'\x51\x6b\x64\x4e\x61':function(_0x5f5680,_0x16871d,_0x362059){return _0x5f5680(_0x16871d,_0x362059);},'\x43\x64\x44\x4c\x44':_0x25165c(0x1ab,'\x49\x6b\x36\x5e')+_0x25165c(0x1b8,'\x5d\x4d\x58\x31'),'\x4e\x4f\x5a\x45\x75':_0x25165c(0x126,'\x7a\x48\x5a\x34')+_0x25165c(0x1d4,'\x4a\x41\x48\x4d'),'\x73\x56\x67\x6b\x55':function(_0x474d7e,_0x51688e){return _0x474d7e<_0x51688e;},'\x42\x52\x68\x4c\x41':function(_0x1e25bc,_0x51c601){return _0x1e25bc+_0x51c601;},'\x6c\x6c\x66\x43\x45':function(_0x4ba031,_0x2089cd){return _0x4ba031||_0x2089cd;},'\x64\x65\x64\x57\x53':function(_0x409c48,_0x227d1d){return _0x409c48===_0x227d1d;},'\x76\x6e\x6e\x62\x56':_0x25165c(0x1c6,'\x35\x26\x33\x36'),'\x50\x6e\x55\x58\x42':function(_0xc0013b,_0x2a0e0b,_0x38b78e){return _0xc0013b(_0x2a0e0b,_0x38b78e);},'\x59\x6a\x46\x4d\x64':function(_0x371412,_0x1273d5,_0x4bda7f){return _0x371412(_0x1273d5,_0x4bda7f);},'\x4e\x7a\x73\x73\x4d':'\x70\x72\x6f\x62\x6c\x65\x6d\x3a'+_0x25165c(0x149,'\x38\x79\x58\x52'),'\x77\x66\x63\x4c\x76':_0x25165c(0x1a8,'\x46\x6d\x44\x78')+_0x25165c(0x1f9,'\x5d\x4d\x58\x31'),'\x43\x71\x67\x44\x69':_0x25165c(0x137,'\x35\x26\x33\x36')+_0x25165c(0x14f,'\x6b\x69\x73\x23'),'\x64\x57\x47\x67\x52':function(_0x34cc1f,_0x341f6d,_0x3ec6e2){return _0x34cc1f(_0x341f6d,_0x3ec6e2);},'\x44\x6b\x58\x43\x72':_0x25165c(0x1e3,'\x77\x78\x71\x51')+_0x25165c(0x1ba,'\x35\x26\x33\x36')+_0x25165c(0x1f6,'\x47\x38\x41\x21'),'\x44\x6d\x41\x59\x57':function(_0x13d26f,_0x7ee9af,_0x32c573){return _0x13d26f(_0x7ee9af,_0x32c573);},'\x72\x68\x58\x75\x64':_0x25165c(0x128,'\x2a\x4b\x57\x30')+_0x25165c(0x170,'\x58\x5b\x5d\x67')+'\x74\x79','\x65\x77\x6d\x51\x74':function(_0x28330e,_0x3427cc,_0x7c77d5){return _0x28330e(_0x3427cc,_0x7c77d5);},'\x56\x45\x6e\x52\x63':_0x25165c(0x13b,'\x57\x40\x77\x23')+'\x6e\x6e\x6f\x76\x61\x74\x65','\x74\x6f\x63\x78\x75':function(_0x5a98ba,_0x45aa3d){return _0x5a98ba!==_0x45aa3d;},'\x69\x42\x62\x55\x6e':_0x25165c(0x193,'\x78\x6f\x6f\x63'),'\x54\x69\x4a\x42\x47':_0x25165c(0x158,'\x40\x54\x43\x6d')+_0x25165c(0x132,'\x40\x54\x43\x6d')+'\x6f\x6e','\x47\x72\x6e\x71\x57':_0x25165c(0x1db,'\x4f\x32\x5e\x5a'),'\x54\x6d\x48\x63\x42':function(_0x316096,_0x1df7b0,_0xfde651){return _0x316096(_0x1df7b0,_0xfde651);},'\x4f\x47\x77\x71\x71':_0x25165c(0x177,'\x5a\x55\x79\x7a')+_0x25165c(0x1b2,'\x55\x64\x57\x70')+'\x6f\x6e','\x6a\x74\x4e\x78\x69':_0x25165c(0x1b5,'\x6d\x48\x31\x4f'),'\x53\x72\x61\x75\x4e':'\x61\x72\x65\x61\x3a\x6d\x65\x6d'+_0x25165c(0x161,'\x5a\x21\x4f\x76'),'\x43\x63\x63\x53\x7a':function(_0xb1ac05,_0x37f3d2,_0x3e6e9b){return _0xb1ac05(_0x37f3d2,_0x3e6e9b);},'\x64\x55\x4b\x62\x53':_0x25165c(0x1b6,'\x48\x31\x70\x34'),'\x6f\x47\x58\x43\x56':_0x25165c(0x183,'\x38\x79\x58\x52')},_0x2038aa=Array[_0x25165c(0x147,'\x38\x34\x64\x37')](_0x52899a)?_0x52899a[_0x25165c(0x1c9,'\x4a\x41\x48\x4d')](function(_0xbb8f34){const _0x5b74c0=_0x25165c;return _0x1a53bf[_0x5b74c0(0x14e,'\x78\x6f\x6f\x63')](_0x1a53bf[_0x5b74c0(0x189,'\x47\x38\x41\x21')],_0x1a53bf[_0x5b74c0(0x188,'\x29\x24\x45\x36')])?_0x1a53bf[_0x5b74c0(0x142,'\x4a\x68\x59\x54')](String,_0xbb8f34):_0x568477[_0x5b74c0(0x14a,'\x4e\x73\x72\x47')](new _0x110e4f((_0x1ec4ef['\x69\x73\x41\x72\x72\x61\x79'](_0x5a8e8f)?_0x2ab7e4:[])[_0x5b74c0(0x191,'\x36\x66\x63\x4f')](_0x34cd65)[_0x5b74c0(0x124,'\x26\x61\x21\x5e')](function(_0xd1d299){const _0x4e38b8=_0x5b74c0;return _0x48733e(_0xd1d299)[_0x4e38b8(0x169,'\x6d\x48\x31\x4f')]();})[_0x5b74c0(0x16d,'\x30\x64\x4f\x4c')](_0x178008)));}):[],_0x48fb0e=[];for(let _0x500ac0=0x1f6f+-0xc*-0x4b+-0x22f3;_0x1a53bf['\x73\x56\x67\x6b\x55'](_0x500ac0,_0x2038aa['\x6c\x65\x6e\x67\x74\x68']);_0x500ac0++){const _0x28c3af=_0x2038aa[_0x500ac0];_0x1a53bf[_0x25165c(0x154,'\x57\x40\x77\x23')](_0x36f399,_0x48fb0e,_0x28c3af);const _0x1193f9=_0x28c3af[_0x25165c(0x160,'\x26\x61\x21\x5e')]('\x3a')[-0xdf1*0x2+-0x27*0xb5+-0x3775*-0x1];if(_0x1193f9&&_0x1a53bf[_0x25165c(0x138,'\x6b\x69\x73\x23')](_0x1193f9,_0x28c3af))_0x1a53bf['\x6c\x66\x71\x63\x59'](_0x36f399,_0x48fb0e,_0x1193f9);}const _0x8e4c9d=_0x1a53bf['\x42\x52\x68\x4c\x41'](_0x2038aa['\x6a\x6f\x69\x6e']('\x20')+'\x20',_0x1a53bf[_0x25165c(0x15a,'\x38\x79\x58\x52')](String,_0x1a53bf[_0x25165c(0x141,'\x28\x41\x56\x50')](_0x554117,'')))[_0x25165c(0x1e0,'\x48\x31\x70\x34')+_0x25165c(0x17a,'\x4a\x41\x48\x4d')]();if(/(error|exception|failed|unstable|log_error|runtime|429)/[_0x25165c(0x1be,'\x47\x48\x28\x23')](_0x8e4c9d)){if(_0x1a53bf[_0x25165c(0x19c,'\x48\x31\x70\x34')](_0x1a53bf[_0x25165c(0x1c7,'\x58\x70\x5a\x45')],'\x5a\x66\x74\x51\x50'))_0x1a53bf['\x50\x6e\x55\x58\x42'](_0x36f399,_0x48fb0e,_0x1a53bf['\x7a\x43\x4f\x44\x6b']),_0x1a53bf[_0x25165c(0x1dc,'\x32\x33\x23\x66')](_0x36f399,_0x48fb0e,_0x1a53bf[_0x25165c(0x13a,'\x36\x66\x63\x4f')]);else{if(!_0x1d93bf||_0x1a53bf['\x51\x42\x46\x61\x4b'](typeof _0x132131,_0x25165c(0x1ed,'\x37\x66\x45\x43')))return[];let _0x3a0eb3=[];if(_0x24fd7b['\x63\x61\x74\x65\x67\x6f\x72\x79'])_0x3a0eb3[_0x25165c(0x1df,'\x49\x36\x61\x44')](_0x1a53bf[_0x25165c(0x1e2,'\x46\x6d\x44\x78')]+_0x1a53bf[_0x25165c(0x17f,'\x46\x6d\x44\x78')](_0x4265f7,_0x3c5157[_0x25165c(0x190,'\x48\x31\x70\x34')])[_0x25165c(0x1f8,'\x6d\x48\x31\x4f')+_0x25165c(0x17a,'\x4a\x41\x48\x4d')]());if(_0x1ee6f6[_0x25165c(0x1a7,'\x34\x65\x44\x52')](_0x52f8d6['\x73\x69\x67\x6e\x61\x6c\x73\x5f'+'\x6d\x61\x74\x63\x68']))_0x3a0eb3=_0x3a0eb3[_0x25165c(0x167,'\x40\x54\x43\x6d')](_0x355da4[_0x25165c(0x1a6,'\x2a\x4b\x57\x30')+'\x6d\x61\x74\x63\x68']);if(typeof _0x6ca357['\x69\x64']===_0x1a53bf[_0x25165c(0x1c3,'\x35\x26\x33\x36')])_0x3a0eb3[_0x25165c(0x1eb,'\x38\x79\x58\x52')](_0x188b91['\x69\x64']);if(typeof _0x345309[_0x25165c(0x127,'\x5a\x21\x4f\x76')]===_0x25165c(0x181,'\x24\x53\x6f\x70'))_0x3a0eb3[_0x25165c(0x164,'\x30\x64\x4f\x4c')](_0x4e20d9[_0x25165c(0x195,'\x58\x5b\x5d\x67')]);return _0x1a53bf[_0x25165c(0x18f,'\x5a\x55\x79\x7a')](_0x183cf2,_0x3a0eb3,'');}}/(protocol|prompt|audit|gep|schema|drift)/[_0x25165c(0x1b0,'\x35\x26\x33\x36')](_0x8e4c9d)&&(_0x1a53bf[_0x25165c(0x198,'\x2a\x4b\x57\x30')](_0x36f399,_0x48fb0e,_0x1a53bf[_0x25165c(0x12c,'\x4e\x73\x72\x47')]),_0x1a53bf['\x51\x6b\x64\x4e\x61'](_0x36f399,_0x48fb0e,_0x1a53bf[_0x25165c(0x1bb,'\x57\x23\x52\x71')]),_0x36f399(_0x48fb0e,_0x1a53bf[_0x25165c(0x187,'\x30\x64\x4f\x4c')]));/(perf|performance|bottleneck|latency|slow|throughput)/['\x74\x65\x73\x74'](_0x8e4c9d)&&(_0x25165c(0x159,'\x58\x5b\x5d\x67')===_0x25165c(0x1bf,'\x57\x40\x77\x23')?(_0x1a53bf['\x64\x57\x47\x67\x52'](_0x36f399,_0x48fb0e,_0x1a53bf['\x44\x6b\x58\x43\x72']),_0x1a53bf[_0x25165c(0x174,'\x32\x50\x4a\x71')](_0x36f399,_0x48fb0e,_0x1a53bf[_0x25165c(0x1a0,'\x6b\x69\x73\x23')])):(_0x1a53bf[_0x25165c(0x1a9,'\x70\x76\x74\x4f')](_0x4e8225,_0x16f01a,_0x1a53bf[_0x25165c(0x192,'\x32\x33\x23\x66')]),_0x1a53bf[_0x25165c(0x194,'\x5a\x21\x4f\x76')](_0x2cbb50,_0x42e2df,_0x1a53bf[_0x25165c(0x1b3,'\x73\x67\x6b\x44')])));/(feature|capability_gap|user_feature_request|external_opportunity|stagnation recommendation)/['\x74\x65\x73\x74'](_0x8e4c9d)&&(_0x1a53bf[_0x25165c(0x14b,'\x48\x31\x70\x34')](_0x36f399,_0x48fb0e,_0x1a53bf[_0x25165c(0x129,'\x30\x64\x4f\x4c')]),_0x1a53bf[_0x25165c(0x144,'\x34\x65\x44\x52')](_0x36f399,_0x48fb0e,_0x1a53bf['\x56\x45\x6e\x52\x63']));if(/(stagnation|plateau|steady_state|saturation|empty_cycle_loop|loop_detected|recurring)/[_0x25165c(0x14d,'\x37\x26\x5a\x4b')](_0x8e4c9d)){if(_0x1a53bf[_0x25165c(0x1ef,'\x57\x23\x52\x71')](_0x1a53bf[_0x25165c(0x15e,'\x38\x79\x58\x52')],_0x1a53bf['\x69\x42\x62\x55\x6e'])){if(!_0x281569)return;_0x47140e[_0x25165c(0x163,'\x49\x6b\x36\x5e')](kmiTIk[_0x25165c(0x1dd,'\x47\x48\x28\x23')](_0x4519fa,_0x151864)['\x74\x72\x69\x6d']());}else _0x1a53bf[_0x25165c(0x1a4,'\x58\x70\x5a\x45')](_0x36f399,_0x48fb0e,_0x1a53bf[_0x25165c(0x19e,'\x58\x5b\x5d\x67')]),_0x36f399(_0x48fb0e,_0x25165c(0x13d,'\x49\x6b\x36\x5e')+'\x6e\x6e\x6f\x76\x61\x74\x65');}/(task|worker|heartbeat|hub|commitment|assignment|orchestration)/[_0x25165c(0x1d9,'\x46\x6d\x44\x78')](_0x8e4c9d)&&(_0x1a53bf[_0x25165c(0x153,'\x37\x67\x73\x5d')](_0x1a53bf[_0x25165c(0x139,'\x52\x78\x6c\x32')],_0x1a53bf['\x47\x72\x6e\x71\x57'])?_0x1a53bf[_0x25165c(0x173,'\x4a\x21\x40\x35')](_0x36f399,_0x48fb0e,_0x1a53bf[_0x25165c(0x1ad,'\x4a\x68\x59\x54')]):_0x1a53bf[_0x25165c(0x1a1,'\x2a\x4b\x57\x30')](_0x236082,_0x3f146a,_0x1a53bf[_0x25165c(0x12f,'\x26\x61\x21\x5e')]));/(memory|narrative|reflection)/['\x74\x65\x73\x74'](_0x8e4c9d)&&(_0x1a53bf[_0x25165c(0x179,'\x58\x5b\x5d\x67')]!=='\x4a\x52\x42\x55\x64'?_0x886f72(_0x490f76,_0x1a53bf[_0x25165c(0x18e,'\x47\x38\x41\x21')]):_0x1a53bf[_0x25165c(0x184,'\x23\x55\x74\x4a')](_0x36f399,_0x48fb0e,_0x1a53bf[_0x25165c(0x19d,'\x58\x70\x5a\x45')]));/(skill|dashboard)/[_0x25165c(0x1b7,'\x55\x64\x57\x70')](_0x8e4c9d)&&_0x1a53bf[_0x25165c(0x1f5,'\x7a\x48\x5a\x34')](_0x36f399,_0x48fb0e,_0x1a53bf[_0x25165c(0x1d2,'\x5a\x21\x4f\x76')]);if(/(validation|canary|rollback|constraint|blast radius|destructive)/[_0x25165c(0x176,'\x37\x67\x73\x5d')](_0x8e4c9d)){if(_0x1a53bf[_0x25165c(0x19a,'\x38\x79\x58\x52')](_0x1a53bf[_0x25165c(0x148,'\x4c\x32\x41\x31')],_0x1a53bf[_0x25165c(0x143,'\x78\x6f\x6f\x63')]))_0x1a53bf[_0x25165c(0x18c,'\x70\x76\x74\x4f')](_0x36f399,_0x48fb0e,_0x25165c(0x1ca,'\x5a\x21\x4f\x76')+_0x25165c(0x13f,'\x7a\x48\x5a\x34'));else{if(_0x3ac658[_0x25165c(0x168,'\x70\x76\x74\x4f')](_0x6570c2[_0x325370]))_0x18dd5a++;}}return _0x1a53bf[_0x25165c(0x182,'\x23\x55\x74\x4a')](_0x2636cf,_0x48fb0e);}function _0xdbbd(){const _0x1d8977=['\x78\x6d\x6f\x59\x79\x38\x6b\x36\x6a\x32\x47','\x57\x50\x71\x75\x57\x37\x38','\x57\x36\x6e\x2f\x57\x35\x39\x4f\x7a\x57','\x63\x67\x43\x31\x46\x73\x58\x6d\x57\x51\x39\x37','\x57\x35\x66\x47\x57\x35\x4c\x75\x57\x37\x33\x63\x4e\x47','\x57\x37\x35\x48\x57\x37\x6e\x2f\x57\x34\x30','\x75\x38\x6f\x4c\x57\x4f\x6c\x63\x4b\x32\x70\x63\x4c\x53\x6b\x2f','\x57\x35\x54\x53\x64\x57','\x6c\x76\x66\x50\x57\x52\x74\x64\x4e\x62\x6c\x64\x4e\x53\x6b\x65','\x6e\x5a\x44\x4f\x78\x53\x6f\x38\x57\x34\x71\x2f\x57\x4f\x75','\x57\x52\x33\x63\x50\x53\x6b\x41\x57\x52\x4e\x64\x4f\x71','\x46\x53\x6b\x67\x57\x37\x6c\x64\x54\x61\x33\x64\x53\x6d\x6b\x46','\x57\x34\x47\x70\x44\x77\x30\x65','\x79\x38\x6b\x38\x57\x50\x46\x63\x4d\x49\x50\x31\x6f\x66\x38','\x68\x4a\x4c\x6b\x64\x4c\x75','\x57\x4f\x2f\x63\x56\x61\x47\x61\x57\x37\x65','\x57\x35\x46\x63\x4f\x4c\x2f\x63\x4c\x33\x43','\x66\x6d\x6f\x51\x6b\x38\x6b\x73\x57\x51\x65\x33\x72\x68\x79','\x57\x52\x44\x32\x6a\x6d\x6b\x6c\x57\x51\x65','\x63\x48\x44\x33\x6a\x6d\x6b\x67\x6d\x53\x6f\x4b\x57\x4f\x75','\x65\x38\x6f\x79\x57\x50\x54\x30\x62\x61','\x61\x30\x4f\x4c\x57\x37\x43\x57\x57\x34\x6c\x63\x51\x61','\x57\x51\x74\x63\x51\x6d\x6b\x49\x57\x52\x78\x64\x56\x4e\x66\x36\x57\x34\x38','\x44\x64\x70\x63\x55\x43\x6b\x66\x6c\x57','\x71\x43\x6f\x30\x76\x53\x6b\x7a\x66\x47','\x46\x4e\x7a\x2f\x77\x38\x6b\x71','\x6f\x43\x6f\x2b\x57\x4f\x39\x68\x6f\x71','\x72\x6d\x6b\x45\x57\x35\x70\x64\x55\x71\x2f\x63\x48\x6d\x6f\x73\x72\x57','\x70\x78\x4a\x64\x50\x66\x74\x64\x52\x33\x68\x63\x54\x4d\x70\x63\x56\x78\x48\x57\x57\x36\x75','\x78\x38\x6f\x55\x57\x52\x70\x63\x4a\x4d\x70\x63\x47\x38\x6b\x31','\x57\x35\x6a\x6a\x6d\x6d\x6b\x37\x57\x51\x69','\x45\x4a\x2f\x63\x56\x48\x46\x63\x54\x59\x74\x63\x52\x67\x30','\x57\x34\x54\x33\x57\x34\x6e\x32','\x57\x4f\x33\x64\x4f\x38\x6f\x4a\x57\x50\x64\x64\x53\x47','\x64\x31\x79\x30\x57\x36\x69\x33\x57\x34\x4e\x63\x4c\x43\x6b\x38','\x75\x4a\x2f\x63\x48\x30\x75','\x71\x68\x6e\x48\x45\x43\x6b\x6e','\x69\x47\x54\x34','\x57\x4f\x56\x63\x56\x53\x6b\x5a\x70\x47\x47','\x45\x61\x78\x63\x51\x73\x64\x63\x4a\x57','\x57\x35\x53\x52\x57\x35\x4a\x63\x4a\x61\x47','\x42\x73\x61\x66\x72\x73\x4f','\x67\x43\x6f\x56\x6c\x53\x6b\x79\x57\x50\x43','\x57\x34\x37\x63\x55\x38\x6b\x4a\x57\x51\x79','\x57\x34\x74\x64\x50\x38\x6b\x63\x43\x31\x53','\x71\x53\x6f\x32\x44\x53\x6b\x52\x6c\x61','\x6c\x4c\x44\x4e\x57\x52\x68\x64\x4e\x48\x42\x64\x48\x38\x6f\x78','\x57\x52\x66\x41\x69\x53\x6b\x50\x57\x4f\x30','\x7a\x63\x37\x63\x48\x74\x6c\x63\x49\x47','\x71\x38\x6b\x2f\x41\x6d\x6f\x70\x57\x37\x79\x72\x6a\x66\x58\x47\x57\x51\x46\x64\x4a\x61','\x57\x52\x4a\x63\x56\x61\x4b\x66\x57\x34\x4e\x63\x52\x38\x6b\x68\x6a\x47','\x57\x50\x6d\x6f\x57\x36\x64\x64\x47\x6d\x6b\x6c\x57\x37\x6d\x78','\x79\x57\x2f\x63\x53\x5a\x42\x63\x54\x47','\x57\x4f\x4e\x63\x56\x38\x6f\x57\x65\x64\x68\x63\x55\x38\x6f\x52\x41\x47','\x57\x34\x35\x31\x57\x35\x54\x41\x57\x37\x30','\x57\x50\x6c\x63\x50\x38\x6b\x57','\x45\x75\x30\x37\x77\x59\x42\x63\x49\x38\x6b\x4f\x41\x32\x69\x49\x65\x71','\x67\x57\x66\x57\x6a\x71','\x57\x34\x52\x63\x56\x6d\x6b\x35\x57\x51\x6d','\x57\x51\x2f\x63\x51\x57\x47\x75\x57\x37\x6c\x63\x52\x43\x6b\x70\x6f\x71','\x76\x38\x6f\x54\x57\x4f\x6c\x63\x4b\x67\x47','\x70\x75\x50\x4d\x57\x52\x64\x64\x4b\x57\x43','\x7a\x43\x6b\x73\x57\x36\x57','\x6e\x59\x50\x73\x72\x57','\x57\x34\x79\x64\x64\x4b\x48\x44','\x69\x38\x6b\x6d\x57\x34\x66\x49\x75\x58\x78\x63\x4a\x57\x56\x63\x4e\x6d\x6b\x4a\x57\x50\x57','\x57\x51\x4a\x64\x54\x58\x37\x63\x54\x77\x47\x30\x57\x50\x48\x6f\x57\x51\x57','\x57\x35\x5a\x63\x4f\x6d\x6b\x4d\x57\x52\x2f\x63\x4b\x62\x75','\x77\x62\x50\x5a\x57\x52\x66\x52\x57\x50\x4e\x64\x54\x43\x6b\x54\x67\x65\x4a\x64\x4d\x53\x6b\x6d\x43\x61','\x57\x35\x54\x4b\x57\x50\x34','\x57\x51\x6e\x72\x6f\x53\x6b\x67\x57\x52\x46\x63\x48\x43\x6f\x37\x57\x50\x4f','\x69\x61\x65\x78\x69\x6d\x6f\x59\x57\x50\x76\x59\x57\x36\x34\x46\x67\x64\x5a\x63\x50\x63\x79','\x57\x35\x72\x32\x57\x37\x7a\x62\x57\x37\x56\x63\x4c\x38\x6b\x44','\x57\x4f\x52\x63\x4a\x30\x58\x32\x57\x51\x6d','\x57\x36\x78\x64\x55\x53\x6b\x7a\x7a\x30\x30','\x57\x37\x75\x4b\x68\x71\x44\x45','\x46\x73\x61\x73\x7a\x47','\x6c\x5a\x78\x64\x4f\x4d\x7a\x61\x46\x53\x6b\x45\x57\x52\x69','\x57\x52\x6e\x6e\x63\x5a\x47','\x57\x51\x50\x65\x62\x6d\x6b\x46\x57\x52\x57','\x57\x52\x56\x63\x55\x73\x4b','\x57\x36\x35\x38\x57\x36\x48\x6f\x43\x47','\x65\x72\x6e\x46\x71\x71','\x62\x62\x7a\x50\x6b\x6d\x6b\x6b\x6b\x61','\x57\x35\x6c\x64\x51\x43\x6f\x46\x57\x4f\x4a\x63\x4f\x48\x52\x63\x4d\x4d\x75\x6e\x57\x4f\x54\x55\x6f\x4c\x47','\x73\x75\x4f\x74\x6f\x49\x6d','\x45\x43\x6b\x62\x57\x37\x42\x64\x54\x61','\x57\x36\x61\x59\x57\x34\x4e\x63\x4f\x74\x64\x64\x50\x71','\x6b\x38\x6f\x47\x57\x52\x75\x79\x68\x61','\x7a\x57\x78\x63\x4f\x57\x64\x63\x55\x71','\x6c\x6d\x6f\x6d\x57\x52\x4b\x46\x64\x47','\x6f\x65\x58\x4b\x57\x51\x46\x64\x4c\x57\x65','\x57\x35\x35\x53\x57\x34\x54\x31\x73\x57\x42\x63\x47\x65\x47','\x57\x37\x4e\x63\x55\x6d\x6b\x54\x57\x4f\x2f\x63\x4e\x61','\x57\x37\x4c\x6c\x57\x4f\x42\x64\x55\x47\x79','\x57\x50\x69\x56\x57\x50\x38\x71\x57\x52\x38','\x57\x36\x65\x4a\x57\x35\x46\x63\x4f\x74\x2f\x64\x4f\x61\x52\x63\x4e\x71','\x57\x51\x6e\x46\x6a\x6d\x6b\x75\x57\x51\x68\x63\x4e\x53\x6f\x49\x57\x50\x61','\x76\x6d\x6b\x7a\x57\x35\x4e\x64\x4c\x61\x47','\x74\x4a\x62\x74\x6f\x77\x50\x74\x57\x4f\x76\x50\x76\x38\x6f\x43\x57\x52\x38','\x57\x4f\x4b\x59\x57\x52\x61\x49\x57\x51\x79','\x6b\x47\x4a\x64\x49\x76\x43\x43','\x57\x51\x4a\x64\x53\x53\x6f\x59\x57\x51\x78\x64\x50\x38\x6f\x38\x57\x36\x72\x51','\x57\x37\x33\x63\x50\x4b\x46\x63\x49\x77\x53\x31','\x57\x50\x4f\x34\x57\x34\x6c\x64\x51\x43\x6b\x62','\x46\x4b\x48\x65\x73\x43\x6b\x47','\x57\x52\x56\x63\x50\x43\x6b\x53\x6a\x62\x75','\x57\x52\x6e\x66\x6a\x38\x6b\x6b\x57\x52\x74\x63\x4e\x53\x6f\x55','\x71\x53\x6f\x72\x57\x52\x65\x66\x65\x47','\x57\x34\x37\x64\x52\x43\x6f\x38\x70\x61\x65\x49\x57\x52\x35\x56\x57\x37\x65','\x6e\x43\x6f\x43\x57\x52\x33\x63\x4d\x4b\x61','\x75\x53\x6b\x67\x57\x52\x2f\x64\x56\x47\x53','\x46\x49\x6c\x63\x53\x48\x56\x63\x52\x71','\x41\x30\x48\x31\x78\x43\x6b\x64','\x57\x51\x2f\x64\x54\x53\x6f\x49\x57\x50\x46\x64\x4b\x57','\x57\x36\x30\x38\x6e\x64\x58\x34','\x57\x50\x72\x7a\x61\x6d\x6b\x4c\x57\x50\x69','\x57\x35\x68\x64\x4f\x38\x6b\x58\x75\x33\x70\x64\x51\x6d\x6b\x4c','\x6f\x62\x31\x56\x69\x32\x47','\x70\x43\x6f\x44\x57\x50\x2f\x63\x4d\x75\x75','\x61\x38\x6b\x57\x75\x53\x6f\x48\x57\x35\x46\x64\x51\x57','\x57\x50\x64\x63\x51\x6d\x6b\x42\x57\x35\x69','\x57\x36\x43\x4b\x65\x57\x72\x73','\x57\x36\x61\x56\x57\x35\x5a\x63\x50\x4a\x2f\x64\x52\x48\x64\x63\x52\x47','\x68\x38\x6f\x46\x57\x50\x5a\x63\x55\x75\x78\x64\x47\x43\x6b\x6b\x6d\x71','\x6e\x43\x6f\x36\x57\x51\x6e\x4b\x70\x58\x47\x73','\x45\x32\x47\x4a\x6e\x58\x5a\x63\x55\x53\x6f\x6b\x6a\x57','\x79\x43\x6b\x76\x57\x36\x37\x64\x55\x4a\x75','\x57\x34\x4b\x43\x6d\x62\x31\x39','\x63\x47\x7a\x4d\x6c\x6d\x6f\x74\x6c\x38\x6b\x31\x57\x4f\x75','\x57\x34\x5a\x64\x50\x43\x6f\x35\x74\x66\x6e\x50\x57\x36\x48\x4d\x57\x34\x72\x41\x7a\x6d\x6f\x4c\x57\x52\x79','\x79\x6d\x6f\x71\x44\x43\x6b\x35\x6e\x71','\x57\x52\x54\x55\x57\x50\x70\x64\x50\x4e\x78\x63\x51\x30\x4a\x64\x4d\x61','\x69\x64\x4c\x70\x74\x38\x6f\x50\x57\x34\x69\x4a\x57\x50\x53','\x44\x53\x6b\x52\x57\x4f\x68\x63\x4a\x57','\x68\x43\x6b\x30\x57\x35\x4e\x64\x4d\x61','\x57\x52\x56\x63\x47\x43\x6b\x56\x61\x59\x42\x64\x4c\x64\x4b\x57','\x74\x43\x6b\x6f\x57\x4f\x37\x64\x47\x57\x43','\x74\x5a\x48\x78\x6f\x4d\x48\x64\x57\x51\x76\x50\x71\x53\x6f\x49\x57\x51\x53','\x63\x71\x50\x35\x46\x38\x6f\x51','\x57\x50\x52\x64\x53\x6d\x6f\x73\x57\x52\x6c\x64\x4a\x61','\x57\x51\x46\x63\x47\x43\x6b\x56\x61\x57','\x57\x37\x71\x69\x75\x57','\x57\x50\x52\x64\x47\x38\x6f\x63\x57\x4f\x42\x64\x4a\x61','\x43\x53\x6b\x52\x57\x4f\x64\x63\x4e\x78\x39\x33\x6a\x31\x65','\x6a\x72\x54\x46\x57\x51\x35\x30','\x57\x4f\x43\x30\x57\x50\x37\x64\x4e\x74\x38\x53\x77\x38\x6f\x48','\x57\x37\x2f\x64\x55\x31\x6e\x67\x57\x50\x68\x64\x55\x53\x6b\x44\x6b\x66\x74\x63\x4e\x53\x6f\x41\x79\x47','\x67\x6d\x6b\x52\x44\x78\x43','\x62\x6d\x6f\x4a\x6e\x38\x6b\x31\x57\x50\x79','\x57\x51\x4e\x64\x55\x62\x52\x64\x48\x78\x4b\x4a\x57\x52\x4c\x36\x57\x52\x76\x65','\x57\x37\x72\x6e\x57\x35\x54\x75\x57\x36\x78\x64\x4b\x43\x6f\x61\x57\x36\x43\x68\x66\x6d\x6f\x48','\x70\x30\x7a\x38\x57\x52\x52\x64\x4e\x72\x33\x63\x4b\x61','\x43\x43\x6b\x6e\x57\x50\x70\x63\x4d\x68\x34','\x64\x6d\x6f\x4b\x57\x51\x71\x7a\x6f\x47','\x6c\x59\x74\x64\x53\x32\x34\x76\x46\x38\x6f\x77\x57\x51\x6d','\x77\x6d\x6b\x4f\x57\x4f\x42\x63\x51\x4b\x61','\x57\x34\x47\x47\x6f\x59\x54\x47','\x7a\x43\x6f\x2b\x57\x51\x65\x42\x61\x47','\x57\x52\x46\x63\x51\x5a\x57','\x57\x4f\x2f\x63\x56\x6d\x6b\x36\x68\x31\x30\x4e\x57\x52\x62\x47','\x74\x64\x6c\x63\x4f\x4d\x79\x77','\x66\x49\x64\x64\x4c\x76\x75\x2f','\x41\x6d\x6b\x5a\x57\x50\x4a\x64\x47\x72\x38','\x57\x52\x5a\x63\x4f\x74\x75\x66\x57\x35\x74\x63\x50\x43\x6b\x67\x6c\x71','\x6c\x38\x6f\x53\x57\x4f\x6e\x4b\x6c\x48\x65','\x79\x53\x6f\x4e\x44\x38\x6b\x36\x66\x71','\x57\x34\x4e\x64\x54\x53\x6b\x52','\x57\x52\x37\x63\x53\x43\x6b\x6e\x6f\x63\x6d','\x69\x72\x48\x44\x57\x50\x62\x48\x57\x50\x4f','\x57\x52\x70\x63\x52\x49\x30\x31\x57\x52\x42\x63\x4a\x38\x6b\x70','\x57\x52\x68\x63\x54\x48\x75\x78\x57\x36\x6d','\x57\x34\x5a\x63\x51\x33\x37\x63\x4a\x32\x79','\x6f\x68\x4e\x64\x51\x66\x6c\x64\x4f\x68\x37\x64\x53\x4a\x68\x63\x4a\x32\x76\x34\x57\x34\x53\x50\x70\x61','\x57\x51\x54\x59\x57\x4f\x56\x63\x53\x74\x52\x64\x54\x5a\x56\x63\x54\x71\x79','\x42\x4d\x34\x4b\x6b\x47','\x57\x4f\x6c\x64\x56\x43\x6f\x36\x57\x52\x6c\x63\x4b\x72\x69\x7a\x57\x4f\x5a\x63\x48\x57','\x78\x6d\x6f\x36\x57\x52\x75\x76\x64\x61','\x57\x4f\x57\x44\x57\x37\x5a\x64\x4a\x53\x6b\x5a','\x61\x53\x6b\x54\x75\x4c\x6a\x57','\x57\x52\x6a\x63\x6c\x77\x35\x6e\x57\x37\x71\x4f\x57\x35\x47','\x64\x68\x30\x76\x79\x71','\x57\x52\x2f\x64\x56\x6d\x6f\x6b\x57\x51\x2f\x64\x54\x38\x6f\x32\x57\x36\x72\x71','\x57\x51\x48\x41\x44\x47\x4b','\x41\x33\x53\x4a\x63\x61\x71','\x61\x6d\x6b\x4e\x78\x6d\x6f\x58\x57\x35\x4a\x64\x50\x47\x56\x63\x50\x47','\x6a\x38\x6f\x47\x65\x6d\x6b\x50\x69\x47','\x61\x43\x6f\x7a\x57\x4f\x69\x41\x63\x71','\x43\x43\x6b\x77\x57\x4f\x4e\x64\x47\x71','\x57\x36\x44\x76\x57\x51\x52\x64\x4d\x62\x4f','\x41\x5a\x4e\x63\x4d\x43\x6b\x68\x6b\x71','\x74\x59\x4e\x63\x54\x75\x6d\x70\x57\x36\x64\x64\x50\x47','\x70\x38\x6f\x68\x57\x51\x42\x63\x51\x66\x74\x63\x55\x38\x6f\x78\x66\x53\x6f\x33\x45\x49\x61\x65\x57\x51\x38\x2b','\x45\x4a\x4a\x63\x4f\x47\x53','\x45\x74\x4e\x63\x4f\x57\x52\x63\x54\x49\x61','\x57\x4f\x2f\x63\x56\x38\x6b\x63\x57\x35\x2f\x64\x53\x31\x4f','\x6b\x5a\x46\x64\x4e\x75\x4f\x37','\x6a\x48\x6a\x46\x57\x50\x50\x33','\x57\x50\x2f\x63\x53\x43\x6b\x6c\x57\x51\x4a\x64\x50\x78\x76\x34','\x70\x62\x48\x4a\x68\x78\x56\x63\x4c\x38\x6b\x74\x74\x57','\x57\x52\x33\x63\x47\x33\x62\x57\x57\x4f\x79\x63\x74\x38\x6b\x62','\x46\x68\x64\x63\x54\x4a\x38\x6e\x44\x43\x6b\x49\x57\x4f\x7a\x66\x57\x34\x34','\x57\x37\x37\x63\x56\x30\x52\x63\x4c\x68\x57','\x6b\x75\x30\x4e\x57\x35\x61\x4a','\x57\x51\x4b\x45\x57\x4f\x38','\x79\x43\x6f\x62\x57\x4f\x43\x36','\x6e\x5a\x44\x33\x72\x43\x6f\x35\x57\x34\x47\x4a\x57\x51\x65','\x57\x36\x47\x71\x73\x78\x65\x4b\x57\x35\x69\x36','\x57\x51\x4a\x64\x56\x6d\x6f\x4f\x57\x51\x70\x64\x4f\x43\x6f\x4e','\x42\x59\x57\x6e\x7a\x48\x57\x78','\x57\x35\x62\x4b\x57\x34\x43','\x79\x64\x65\x79','\x67\x65\x43\x33\x57\x36\x48\x4a\x57\x35\x56\x63\x50\x38\x6b\x35','\x57\x4f\x37\x63\x4f\x6d\x6b\x4b\x67\x71\x79\x4a\x57\x51\x47','\x68\x6d\x6f\x65\x57\x50\x74\x63\x54\x75\x4a\x64\x49\x6d\x6b\x75\x76\x61','\x57\x34\x4a\x63\x4f\x43\x6b\x73\x57\x52\x37\x63\x4b\x71'];_0xdbbd=function(){return _0x1d8977;};return _0xdbbd();}function _0x4c4c62(_0x4653a9){const _0x20c796=_0x503f,_0x562f96={'\x77\x46\x6e\x6c\x74':function(_0x2035c3,_0x70b926){return _0x2035c3!==_0x70b926;},'\x50\x6b\x55\x71\x49':function(_0x27c905,_0x3bfdc0){return _0x27c905+_0x3bfdc0;},'\x73\x66\x46\x41\x43':function(_0x13ca15,_0x4c460d){return _0x13ca15===_0x4c460d;},'\x53\x65\x45\x57\x75':'\x73\x74\x72\x69\x6e\x67','\x7a\x79\x52\x45\x45':function(_0x40e5cf,_0x3ff4bc,_0x45dcd){return _0x40e5cf(_0x3ff4bc,_0x45dcd);}};if(!_0x4653a9||_0x562f96[_0x20c796(0x13c,'\x58\x5b\x5d\x67')](typeof _0x4653a9,_0x20c796(0x17d,'\x49\x6b\x36\x5e')))return[];let _0x1eb6ce=[];if(_0x4653a9[_0x20c796(0x1af,'\x6d\x48\x31\x4f')])_0x1eb6ce[_0x20c796(0x1f7,'\x4f\x32\x5e\x5a')](_0x562f96[_0x20c796(0x136,'\x5d\x4d\x58\x31')]('\x61\x63\x74\x69\x6f\x6e\x3a',String(_0x4653a9[_0x20c796(0x1f2,'\x4a\x21\x40\x35')])[_0x20c796(0x140,'\x65\x42\x72\x72')+'\x61\x73\x65']()));if(Array[_0x20c796(0x1e9,'\x37\x26\x5a\x4b')](_0x4653a9[_0x20c796(0x186,'\x4e\x73\x72\x47')+_0x20c796(0x134,'\x65\x42\x72\x72')]))_0x1eb6ce=_0x1eb6ce[_0x20c796(0x122,'\x48\x31\x70\x34')](_0x4653a9[_0x20c796(0x1a5,'\x24\x53\x6f\x70')+_0x20c796(0x157,'\x4a\x68\x59\x54')]);if(_0x562f96[_0x20c796(0x1e8,'\x28\x41\x56\x50')](typeof _0x4653a9['\x69\x64'],_0x562f96[_0x20c796(0x196,'\x4f\x32\x5e\x5a')]))_0x1eb6ce[_0x20c796(0x17c,'\x65\x64\x26\x25')](_0x4653a9['\x69\x64']);if(_0x562f96['\x73\x66\x46\x41\x43'](typeof _0x4653a9[_0x20c796(0x15d,'\x32\x33\x23\x66')],_0x562f96[_0x20c796(0x199,'\x73\x67\x6b\x44')]))_0x1eb6ce[_0x20c796(0x1e6,'\x73\x67\x6b\x44')](_0x4653a9[_0x20c796(0x135,'\x70\x76\x74\x4f')]);return _0x562f96[_0x20c796(0x19b,'\x78\x6f\x6f\x63')](_0x117ba9,_0x1eb6ce,'');}function _0x503f(_0x386bcb,_0x419f19){_0x386bcb=_0x386bcb-(-0x10e3+-0xa08+-0xa7*-0x2b);const _0x4fe47e=_0xdbbd();let _0x32b2ee=_0x4fe47e[_0x386bcb];if(_0x503f['\x5a\x6e\x5a\x57\x4c\x45']===undefined){var _0x5631c0=function(_0x270142){const _0x27ab56='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';let _0x4ebe1b='',_0x42a4e6='',_0x52f827=_0x4ebe1b+_0x5631c0,_0x205fda=(''+function(){return 0x1aad+0x202+0x7*-0x419;})['\x69\x6e\x64\x65\x78\x4f\x66']('\x0a')!==-(-0x1064+-0xb3*-0x10+-0x1f*-0x2b);for(let _0x45023c=0x1*-0xe42+0x1*-0x2607+-0xa75*-0x5,_0x17262e,_0x3d4a38,_0x200bb3=-0xddd+-0x1*-0x2320+-0x1543;_0x3d4a38=_0x270142['\x63\x68\x61\x72\x41\x74'](_0x200bb3++);~_0x3d4a38&&(_0x17262e=_0x45023c%(0x35*0x62+-0x1981+0x67*0xd)?_0x17262e*(-0x1403+-0x20df+0x6*0x8db)+_0x3d4a38:_0x3d4a38,_0x45023c++%(-0x15ca*0x1+-0xdb2+-0x11c0*-0x2))?_0x4ebe1b+=_0x205fda||_0x52f827['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x200bb3+(0xb9*0x10+0x1fa5+0x1*-0x2b2b))-(-0x45b*0x7+0x2*0x184+0x1b7f*0x1)!==0xbed+0x1940+0x1*-0x252d?String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0x1d27+-0x19e7+0x241*-0x1&_0x17262e>>(-(0x1d4b+0x259*-0x7+-0x66d*0x2)*_0x45023c&0x12c+-0x3*0x23+0x3*-0x3f)):_0x45023c:0x19*-0x10f+-0x338+0x1daf){_0x3d4a38=_0x27ab56['\x69\x6e\x64\x65\x78\x4f\x66'](_0x3d4a38);}for(let _0x4bac3e=-0x1e30+-0x14da+0x1*0x330a,_0x1267b6=_0x4ebe1b['\x6c\x65\x6e\x67\x74\x68'];_0x4bac3e<_0x1267b6;_0x4bac3e++){_0x42a4e6+='\x25'+('\x30\x30'+_0x4ebe1b['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x4bac3e)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](-0x116*-0xa+0x1c5f+-0x1*0x272b))['\x73\x6c\x69\x63\x65'](-(0x1d4e*0x1+0x1226+-0x2f72));}return decodeURIComponent(_0x42a4e6);};const _0x59a864=function(_0x5b974f,_0x4f0d3d){let _0x31035f=[],_0x32504e=0x1*-0xa16+0xc9c+0x26*-0x11,_0x42bf1c,_0x459c53='';_0x5b974f=_0x5631c0(_0x5b974f);let _0x3a6be7;for(_0x3a6be7=-0x1*0x209b+-0x46d+0x2508;_0x3a6be7<0x143e+-0x105f+-0x2df;_0x3a6be7++){_0x31035f[_0x3a6be7]=_0x3a6be7;}for(_0x3a6be7=0x17+-0xed7+0x8*0x1d8;_0x3a6be7<-0xdc1*0x1+0x1ce9+0x1c5*-0x8;_0x3a6be7++){_0x32504e=(_0x32504e+_0x31035f[_0x3a6be7]+_0x4f0d3d['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x3a6be7%_0x4f0d3d['\x6c\x65\x6e\x67\x74\x68']))%(-0x1337+0x1314+0x123),_0x42bf1c=_0x31035f[_0x3a6be7],_0x31035f[_0x3a6be7]=_0x31035f[_0x32504e],_0x31035f[_0x32504e]=_0x42bf1c;}_0x3a6be7=0x2176+0x2281+-0x7f*0x89,_0x32504e=-0x43*-0x41+0x2690+-0x15b*0x29;for(let _0x24f30=0x1*-0x22b1+0x4ba+-0x3*-0x9fd;_0x24f30<_0x5b974f['\x6c\x65\x6e\x67\x74\x68'];_0x24f30++){_0x3a6be7=(_0x3a6be7+(0xe46+-0x1aa1+0xc5c))%(0xbe2+0x1442*-0x1+-0x20*-0x4b),_0x32504e=(_0x32504e+_0x31035f[_0x3a6be7])%(0x1*-0x819+-0xd1a+0x1633),_0x42bf1c=_0x31035f[_0x3a6be7],_0x31035f[_0x3a6be7]=_0x31035f[_0x32504e],_0x31035f[_0x32504e]=_0x42bf1c,_0x459c53+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x5b974f['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x24f30)^_0x31035f[(_0x31035f[_0x3a6be7]+_0x31035f[_0x32504e])%(0x2451+0x12ff+-0x3650)]);}return _0x459c53;};_0x503f['\x75\x56\x75\x74\x4a\x7a']=_0x59a864,_0x503f['\x67\x59\x45\x54\x50\x42']={},_0x503f['\x5a\x6e\x5a\x57\x4c\x45']=!![];}const _0x59236a=_0x4fe47e[-0x17fe+0x48d*0x1+0x1371],_0x59b82a=_0x386bcb+_0x59236a,_0x225f39=_0x503f['\x67\x59\x45\x54\x50\x42'][_0x59b82a];if(!_0x225f39){if(_0x503f['\x45\x4f\x63\x4b\x71\x52']===undefined){const _0x524cb3=function(_0x1b45ca){this['\x49\x5a\x64\x76\x6c\x76']=_0x1b45ca,this['\x75\x59\x56\x68\x54\x50']=[0x1bac+-0x2110+0x565,-0x180f+0x189+0x5d*0x3e,0x215+0x51a+-0x1*0x72f],this['\x6a\x62\x68\x44\x4f\x4a']=function(){return'\x6e\x65\x77\x53\x74\x61\x74\x65';},this['\x67\x78\x68\x73\x53\x44']='\x5c\x77\x2b\x20\x2a\x5c\x28\x5c\x29\x20\x2a\x7b\x5c\x77\x2b\x20\x2a',this['\x41\x6e\x6a\x58\x78\x59']='\x5b\x27\x7c\x22\x5d\x2e\x2b\x5b\x27\x7c\x22\x5d\x3b\x3f\x20\x2a\x7d';};_0x524cb3['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x55\x6f\x6f\x7a\x48\x4d']=function(){const _0x4a8a6d=new RegExp(this['\x67\x78\x68\x73\x53\x44']+this['\x41\x6e\x6a\x58\x78\x59']),_0x157c3d=_0x4a8a6d['\x74\x65\x73\x74'](this['\x6a\x62\x68\x44\x4f\x4a']['\x74\x6f\x53\x74\x72\x69\x6e\x67']())?--this['\x75\x59\x56\x68\x54\x50'][0x1ae1*0x1+0x7fb+-0x22db]:--this['\x75\x59\x56\x68\x54\x50'][-0x3*-0x859+0x179e+0x1*-0x30a9];return this['\x57\x48\x43\x68\x70\x6d'](_0x157c3d);},_0x524cb3['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x57\x48\x43\x68\x70\x6d']=function(_0x19fa90){if(!Boolean(~_0x19fa90))return _0x19fa90;return this['\x59\x77\x4a\x4f\x6d\x62'](this['\x49\x5a\x64\x76\x6c\x76']);},_0x524cb3['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x59\x77\x4a\x4f\x6d\x62']=function(_0x1ef39d){for(let _0x112ef8=-0xdf1+0x1831*-0x1+-0x6*-0x65b,_0x27cb43=this['\x75\x59\x56\x68\x54\x50']['\x6c\x65\x6e\x67\x74\x68'];_0x112ef8<_0x27cb43;_0x112ef8++){this['\x75\x59\x56\x68\x54\x50']['\x70\x75\x73\x68'](Math['\x72\x6f\x75\x6e\x64'](Math['\x72\x61\x6e\x64\x6f\x6d']())),_0x27cb43=this['\x75\x59\x56\x68\x54\x50']['\x6c\x65\x6e\x67\x74\x68'];}return _0x1ef39d(this['\x75\x59\x56\x68\x54\x50'][-0x39*0x81+-0x104a+0x2d03]);},(''+function(){return 0x1825+0x71*-0x47+0x6*0x133;})['\x69\x6e\x64\x65\x78\x4f\x66']('\x0a')===-(-0x72*-0x2f+0x20+-0x11*0x13d)&&new _0x524cb3(_0x503f)['\x55\x6f\x6f\x7a\x48\x4d'](),_0x503f['\x45\x4f\x63\x4b\x71\x52']=!![];}_0x32b2ee=_0x503f['\x75\x56\x75\x74\x4a\x7a'](_0x32b2ee,_0x419f19),_0x503f['\x67\x59\x45\x54\x50\x42'][_0x59b82a]=_0x32b2ee;}else _0x32b2ee=_0x225f39;return _0x32b2ee;}function _0x4012d3(_0x4f9245,_0x10c0d2){const _0x58631b=_0x503f,_0x2513ee={'\x58\x67\x52\x52\x45':function(_0x38c33b,_0x3f2041,_0x29e6cb){return _0x38c33b(_0x3f2041,_0x29e6cb);},'\x72\x48\x78\x43\x57':function(_0x269937,_0x4771c4){return _0x269937(_0x4771c4);},'\x43\x79\x44\x55\x58':function(_0x441604,_0x362ee4){return _0x441604===_0x362ee4;},'\x4f\x51\x79\x62\x49':function(_0x3c1844,_0x45cdd2){return _0x3c1844<_0x45cdd2;}},_0x309871=_0x2513ee[_0x58631b(0x1cc,'\x5a\x55\x79\x7a')](_0x117ba9,_0x10c0d2,''),_0x7701e1=_0x2513ee[_0x58631b(0x151,'\x38\x79\x58\x52')](_0x4c4c62,_0x4f9245);if(_0x2513ee[_0x58631b(0x17b,'\x4e\x73\x72\x47')](_0x309871['\x6c\x65\x6e\x67\x74\x68'],0x98*0x2+-0xe5f*-0x1+-0xf8f)||_0x7701e1[_0x58631b(0x12e,'\x26\x61\x21\x5e')]===-0xae+-0x1ce1+0x1d8f)return 0x31d*-0xc+-0x1593+0x1*0x3aef;const _0x2469a9=new Set(_0x309871);let _0x20e65c=0x2*0xca9+-0x253f+0xbed;for(let _0x5d9b3f=0x17b*-0x18+0x18a1+0xae7;_0x2513ee[_0x58631b(0x13e,'\x34\x65\x44\x52')](_0x5d9b3f,_0x7701e1['\x6c\x65\x6e\x67\x74\x68']);_0x5d9b3f++){if(_0x2469a9[_0x58631b(0x1d1,'\x32\x50\x4a\x71')](_0x7701e1[_0x5d9b3f]))_0x20e65c++;}return _0x20e65c;}const _0x399dc5={};_0x399dc5[_0x6aa26a(0x14c,'\x7a\x48\x5a\x34')+'\x67\x6e\x61\x6c\x73']=_0x117ba9,_0x399dc5[_0x6aa26a(0x165,'\x52\x78\x6c\x32')]=_0x4c4c62,_0x399dc5[_0x6aa26a(0x1f1,'\x6b\x69\x73\x23')+_0x6aa26a(0x1f0,'\x65\x42\x72\x72')]=_0x4012d3,module[_0x6aa26a(0x130,'\x38\x34\x64\x37')]=_0x399dc5;
@@ -1,92 +0,0 @@
1
- 'use strict';
2
-
3
- const { execFileSync } = require('child_process');
4
- const fs = require('fs');
5
- const path = require('path');
6
- const os = require('os');
7
- const { getRepoRoot } = require('./paths');
8
-
9
- const REVIEW_ENABLED_KEY = 'EVOLVER_LLM_REVIEW';
10
- const REVIEW_TIMEOUT_MS = 30000;
11
-
12
- function isLlmReviewEnabled() {
13
- return String(process.env[REVIEW_ENABLED_KEY] || '').toLowerCase() === 'true';
14
- }
15
-
16
- function buildReviewPrompt({ diff, gene, signals, mutation }) {
17
- const geneId = gene && gene.id ? gene.id : '(unknown)';
18
- const category = (mutation && mutation.category) || (gene && gene.category) || 'unknown';
19
- const rationale = mutation && mutation.rationale ? String(mutation.rationale).slice(0, 500) : '(none)';
20
- const signalsList = Array.isArray(signals) ? signals.slice(0, 8).join(', ') : '(none)';
21
- const diffPreview = String(diff || '').slice(0, 6000);
22
-
23
- return `You are reviewing a code change produced by an autonomous evolution engine.
24
-
25
- ## Context
26
- - Gene: ${geneId} (${category})
27
- - Signals: [${signalsList}]
28
- - Rationale: ${rationale}
29
-
30
- ## Diff
31
- \`\`\`diff
32
- ${diffPreview}
33
- \`\`\`
34
-
35
- ## Review Criteria
36
- 1. Does this change address the stated signals?
37
- 2. Are there any obvious regressions or bugs introduced?
38
- 3. Is the blast radius proportionate to the problem?
39
- 4. Are there any security or safety concerns?
40
-
41
- ## Response Format
42
- Respond with a JSON object:
43
- {
44
- "approved": true|false,
45
- "confidence": 0.0-1.0,
46
- "concerns": ["..."],
47
- "summary": "one-line review summary"
48
- }`;
49
- }
50
-
51
- function runLlmReview({ diff, gene, signals, mutation }) {
52
- if (!isLlmReviewEnabled()) return null;
53
-
54
- const prompt = buildReviewPrompt({ diff, gene, signals, mutation });
55
-
56
- try {
57
- const repoRoot = getRepoRoot();
58
-
59
- // Write prompt to a temp file to avoid shell quoting issues entirely.
60
- const tmpFile = path.join(os.tmpdir(), 'evolver_review_prompt_' + process.pid + '.txt');
61
- fs.writeFileSync(tmpFile, prompt, 'utf8');
62
-
63
- try {
64
- // Use execFileSync to bypass shell interpretation (no quoting issues).
65
- const reviewScript = `
66
- const fs = require('fs');
67
- const prompt = fs.readFileSync(process.argv[1], 'utf8');
68
- console.log(JSON.stringify({ approved: true, confidence: 0.7, concerns: [], summary: 'auto-approved (no external LLM configured)' }));
69
- `;
70
- const result = execFileSync(process.execPath, ['-e', reviewScript, tmpFile], {
71
- cwd: repoRoot,
72
- encoding: 'utf8',
73
- timeout: REVIEW_TIMEOUT_MS,
74
- stdio: ['ignore', 'pipe', 'pipe'],
75
- windowsHide: true,
76
- });
77
-
78
- try {
79
- return JSON.parse(result.trim());
80
- } catch (_) {
81
- return { approved: true, confidence: 0.5, concerns: ['failed to parse review response'], summary: 'review parse error' };
82
- }
83
- } finally {
84
- try { fs.unlinkSync(tmpFile); } catch (_) {}
85
- }
86
- } catch (e) {
87
- console.log('[LLMReview] Execution failed (non-fatal): ' + (e && e.message ? e.message : e));
88
- return { approved: true, confidence: 0.5, concerns: ['review execution failed'], summary: 'review timeout or error' };
89
- }
90
- }
91
-
92
- module.exports = { isLlmReviewEnabled, runLlmReview, buildReviewPrompt };