@evomap/evolver 1.89.10 → 1.89.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursor/BUGBOT.md +182 -0
- package/.env.example +68 -0
- package/.git-commit-guard-token +1 -0
- package/.github/CODEOWNERS +63 -0
- package/.github/ISSUE_TEMPLATE/good_first_issue.md +23 -0
- package/.github/pull_request_template.md +45 -0
- package/.github/workflows/test.yml +75 -0
- package/CHANGELOG.md +1367 -0
- package/README.ja-JP.md +1 -1
- package/README.ko-KR.md +1 -1
- package/README.md +90 -536
- package/README.public.md +578 -0
- package/README.zh-CN.md +1 -1
- package/SECURITY.md +108 -0
- package/assets/gep/events.jsonl +3 -0
- package/examples/atp-consumer-quickstart.md +100 -0
- package/examples/hello-world.md +38 -0
- package/index.js +5 -3
- package/package.json +6 -18
- package/proxy-package.json +39 -0
- package/public.manifest.json +145 -0
- package/src/adapters/scripts/evolver-session-end.js +18 -37
- package/src/atp/atpExecute.js +27 -71
- package/src/atp/serviceHelper.js +28 -36
- package/src/config.js +17 -0
- package/src/evolve/guards.js +721 -1
- package/src/evolve/pipeline/collect.js +1283 -1
- package/src/evolve/pipeline/dispatch.js +421 -1
- package/src/evolve/pipeline/enrich.js +440 -1
- package/src/evolve/pipeline/hub.js +319 -1
- package/src/evolve/pipeline/select.js +274 -1
- package/src/evolve/pipeline/signals.js +206 -1
- package/src/evolve/utils.js +264 -1
- package/src/evolve.js +350 -1
- package/src/gep/a2aProtocol.js +4463 -1
- package/src/gep/antiAbuseTelemetry.js +233 -1
- package/src/gep/autoDistillConv.js +205 -1
- package/src/gep/autoDistillLlm.js +315 -1
- package/src/gep/candidateEval.js +92 -1
- package/src/gep/candidates.js +198 -1
- package/src/gep/contentHash.js +30 -1
- package/src/gep/conversationDistiller.js +270 -0
- package/src/gep/conversationSniffer.js +266 -1
- package/src/gep/crypto.js +89 -1
- package/src/gep/curriculum.js +163 -1
- package/src/gep/deviceId.js +218 -1
- package/src/gep/envFingerprint.js +118 -1
- package/src/gep/epigenetics.js +31 -1
- package/src/gep/execBridge.js +712 -1
- package/src/gep/explore.js +289 -1
- package/src/gep/hash.js +15 -1
- package/src/gep/hubFetch.js +608 -1
- package/src/gep/hubReview.js +207 -1
- package/src/gep/hubSearch.js +526 -1
- package/src/gep/hubVerify.js +306 -1
- package/src/gep/learningSignals.js +89 -1
- package/src/gep/memoryGraph.js +1449 -1
- package/src/gep/memoryGraphAdapter.js +203 -1
- package/src/gep/mutation.js +203 -1
- package/src/gep/narrativeMemory.js +108 -1
- package/src/gep/oauthLogin.js +9 -3
- package/src/gep/openPRRegistry.js +205 -1
- package/src/gep/personality.js +423 -1
- package/src/gep/policyCheck.js +599 -1
- package/src/gep/privacyClient.js +10 -9
- package/src/gep/prompt.js +836 -1
- package/src/gep/questionGenerator.js +103 -0
- package/src/gep/recallInject.js +409 -1
- package/src/gep/recallVerifier.js +318 -1
- package/src/gep/reflection.js +177 -1
- package/src/gep/savingsCore.js +112 -1
- package/src/gep/selector.js +602 -1
- package/src/gep/signals.js +85 -17
- package/src/gep/skillDistiller.js +1294 -1
- package/src/gep/solidify.js +1699 -1
- package/src/gep/strategy.js +136 -1
- package/src/gep/tokenSavings.js +95 -1
- package/src/gep/workspaceKeychain.js +174 -1
- package/src/proxy/extensions/traceControl.js +109 -1
- package/src/proxy/index.js +100 -3
- package/src/proxy/inject.js +52 -1
- package/src/proxy/lifecycle/manager.js +108 -7
- package/src/proxy/server/routes.js +41 -7
- package/src/proxy/server/settings.js +6 -2
- package/src/proxy/sync/engine.js +31 -15
- package/src/proxy/sync/inbound.js +87 -9
- package/src/proxy/sync/outbound.js +57 -4
- package/src/proxy/trace/extractor.js +1403 -1
- package/src/proxy/trace/usage.js +105 -1
- package/CONTRIBUTING.md +0 -19
- package/assets/cover.png +0 -0
- package/scripts/a2a_export.js +0 -63
- package/scripts/a2a_ingest.js +0 -79
- package/scripts/a2a_promote.js +0 -118
- package/scripts/analyze_by_skill.js +0 -121
- package/scripts/build_binaries.js +0 -479
- package/scripts/check-changelog.js +0 -166
- package/scripts/extract_log.js +0 -85
- package/scripts/generate_history.js +0 -75
- package/scripts/gep_append_event.js +0 -96
- package/scripts/gep_personality_report.js +0 -234
- package/scripts/human_report.js +0 -147
- package/scripts/recall-verify-report.js +0 -234
- package/scripts/recover_loop.js +0 -61
- package/scripts/refresh_stars_badge.js +0 -168
- package/scripts/seed-merchants.js +0 -91
- package/scripts/suggest_version.js +0 -89
- package/scripts/validate-modules.js +0 -38
- package/scripts/validate-suite.js +0 -78
- package/skills/index.json +0 -14
- /package/assets/gep/{genes.seed.json → genes.json} +0 -0
- /package/{skills → bundled-skills}/_meta/SKILL.md +0 -0
package/src/proxy/trace/usage.js
CHANGED
|
@@ -1 +1,105 @@
|
|
|
1
|
-
const _0x56fc10=_0x304f;(function(_0x413ba9,_0x481e36){const _0x5cf46f=_0x304f,_0x2bd3f1=_0x413ba9();while(!![]){try{const _0x520c68=parseInt(_0x5cf46f(0x14c,'\x37\x62\x59\x62'))/(-0x36d*0x6+0x6*-0x4+-0x1*-0x14a7)+parseInt(_0x5cf46f(0xc9,'\x48\x6b\x61\x40'))/(0x2*0x4d1+0x18*0x79+-0x14f8)+parseInt(_0x5cf46f(0x13d,'\x67\x64\x6d\x23'))/(-0x25b9+0xf0a+0x16b2)*(-parseInt(_0x5cf46f(0x145,'\x33\x33\x79\x28'))/(0x102b+-0x8*0x19f+-0x32f))+parseInt(_0x5cf46f(0xea,'\x74\x52\x41\x47'))/(0x8*-0x307+-0x10d*0x17+-0x4*-0xc1a)*(-parseInt(_0x5cf46f(0xe2,'\x30\x55\x43\x21'))/(0x7f*0xc+-0x977*0x1+0x389))+-parseInt(_0x5cf46f(0x11e,'\x6a\x32\x4c\x48'))/(-0x170d+-0x1d09*0x1+0x1*0x341d)+-parseInt(_0x5cf46f(0x14a,'\x38\x2a\x42\x64'))/(0xe65+-0x20b0+0x1253)*(parseInt(_0x5cf46f(0x126,'\x75\x54\x72\x79'))/(-0xa53*0x1+-0x3*0xcf8+0x3144))+parseInt(_0x5cf46f(0x10d,'\x72\x56\x75\x6f'))/(-0xf*0xa9+0xbba+-0x1*0x1c9)*(parseInt(_0x5cf46f(0x128,'\x76\x67\x30\x6b'))/(0x147e+-0x381+0x6*-0x2d3));if(_0x520c68===_0x481e36)break;else _0x2bd3f1['push'](_0x2bd3f1['shift']());}catch(_0x424cd5){_0x2bd3f1['push'](_0x2bd3f1['shift']());}}}(_0x23cf,-0x97*0xa18+-0x2b1ec+0xe*0xd623));const _0x3ad776=(function(){const _0x485f70=_0x304f,_0xcbc870={'\x70\x6c\x67\x4b\x4f':_0x485f70(0x119,'\x2a\x5b\x45\x66'),'\x43\x72\x41\x66\x46':'\x6c\x6b\x6e\x70\x61','\x70\x77\x42\x6d\x6f':function(_0x2b6fa7,_0x47a15f){return _0x2b6fa7!==_0x47a15f;},'\x61\x63\x4a\x53\x78':_0x485f70(0xf0,'\x4e\x38\x67\x40'),'\x42\x79\x71\x64\x4d':function(_0x3800d5,_0x3600e0){return _0x3800d5(_0x3600e0);},'\x50\x72\x76\x4d\x42':function(_0x466626,_0x12cb40){return _0x466626*_0x12cb40;},'\x51\x42\x74\x53\x4e':function(_0x2103c1,_0x203b7f){return _0x2103c1===_0x203b7f;},'\x43\x42\x48\x6f\x73':'\x6e\x55\x42\x47\x4f'};let _0x588183=!![];return function(_0x54e7f1,_0x55dec6){const _0x25fbd3=_0x485f70,_0x545394={'\x68\x55\x42\x42\x57':function(_0x4f0624,_0x264ad8){return _0xcbc870['\x42\x79\x71\x64\x4d'](_0x4f0624,_0x264ad8);},'\x50\x79\x65\x50\x69':function(_0x303ed5,_0x3640bd){const _0x464d6e=_0x304f;return _0xcbc870[_0x464d6e(0x111,'\x61\x5d\x77\x59')](_0x303ed5,_0x3640bd);}};if(_0xcbc870[_0x25fbd3(0x127,'\x21\x65\x64\x30')](_0xcbc870[_0x25fbd3(0x131,'\x65\x57\x77\x78')],_0xcbc870[_0x25fbd3(0x10b,'\x65\x76\x45\x71')])){const _0xdcdeb4=_0x588183?function(){const _0x517ff5=_0x25fbd3;if(_0xcbc870[_0x517ff5(0xcb,'\x72\x28\x28\x37')]===_0xcbc870[_0x517ff5(0x14d,'\x6a\x32\x4c\x48')]){const _0x420acf={..._0x2b2dfa};return _0x420acf;}else{if(_0x55dec6){if(_0xcbc870[_0x517ff5(0x13e,'\x23\x4e\x50\x63')](_0x517ff5(0xde,'\x37\x5d\x71\x5b'),_0xcbc870[_0x517ff5(0x10e,'\x6a\x55\x64\x63')])){const _0x2e0403=_0x555eef&&(_0x427b74[_0x517ff5(0x14f,'\x4e\x38\x67\x40')+'\x70']||_0x4830f5[_0x517ff5(0xc7,'\x6a\x32\x4c\x48')+_0x517ff5(0x103,'\x74\x52\x41\x47')]);if(_0x2e0403){const _0x2e6ad4=_0x4965b8[_0x517ff5(0xe3,'\x72\x65\x61\x78')](_0x2e0403);if(_0x412ad5['\x69\x73\x46\x69\x6e\x69\x74\x65'](_0x2e6ad4))return _0x2e6ad4;}if(_0x533a2e&&_0x441b01[_0x517ff5(0x13c,'\x6a\x56\x42\x4f')](_0x545394[_0x517ff5(0xeb,'\x6a\x55\x64\x63')](_0x54dedc,_0x26cb88[_0x517ff5(0x140,'\x6a\x28\x76\x53')+'\x74'])))return _0x545394[_0x517ff5(0xe4,'\x72\x28\x28\x37')](_0x545394[_0x517ff5(0xd1,'\x43\x4c\x61\x55')](_0x39abb3,_0x25fe2c[_0x517ff5(0xd9,'\x51\x76\x25\x5a')+'\x74']),0x1c*0xe8+-0xbf7*-0x3+-0x37*0x10b);return null;}else{const _0x4d2fec=_0x55dec6[_0x517ff5(0xfa,'\x6f\x4c\x79\x76')](_0x54e7f1,arguments);return _0x55dec6=null,_0x4d2fec;}}}}:function(){};return _0x588183=![],_0xdcdeb4;}else return _0x5e127e[_0x25fbd3(0xe9,'\x38\x2a\x42\x64')]()[_0x25fbd3(0x149,'\x67\x64\x6d\x23')]('\x28\x28\x28\x2e\x2b\x29\x2b\x29'+_0x25fbd3(0x114,'\x46\x30\x74\x65'))[_0x25fbd3(0x107,'\x37\x62\x59\x62')]()[_0x25fbd3(0xd6,'\x66\x4e\x71\x21')+_0x25fbd3(0x11f,'\x48\x6b\x61\x40')](_0x1d3556)[_0x25fbd3(0x117,'\x76\x67\x30\x6b')](_0x25fbd3(0x11c,'\x6f\x64\x30\x55')+_0x25fbd3(0x120,'\x4e\x38\x67\x40'));};}()),_0x4ee11b=_0x3ad776(this,function(){const _0x8b562e=_0x304f;return _0x4ee11b[_0x8b562e(0x150,'\x72\x28\x28\x37')]()['\x73\x65\x61\x72\x63\x68'](_0x8b562e(0xfe,'\x72\x65\x61\x78')+_0x8b562e(0xe6,'\x67\x64\x6d\x23'))['\x74\x6f\x53\x74\x72\x69\x6e\x67']()[_0x8b562e(0xf2,'\x5e\x49\x4f\x62')+'\x74\x6f\x72'](_0x4ee11b)[_0x8b562e(0x12f,'\x72\x28\x28\x37')](_0x8b562e(0xf6,'\x30\x55\x43\x21')+_0x8b562e(0xdf,'\x66\x4e\x71\x21'));});_0x4ee11b();'use strict';const _0x33926e=require('\x66\x73'),{resolveTraceFile:_0x243318,resolveEvomapNodeSecret:_0xacfde9,decryptTraceEnvelope:_0xec99b3}=require('\x2e\x2f\x65\x78\x74\x72\x61\x63'+'\x74\x6f\x72'),_0x4a17f3={};function _0x23cf(){const _0xcdd6d3=['\x57\x37\x76\x2b\x57\x36\x33\x63\x51\x30\x65','\x57\x37\x37\x64\x50\x57\x38\x56\x46\x67\x70\x64\x4a\x43\x6f\x6e','\x57\x50\x62\x66\x6e\x53\x6b\x42','\x63\x6d\x6b\x53\x6d\x53\x6f\x68\x57\x50\x70\x64\x53\x53\x6b\x4d\x61\x47','\x57\x36\x78\x64\x52\x62\x34\x2b\x74\x4c\x78\x64\x4c\x43\x6f\x68','\x70\x38\x6f\x5a\x73\x73\x65\x4f\x57\x4f\x4f\x32\x72\x71','\x64\x38\x6b\x59\x57\x4f\x37\x63\x52\x6d\x6f\x72\x42\x53\x6b\x51\x57\x4f\x4b\x71','\x64\x68\x78\x63\x4c\x53\x6f\x4b\x57\x34\x65','\x57\x37\x58\x37\x57\x34\x78\x63\x50\x43\x6f\x32\x67\x57\x2f\x64\x49\x31\x6a\x54\x57\x50\x69\x35','\x57\x50\x5a\x63\x47\x57\x52\x64\x4f\x49\x76\x78\x57\x34\x68\x63\x49\x57','\x73\x38\x6b\x77\x57\x52\x42\x64\x49\x47','\x57\x34\x72\x66\x57\x51\x35\x6a\x57\x52\x78\x63\x53\x57\x35\x51','\x71\x6d\x6b\x4c\x67\x77\x52\x63\x4d\x47','\x57\x4f\x79\x30\x6a\x6d\x6f\x31\x57\x4f\x75','\x42\x43\x6f\x79\x61\x43\x6f\x75\x61\x4a\x62\x6f\x57\x35\x75','\x57\x51\x79\x53\x57\x4f\x6d','\x57\x36\x6a\x46\x62\x43\x6f\x2f\x6e\x71','\x57\x34\x56\x63\x56\x53\x6b\x72\x57\x34\x47','\x44\x47\x30\x52\x43\x53\x6f\x4a\x57\x36\x5a\x64\x53\x59\x30','\x45\x49\x4c\x4e\x72\x61','\x42\x6d\x6b\x54\x57\x51\x4c\x4c\x57\x51\x2f\x63\x4c\x53\x6f\x72\x57\x50\x79','\x74\x6d\x6b\x57\x57\x51\x48\x2b\x57\x51\x53','\x6f\x6d\x6b\x42\x57\x36\x62\x6b\x57\x50\x71','\x57\x51\x70\x63\x4c\x64\x56\x64\x48\x72\x53','\x57\x52\x2f\x63\x47\x4d\x6c\x64\x50\x43\x6f\x45','\x57\x52\x46\x64\x49\x48\x33\x63\x47\x43\x6f\x49','\x62\x64\x75\x73\x57\x35\x52\x64\x4b\x6d\x6b\x6a\x57\x37\x72\x48','\x66\x77\x42\x63\x4b\x53\x6f\x6e\x57\x36\x57','\x78\x53\x6b\x74\x6f\x66\x56\x63\x4e\x53\x6b\x52\x57\x51\x70\x63\x4a\x57','\x57\x34\x5a\x63\x4e\x53\x6b\x6d\x57\x34\x74\x63\x55\x77\x31\x7a\x57\x36\x38','\x57\x52\x64\x63\x50\x53\x6f\x55\x69\x4c\x33\x64\x56\x6d\x6f\x61\x57\x51\x75','\x73\x53\x6f\x64\x57\x34\x4a\x63\x53\x61','\x57\x35\x7a\x31\x57\x50\x6d\x58\x57\x52\x4f','\x57\x37\x7a\x56\x77\x63\x4b','\x57\x51\x37\x64\x55\x64\x6c\x63\x56\x43\x6f\x37\x74\x4a\x66\x4a','\x67\x38\x6f\x7a\x57\x50\x46\x64\x51\x43\x6b\x79\x64\x6d\x6b\x30\x42\x47','\x57\x35\x31\x6d\x57\x37\x4f','\x61\x4c\x6c\x63\x53\x43\x6f\x64\x57\x36\x5a\x64\x4b\x47','\x57\x37\x33\x63\x4c\x53\x6f\x75\x6e\x77\x4a\x64\x4d\x6d\x6f\x61','\x77\x38\x6f\x6f\x6b\x64\x78\x64\x54\x61','\x65\x6d\x6f\x37\x57\x52\x61\x39\x57\x51\x53','\x57\x4f\x72\x34\x57\x4f\x75\x56\x67\x71\x5a\x64\x50\x6d\x6f\x38\x57\x35\x30\x72','\x62\x75\x70\x63\x4e\x53\x6f\x31\x57\x36\x34','\x6b\x48\x5a\x64\x51\x32\x72\x6e\x57\x36\x31\x7a\x7a\x47','\x57\x36\x61\x37\x57\x35\x79\x37\x57\x35\x4f','\x57\x4f\x61\x43\x6a\x43\x6f\x6c\x57\x52\x79','\x57\x37\x39\x2b\x57\x52\x35\x58\x57\x4f\x75','\x70\x43\x6b\x58\x57\x51\x79\x32\x57\x35\x75','\x57\x52\x7a\x68\x57\x36\x68\x63\x55\x71','\x46\x32\x72\x75\x57\x50\x43','\x57\x52\x52\x63\x51\x6d\x6f\x31\x57\x36\x44\x65\x57\x50\x4b\x69\x65\x38\x6f\x53','\x57\x34\x39\x6f\x57\x37\x37\x63\x4b\x38\x6b\x43\x57\x34\x38','\x57\x36\x35\x64\x57\x51\x39\x37\x57\x52\x47','\x57\x36\x37\x63\x4c\x4d\x4b\x63\x57\x51\x79','\x57\x34\x4c\x2f\x57\x4f\x71\x53\x57\x51\x57','\x70\x6d\x6b\x74\x57\x36\x62\x6a\x57\x50\x38\x63\x70\x71','\x72\x4c\x4a\x63\x49\x6d\x6f\x79\x44\x68\x64\x64\x49\x5a\x61','\x79\x30\x54\x58\x57\x4f\x33\x63\x56\x57','\x64\x53\x6f\x43\x57\x36\x46\x63\x4b\x53\x6b\x78\x71\x38\x6b\x46\x6a\x4b\x69\x2b\x65\x68\x6a\x6a','\x75\x61\x33\x64\x4d\x71','\x68\x6d\x6f\x6a\x76\x72\x79','\x77\x38\x6b\x49\x41\x38\x6f\x77\x6e\x38\x6f\x68\x57\x52\x78\x63\x48\x71','\x57\x35\x4e\x64\x56\x48\x72\x73\x44\x47','\x6e\x38\x6f\x72\x57\x50\x65\x36\x57\x51\x57','\x45\x38\x6f\x73\x57\x34\x50\x47\x57\x34\x7a\x38\x62\x43\x6f\x4a\x78\x62\x4b','\x57\x51\x5a\x64\x54\x43\x6b\x4e\x44\x4b\x79\x75\x79\x38\x6b\x6d\x64\x38\x6b\x43\x77\x67\x69','\x57\x50\x38\x62\x6e\x53\x6b\x55\x57\x52\x65\x58\x57\x35\x61','\x7a\x6d\x6b\x43\x57\x4f\x65\x4b\x72\x57','\x57\x4f\x34\x46\x57\x51\x33\x63\x4b\x6d\x6b\x32\x57\x36\x5a\x63\x4d\x38\x6b\x53\x71\x47','\x57\x35\x65\x58\x57\x35\x57\x50\x57\x35\x69\x50\x57\x52\x58\x4e','\x57\x51\x54\x42\x57\x37\x6c\x63\x52\x38\x6f\x33\x71\x61\x78\x63\x51\x4a\x64\x63\x4e\x47','\x77\x53\x6b\x6b\x57\x52\x5a\x64\x4c\x43\x6f\x78\x62\x43\x6f\x41\x6b\x61','\x57\x37\x42\x63\x50\x53\x6f\x58\x61\x47\x30','\x57\x37\x31\x37\x57\x4f\x6d\x67\x57\x51\x79','\x57\x4f\x46\x63\x4f\x53\x6f\x72\x6b\x66\x34','\x57\x35\x7a\x49\x57\x36\x4e\x63\x49\x75\x54\x4e','\x69\x6d\x6f\x35\x44\x63\x79','\x61\x38\x6b\x6c\x73\x6d\x6f\x4f\x66\x71','\x57\x4f\x2f\x64\x4d\x38\x6f\x6f\x76\x62\x53','\x57\x36\x4e\x63\x4e\x31\x69\x48\x57\x52\x53','\x7a\x64\x48\x56\x64\x57','\x76\x53\x6b\x78\x57\x50\x4e\x64\x4a\x53\x6f\x61\x68\x6d\x6f\x41\x6b\x61','\x6e\x30\x54\x5a\x6b\x43\x6b\x38\x57\x50\x52\x63\x52\x67\x53','\x57\x37\x37\x64\x55\x47\x31\x4e\x41\x47','\x76\x61\x70\x64\x4d\x76\x69\x6c','\x64\x6d\x6b\x38\x6b\x6d\x6f\x65','\x6a\x67\x38\x52\x57\x34\x64\x64\x47\x57','\x57\x34\x34\x79\x45\x38\x6b\x68','\x57\x34\x6a\x64\x57\x50\x58\x71\x57\x51\x37\x63\x52\x49\x76\x37','\x57\x4f\x50\x76\x6b\x43\x6b\x6f\x68\x53\x6f\x30\x57\x36\x2f\x63\x51\x53\x6b\x63\x57\x35\x65','\x57\x36\x31\x39\x44\x64\x44\x33','\x72\x71\x6a\x54\x46\x5a\x69','\x57\x51\x53\x58\x57\x50\x68\x64\x54\x43\x6b\x57\x72\x49\x4e\x64\x53\x57','\x45\x43\x6b\x73\x43\x53\x6f\x58\x6a\x57','\x57\x37\x5a\x64\x4f\x58\x57\x34\x78\x57','\x57\x35\x7a\x38\x57\x50\x57\x36\x57\x51\x52\x64\x53\x71','\x57\x51\x70\x64\x48\x53\x6b\x30\x57\x51\x71\x66','\x57\x51\x6d\x6e\x71\x38\x6b\x57\x64\x48\x42\x64\x54\x43\x6f\x42\x75\x67\x43','\x44\x6d\x6f\x55\x68\x38\x6f\x6d\x70\x57','\x69\x53\x6f\x56\x78\x64\x57\x30\x57\x4f\x4f\x53\x72\x57','\x78\x43\x6b\x4f\x7a\x38\x6f\x65\x6e\x38\x6f\x72\x57\x4f\x6c\x63\x56\x71','\x57\x34\x47\x6a\x46\x6d\x6f\x6e\x6a\x43\x6f\x79','\x46\x38\x6b\x4b\x6b\x32\x72\x4f\x57\x35\x53\x41\x77\x33\x4f\x53\x45\x6d\x6b\x52','\x57\x35\x48\x61\x57\x52\x7a\x71\x57\x52\x71','\x78\x6d\x6b\x6f\x57\x37\x5a\x63\x50\x43\x6f\x79\x78\x43\x6b\x63\x79\x38\x6b\x2f\x57\x37\x6a\x77\x57\x52\x53','\x46\x6d\x6b\x77\x57\x50\x37\x64\x47\x43\x6f\x4f','\x6b\x4b\x50\x33\x70\x43\x6b\x4b\x57\x50\x52\x63\x52\x67\x53','\x71\x38\x6b\x6a\x65\x31\x46\x63\x47\x38\x6b\x32\x57\x52\x42\x63\x48\x57','\x57\x35\x66\x4f\x57\x35\x56\x63\x4a\x31\x50\x4d\x57\x51\x50\x51','\x45\x6d\x6b\x4a\x6c\x65\x78\x63\x56\x71','\x70\x6d\x6f\x37\x57\x52\x46\x64\x4c\x38\x6b\x48','\x57\x35\x62\x54\x57\x52\x61\x32\x57\x51\x46\x64\x52\x68\x33\x63\x4c\x47','\x57\x37\x37\x63\x4b\x75\x4f\x53\x57\x51\x74\x64\x56\x4a\x33\x64\x4e\x61','\x64\x43\x6b\x78\x44\x53\x6b\x32\x6a\x61','\x78\x6d\x6b\x77\x57\x52\x52\x64\x48\x53\x6f\x41\x65\x6d\x6f\x6b\x64\x61','\x6c\x72\x33\x64\x53\x53\x6b\x7a\x6c\x57','\x65\x4c\x74\x63\x4e\x72\x76\x44\x6b\x53\x6b\x4f\x73\x6d\x6b\x6b\x57\x37\x38\x72\x64\x61','\x64\x73\x33\x64\x53\x30\x66\x76','\x57\x35\x76\x52\x57\x36\x2f\x63\x53\x67\x43','\x57\x36\x78\x64\x55\x43\x6b\x4d\x57\x36\x76\x34\x57\x51\x61\x6f\x6d\x71','\x57\x4f\x33\x63\x56\x32\x46\x64\x4d\x43\x6f\x52','\x57\x35\x4e\x64\x50\x73\x71\x56\x76\x71','\x67\x53\x6f\x79\x57\x52\x64\x64\x54\x6d\x6b\x67\x6c\x6d\x6b\x50\x7a\x47','\x62\x57\x70\x64\x50\x53\x6b\x46\x6d\x74\x64\x63\x4c\x68\x57','\x57\x36\x74\x64\x4c\x59\x57\x6a\x42\x71','\x41\x66\x4e\x63\x53\x47\x35\x62\x57\x36\x31\x36\x76\x6d\x6b\x6d\x57\x34\x4f','\x57\x36\x4e\x64\x55\x47\x43\x34\x74\x4e\x4e\x64\x53\x53\x6f\x72','\x46\x53\x6f\x77\x68\x43\x6f\x75\x65\x57','\x6b\x43\x6b\x7a\x77\x53\x6f\x33\x61\x61','\x57\x52\x74\x63\x47\x4b\x6c\x64\x4e\x6d\x6f\x4f\x57\x50\x52\x64\x4b\x72\x61','\x57\x52\x42\x63\x47\x77\x2f\x64\x49\x43\x6f\x45','\x57\x37\x74\x64\x51\x63\x44\x49\x44\x38\x6f\x4b\x57\x4f\x6a\x32','\x57\x51\x4a\x64\x4a\x6d\x6f\x45\x42\x61\x61\x6a\x57\x50\x69\x48','\x6b\x43\x6b\x30\x77\x67\x2f\x63\x56\x48\x71\x46\x57\x37\x46\x63\x50\x38\x6f\x6e\x6a\x47\x37\x63\x49\x57','\x6c\x6d\x6b\x66\x57\x36\x72\x70\x57\x4f\x65\x2f\x70\x43\x6b\x37','\x57\x34\x4c\x41\x7a\x62\x58\x44','\x67\x53\x6b\x52\x7a\x38\x6b\x55\x67\x6d\x6b\x75\x57\x52\x31\x68','\x6d\x6d\x6f\x31\x57\x4f\x71\x72\x57\x51\x6d','\x57\x37\x5a\x64\x48\x61\x46\x63\x49\x57','\x57\x50\x42\x63\x55\x48\x68\x64\x4d\x47\x71','\x57\x51\x64\x63\x4a\x58\x64\x64\x53\x71','\x41\x62\x61\x37\x42\x53\x6b\x6a\x57\x51\x33\x63\x52\x75\x2f\x64\x48\x53\x6f\x44','\x78\x68\x58\x69\x57\x4f\x46\x63\x4e\x47'];_0x23cf=function(){return _0xcdd6d3;};return _0x23cf();}function _0x304f(_0x15e979,_0x1cf662){_0x15e979=_0x15e979-(0xf45*0x1+0x20d5+-0x2f57);const _0x28aa37=_0x23cf();let _0x323708=_0x28aa37[_0x15e979];if(_0x304f['\x45\x52\x4b\x69\x58\x68']===undefined){var _0x16dd7d=function(_0x49836){const _0x4ea6ce='\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 _0x41f987='',_0x5133f0='',_0x2b8d27=_0x41f987+_0x16dd7d,_0x1c9828=(''+function(){return-0xa*-0xd+-0x3*0x503+0xe87;})['\x69\x6e\x64\x65\x78\x4f\x66']('\x0a')!==-(-0xd*-0xb3+0x1*-0x7eb+-0xd*0x17);for(let _0x1fd01a=0x397*-0x3+-0x1078+0x1b3d,_0x47b1a7,_0x452399,_0x4a84b7=0x1d11+0x13*0x1a0+-0x3bf1;_0x452399=_0x49836['\x63\x68\x61\x72\x41\x74'](_0x4a84b7++);~_0x452399&&(_0x47b1a7=_0x1fd01a%(-0x1*-0x1d1e+-0x1*-0x10ba+0xe*-0x346)?_0x47b1a7*(-0x2066+0x37d*0x5+0xf35)+_0x452399:_0x452399,_0x1fd01a++%(-0x2546*-0x1+0x1a6f+-0x3fb1))?_0x41f987+=_0x1c9828||_0x2b8d27['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x4a84b7+(-0x9a9*0x1+0x5*0x441+-0xb92))-(0x2254+-0x11b4+-0x1096)!==-0xf0f+0x19c0+0x7*-0x187?String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0x117+-0x26f1+-0x1*-0x26d9&_0x47b1a7>>(-(-0x12b4+0x515+0x48b*0x3)*_0x1fd01a&-0xe05+-0x1*0x1b2f+-0xdbe*-0x3)):_0x1fd01a:0x230d+-0x181e+-0x9*0x137){_0x452399=_0x4ea6ce['\x69\x6e\x64\x65\x78\x4f\x66'](_0x452399);}for(let _0x85731d=0x599*-0x6+-0x1baa+0x3d40,_0x3ac6eb=_0x41f987['\x6c\x65\x6e\x67\x74\x68'];_0x85731d<_0x3ac6eb;_0x85731d++){_0x5133f0+='\x25'+('\x30\x30'+_0x41f987['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x85731d)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](-0x16ca+-0x12e8+0x29c2))['\x73\x6c\x69\x63\x65'](-(0x15*-0x7e+-0x1c47+0x1*0x269f));}return decodeURIComponent(_0x5133f0);};const _0x1fd47a=function(_0x417306,_0x3d10e8){let _0x1fbb80=[],_0x803862=0x4d6*0x2+0x5*0x45d+-0x1f7d,_0x5b8268,_0x4e09eb='';_0x417306=_0x16dd7d(_0x417306);let _0x541560;for(_0x541560=0x1f49+-0x2*-0x15d+-0x2203;_0x541560<-0x26e1+-0x181a+0x3ffb;_0x541560++){_0x1fbb80[_0x541560]=_0x541560;}for(_0x541560=0x10b4+-0x204+0x178*-0xa;_0x541560<0x1f6a+-0xb59+-0x1311;_0x541560++){_0x803862=(_0x803862+_0x1fbb80[_0x541560]+_0x3d10e8['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x541560%_0x3d10e8['\x6c\x65\x6e\x67\x74\x68']))%(0x5b2*-0x4+-0x21f7+-0x1*-0x39bf),_0x5b8268=_0x1fbb80[_0x541560],_0x1fbb80[_0x541560]=_0x1fbb80[_0x803862],_0x1fbb80[_0x803862]=_0x5b8268;}_0x541560=-0x31*0x7b+0x1*0xccc+0x395*0x3,_0x803862=0x2690+-0x595+-0x20fb;for(let _0x45ec75=-0x28d*0x1+-0x20fc+0x2389;_0x45ec75<_0x417306['\x6c\x65\x6e\x67\x74\x68'];_0x45ec75++){_0x541560=(_0x541560+(0x16e5+0x26f4+-0x3dd8))%(0x157c+0x2*-0xaac+0xdc),_0x803862=(_0x803862+_0x1fbb80[_0x541560])%(0x20af+0x2606+0x45b5*-0x1),_0x5b8268=_0x1fbb80[_0x541560],_0x1fbb80[_0x541560]=_0x1fbb80[_0x803862],_0x1fbb80[_0x803862]=_0x5b8268,_0x4e09eb+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x417306['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x45ec75)^_0x1fbb80[(_0x1fbb80[_0x541560]+_0x1fbb80[_0x803862])%(0x1*0xa36+-0x4*0x96e+0x59*0x52)]);}return _0x4e09eb;};_0x304f['\x72\x59\x4a\x61\x6f\x7a']=_0x1fd47a,_0x304f['\x58\x4d\x47\x61\x56\x46']={},_0x304f['\x45\x52\x4b\x69\x58\x68']=!![];}const _0x1ae700=_0x28aa37[0x1*-0x13b1+0x43e+0x5*0x317],_0x593eee=_0x15e979+_0x1ae700,_0x1cbfec=_0x304f['\x58\x4d\x47\x61\x56\x46'][_0x593eee];if(!_0x1cbfec){if(_0x304f['\x47\x41\x67\x67\x4e\x6f']===undefined){const _0x14b836=function(_0x58dc48){this['\x6b\x46\x47\x77\x54\x68']=_0x58dc48,this['\x43\x46\x67\x6e\x76\x42']=[-0x136f+-0xb*0x289+-0x5*-0x977,-0x165c+0x481*0x1+0x11db,0x4*-0x714+-0x7da+0x242a],this['\x53\x68\x59\x57\x41\x42']=function(){return'\x6e\x65\x77\x53\x74\x61\x74\x65';},this['\x44\x42\x79\x75\x41\x47']='\x5c\x77\x2b\x20\x2a\x5c\x28\x5c\x29\x20\x2a\x7b\x5c\x77\x2b\x20\x2a',this['\x59\x76\x4c\x50\x4c\x56']='\x5b\x27\x7c\x22\x5d\x2e\x2b\x5b\x27\x7c\x22\x5d\x3b\x3f\x20\x2a\x7d';};_0x14b836['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x41\x4d\x4a\x41\x73\x4a']=function(){const _0x40d116=new RegExp(this['\x44\x42\x79\x75\x41\x47']+this['\x59\x76\x4c\x50\x4c\x56']),_0x4d9547=_0x40d116['\x74\x65\x73\x74'](this['\x53\x68\x59\x57\x41\x42']['\x74\x6f\x53\x74\x72\x69\x6e\x67']())?--this['\x43\x46\x67\x6e\x76\x42'][0xa82*0x3+0x259+0xff*-0x22]:--this['\x43\x46\x67\x6e\x76\x42'][-0xef*0x3+-0x1*0x1fc7+0x114a*0x2];return this['\x76\x42\x6b\x42\x61\x66'](_0x4d9547);},_0x14b836['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x76\x42\x6b\x42\x61\x66']=function(_0x325cb7){if(!Boolean(~_0x325cb7))return _0x325cb7;return this['\x78\x55\x4f\x61\x47\x4f'](this['\x6b\x46\x47\x77\x54\x68']);},_0x14b836['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x78\x55\x4f\x61\x47\x4f']=function(_0x2d8a03){for(let _0x1ee671=-0x7*0x269+-0x963*-0x4+0x1*-0x14ad,_0x62b217=this['\x43\x46\x67\x6e\x76\x42']['\x6c\x65\x6e\x67\x74\x68'];_0x1ee671<_0x62b217;_0x1ee671++){this['\x43\x46\x67\x6e\x76\x42']['\x70\x75\x73\x68'](Math['\x72\x6f\x75\x6e\x64'](Math['\x72\x61\x6e\x64\x6f\x6d']())),_0x62b217=this['\x43\x46\x67\x6e\x76\x42']['\x6c\x65\x6e\x67\x74\x68'];}return _0x2d8a03(this['\x43\x46\x67\x6e\x76\x42'][0x2*0xba7+0x1131*-0x1+-0x61d]);},(''+function(){return-0x19c6+-0xf23+0xda3*0x3;})['\x69\x6e\x64\x65\x78\x4f\x66']('\x0a')===-(-0x3*-0xe3+-0x1157*0x2+-0x2*-0x1003)&&new _0x14b836(_0x304f)['\x41\x4d\x4a\x41\x73\x4a'](),_0x304f['\x47\x41\x67\x67\x4e\x6f']=!![];}_0x323708=_0x304f['\x72\x59\x4a\x61\x6f\x7a'](_0x323708,_0x1cf662),_0x304f['\x58\x4d\x47\x61\x56\x46'][_0x593eee]=_0x323708;}else _0x323708=_0x1cbfec;return _0x323708;}_0x4a17f3[_0x56fc10(0x136,'\x30\x55\x43\x21')+_0x56fc10(0x105,'\x23\x4e\x50\x63')]=0x0,_0x4a17f3[_0x56fc10(0xed,'\x65\x51\x5d\x71')+'\x6f\x6b\x65\x6e\x73']=0x0,_0x4a17f3[_0x56fc10(0xc5,'\x2a\x5b\x45\x66')+_0x56fc10(0x130,'\x38\x2a\x42\x64')]=0x0,_0x4a17f3[_0x56fc10(0x133,'\x2a\x5b\x45\x66')]=0x0,_0x4a17f3[_0x56fc10(0xdd,'\x5a\x5e\x35\x44')]=![];const _0x6294a1=Object[_0x56fc10(0x109,'\x6a\x55\x64\x63')](_0x4a17f3);function _0x382895(_0x28cee0){const _0x3245b0=_0x56fc10,_0x7fcfd0={'\x61\x6c\x43\x66\x42':function(_0x332e46,_0x271a81){return _0x332e46(_0x271a81);},'\x57\x4b\x53\x74\x62':function(_0x5dcf94,_0x164246){return _0x5dcf94*_0x164246;}},_0x27a2c3=_0x28cee0&&(_0x28cee0[_0x3245b0(0x102,'\x4d\x6c\x6a\x57')+'\x70']||_0x28cee0['\x63\x72\x65\x61\x74\x65\x64\x41'+_0x3245b0(0xf5,'\x2a\x6d\x64\x5a')]);if(_0x27a2c3){const _0x1cf0a0=Date[_0x3245b0(0xd4,'\x5e\x49\x4f\x62')](_0x27a2c3);if(Number[_0x3245b0(0xc4,'\x39\x6b\x6a\x58')](_0x1cf0a0))return _0x1cf0a0;}if(_0x28cee0&&Number[_0x3245b0(0x106,'\x35\x57\x4c\x32')](_0x7fcfd0[_0x3245b0(0xd7,'\x66\x4e\x71\x21')](Number,_0x28cee0['\x63\x72\x65\x61\x74\x65\x64\x41'+'\x74'])))return _0x7fcfd0[_0x3245b0(0x10c,'\x37\x5d\x71\x5b')](Number(_0x28cee0[_0x3245b0(0x148,'\x52\x6a\x35\x54')+'\x74']),0x171*0x9+0x2248*0x1+0x9*-0x4d1);return null;}function _0xddeaba(_0x1e1902={}){const _0x511b4b=_0x56fc10,_0x480713={'\x5a\x52\x4b\x76\x77':_0x511b4b(0x13b,'\x67\x64\x6d\x23'),'\x54\x4e\x64\x48\x45':function(_0x15476b){return _0x15476b();},'\x54\x44\x75\x77\x6d':function(_0x59d6e9,_0x179f43){return _0x59d6e9!=_0x179f43;},'\x50\x62\x45\x57\x4b':function(_0x43a3bb,_0x427ac6){return _0x43a3bb===_0x427ac6;},'\x77\x5a\x58\x67\x4b':_0x511b4b(0x13a,'\x35\x57\x6b\x52'),'\x54\x50\x52\x46\x45':_0x511b4b(0x12c,'\x49\x42\x2a\x38'),'\x71\x46\x46\x6b\x7a':function(_0x1585f0,_0x450bcc){return _0x1585f0===_0x450bcc;},'\x53\x4d\x73\x4a\x4b':_0x511b4b(0xc6,'\x5a\x5e\x35\x44'),'\x68\x6f\x4e\x4a\x42':function(_0x559230){return _0x559230();},'\x70\x62\x72\x77\x42':function(_0x338953,_0x4e362b){return _0x338953===_0x4e362b;},'\x55\x67\x4a\x64\x6f':_0x511b4b(0x144,'\x41\x79\x50\x58'),'\x70\x41\x69\x55\x77':_0x511b4b(0x151,'\x4e\x38\x67\x40'),'\x47\x48\x70\x54\x64':_0x511b4b(0xf1,'\x61\x5d\x77\x59'),'\x4f\x56\x4b\x79\x44':function(_0x19ad7c,_0x5de16c,_0x372b3e){return _0x19ad7c(_0x5de16c,_0x372b3e);},'\x43\x6d\x52\x6f\x70':function(_0x2f3b6c,_0x546a70){return _0x2f3b6c!==_0x546a70;},'\x45\x49\x52\x53\x73':_0x511b4b(0xd5,'\x65\x57\x77\x78'),'\x43\x6f\x6b\x76\x4e':'\x75\x4f\x6c\x63\x46','\x44\x65\x75\x59\x6f':function(_0x55188c,_0x2c8b89){return _0x55188c(_0x2c8b89);},'\x44\x51\x76\x6f\x58':function(_0xde62fd,_0x4d5777){return _0xde62fd==_0x4d5777;},'\x6d\x71\x7a\x43\x58':function(_0x36222d,_0x33ef13){return _0x36222d>_0x33ef13;},'\x65\x4c\x6f\x48\x54':function(_0x329e94,_0x5000f8){return _0x329e94>_0x5000f8;},'\x45\x73\x75\x42\x78':function(_0x56ead0,_0x359d4a){return _0x56ead0||_0x359d4a;}},_0x1e5b55=_0x1e1902&&_0x480713['\x54\x44\x75\x77\x6d'](_0x1e1902[_0x511b4b(0x101,'\x2a\x6d\x64\x5a')],null)?Date['\x70\x61\x72\x73\x65'](_0x1e1902[_0x511b4b(0x101,'\x2a\x6d\x64\x5a')]):NaN,_0x444286={..._0x6294a1};if(!Number[_0x511b4b(0x135,'\x6a\x32\x4c\x48')](_0x1e5b55))return _0x444286;const _0x3b9e71=_0x1e1902&&_0x480713[_0x511b4b(0xca,'\x6b\x63\x57\x25')](_0x1e1902[_0x511b4b(0xf8,'\x23\x69\x66\x43')],null)&&Number[_0x511b4b(0x100,'\x4e\x38\x67\x40')](Date[_0x511b4b(0x11a,'\x39\x6b\x6a\x58')](_0x1e1902[_0x511b4b(0xcf,'\x37\x62\x59\x62')]))?Date[_0x511b4b(0x138,'\x48\x6b\x61\x40')](_0x1e1902[_0x511b4b(0xdb,'\x6f\x4c\x79\x76')]):Date[_0x511b4b(0xf3,'\x6a\x28\x76\x53')]();let _0x2243ff;try{if(_0x480713[_0x511b4b(0xfb,'\x65\x51\x5d\x71')](_0x480713[_0x511b4b(0x113,'\x66\x28\x76\x71')],_0x480713[_0x511b4b(0xdc,'\x23\x4e\x50\x63')]))_0x887033=_0x9b0c21(_0x4a8de1,_0x4b99a2);else{const _0x3574e5=_0x480713[_0x511b4b(0x13f,'\x36\x36\x46\x64')](_0x243318),_0x16abb3={..._0x6294a1};if(!_0x33926e[_0x511b4b(0x121,'\x52\x6a\x35\x54')+'\x6e\x63'](_0x3574e5))return _0x16abb3;_0x2243ff=_0x33926e[_0x511b4b(0xe5,'\x43\x4c\x61\x55')+_0x511b4b(0x115,'\x72\x65\x61\x78')](_0x3574e5,_0x511b4b(0x134,'\x36\x36\x46\x64'));}}catch(_0x4b57ac){if(_0x480713[_0x511b4b(0xff,'\x6a\x55\x64\x63')]('\x55\x73\x75\x72\x68',_0x511b4b(0xf9,'\x23\x69\x66\x43'))){const _0x44e724={..._0x6294a1};return _0x44e724;}else{const _0x2c7cd1=_0xc6cbd4[_0x511b4b(0x142,'\x43\x4c\x61\x55')](_0x5d2e64);if(_0x4ff312[_0x511b4b(0xd0,'\x6f\x64\x30\x55')](_0x2c7cd1))return _0x2c7cd1;}}let _0x526ea0=null;try{if(_0x511b4b(0x146,'\x5e\x49\x4f\x62')===_0x480713[_0x511b4b(0xc3,'\x37\x62\x59\x62')])_0x526ea0=_0x480713[_0x511b4b(0xfc,'\x66\x4e\x71\x21')](_0xacfde9);else{const _0x5d64be=_0x4a4247(),_0x542aa3={..._0x4b3da1};if(!_0xe6f0ea[_0x511b4b(0xd3,'\x43\x4c\x61\x55')+'\x6e\x63'](_0x5d64be))return _0x542aa3;_0x3658d3=_0x168f28[_0x511b4b(0x129,'\x4f\x58\x4a\x76')+_0x511b4b(0xe1,'\x65\x51\x5d\x71')](_0x5d64be,_0x480713[_0x511b4b(0xcd,'\x66\x4e\x71\x21')]);}}catch(_0x12abd3){_0x526ea0=null;}let _0x2349c0=0x62*0x7+0x171f*-0x1+-0x1*-0x1471,_0x2c2597=0x6*-0x1a6+-0x1a26*-0x1+-0x1042,_0x47a7d6=-0xe76+-0x7+-0xe7d*-0x1;for(const _0x3c541b of _0x2243ff[_0x511b4b(0x14b,'\x6a\x56\x42\x4f')]('\x0a')){if(_0x480713['\x70\x62\x72\x77\x42'](_0x480713[_0x511b4b(0xce,'\x43\x4c\x61\x55')],_0x480713[_0x511b4b(0xfd,'\x35\x57\x4c\x32')]))_0x1d4e95=_0x480713[_0x511b4b(0x112,'\x6a\x56\x42\x4f')](_0x4f1e1a);else{const _0x1cab1b=_0x3c541b[_0x511b4b(0xee,'\x6a\x32\x4c\x48')]();if(!_0x1cab1b)continue;let _0x1452ae;try{_0x480713['\x47\x48\x70\x54\x64']===_0x480713[_0x511b4b(0x141,'\x52\x6a\x35\x54')]?_0x1452ae=JSON[_0x511b4b(0x123,'\x37\x5d\x71\x5b')](_0x1cab1b):_0x29356=_0x1c93fc[_0x511b4b(0xd4,'\x5e\x49\x4f\x62')](_0x2be4a5);}catch(_0x30aba5){continue;}if(_0x1452ae&&_0x1452ae[_0x511b4b(0x12b,'\x6a\x32\x4c\x48')+'\x64']){if(!_0x526ea0)continue;try{_0x1452ae=_0x480713[_0x511b4b(0x11d,'\x72\x65\x61\x78')](_0xec99b3,_0x1452ae,_0x526ea0);}catch(_0x42d46f){if(_0x480713[_0x511b4b(0x12e,'\x4d\x6c\x6a\x57')](_0x480713['\x45\x49\x52\x53\x73'],_0x480713[_0x511b4b(0x110,'\x4f\x58\x4a\x76')]))continue;else _0x1ab6d0=null;}}if(!_0x1452ae||_0x480713[_0x511b4b(0xc8,'\x6f\x64\x30\x55')](typeof _0x1452ae,_0x511b4b(0x143,'\x39\x6b\x6a\x58')))continue;const _0x4a598f=_0x480713[_0x511b4b(0x132,'\x51\x76\x25\x5a')](_0x382895,_0x1452ae);if(_0x480713['\x44\x51\x76\x6f\x58'](_0x4a598f,null)||_0x4a598f<_0x1e5b55||_0x4a598f>_0x3b9e71)continue;const _0x52ad22=_0x480713[_0x511b4b(0x122,'\x72\x7a\x37\x79')](Number,_0x1452ae[_0x511b4b(0xe8,'\x43\x4c\x61\x55')+_0x511b4b(0x139,'\x57\x35\x31\x66')]),_0x1c7b5f=_0x480713[_0x511b4b(0x12d,'\x39\x6b\x6a\x58')](Number,_0x1452ae[_0x511b4b(0xe7,'\x57\x35\x31\x66')+_0x511b4b(0x104,'\x39\x6b\x6a\x58')]),_0x352a9e=Number[_0x511b4b(0xd8,'\x72\x7a\x37\x79')](_0x52ad22)&&_0x480713['\x6d\x71\x7a\x43\x58'](_0x52ad22,-0x11db+-0x1fb2+0x318d),_0x35c3b2=Number[_0x511b4b(0x147,'\x38\x2a\x42\x64')](_0x1c7b5f)&&_0x480713[_0x511b4b(0xe0,'\x65\x51\x5d\x71')](_0x1c7b5f,0x47*0x21+0x1b9c+0x3*-0xc41);if(_0x352a9e)_0x2349c0+=_0x52ad22;if(_0x35c3b2)_0x2c2597+=_0x1c7b5f;if(_0x480713[_0x511b4b(0x118,'\x6a\x56\x42\x4f')](_0x352a9e,_0x35c3b2))_0x47a7d6+=0x1c3e+-0x191*-0x14+-0x3b91;}}const _0x195268={..._0x6294a1};if(_0x480713[_0x511b4b(0xf4,'\x33\x33\x79\x28')](_0x47a7d6,0x24f3+-0x1fc1*-0x1+-0x2*0x225a))return _0x195268;const _0x433f92={};return _0x433f92['\x69\x6e\x70\x75\x74\x5f\x74\x6f'+_0x511b4b(0xf7,'\x36\x36\x46\x64')]=_0x2349c0,_0x433f92[_0x511b4b(0xef,'\x6a\x56\x42\x4f')+'\x6f\x6b\x65\x6e\x73']=_0x2c2597,_0x433f92[_0x511b4b(0x14e,'\x30\x55\x43\x21')+'\x6b\x65\x6e\x73']=_0x2349c0+_0x2c2597,_0x433f92[_0x511b4b(0x137,'\x72\x7a\x37\x79')]=_0x47a7d6,_0x433f92[_0x511b4b(0xcc,'\x5a\x21\x4e\x34')]=!![],_0x433f92;}const _0x5629cc={};_0x5629cc[_0x56fc10(0x10f,'\x6b\x63\x57\x25')+_0x56fc10(0x108,'\x76\x67\x30\x6b')]=_0xddeaba,module[_0x56fc10(0x11b,'\x6f\x4c\x79\x76')]=_0x5629cc;
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Per-run token-usage rollup over the proxy trace log.
|
|
4
|
+
//
|
|
5
|
+
// The local proxy (src/proxy) meters real Anthropic input/output tokens for
|
|
6
|
+
// every Hand /v1/messages call into proxy-traces.jsonl. This reads that log
|
|
7
|
+
// back -- decrypting encrypted rows with the local EvoMap node secret -- and
|
|
8
|
+
// sums the real tokens spent within a time window, giving solidify the
|
|
9
|
+
// MEASURED cost of a derive loop.
|
|
10
|
+
//
|
|
11
|
+
// Best-effort by design: returns measured:false (and never throws) when the
|
|
12
|
+
// proxy was inactive, the node secret is missing, no rows fall in the window,
|
|
13
|
+
// or the in-window rows carried no usage (e.g. streamed-but-unobserved calls).
|
|
14
|
+
// Callers fall back to a grounded estimate in that case.
|
|
15
|
+
|
|
16
|
+
const fs = require('fs');
|
|
17
|
+
const {
|
|
18
|
+
resolveTraceFile,
|
|
19
|
+
resolveEvomapNodeSecret,
|
|
20
|
+
decryptTraceEnvelope,
|
|
21
|
+
} = require('./extractor');
|
|
22
|
+
|
|
23
|
+
const EMPTY = Object.freeze({
|
|
24
|
+
input_tokens: 0,
|
|
25
|
+
output_tokens: 0,
|
|
26
|
+
total_tokens: 0,
|
|
27
|
+
calls: 0,
|
|
28
|
+
measured: false,
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
function _rowTimestampMs(row) {
|
|
32
|
+
const iso = row && (row.timestamp || row.createdAtIso);
|
|
33
|
+
if (iso) {
|
|
34
|
+
const ms = Date.parse(iso);
|
|
35
|
+
if (Number.isFinite(ms)) return ms;
|
|
36
|
+
}
|
|
37
|
+
// createdAt is unix seconds in the Prism trace shape.
|
|
38
|
+
if (row && Number.isFinite(Number(row.createdAt))) return Number(row.createdAt) * 1000;
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Sum the real token usage the proxy recorded within a run's time window.
|
|
44
|
+
*
|
|
45
|
+
* @param {object} opts
|
|
46
|
+
* @param {string} opts.sinceIso - REQUIRED lower bound (e.g. last_run.created_at).
|
|
47
|
+
* Without a window we cannot attribute traces to this run, so we report
|
|
48
|
+
* unmeasured rather than summing unrelated calls.
|
|
49
|
+
* @param {string} [opts.untilIso] - upper bound; defaults to now.
|
|
50
|
+
* @returns {{input_tokens:number,output_tokens:number,total_tokens:number,calls:number,measured:boolean}}
|
|
51
|
+
*/
|
|
52
|
+
function sumRunUsage(opts = {}) {
|
|
53
|
+
const sinceMs = opts && opts.sinceIso != null ? Date.parse(opts.sinceIso) : NaN;
|
|
54
|
+
if (!Number.isFinite(sinceMs)) return { ...EMPTY };
|
|
55
|
+
const untilMs = opts && opts.untilIso != null && Number.isFinite(Date.parse(opts.untilIso))
|
|
56
|
+
? Date.parse(opts.untilIso)
|
|
57
|
+
: Date.now();
|
|
58
|
+
|
|
59
|
+
let raw;
|
|
60
|
+
try {
|
|
61
|
+
const file = resolveTraceFile();
|
|
62
|
+
if (!fs.existsSync(file)) return { ...EMPTY };
|
|
63
|
+
raw = fs.readFileSync(file, 'utf8');
|
|
64
|
+
} catch (_) {
|
|
65
|
+
return { ...EMPTY };
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
let secret = null;
|
|
69
|
+
try { secret = resolveEvomapNodeSecret(); } catch (_) { secret = null; }
|
|
70
|
+
|
|
71
|
+
let input = 0;
|
|
72
|
+
let output = 0;
|
|
73
|
+
let calls = 0;
|
|
74
|
+
for (const line of raw.split('\n')) {
|
|
75
|
+
const s = line.trim();
|
|
76
|
+
if (!s) continue;
|
|
77
|
+
let row;
|
|
78
|
+
try { row = JSON.parse(s); } catch (_) { continue; }
|
|
79
|
+
if (row && row.encrypted) {
|
|
80
|
+
if (!secret) continue; // cannot decrypt -> treat as unobserved
|
|
81
|
+
try { row = decryptTraceEnvelope(row, secret); } catch (_) { continue; }
|
|
82
|
+
}
|
|
83
|
+
if (!row || typeof row !== 'object') continue;
|
|
84
|
+
const ms = _rowTimestampMs(row);
|
|
85
|
+
if (ms == null || ms < sinceMs || ms > untilMs) continue;
|
|
86
|
+
const i = Number(row.input_tokens);
|
|
87
|
+
const o = Number(row.output_tokens);
|
|
88
|
+
const hasI = Number.isFinite(i) && i > 0;
|
|
89
|
+
const hasO = Number.isFinite(o) && o > 0;
|
|
90
|
+
if (hasI) input += i;
|
|
91
|
+
if (hasO) output += o;
|
|
92
|
+
if (hasI || hasO) calls += 1;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (calls === 0) return { ...EMPTY };
|
|
96
|
+
return {
|
|
97
|
+
input_tokens: input,
|
|
98
|
+
output_tokens: output,
|
|
99
|
+
total_tokens: input + output,
|
|
100
|
+
calls,
|
|
101
|
+
measured: true,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
module.exports = { sumRunUsage };
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
## Contributing
|
|
2
|
-
|
|
3
|
-
Thank you for contributing. Please follow these rules:
|
|
4
|
-
|
|
5
|
-
- Do not use emoji (except the DNA emoji in documentation if needed).
|
|
6
|
-
- Keep changes small and reviewable.
|
|
7
|
-
- Update related documentation when you change behavior.
|
|
8
|
-
- Run `node index.js` for a quick sanity check.
|
|
9
|
-
|
|
10
|
-
Submit PRs with clear intent and scope.
|
|
11
|
-
|
|
12
|
-
### Engineering conventions
|
|
13
|
-
|
|
14
|
-
- **Spawn child CLIs as `node <entry.js>` — never via a `.cmd` shim, npm symlink, or bare command name.** When launching a harness/tool subprocess (claude-code, openclaw, codex, ...), resolve the JS entry behind the launcher and hand it to `node` directly. Two reasons:
|
|
15
|
-
1. On Windows, `child_process.spawn` without `shell:true` on a `.cmd`/`.bat` throws `EINVAL` since the CVE-2024-27980 fix (Node >=18.20.2 / 20.12.2 / 21.7.3) — this silently broke the auto-exec bridge on Windows.
|
|
16
|
-
2. Across platforms, shims/wrappers can emit warnings or silently exit on some machines. `node <entry>` is zero-shell, deterministic, and passes args via argv (no shell-injection surface).
|
|
17
|
-
|
|
18
|
-
`runChild` in `src/gep/execBridge.js` implements this for Windows npm shims (`_resolveNpmCmdShim`: parse the shim's `"%dp0%\<entry>" %*` exec line and rewrite `(bin, args)` -> `(process.execPath, [<entry>, ...args])`), falling back to the original target when it is not a recognized npm shim. POSIX binaries / wrappers spawn natively and are left unchanged. A unit test (`test/execBridgeSpawnNpmShim.test.js`) enforces the parser.
|
|
19
|
-
|
package/assets/cover.png
DELETED
|
Binary file
|
package/scripts/a2a_export.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
const { loadGenes, loadCapsules, readAllEvents } = require('../src/gep/assetStore');
|
|
2
|
-
const { exportEligibleCapsules, exportEligibleGenes, isAllowedA2AAsset } = require('../src/gep/a2a');
|
|
3
|
-
const { buildPublish, buildHello, getTransport } = require('../src/gep/a2aProtocol');
|
|
4
|
-
const { computeAssetId, SCHEMA_VERSION } = require('../src/gep/contentHash');
|
|
5
|
-
|
|
6
|
-
function main() {
|
|
7
|
-
var args = process.argv.slice(2);
|
|
8
|
-
var asJson = args.includes('--json');
|
|
9
|
-
var asProtocol = args.includes('--protocol');
|
|
10
|
-
var withHello = args.includes('--hello');
|
|
11
|
-
var persist = args.includes('--persist');
|
|
12
|
-
var includeEvents = args.includes('--include-events');
|
|
13
|
-
|
|
14
|
-
var capsules = loadCapsules();
|
|
15
|
-
var genes = loadGenes();
|
|
16
|
-
var events = readAllEvents();
|
|
17
|
-
|
|
18
|
-
// Build eligible list: Capsules (filtered) + Genes (filtered) + Events (opt-in)
|
|
19
|
-
var eligibleCapsules = exportEligibleCapsules({ capsules: capsules, events: events });
|
|
20
|
-
var eligibleGenes = exportEligibleGenes({ genes: genes });
|
|
21
|
-
var eligible = eligibleCapsules.concat(eligibleGenes);
|
|
22
|
-
|
|
23
|
-
if (includeEvents) {
|
|
24
|
-
var eligibleEvents = (Array.isArray(events) ? events : []).filter(function (e) {
|
|
25
|
-
return isAllowedA2AAsset(e) && e.type === 'EvolutionEvent';
|
|
26
|
-
});
|
|
27
|
-
for (var ei = 0; ei < eligibleEvents.length; ei++) {
|
|
28
|
-
var ev = eligibleEvents[ei];
|
|
29
|
-
if (!ev.schema_version) ev.schema_version = SCHEMA_VERSION;
|
|
30
|
-
if (!ev.asset_id) { try { ev.asset_id = computeAssetId(ev); } catch (e) {} }
|
|
31
|
-
}
|
|
32
|
-
eligible = eligible.concat(eligibleEvents);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
if (withHello || asProtocol) {
|
|
36
|
-
var hello = buildHello({ geneCount: genes.length, capsuleCount: capsules.length });
|
|
37
|
-
process.stdout.write(JSON.stringify(hello) + '\n');
|
|
38
|
-
if (persist) { try { getTransport().send(hello); } catch (e) {} }
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (asProtocol) {
|
|
42
|
-
for (var i = 0; i < eligible.length; i++) {
|
|
43
|
-
var msg = buildPublish({ asset: eligible[i] });
|
|
44
|
-
process.stdout.write(JSON.stringify(msg) + '\n');
|
|
45
|
-
if (persist) { try { getTransport().send(msg); } catch (e) {} }
|
|
46
|
-
}
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (asJson) {
|
|
51
|
-
process.stdout.write(JSON.stringify(eligible, null, 2) + '\n');
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
for (var j = 0; j < eligible.length; j++) {
|
|
56
|
-
process.stdout.write(JSON.stringify(eligible[j]) + '\n');
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
try { main(); } catch (e) {
|
|
61
|
-
process.stderr.write((e && e.message ? e.message : String(e)) + '\n');
|
|
62
|
-
process.exit(1);
|
|
63
|
-
}
|
package/scripts/a2a_ingest.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
var fs = require('fs');
|
|
2
|
-
var assetStore = require('../src/gep/assetStore');
|
|
3
|
-
var a2a = require('../src/gep/a2a');
|
|
4
|
-
var memGraph = require('../src/gep/memoryGraphAdapter');
|
|
5
|
-
var contentHash = require('../src/gep/contentHash');
|
|
6
|
-
var a2aProto = require('../src/gep/a2aProtocol');
|
|
7
|
-
|
|
8
|
-
function readStdin() {
|
|
9
|
-
try { return fs.readFileSync(0, 'utf8'); } catch (e) { return ''; }
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function parseSignalsFromEnv() {
|
|
13
|
-
var raw = process.env.A2A_SIGNALS || '';
|
|
14
|
-
if (!raw) return [];
|
|
15
|
-
try {
|
|
16
|
-
var maybe = JSON.parse(raw);
|
|
17
|
-
if (Array.isArray(maybe)) return maybe.map(String).filter(Boolean);
|
|
18
|
-
} catch (e) {}
|
|
19
|
-
return String(raw).split(',').map(function (s) { return s.trim(); }).filter(Boolean);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function main() {
|
|
23
|
-
var args = process.argv.slice(2);
|
|
24
|
-
var inputPath = '';
|
|
25
|
-
for (var i = 0; i < args.length; i++) {
|
|
26
|
-
if (args[i] && !args[i].startsWith('--')) { inputPath = args[i]; break; }
|
|
27
|
-
}
|
|
28
|
-
var source = process.env.A2A_SOURCE || 'external';
|
|
29
|
-
var factor = Number.isFinite(Number(process.env.A2A_EXTERNAL_CONFIDENCE_FACTOR))
|
|
30
|
-
? Number(process.env.A2A_EXTERNAL_CONFIDENCE_FACTOR) : 0.6;
|
|
31
|
-
|
|
32
|
-
var text = inputPath ? a2a.readTextIfExists(inputPath) : readStdin();
|
|
33
|
-
var parsed = a2a.parseA2AInput(text);
|
|
34
|
-
var signals = parseSignalsFromEnv();
|
|
35
|
-
|
|
36
|
-
var accepted = 0;
|
|
37
|
-
var rejected = 0;
|
|
38
|
-
var emitDecisions = process.env.A2A_EMIT_DECISIONS === 'true';
|
|
39
|
-
|
|
40
|
-
for (var j = 0; j < parsed.length; j++) {
|
|
41
|
-
var obj = parsed[j];
|
|
42
|
-
if (!a2a.isAllowedA2AAsset(obj)) continue;
|
|
43
|
-
|
|
44
|
-
if (obj.asset_id && typeof obj.asset_id === 'string') {
|
|
45
|
-
if (!contentHash.verifyAssetId(obj)) {
|
|
46
|
-
rejected += 1;
|
|
47
|
-
if (emitDecisions) {
|
|
48
|
-
try {
|
|
49
|
-
var dm = a2aProto.buildDecision({ assetId: obj.asset_id, localId: obj.id, decision: 'reject', reason: 'asset_id integrity check failed' });
|
|
50
|
-
a2aProto.getTransport().send(dm);
|
|
51
|
-
} catch (e) {}
|
|
52
|
-
}
|
|
53
|
-
continue;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
var staged = a2a.lowerConfidence(obj, { source: source, factor: factor });
|
|
58
|
-
if (!staged) continue;
|
|
59
|
-
|
|
60
|
-
assetStore.appendExternalCandidateJsonl(staged);
|
|
61
|
-
try { memGraph.recordExternalCandidate({ asset: staged, source: source, signals: signals }); } catch (e) {}
|
|
62
|
-
|
|
63
|
-
if (emitDecisions) {
|
|
64
|
-
try {
|
|
65
|
-
var dm2 = a2aProto.buildDecision({ assetId: staged.asset_id, localId: staged.id, decision: 'quarantine', reason: 'staged as external candidate' });
|
|
66
|
-
a2aProto.getTransport().send(dm2);
|
|
67
|
-
} catch (e) {}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
accepted += 1;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
process.stdout.write('accepted=' + accepted + ' rejected=' + rejected + '\n');
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
try { main(); } catch (e) {
|
|
77
|
-
process.stderr.write((e && e.message ? e.message : String(e)) + '\n');
|
|
78
|
-
process.exit(1);
|
|
79
|
-
}
|
package/scripts/a2a_promote.js
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
var assetStore = require('../src/gep/assetStore');
|
|
2
|
-
var solidifyMod = require('../src/gep/solidify');
|
|
3
|
-
var contentHash = require('../src/gep/contentHash');
|
|
4
|
-
var a2aProto = require('../src/gep/a2aProtocol');
|
|
5
|
-
|
|
6
|
-
function parseArgs(argv) {
|
|
7
|
-
var out = { flags: new Set(), kv: new Map(), positionals: [] };
|
|
8
|
-
for (var i = 0; i < argv.length; i++) {
|
|
9
|
-
var a = argv[i];
|
|
10
|
-
if (!a) continue;
|
|
11
|
-
if (a.startsWith('--')) {
|
|
12
|
-
var eq = a.indexOf('=');
|
|
13
|
-
if (eq > -1) { out.kv.set(a.slice(2, eq), a.slice(eq + 1)); }
|
|
14
|
-
else {
|
|
15
|
-
var key = a.slice(2);
|
|
16
|
-
var next = argv[i + 1];
|
|
17
|
-
if (next && !String(next).startsWith('--')) { out.kv.set(key, next); i++; }
|
|
18
|
-
else { out.flags.add(key); }
|
|
19
|
-
}
|
|
20
|
-
} else { out.positionals.push(a); }
|
|
21
|
-
}
|
|
22
|
-
return out;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function main() {
|
|
26
|
-
var args = parseArgs(process.argv.slice(2));
|
|
27
|
-
var id = String(args.kv.get('id') || '').trim();
|
|
28
|
-
var typeRaw = String(args.kv.get('type') || '').trim().toLowerCase();
|
|
29
|
-
var validated = args.flags.has('validated') || String(args.kv.get('validated') || '') === 'true';
|
|
30
|
-
var limit = Number.isFinite(Number(args.kv.get('limit'))) ? Number(args.kv.get('limit')) : 500;
|
|
31
|
-
|
|
32
|
-
if (!id || !typeRaw) throw new Error('Usage: node scripts/a2a_promote.js --type capsule|gene|event --id <id> --validated');
|
|
33
|
-
if (!validated) throw new Error('Refusing to promote without --validated (local verification must be done first).');
|
|
34
|
-
|
|
35
|
-
var type = typeRaw === 'capsule' ? 'Capsule' : typeRaw === 'gene' ? 'Gene' : typeRaw === 'event' ? 'EvolutionEvent' : '';
|
|
36
|
-
if (!type) throw new Error('Invalid --type. Use capsule, gene, or event.');
|
|
37
|
-
|
|
38
|
-
var external = assetStore.readRecentExternalCandidates(limit);
|
|
39
|
-
var candidate = null;
|
|
40
|
-
for (var i = 0; i < external.length; i++) {
|
|
41
|
-
if (external[i] && external[i].type === type && String(external[i].id) === id) { candidate = external[i]; break; }
|
|
42
|
-
}
|
|
43
|
-
if (!candidate) throw new Error('Candidate not found in external zone: type=' + type + ' id=' + id);
|
|
44
|
-
|
|
45
|
-
if (type === 'Gene') {
|
|
46
|
-
var validation = Array.isArray(candidate.validation) ? candidate.validation : [];
|
|
47
|
-
for (var j = 0; j < validation.length; j++) {
|
|
48
|
-
var c = String(validation[j] || '').trim();
|
|
49
|
-
if (!c) continue;
|
|
50
|
-
if (!solidifyMod.isValidationCommandAllowed(c)) {
|
|
51
|
-
throw new Error('Refusing to promote Gene ' + id + ': validation command rejected by safety check: "' + c + '". Only node/npm/npx commands without shell operators are allowed.');
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
var promoted = JSON.parse(JSON.stringify(candidate));
|
|
57
|
-
if (!promoted.a2a || typeof promoted.a2a !== 'object') promoted.a2a = {};
|
|
58
|
-
promoted.a2a.status = 'promoted';
|
|
59
|
-
promoted.a2a.promoted_at = new Date().toISOString();
|
|
60
|
-
if (!promoted.schema_version) promoted.schema_version = contentHash.SCHEMA_VERSION;
|
|
61
|
-
promoted.asset_id = contentHash.computeAssetId(promoted);
|
|
62
|
-
|
|
63
|
-
var emitDecisions = process.env.A2A_EMIT_DECISIONS === 'true';
|
|
64
|
-
|
|
65
|
-
if (type === 'EvolutionEvent') {
|
|
66
|
-
assetStore.appendEventJsonl(promoted);
|
|
67
|
-
if (emitDecisions) {
|
|
68
|
-
try {
|
|
69
|
-
var dmEv = a2aProto.buildDecision({ assetId: promoted.asset_id, localId: id, decision: 'accept', reason: 'event promoted for provenance tracking' });
|
|
70
|
-
a2aProto.getTransport().send(dmEv);
|
|
71
|
-
} catch (e) {}
|
|
72
|
-
}
|
|
73
|
-
process.stdout.write('promoted_event=' + id + '\n');
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
if (type === 'Capsule') {
|
|
78
|
-
assetStore.appendCapsule(promoted);
|
|
79
|
-
if (emitDecisions) {
|
|
80
|
-
try {
|
|
81
|
-
var dm = a2aProto.buildDecision({ assetId: promoted.asset_id, localId: id, decision: 'accept', reason: 'capsule promoted after validation' });
|
|
82
|
-
a2aProto.getTransport().send(dm);
|
|
83
|
-
} catch (e) {}
|
|
84
|
-
}
|
|
85
|
-
process.stdout.write('promoted_capsule=' + id + '\n');
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
var localGenes = assetStore.loadGenes();
|
|
90
|
-
var exists = false;
|
|
91
|
-
for (var k = 0; k < localGenes.length; k++) {
|
|
92
|
-
if (localGenes[k] && localGenes[k].type === 'Gene' && String(localGenes[k].id) === id) { exists = true; break; }
|
|
93
|
-
}
|
|
94
|
-
if (exists) {
|
|
95
|
-
if (emitDecisions) {
|
|
96
|
-
try {
|
|
97
|
-
var dm2 = a2aProto.buildDecision({ assetId: promoted.asset_id, localId: id, decision: 'reject', reason: 'local gene with same ID already exists' });
|
|
98
|
-
a2aProto.getTransport().send(dm2);
|
|
99
|
-
} catch (e) {}
|
|
100
|
-
}
|
|
101
|
-
process.stdout.write('conflict_keep_local_gene=' + id + '\n');
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
assetStore.upsertGene(promoted);
|
|
106
|
-
if (emitDecisions) {
|
|
107
|
-
try {
|
|
108
|
-
var dm3 = a2aProto.buildDecision({ assetId: promoted.asset_id, localId: id, decision: 'accept', reason: 'gene promoted after safety audit' });
|
|
109
|
-
a2aProto.getTransport().send(dm3);
|
|
110
|
-
} catch (e) {}
|
|
111
|
-
}
|
|
112
|
-
process.stdout.write('promoted_gene=' + id + '\n');
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
try { main(); } catch (e) {
|
|
116
|
-
process.stderr.write((e && e.message ? e.message : String(e)) + '\n');
|
|
117
|
-
process.exit(1);
|
|
118
|
-
}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
const REPO_ROOT = path.resolve(__dirname, '..');
|
|
5
|
-
const LOG_FILE = path.join(REPO_ROOT, 'evolution_history_full.md');
|
|
6
|
-
const OUT_FILE = path.join(REPO_ROOT, 'evolution_detailed_report.md');
|
|
7
|
-
|
|
8
|
-
function analyzeEvolution() {
|
|
9
|
-
if (!fs.existsSync(LOG_FILE)) {
|
|
10
|
-
console.error("Source file missing.");
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const content = fs.readFileSync(LOG_FILE, 'utf8');
|
|
15
|
-
// Split by divider
|
|
16
|
-
const entries = content.split('---').map(e => e.trim()).filter(e => e.length > 0);
|
|
17
|
-
|
|
18
|
-
const skillUpdates = {}; // Map<SkillName, Array<Changes>>
|
|
19
|
-
const generalUpdates = []; // Array<Changes>
|
|
20
|
-
|
|
21
|
-
// Regex to detect skills/paths
|
|
22
|
-
// e.g. `skills/feishu-card/send.js` or **Target**: `skills/git-sync`
|
|
23
|
-
const skillRegex = /skills\/([a-zA-Z0-9\-_]+)/;
|
|
24
|
-
const actionRegex = /Action:\s*([\s\S]*?)(?=\n\n|\n[A-Z]|$)/i; // Capture Action text
|
|
25
|
-
const statusRegex = /Status:\s*\[?([A-Z\s_]+)\]?/i;
|
|
26
|
-
|
|
27
|
-
entries.forEach(entry => {
|
|
28
|
-
// Extract basic info
|
|
29
|
-
const statusMatch = entry.match(statusRegex);
|
|
30
|
-
const status = statusMatch ? statusMatch[1].trim().toUpperCase() : 'UNKNOWN';
|
|
31
|
-
|
|
32
|
-
// Skip routine checks if we want a *detailed evolution* report (focus on changes)
|
|
33
|
-
// But user asked for "what happened", so routine scans might be boring unless they found something.
|
|
34
|
-
// Let's filter out "STABILITY" or "RUNNING" unless there is a clear "Mutated" or "Fixed" keyword.
|
|
35
|
-
const isInteresting =
|
|
36
|
-
entry.includes('Fixed') ||
|
|
37
|
-
entry.includes('Hardened') ||
|
|
38
|
-
entry.includes('Optimized') ||
|
|
39
|
-
entry.includes('Patched') ||
|
|
40
|
-
entry.includes('Created') ||
|
|
41
|
-
entry.includes('Added') ||
|
|
42
|
-
status === 'SUCCESS' ||
|
|
43
|
-
status === 'COMPLETED';
|
|
44
|
-
|
|
45
|
-
if (!isInteresting) return;
|
|
46
|
-
|
|
47
|
-
// Find associated skill
|
|
48
|
-
const skillMatch = entry.match(skillRegex);
|
|
49
|
-
let skillName = 'General / System';
|
|
50
|
-
if (skillMatch) {
|
|
51
|
-
skillName = skillMatch[1];
|
|
52
|
-
} else {
|
|
53
|
-
// Try heuristics
|
|
54
|
-
if (entry.toLowerCase().includes('feishu card')) skillName = 'feishu-card';
|
|
55
|
-
else if (entry.toLowerCase().includes('git sync')) skillName = 'git-sync';
|
|
56
|
-
else if (entry.toLowerCase().includes('logger')) skillName = 'interaction-logger';
|
|
57
|
-
else if (entry.toLowerCase().includes('evolve')) skillName = 'capability-evolver';
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// Extract description
|
|
61
|
-
let description = "";
|
|
62
|
-
const actionMatch = entry.match(actionRegex);
|
|
63
|
-
if (actionMatch) {
|
|
64
|
-
description = actionMatch[1].trim();
|
|
65
|
-
} else {
|
|
66
|
-
// Fallback: take lines that look like bullet points or text after header
|
|
67
|
-
const lines = entry.split('\n');
|
|
68
|
-
description = lines.filter(l => l.match(/^[•\-\*]|\w/)).slice(1).join('\n').trim();
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Clean up description (remove duplicate "Action:" prefix if captured)
|
|
72
|
-
description = description.replace(/^Action:\s*/i, '');
|
|
73
|
-
|
|
74
|
-
if (!skillUpdates[skillName]) skillUpdates[skillName] = [];
|
|
75
|
-
|
|
76
|
-
// Dedup descriptions slightly (simple check)
|
|
77
|
-
const isDuplicate = skillUpdates[skillName].some(u => u.desc.includes(description.substring(0, 20)));
|
|
78
|
-
if (!isDuplicate) {
|
|
79
|
-
// Extract Date if possible
|
|
80
|
-
const dateMatch = entry.match(/\((\d{4}\/\d{1,2}\/\d{1,2}.*?)\)/);
|
|
81
|
-
const date = dateMatch ? dateMatch[1] : 'Unknown';
|
|
82
|
-
|
|
83
|
-
skillUpdates[skillName].push({
|
|
84
|
-
date,
|
|
85
|
-
status,
|
|
86
|
-
desc: description
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
// Generate Markdown
|
|
92
|
-
let md = "# Detailed Evolution Report (By Skill)\n\n> Comprehensive breakdown of system changes.\n\n";
|
|
93
|
-
|
|
94
|
-
// Sort skills alphabetically
|
|
95
|
-
const sortedSkills = Object.keys(skillUpdates).sort();
|
|
96
|
-
|
|
97
|
-
sortedSkills.forEach(skill => {
|
|
98
|
-
md += `## ${skill}\n`;
|
|
99
|
-
const updates = skillUpdates[skill];
|
|
100
|
-
|
|
101
|
-
updates.forEach(u => {
|
|
102
|
-
// Icon based on content
|
|
103
|
-
let icon = '*';
|
|
104
|
-
const lowerDesc = u.desc.toLowerCase();
|
|
105
|
-
if (lowerDesc.includes('optimiz')) icon = '[optimize]';
|
|
106
|
-
if (lowerDesc.includes('secur') || lowerDesc.includes('harden') || lowerDesc.includes('permission')) icon = '[security]';
|
|
107
|
-
if (lowerDesc.includes('fix') || lowerDesc.includes('patch')) icon = '[repair]';
|
|
108
|
-
if (lowerDesc.includes('creat') || lowerDesc.includes('add')) icon = '[add]';
|
|
109
|
-
|
|
110
|
-
md += `### ${icon} ${u.date}\n`;
|
|
111
|
-
md += `${u.desc}\n\n`;
|
|
112
|
-
});
|
|
113
|
-
md += `---\n`;
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
fs.writeFileSync(OUT_FILE, md);
|
|
117
|
-
console.log(`Generated report for ${sortedSkills.length} skills.`);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
analyzeEvolution();
|
|
121
|
-
|