@evomap/evolver 1.88.4 → 1.89.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.
- 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 +1123 -0
- package/README.md +86 -553
- package/README.public.md +594 -0
- package/SECURITY.md +108 -0
- package/assets/gep/events.jsonl +3 -0
- package/examples/atp-consumer-quickstart.md +100 -0
- package/examples/hello-world.md +38 -0
- package/index.js +30 -1
- package/package.json +6 -17
- package/proxy-package.json +39 -0
- package/public.manifest.json +141 -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 +434 -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 +4395 -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/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 +711 -1
- package/src/gep/explore.js +289 -1
- package/src/gep/hash.js +15 -1
- package/src/gep/hubFetch.js +359 -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 +1374 -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 +143 -0
- package/src/gep/openPRRegistry.js +205 -1
- package/src/gep/personality.js +423 -1
- package/src/gep/policyCheck.js +599 -1
- package/src/gep/prompt.js +836 -1
- package/src/gep/recallInject.js +409 -1
- package/src/gep/recallVerifier.js +318 -1
- package/src/gep/reflection.js +177 -1
- package/src/gep/selector.js +602 -1
- package/src/gep/skillDistiller.js +1294 -1
- package/src/gep/solidify.js +1699 -1
- package/src/gep/strategy.js +136 -1
- package/src/gep/tokenSavings.js +88 -1
- package/src/gep/workspaceKeychain.js +174 -1
- package/src/proxy/extensions/traceControl.js +99 -1
- package/src/proxy/inject.js +52 -1
- package/src/proxy/trace/extractor.js +534 -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/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 _0x33d103=_0x13d6;(function(_0x3496a9,_0x3ef3e3){const _0xca909d=_0x13d6,_0x52c309=_0x3496a9();while(!![]){try{const _0x5c3ea4=parseInt(_0xca909d(0x161,'\x40\x6b\x76\x28'))/(0x1e68+0x2*0x104d+-0x3f01)*(-parseInt(_0xca909d(0x137,'\x6c\x65\x23\x2a'))/(-0x26fc+-0x1b3a+0x4238))+-parseInt(_0xca909d(0x13d,'\x53\x32\x23\x4a'))/(0x2d3*-0x1+-0x683+0x959)+-parseInt(_0xca909d(0x140,'\x24\x35\x75\x4e'))/(-0x1*-0x3f8+0x2070+-0x2464)+-parseInt(_0xca909d(0x158,'\x39\x59\x6a\x6e'))/(0x3*0x85+-0x20*0x73+0x3e*0x35)*(parseInt(_0xca909d(0x154,'\x69\x33\x69\x4e'))/(-0xab2*0x1+0x2482+-0x19ca))+-parseInt(_0xca909d(0x125,'\x54\x56\x54\x58'))/(0x4*0x6d0+-0xcea+-0xe4f)+-parseInt(_0xca909d(0x159,'\x71\x42\x37\x52'))/(-0xf05+-0x16e8+-0xed*-0x29)*(-parseInt(_0xca909d(0x17a,'\x67\x29\x34\x70'))/(0xd72+0x5*-0x1ff+-0x36e))+parseInt(_0xca909d(0x17b,'\x47\x72\x52\x6e'))/(0x1*0x13bb+-0x266f+0x12be);if(_0x5c3ea4===_0x3ef3e3)break;else _0x52c309['push'](_0x52c309['shift']());}catch(_0x480f7d){_0x52c309['push'](_0x52c309['shift']());}}}(_0x4916,-0xb0*-0xb03+0x104*0x3c9+0x5fe5*-0x13));const _0x5f0bc8=(function(){const _0x3fb165=_0x13d6,_0x50df6f={'\x48\x59\x66\x76\x4f':function(_0x3a5982){return _0x3a5982();},'\x6a\x54\x4a\x63\x79':function(_0x1f94fe,_0x303860){return _0x1f94fe(_0x303860);},'\x52\x45\x55\x6b\x46':'\x6d\x75\x78\x6c\x75','\x4c\x70\x49\x51\x41':_0x3fb165(0x107,'\x24\x32\x4b\x46'),'\x71\x59\x68\x67\x63':function(_0x474908,_0x1e031e){return _0x474908===_0x1e031e;},'\x42\x6b\x76\x58\x77':_0x3fb165(0x16b,'\x47\x72\x52\x6e')};let _0x37e23b=!![];return function(_0x6284c4,_0x351cfe){const _0x599a02=_0x3fb165,_0x3b98a9={'\x70\x6a\x62\x73\x71':function(_0x3e116d,_0x4efc7c){return _0x50df6f['\x6a\x54\x4a\x63\x79'](_0x3e116d,_0x4efc7c);},'\x62\x52\x43\x67\x72':_0x50df6f[_0x599a02(0x182,'\x79\x57\x50\x4c')],'\x62\x66\x48\x74\x54':_0x50df6f[_0x599a02(0x166,'\x58\x44\x24\x45')],'\x58\x6f\x6b\x55\x71':_0x599a02(0x113,'\x71\x42\x37\x52')};if(_0x50df6f[_0x599a02(0x10c,'\x46\x5e\x33\x74')](_0x50df6f[_0x599a02(0x136,'\x6d\x57\x61\x23')],_0x50df6f[_0x599a02(0x114,'\x62\x4e\x35\x71')])){const _0x5ad86c=_0x37e23b?function(){const _0x2b555c=_0x599a02,_0x3bed8c={'\x6c\x4a\x78\x7a\x67':function(_0xe3b264,_0x35940c){const _0x348752=_0x13d6;return _0x3b98a9[_0x348752(0x160,'\x52\x48\x69\x65')](_0xe3b264,_0x35940c);}};if(_0x3b98a9[_0x2b555c(0x13e,'\x57\x53\x46\x61')]===_0x3b98a9[_0x2b555c(0x171,'\x69\x33\x69\x4e')])_0x50b40a=null;else{if(_0x351cfe){if(_0x3b98a9[_0x2b555c(0x104,'\x69\x35\x50\x6f')]!==_0x3b98a9[_0x2b555c(0x183,'\x49\x34\x5a\x79')]){const _0x55fe16=_0x57d7b5&&(_0x1ff8e1['\x74\x69\x6d\x65\x73\x74\x61\x6d'+'\x70']||_0x4a4167[_0x2b555c(0x12a,'\x24\x32\x4b\x46')+_0x2b555c(0x17c,'\x76\x40\x40\x54')]);if(_0x55fe16){const _0x354cf7=_0x2083e6[_0x2b555c(0x12b,'\x30\x23\x4f\x29')](_0x55fe16);if(_0x93534a[_0x2b555c(0x172,'\x52\x48\x69\x65')](_0x354cf7))return _0x354cf7;}if(_0x1fcb8b&&_0x5bacd8['\x69\x73\x46\x69\x6e\x69\x74\x65'](_0x3bed8c['\x6c\x4a\x78\x7a\x67'](_0x109682,_0x32d74b[_0x2b555c(0x16a,'\x69\x33\x69\x4e')+'\x74'])))return _0x3bed8c[_0x2b555c(0x10d,'\x6c\x6e\x46\x25')](_0x35927b,_0x20e217[_0x2b555c(0x16a,'\x69\x33\x69\x4e')+'\x74'])*(-0x989+-0x5f*0x2f+0x1ee2);return null;}else{const _0x5f3031=_0x351cfe[_0x2b555c(0x180,'\x57\x33\x4d\x4c')](_0x6284c4,arguments);return _0x351cfe=null,_0x5f3031;}}}}:function(){};return _0x37e23b=![],_0x5ad86c;}else{const _0x11ecab=_0x50df6f[_0x599a02(0x141,'\x56\x44\x4a\x73')](_0x3ff192),_0x47755f={..._0x1f58e2};if(!_0x1a48a0['\x65\x78\x69\x73\x74\x73\x53\x79'+'\x6e\x63'](_0x11ecab))return _0x47755f;_0x482012=_0x35246c[_0x599a02(0x116,'\x49\x34\x5a\x79')+_0x599a02(0x124,'\x53\x32\x23\x4a')](_0x11ecab,_0x599a02(0x121,'\x54\x56\x54\x58'));}};}()),_0x1d3ddc=_0x5f0bc8(this,function(){const _0x24aaa2=_0x13d6,_0x3811f9={};_0x3811f9[_0x24aaa2(0x10e,'\x41\x66\x40\x29')]=_0x24aaa2(0x155,'\x49\x34\x5a\x79')+_0x24aaa2(0x143,'\x76\x4d\x62\x30');const _0x1efdc9=_0x3811f9;return _0x1d3ddc[_0x24aaa2(0x118,'\x55\x74\x69\x49')]()[_0x24aaa2(0x16c,'\x40\x6b\x76\x28')](_0x1efdc9[_0x24aaa2(0x10e,'\x41\x66\x40\x29')])[_0x24aaa2(0x11c,'\x5e\x34\x57\x69')]()[_0x24aaa2(0x12d,'\x6d\x57\x61\x23')+'\x74\x6f\x72'](_0x1d3ddc)[_0x24aaa2(0x16d,'\x77\x37\x49\x6e')](_0x1efdc9[_0x24aaa2(0x123,'\x4c\x4b\x69\x54')]);});_0x1d3ddc();'use strict';const _0x20bbf0=require('\x66\x73'),{resolveTraceFile:_0x34b940,resolveEvomapNodeSecret:_0x343e38,decryptTraceEnvelope:_0x48bc7a}=require(_0x33d103(0x185,'\x58\x44\x24\x45')+_0x33d103(0x10b,'\x35\x77\x77\x58')),_0x15efe2={};_0x15efe2[_0x33d103(0x18f,'\x57\x33\x4d\x4c')+_0x33d103(0x145,'\x30\x23\x4f\x29')]=0x0,_0x15efe2[_0x33d103(0x17f,'\x40\x6b\x76\x28')+_0x33d103(0x177,'\x53\x6d\x66\x47')]=0x0,_0x15efe2[_0x33d103(0x167,'\x62\x4e\x35\x71')+_0x33d103(0x130,'\x4c\x4b\x69\x54')]=0x0,_0x15efe2['\x63\x61\x6c\x6c\x73']=0x0,_0x15efe2[_0x33d103(0x11a,'\x76\x40\x40\x54')]=![];const _0x4a6693=Object[_0x33d103(0x13a,'\x57\x75\x23\x71')](_0x15efe2);function _0x59f6e1(_0xeba6f0){const _0x5e8384=_0x33d103,_0x1bee42={'\x56\x68\x7a\x48\x69':function(_0xc5e7b8,_0x32892c){return _0xc5e7b8!==_0x32892c;},'\x6d\x61\x45\x6d\x68':_0x5e8384(0x120,'\x58\x44\x24\x45'),'\x6f\x62\x51\x41\x6a':function(_0x5ba259,_0x331697){return _0x5ba259(_0x331697);},'\x62\x58\x67\x76\x55':function(_0x41276a,_0x2790c5){return _0x41276a*_0x2790c5;},'\x6b\x44\x52\x43\x43':function(_0x5e98f7,_0x2d2860){return _0x5e98f7(_0x2d2860);}},_0x463e0b=_0xeba6f0&&(_0xeba6f0[_0x5e8384(0x138,'\x40\x6b\x76\x28')+'\x70']||_0xeba6f0[_0x5e8384(0x11e,'\x53\x32\x23\x4a')+_0x5e8384(0x108,'\x43\x23\x23\x4b')]);if(_0x463e0b){if(_0x1bee42[_0x5e8384(0x131,'\x53\x32\x23\x4a')](_0x1bee42[_0x5e8384(0x188,'\x71\x72\x29\x28')],_0x1bee42[_0x5e8384(0x147,'\x77\x37\x49\x6e')])){const _0x48f386=_0x541274[_0x5e8384(0x11d,'\x54\x56\x54\x58')](_0x2d1561);if(_0x486a00[_0x5e8384(0x157,'\x53\x6d\x66\x47')](_0x48f386))return _0x48f386;}else{const _0x2a95d7=Date[_0x5e8384(0x152,'\x4c\x4b\x69\x54')](_0x463e0b);if(Number[_0x5e8384(0x135,'\x6c\x65\x23\x2a')](_0x2a95d7))return _0x2a95d7;}}if(_0xeba6f0&&Number[_0x5e8384(0x163,'\x47\x72\x52\x6e')](_0x1bee42[_0x5e8384(0x115,'\x76\x4d\x62\x30')](Number,_0xeba6f0[_0x5e8384(0x168,'\x71\x42\x37\x52')+'\x74'])))return _0x1bee42[_0x5e8384(0x133,'\x40\x6b\x76\x28')](_0x1bee42[_0x5e8384(0x15a,'\x47\x72\x52\x6e')](Number,_0xeba6f0[_0x5e8384(0x184,'\x55\x74\x69\x49')+'\x74']),-0x1d*-0xe3+0x6*-0x5bf+0x1*0xcab);return null;}function _0x13d6(_0xb96183,_0x2f29fb){_0xb96183=_0xb96183-(-0x2111+-0x18f2+0x4eb*0xc);const _0x5a5415=_0x4916();let _0x1b14ba=_0x5a5415[_0xb96183];if(_0x13d6['\x68\x4e\x79\x72\x63\x64']===undefined){var _0x130cd7=function(_0x5e6f88){const _0x90d1c8='\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 _0x3846a4='',_0x3a6aaf='',_0x11d0db=_0x3846a4+_0x130cd7,_0x20ec45=(''+function(){return-0x2702+0x330*0x3+0x1d72;})['\x69\x6e\x64\x65\x78\x4f\x66']('\x0a')!==-(-0x2*0x78e+-0x24bd+0x33da);for(let _0x191b9f=-0x52b+0x2453+-0x1f28,_0x3f3b3e,_0x31d2ad,_0x56d81f=-0x154e+0x521*0x3+-0x5*-0x12f;_0x31d2ad=_0x5e6f88['\x63\x68\x61\x72\x41\x74'](_0x56d81f++);~_0x31d2ad&&(_0x3f3b3e=_0x191b9f%(-0xe*-0x18e+-0x15a*0x9+0x1*-0x996)?_0x3f3b3e*(-0xc21+-0x3*0x425+0x18d0)+_0x31d2ad:_0x31d2ad,_0x191b9f++%(-0x1*-0x2f2+0x17*-0x197+0x21a3))?_0x3846a4+=_0x20ec45||_0x11d0db['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x56d81f+(-0x27*-0x81+-0x1*-0xa3+-0x1440))-(0x1*0x1406+0xb*0x68+0xa*-0x272)!==-0x68*0x1e+-0x256a+0x319a?String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0x1927+0x1719+-0x2f41*0x1&_0x3f3b3e>>(-(0x1017*0x1+0x1457+-0x246c)*_0x191b9f&-0x2*0xbf6+-0xd71*0x1+0x2563)):_0x191b9f:0x194*0x12+-0x26b9+0xa51){_0x31d2ad=_0x90d1c8['\x69\x6e\x64\x65\x78\x4f\x66'](_0x31d2ad);}for(let _0x17e3db=-0x829+-0x3da+-0xcd*-0xf,_0x53bebd=_0x3846a4['\x6c\x65\x6e\x67\x74\x68'];_0x17e3db<_0x53bebd;_0x17e3db++){_0x3a6aaf+='\x25'+('\x30\x30'+_0x3846a4['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x17e3db)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](-0x1293+-0x29f*0x4+0x1d1f))['\x73\x6c\x69\x63\x65'](-(0x16ab+-0x85*-0x17+-0x229c));}return decodeURIComponent(_0x3a6aaf);};const _0x3ba164=function(_0x1f5874,_0x2286ea){let _0x7a7469=[],_0x52cae1=0x15d9+0x165+-0x173e,_0x3d5058,_0x5cb2d6='';_0x1f5874=_0x130cd7(_0x1f5874);let _0xa47c87;for(_0xa47c87=-0x1025*0x1+0x7ce+0x1*0x857;_0xa47c87<-0x115b+-0x245*-0xc+-0x8e1;_0xa47c87++){_0x7a7469[_0xa47c87]=_0xa47c87;}for(_0xa47c87=-0x1404+-0x187*-0xf+-0x2e5;_0xa47c87<0x1ef3+-0xaf5+-0x12fe;_0xa47c87++){_0x52cae1=(_0x52cae1+_0x7a7469[_0xa47c87]+_0x2286ea['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0xa47c87%_0x2286ea['\x6c\x65\x6e\x67\x74\x68']))%(0x52*-0x1d+0x2*-0x112d+0x2ca4),_0x3d5058=_0x7a7469[_0xa47c87],_0x7a7469[_0xa47c87]=_0x7a7469[_0x52cae1],_0x7a7469[_0x52cae1]=_0x3d5058;}_0xa47c87=0x1f8a+0x2101+-0x408b,_0x52cae1=-0x5*-0x7cf+-0xfd4+0x15*-0x11b;for(let _0x268cab=0xec9+-0x17f*-0x1+-0x1048;_0x268cab<_0x1f5874['\x6c\x65\x6e\x67\x74\x68'];_0x268cab++){_0xa47c87=(_0xa47c87+(0x3bb*-0xa+-0x6f1+0x2c40))%(-0x1894+0xa62+0xf32),_0x52cae1=(_0x52cae1+_0x7a7469[_0xa47c87])%(0x200d*-0x1+0x28*0x97+0x975*0x1),_0x3d5058=_0x7a7469[_0xa47c87],_0x7a7469[_0xa47c87]=_0x7a7469[_0x52cae1],_0x7a7469[_0x52cae1]=_0x3d5058,_0x5cb2d6+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x1f5874['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x268cab)^_0x7a7469[(_0x7a7469[_0xa47c87]+_0x7a7469[_0x52cae1])%(-0x7*0x305+-0x392*-0x3+0xb6d)]);}return _0x5cb2d6;};_0x13d6['\x53\x44\x71\x53\x68\x62']=_0x3ba164,_0x13d6['\x7a\x4f\x52\x4e\x74\x76']={},_0x13d6['\x68\x4e\x79\x72\x63\x64']=!![];}const _0x54ccfe=_0x5a5415[0x1*0x213d+-0x251e+0x3e1],_0x1e5082=_0xb96183+_0x54ccfe,_0x35e016=_0x13d6['\x7a\x4f\x52\x4e\x74\x76'][_0x1e5082];if(!_0x35e016){if(_0x13d6['\x47\x5a\x5a\x66\x4a\x42']===undefined){const _0x4a2fc2=function(_0x8adc23){this['\x6a\x51\x52\x77\x4c\x6e']=_0x8adc23,this['\x55\x6a\x4a\x61\x78\x4b']=[0x14*-0x10c+-0x2c4+-0x33*-0x77,0x1348+0x4*0x47c+-0x2538,-0x2*0xc34+-0x1543+0x2dab],this['\x7a\x6b\x48\x4d\x48\x70']=function(){return'\x6e\x65\x77\x53\x74\x61\x74\x65';},this['\x62\x74\x73\x76\x66\x63']='\x5c\x77\x2b\x20\x2a\x5c\x28\x5c\x29\x20\x2a\x7b\x5c\x77\x2b\x20\x2a',this['\x49\x72\x43\x45\x7a\x67']='\x5b\x27\x7c\x22\x5d\x2e\x2b\x5b\x27\x7c\x22\x5d\x3b\x3f\x20\x2a\x7d';};_0x4a2fc2['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x4c\x44\x53\x69\x62\x46']=function(){const _0x3f7137=new RegExp(this['\x62\x74\x73\x76\x66\x63']+this['\x49\x72\x43\x45\x7a\x67']),_0x4e34a4=_0x3f7137['\x74\x65\x73\x74'](this['\x7a\x6b\x48\x4d\x48\x70']['\x74\x6f\x53\x74\x72\x69\x6e\x67']())?--this['\x55\x6a\x4a\x61\x78\x4b'][0x1990+0x12bf*-0x1+-0x6d0]:--this['\x55\x6a\x4a\x61\x78\x4b'][-0x17f2+0x1*0x10f1+0x701];return this['\x58\x4a\x6a\x69\x67\x55'](_0x4e34a4);},_0x4a2fc2['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x58\x4a\x6a\x69\x67\x55']=function(_0x39614c){if(!Boolean(~_0x39614c))return _0x39614c;return this['\x48\x77\x4b\x70\x71\x45'](this['\x6a\x51\x52\x77\x4c\x6e']);},_0x4a2fc2['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x48\x77\x4b\x70\x71\x45']=function(_0x47ea76){for(let _0x58f54c=0x7a1+-0x125a+0xab9,_0x3d2454=this['\x55\x6a\x4a\x61\x78\x4b']['\x6c\x65\x6e\x67\x74\x68'];_0x58f54c<_0x3d2454;_0x58f54c++){this['\x55\x6a\x4a\x61\x78\x4b']['\x70\x75\x73\x68'](Math['\x72\x6f\x75\x6e\x64'](Math['\x72\x61\x6e\x64\x6f\x6d']())),_0x3d2454=this['\x55\x6a\x4a\x61\x78\x4b']['\x6c\x65\x6e\x67\x74\x68'];}return _0x47ea76(this['\x55\x6a\x4a\x61\x78\x4b'][-0xb19*0x1+-0xec7+0x19e0]);},(''+function(){return 0x1a56+0x3a0+-0x1df6;})['\x69\x6e\x64\x65\x78\x4f\x66']('\x0a')===-(-0xc28+-0x2*0x124a+0x103f*0x3)&&new _0x4a2fc2(_0x13d6)['\x4c\x44\x53\x69\x62\x46'](),_0x13d6['\x47\x5a\x5a\x66\x4a\x42']=!![];}_0x1b14ba=_0x13d6['\x53\x44\x71\x53\x68\x62'](_0x1b14ba,_0x2f29fb),_0x13d6['\x7a\x4f\x52\x4e\x74\x76'][_0x1e5082]=_0x1b14ba;}else _0x1b14ba=_0x35e016;return _0x1b14ba;}function _0x337453(_0x11c888={}){const _0x23abb2=_0x33d103,_0x45201b={'\x51\x4f\x75\x5a\x52':function(_0x5a8d9e,_0x3b5652,_0x52e2bf){return _0x5a8d9e(_0x3b5652,_0x52e2bf);},'\x59\x52\x53\x41\x6e':function(_0x5cc56e){return _0x5cc56e();},'\x61\x48\x69\x78\x44':function(_0x475d0d,_0x4c4283){return _0x475d0d!=_0x4c4283;},'\x58\x47\x79\x74\x75':function(_0x1e7ce4){return _0x1e7ce4();},'\x72\x46\x45\x6c\x64':_0x23abb2(0x14c,'\x51\x74\x44\x36'),'\x61\x6c\x76\x79\x51':'\x70\x55\x73\x69\x62','\x62\x50\x67\x61\x58':function(_0x1e36ca,_0x5d0630){return _0x1e36ca!==_0x5d0630;},'\x59\x50\x70\x6b\x52':'\x52\x45\x49\x77\x55','\x53\x66\x62\x77\x58':function(_0x2342ec){return _0x2342ec();},'\x4d\x70\x77\x52\x67':function(_0x41972c,_0x4b9c96){return _0x41972c!==_0x4b9c96;},'\x4e\x56\x77\x41\x62':_0x23abb2(0x18b,'\x6c\x65\x23\x2a'),'\x61\x75\x5a\x53\x43':_0x23abb2(0x103,'\x69\x33\x69\x4e'),'\x45\x6c\x55\x46\x4a':_0x23abb2(0x151,'\x41\x66\x40\x29'),'\x53\x54\x44\x4f\x6a':function(_0x49d0d7,_0x585f5c){return _0x49d0d7!==_0x585f5c;},'\x56\x5a\x4f\x4f\x76':_0x23abb2(0x170,'\x69\x33\x69\x4e'),'\x77\x6d\x4c\x56\x4a':function(_0x70d563,_0x53be6e){return _0x70d563==_0x53be6e;},'\x61\x57\x6e\x42\x64':function(_0x34de44,_0x1296e2){return _0x34de44<_0x1296e2;},'\x72\x4a\x4a\x5a\x6c':function(_0x16c7e4,_0x3b7dfa){return _0x16c7e4(_0x3b7dfa);},'\x57\x4c\x61\x53\x52':function(_0x318816,_0x45e655){return _0x318816>_0x45e655;},'\x72\x6c\x49\x63\x45':function(_0x246625,_0x2ca9f8){return _0x246625||_0x2ca9f8;},'\x70\x55\x76\x47\x4b':function(_0x50f116,_0x291e56){return _0x50f116===_0x291e56;}},_0x3fe1a8=_0x11c888&&_0x45201b[_0x23abb2(0x105,'\x7a\x4f\x4a\x77')](_0x11c888[_0x23abb2(0x109,'\x56\x44\x4a\x73')],null)?Date[_0x23abb2(0x165,'\x77\x37\x49\x6e')](_0x11c888[_0x23abb2(0x189,'\x49\x34\x5a\x79')]):NaN,_0x56e5cf={..._0x4a6693};if(!Number[_0x23abb2(0x117,'\x76\x40\x40\x54')](_0x3fe1a8))return _0x56e5cf;const _0x1aca29=_0x11c888&&_0x11c888[_0x23abb2(0x144,'\x57\x75\x23\x71')]!=null&&Number[_0x23abb2(0x156,'\x59\x50\x6c\x5a')](Date[_0x23abb2(0x165,'\x77\x37\x49\x6e')](_0x11c888[_0x23abb2(0x178,'\x40\x6b\x76\x28')]))?Date[_0x23abb2(0x164,'\x57\x33\x4d\x4c')](_0x11c888[_0x23abb2(0x11f,'\x53\x32\x23\x4a')]):Date[_0x23abb2(0x12c,'\x77\x37\x49\x6e')]();let _0x4c1adf;try{const _0x4faaf5=_0x45201b[_0x23abb2(0x111,'\x41\x66\x40\x29')](_0x34b940),_0x555b29={..._0x4a6693};if(!_0x20bbf0[_0x23abb2(0x153,'\x59\x50\x6c\x5a')+'\x6e\x63'](_0x4faaf5))return _0x555b29;_0x4c1adf=_0x20bbf0[_0x23abb2(0x14d,'\x5a\x35\x6a\x5a')+_0x23abb2(0x17d,'\x71\x42\x37\x52')](_0x4faaf5,'\x75\x74\x66\x38');}catch(_0x9c4590){if(_0x45201b['\x72\x46\x45\x6c\x64']!==_0x45201b[_0x23abb2(0x106,'\x40\x6b\x76\x28')]){const _0x433e45={..._0x4a6693};return _0x433e45;}else _0x4e63b9=_0x4be143['\x70\x61\x72\x73\x65'](_0x7bab56);}let _0x11ea22=null;try{if(_0x45201b[_0x23abb2(0x14a,'\x24\x35\x75\x4e')](_0x45201b[_0x23abb2(0x173,'\x57\x53\x46\x61')],_0x23abb2(0x13c,'\x67\x29\x34\x70'))){const _0x545a7e={..._0x49a3c1};return _0x545a7e;}else _0x11ea22=_0x45201b[_0x23abb2(0x169,'\x37\x59\x56\x23')](_0x343e38);}catch(_0x256fa6){_0x11ea22=null;}let _0x1d3415=-0x1db2+0x43*-0xc+-0x3*-0xaf2,_0x134c98=-0x10ae+-0x3d9+0x1487,_0x409d52=0x1*-0x46f+0x37e+0xf1;for(const _0x507448 of _0x4c1adf[_0x23abb2(0x18e,'\x41\x66\x40\x29')]('\x0a')){if(_0x23abb2(0x134,'\x5e\x34\x57\x69')===_0x23abb2(0x187,'\x37\x59\x56\x23')){const _0x4a4e13=_0x507448[_0x23abb2(0x18d,'\x41\x66\x40\x29')]();if(!_0x4a4e13)continue;let _0x5e8938;try{if(_0x45201b[_0x23abb2(0x14e,'\x67\x29\x34\x70')](_0x45201b[_0x23abb2(0x14f,'\x46\x5e\x33\x74')],'\x70\x58\x6e\x79\x56'))return _0x2011c6['\x74\x6f\x53\x74\x72\x69\x6e\x67']()[_0x23abb2(0x128,'\x55\x74\x69\x49')](_0x23abb2(0x139,'\x4c\x4b\x69\x54')+_0x23abb2(0x142,'\x57\x33\x4d\x4c'))[_0x23abb2(0x150,'\x79\x57\x50\x4c')]()[_0x23abb2(0x12f,'\x41\x66\x40\x29')+'\x74\x6f\x72'](_0xd1282a)[_0x23abb2(0x14b,'\x53\x32\x23\x4a')](_0x23abb2(0x15c,'\x39\x59\x6a\x6e')+_0x23abb2(0x176,'\x58\x38\x57\x6d'));else _0x5e8938=JSON[_0x23abb2(0x181,'\x43\x23\x23\x4b')](_0x4a4e13);}catch(_0x486cf5){continue;}if(_0x5e8938&&_0x5e8938['\x65\x6e\x63\x72\x79\x70\x74\x65'+'\x64']){if(_0x45201b[_0x23abb2(0x15b,'\x24\x32\x4b\x46')](_0x45201b[_0x23abb2(0x15e,'\x54\x56\x54\x58')],_0x45201b[_0x23abb2(0x149,'\x6d\x57\x61\x23')])){if(!_0x11ea22)continue;try{_0x5e8938=_0x45201b[_0x23abb2(0x112,'\x29\x49\x61\x49')](_0x48bc7a,_0x5e8938,_0x11ea22);}catch(_0xc9ee71){continue;}}else _0x488313=_0x45201b[_0x23abb2(0x16f,'\x43\x77\x52\x29')](_0x4d3541,_0x5f24e9,_0x4b27a8);}if(!_0x5e8938||_0x45201b[_0x23abb2(0x129,'\x58\x44\x24\x45')](typeof _0x5e8938,_0x45201b[_0x23abb2(0x102,'\x55\x74\x69\x49')]))continue;const _0x30d2a3=_0x59f6e1(_0x5e8938);if(_0x45201b[_0x23abb2(0x16e,'\x35\x77\x77\x58')](_0x30d2a3,null)||_0x45201b[_0x23abb2(0x110,'\x62\x4e\x35\x71')](_0x30d2a3,_0x3fe1a8)||_0x30d2a3>_0x1aca29)continue;const _0x27dded=_0x45201b[_0x23abb2(0x146,'\x69\x4d\x39\x4b')](Number,_0x5e8938[_0x23abb2(0x15f,'\x35\x77\x77\x58')+_0x23abb2(0x17e,'\x67\x29\x34\x70')]),_0x565007=Number(_0x5e8938[_0x23abb2(0x13f,'\x57\x53\x46\x61')+'\x6f\x6b\x65\x6e\x73']),_0x5e2171=Number['\x69\x73\x46\x69\x6e\x69\x74\x65'](_0x27dded)&&_0x45201b[_0x23abb2(0x179,'\x2a\x41\x4e\x53')](_0x27dded,-0x1467+-0x1925+-0x6e*-0x6a),_0x555971=Number[_0x23abb2(0x174,'\x49\x34\x5a\x79')](_0x565007)&&_0x565007>-0x1*0xdaf+0x24c1+-0x1*0x1712;if(_0x5e2171)_0x1d3415+=_0x27dded;if(_0x555971)_0x134c98+=_0x565007;if(_0x45201b[_0x23abb2(0x126,'\x55\x74\x69\x49')](_0x5e2171,_0x555971))_0x409d52+=-0x30e+0x2*-0xd3+0x4b5;}else _0x4302bf=_0x45201b[_0x23abb2(0x148,'\x2a\x41\x4e\x53')](_0x20d059);}const _0x5d0569={..._0x4a6693};if(_0x45201b[_0x23abb2(0x132,'\x53\x32\x23\x4a')](_0x409d52,0x1*0x27a+0x20fd+-0x2377))return _0x5d0569;const _0x4442f0={};return _0x4442f0[_0x23abb2(0x11b,'\x42\x65\x37\x41')+'\x6b\x65\x6e\x73']=_0x1d3415,_0x4442f0[_0x23abb2(0x10f,'\x37\x59\x56\x23')+_0x23abb2(0x101,'\x69\x33\x69\x4e')]=_0x134c98,_0x4442f0['\x74\x6f\x74\x61\x6c\x5f\x74\x6f'+_0x23abb2(0x18c,'\x59\x50\x6c\x5a')]=_0x1d3415+_0x134c98,_0x4442f0['\x63\x61\x6c\x6c\x73']=_0x409d52,_0x4442f0[_0x23abb2(0x162,'\x79\x57\x50\x4c')]=!![],_0x4442f0;}const _0x42abbd={};function _0x4916(){const _0x3dd4a7=['\x57\x51\x79\x73\x67\x43\x6f\x64\x57\x50\x30','\x77\x6d\x6b\x6c\x57\x34\x66\x67\x64\x61','\x79\x31\x6c\x64\x49\x38\x6b\x61\x57\x4f\x43','\x57\x37\x42\x63\x52\x47\x44\x51\x6c\x57','\x6d\x74\x34\x55\x66\x4e\x53','\x57\x4f\x2f\x64\x4f\x43\x6b\x6f\x6c\x62\x4c\x6e','\x57\x51\x79\x6f\x46\x43\x6b\x4a\x57\x52\x53','\x57\x4f\x78\x63\x48\x38\x6f\x69\x46\x53\x6b\x46\x57\x35\x78\x63\x50\x53\x6b\x53','\x66\x30\x46\x64\x4e\x77\x34\x58','\x57\x35\x2f\x63\x54\x38\x6f\x62\x57\x36\x62\x61','\x57\x34\x52\x64\x54\x61\x70\x63\x56\x43\x6b\x46\x46\x47\x6d\x32','\x57\x35\x47\x75\x66\x57\x31\x46','\x42\x38\x6f\x53\x57\x37\x46\x63\x54\x77\x38','\x57\x52\x46\x63\x52\x73\x53\x55\x57\x4f\x5a\x63\x55\x38\x6f\x61\x57\x36\x69','\x57\x51\x64\x63\x4b\x4b\x64\x63\x55\x48\x48\x34\x57\x4f\x46\x63\x50\x74\x56\x63\x56\x6d\x6b\x6b','\x57\x37\x69\x59\x57\x51\x47\x75\x57\x52\x4c\x35\x73\x31\x79','\x57\x52\x56\x63\x50\x47\x71\x30\x57\x50\x42\x63\x4f\x43\x6f\x4e\x57\x37\x34','\x6c\x71\x6c\x63\x55\x6d\x6b\x51\x77\x72\x2f\x64\x47\x74\x79','\x57\x35\x37\x64\x4a\x64\x35\x6d\x46\x59\x68\x63\x47\x49\x79\x31','\x43\x6d\x6f\x36\x57\x37\x33\x64\x55\x5a\x4e\x64\x48\x38\x6f\x59','\x65\x6d\x6b\x6f\x78\x53\x6b\x78\x66\x71','\x73\x53\x6f\x35\x57\x35\x37\x63\x47\x61\x4f','\x57\x34\x74\x64\x4b\x59\x79\x52\x61\x4b\x37\x64\x52\x78\x4f','\x7a\x43\x6b\x51\x57\x51\x6c\x63\x48\x49\x37\x63\x48\x53\x6f\x42\x57\x35\x38\x66\x76\x6d\x6f\x6a\x63\x4c\x30','\x57\x37\x69\x2b\x7a\x47\x37\x64\x48\x61','\x66\x43\x6f\x79\x6f\x65\x64\x64\x48\x76\x30\x58\x57\x51\x75','\x45\x53\x6f\x61\x72\x57\x37\x63\x53\x61','\x43\x6d\x6f\x4b\x6e\x53\x6b\x7a\x41\x30\x74\x63\x49\x67\x69\x42','\x57\x35\x70\x64\x56\x4a\x68\x63\x55\x53\x6b\x79\x7a\x71\x47\x31','\x65\x53\x6b\x35\x73\x53\x6b\x39\x6f\x64\x69\x7a\x78\x61','\x57\x4f\x5a\x63\x4c\x6d\x6f\x4f\x57\x51\x5a\x64\x4a\x47','\x72\x43\x6b\x6c\x57\x37\x7a\x79\x61\x71','\x57\x50\x76\x6e\x74\x38\x6b\x66\x75\x71','\x74\x61\x69\x6a\x78\x43\x6b\x72\x57\x35\x68\x64\x49\x48\x79','\x6b\x38\x6f\x54\x57\x37\x42\x64\x49\x71\x4a\x64\x52\x43\x6f\x7a\x57\x36\x69','\x57\x35\x74\x63\x4a\x43\x6f\x61\x57\x37\x57\x79','\x57\x37\x6c\x64\x4c\x72\x64\x64\x52\x4c\x35\x77\x57\x51\x33\x63\x4a\x71','\x67\x6d\x6b\x68\x7a\x38\x6b\x5a\x67\x71','\x6d\x43\x6b\x34\x79\x53\x6b\x7a\x72\x30\x71','\x72\x53\x6b\x70\x57\x36\x76\x7a\x62\x38\x6b\x79','\x63\x38\x6f\x42\x62\x67\x70\x64\x55\x57','\x57\x4f\x4f\x78\x73\x4e\x70\x63\x48\x57','\x57\x37\x37\x64\x48\x72\x2f\x64\x51\x4b\x4c\x68','\x57\x37\x70\x64\x47\x74\x33\x64\x55\x33\x34','\x79\x38\x6f\x7a\x79\x58\x74\x63\x52\x38\x6f\x4b\x57\x37\x2f\x63\x4c\x47','\x63\x6d\x6f\x70\x57\x36\x64\x64\x4d\x4b\x30','\x57\x52\x6e\x50\x57\x34\x7a\x74\x57\x37\x57\x35\x66\x62\x4f','\x57\x34\x42\x64\x4c\x53\x6b\x7a\x69\x53\x6f\x54\x57\x4f\x52\x64\x56\x6d\x6f\x35\x43\x66\x54\x71\x78\x53\x6f\x31\x6a\x47','\x57\x51\x52\x64\x4d\x57\x70\x63\x4e\x47','\x6b\x58\x52\x63\x4d\x38\x6b\x54\x72\x61','\x6e\x38\x6b\x5a\x44\x38\x6b\x63\x73\x67\x78\x63\x4c\x75\x4b','\x42\x75\x5a\x64\x55\x43\x6b\x73\x57\x52\x53','\x42\x47\x6c\x63\x4d\x61\x54\x4e\x6f\x43\x6b\x64\x73\x48\x7a\x4d\x57\x51\x78\x63\x56\x38\x6b\x37','\x73\x53\x6f\x2b\x70\x6d\x6f\x53\x79\x4d\x31\x42\x63\x73\x2f\x64\x4b\x4c\x75\x6d\x6d\x38\x6b\x68','\x43\x53\x6f\x76\x71\x31\x71','\x67\x38\x6f\x4d\x57\x37\x33\x64\x49\x57','\x6d\x76\x6c\x64\x48\x65\x38','\x6c\x43\x6b\x4f\x44\x38\x6b\x42\x75\x76\x4a\x63\x55\x76\x69','\x57\x50\x33\x63\x48\x43\x6f\x51\x57\x52\x70\x64\x4b\x47','\x76\x32\x42\x63\x4a\x6d\x6f\x79\x57\x50\x57','\x57\x36\x5a\x64\x4e\x47\x78\x63\x4f\x53\x6b\x52','\x57\x4f\x6a\x31\x57\x36\x54\x56\x57\x36\x6d','\x57\x4f\x76\x61\x67\x74\x39\x6b\x57\x50\x7a\x4f\x69\x57','\x57\x37\x43\x73\x79\x38\x6b\x53\x7a\x6d\x6f\x2b\x57\x35\x58\x46','\x57\x52\x42\x64\x4e\x53\x6b\x78\x57\x52\x35\x59\x57\x51\x46\x64\x47\x65\x78\x64\x4e\x38\x6b\x45\x71\x47','\x57\x35\x37\x63\x50\x43\x6f\x55\x57\x35\x30\x77','\x72\x6d\x6f\x4e\x57\x36\x61\x31\x61\x57','\x57\x51\x4c\x5a\x57\x36\x35\x7a\x57\x37\x43\x7a\x65\x58\x61','\x57\x35\x42\x63\x55\x49\x6a\x64\x66\x38\x6b\x47\x57\x35\x4b','\x70\x77\x4b\x37\x46\x63\x47','\x57\x52\x4e\x63\x53\x63\x57\x55','\x57\x35\x4b\x6d\x6f\x72\x79','\x57\x35\x34\x6f\x70\x62\x6a\x65','\x57\x50\x78\x63\x4d\x38\x6f\x51\x57\x51\x52\x64\x4e\x38\x6f\x57\x57\x50\x76\x34','\x45\x43\x6f\x46\x73\x63\x2f\x63\x54\x6d\x6f\x4a\x57\x35\x37\x63\x47\x61','\x57\x37\x37\x64\x4a\x62\x64\x64\x4f\x76\x4b','\x57\x52\x62\x4f\x6d\x58\x66\x69','\x57\x37\x70\x64\x4b\x73\x46\x64\x4e\x66\x30','\x57\x37\x75\x44\x63\x43\x6f\x34\x57\x34\x30','\x68\x43\x6b\x63\x6d\x6d\x6b\x61\x44\x57','\x69\x38\x6b\x58\x44\x43\x6b\x73\x44\x71','\x42\x43\x6f\x62\x57\x35\x46\x63\x4c\x74\x53','\x75\x30\x37\x63\x4a\x43\x6f\x65','\x42\x48\x33\x64\x47\x64\x4b\x7a\x73\x53\x6b\x69\x6b\x47','\x57\x35\x43\x62\x72\x77\x4b\x68\x57\x34\x6d\x37\x6e\x53\x6b\x6f\x77\x4b\x79\x76\x65\x57','\x63\x6d\x6f\x7a\x6f\x47','\x57\x36\x64\x63\x55\x6d\x6f\x45\x57\x34\x7a\x62','\x74\x43\x6f\x69\x45\x53\x6f\x2f\x7a\x57','\x57\x35\x75\x43\x69\x63\x66\x2b','\x57\x36\x4a\x63\x4e\x53\x6f\x77\x57\x37\x53\x31\x57\x50\x4a\x64\x4b\x76\x47','\x77\x74\x4f\x74\x46\x53\x6b\x7a','\x57\x37\x75\x35\x6b\x71\x39\x66','\x66\x38\x6f\x52\x57\x35\x74\x64\x4d\x38\x6f\x42','\x70\x6d\x6f\x79\x57\x37\x68\x64\x4a\x49\x38','\x45\x47\x79\x6c\x7a\x6d\x6b\x6b','\x57\x51\x35\x6c\x74\x4a\x6c\x63\x55\x57','\x57\x51\x48\x2f\x57\x36\x66\x45\x57\x35\x71\x35\x64\x62\x4f','\x42\x38\x6f\x56\x44\x4c\x6c\x64\x4d\x53\x6b\x4e\x57\x37\x37\x64\x50\x57','\x57\x50\x6a\x44\x6c\x59\x50\x6d\x57\x50\x50\x49\x62\x71','\x57\x34\x78\x64\x4d\x38\x6b\x43\x41\x6d\x6b\x77\x57\x35\x74\x63\x50\x6d\x6b\x6e\x46\x71','\x41\x38\x6f\x35\x75\x75\x4a\x64\x47\x43\x6b\x38\x57\x36\x2f\x64\x50\x47','\x6a\x61\x57\x32\x75\x4c\x33\x63\x4c\x53\x6b\x6e\x57\x50\x57','\x57\x51\x43\x58\x6a\x4a\x39\x78\x57\x52\x37\x63\x4f\x78\x57','\x57\x36\x6d\x51\x74\x49\x37\x64\x4f\x47','\x57\x50\x2f\x64\x54\x53\x6b\x6b\x70\x57\x35\x61\x57\x4f\x4f\x6b','\x57\x4f\x4e\x64\x51\x53\x6b\x42\x6e\x58\x7a\x53\x57\x50\x30\x4b','\x57\x50\x48\x41\x42\x43\x6b\x66\x75\x57','\x57\x36\x79\x2f\x77\x4d\x75','\x43\x6d\x6f\x51\x6d\x38\x6b\x49\x43\x4d\x52\x63\x4f\x4c\x6d\x74','\x7a\x38\x6f\x56\x57\x37\x78\x63\x4e\x65\x71','\x57\x51\x2f\x64\x56\x43\x6b\x62\x70\x71','\x57\x51\x6a\x34\x62\x77\x52\x63\x56\x53\x6f\x4f\x57\x36\x75\x69\x57\x37\x74\x64\x51\x38\x6f\x46\x42\x47\x57','\x57\x50\x72\x45\x6e\x74\x31\x37','\x6d\x6d\x6f\x34\x57\x37\x75','\x57\x50\x76\x78\x68\x73\x58\x44\x57\x50\x53','\x57\x4f\x50\x50\x71\x53\x6b\x42\x45\x47','\x73\x38\x6f\x42\x57\x35\x5a\x63\x47\x63\x79\x75\x57\x51\x6d\x71','\x57\x4f\x76\x50\x69\x6d\x6b\x5a\x57\x52\x57','\x77\x38\x6b\x66\x57\x37\x6d','\x57\x35\x64\x63\x52\x74\x58\x46\x65\x43\x6b\x4d\x57\x35\x2f\x63\x4d\x57','\x63\x76\x31\x6b\x63\x38\x6f\x70\x57\x52\x4e\x63\x4a\x48\x72\x4d\x57\x50\x79\x52\x71\x58\x57','\x57\x34\x34\x72\x70\x47\x48\x65\x57\x51\x58\x43\x69\x47','\x44\x6d\x6f\x4f\x57\x36\x56\x63\x54\x71','\x57\x51\x52\x64\x52\x6d\x6b\x76\x66\x48\x6d','\x57\x4f\x5a\x64\x4b\x43\x6b\x7a\x67\x74\x65','\x69\x6d\x6b\x66\x7a\x6d\x6b\x44\x43\x71','\x57\x4f\x4f\x71\x6f\x72\x31\x5a','\x6a\x65\x69\x74\x42\x62\x64\x63\x50\x49\x54\x4d','\x57\x37\x68\x63\x51\x73\x72\x30\x65\x47','\x46\x57\x7a\x53\x6d\x5a\x78\x63\x4d\x57\x4c\x73\x73\x4a\x61','\x6e\x53\x6b\x30\x42\x53\x6b\x6f\x76\x31\x4a\x63\x48\x30\x53','\x6e\x38\x6b\x4c\x57\x51\x33\x64\x51\x63\x66\x53\x57\x35\x6d\x44','\x57\x37\x52\x64\x56\x43\x6f\x4a\x74\x71\x2f\x63\x4a\x57','\x44\x6d\x6b\x74\x57\x50\x4a\x63\x54\x38\x6f\x63\x57\x37\x70\x63\x4c\x43\x6f\x33\x6f\x66\x57','\x63\x68\x6c\x64\x4f\x30\x53\x64','\x57\x34\x33\x63\x54\x6d\x6f\x79\x41\x75\x47\x73\x57\x35\x34\x4d\x64\x77\x75\x36\x57\x50\x62\x6c','\x6d\x38\x6f\x6e\x57\x35\x70\x64\x4c\x4d\x30','\x70\x53\x6f\x51\x57\x36\x74\x64\x47\x77\x52\x64\x48\x38\x6b\x33\x57\x34\x75','\x79\x76\x35\x2b\x71\x58\x78\x63\x52\x31\x37\x63\x53\x53\x6f\x66\x46\x53\x6b\x6b\x57\x34\x4f\x68','\x76\x73\x33\x64\x49\x63\x57\x5a','\x57\x35\x46\x64\x4e\x6d\x6b\x58\x57\x37\x53','\x57\x36\x4f\x61\x6e\x66\x43','\x57\x36\x4e\x64\x4f\x43\x6f\x59\x71\x72\x4e\x63\x4f\x38\x6b\x68\x57\x34\x69','\x57\x50\x35\x54\x70\x6d\x6b\x5a'];_0x4916=function(){return _0x3dd4a7;};return _0x4916();}_0x42abbd[_0x33d103(0x190,'\x52\x48\x69\x65')+_0x33d103(0x127,'\x57\x53\x46\x61')]=_0x337453,module[_0x33d103(0x18a,'\x6d\x57\x61\x23')]=_0x42abbd;
|
|
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
|
-
|