@simosphere/tokenizer-speedup 0.7.4 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/cli/analyze.js +1 -1
  2. package/dist/cli/config-cmd.js +1 -1
  3. package/dist/cli/index.js +1 -1
  4. package/dist/cli/init-cmd.js +1 -0
  5. package/dist/cli/setup-cmd.js +1 -1
  6. package/dist/cloud/stripe-checkout.js +1 -1
  7. package/dist/cloud/stripe-config.js +1 -1
  8. package/dist/cloud/stripe-usage.js +1 -1
  9. package/dist/cloud/stripe-webhooks.js +1 -1
  10. package/dist/cloud/subscription-store.js +1 -1
  11. package/dist/manifest.json +37 -32
  12. package/dist/mcp/index.js +2 -0
  13. package/dist/mcp/resources.js +1 -0
  14. package/dist/mcp/session.js +1 -0
  15. package/dist/mcp/tools.js +1 -0
  16. package/dist/plugin/cli.js +1 -1
  17. package/dist/plugin/config-loader.js +1 -1
  18. package/dist/plugin/context-compressor.js +1 -1
  19. package/dist/plugin/hook-dispatcher.js +1 -1
  20. package/dist/plugin/metering-client.js +1 -1
  21. package/dist/plugin/metrics-collector.js +1 -1
  22. package/dist/plugin/onboarding.js +1 -1
  23. package/dist/plugin/precompact-handler.js +1 -1
  24. package/dist/plugin/report.js +1 -1
  25. package/dist/plugin/rule-analytics-store.js +1 -1
  26. package/dist/plugin/rule-analytics.js +1 -1
  27. package/dist/plugin/rule-engine.js +1 -1
  28. package/dist/plugin/rule-sharing.js +1 -1
  29. package/dist/plugin/rule-suggest.js +1 -1
  30. package/dist/plugin/session-start.js +1 -1
  31. package/dist/plugin/smart-context.js +1 -1
  32. package/dist/shared/license.js +1 -1
  33. package/dist/shared/providers/claude-provider.js +1 -1
  34. package/dist/shared/providers/openai-provider.js +1 -1
  35. package/dist/shared/token-counter.js +1 -1
  36. package/dist/shared/token-provider.js +1 -1
  37. package/package.json +7 -3
@@ -1 +1 @@
1
- const _0x5259c3=_0x3348;(function(_0x11b825,_0x207b8c){const _0x40e6a6=_0x3348,_0x4d1fc3=_0x11b825();while(!![]){try{const _0x1e8e6f=parseInt(_0x40e6a6(0x165))/0x1*(-parseInt(_0x40e6a6(0x174))/0x2)+-parseInt(_0x40e6a6(0x172))/0x3*(-parseInt(_0x40e6a6(0x168))/0x4)+-parseInt(_0x40e6a6(0x167))/0x5*(parseInt(_0x40e6a6(0x16b))/0x6)+parseInt(_0x40e6a6(0x163))/0x7+parseInt(_0x40e6a6(0x16f))/0x8+parseInt(_0x40e6a6(0x16a))/0x9+-parseInt(_0x40e6a6(0x16c))/0xa;if(_0x1e8e6f===_0x207b8c)break;else _0x4d1fc3['push'](_0x4d1fc3['shift']());}catch(_0x569507){_0x4d1fc3['push'](_0x4d1fc3['shift']());}}}(_0x860a,0xad929));function _0x860a(){const _0x5e148a=['305253udDZnF','86070SjsVzv','6120750fgaNRF','openai','claude','2812184XQbFht','filter','fLAFs','219nsFicv','countTokens','22ipNSEB','gFpOX','leVGT','5887644yvDAfb','QrbjG','30937GwjjRE','gpt-4o','290nIDaqG','69524FfEzNy','split'];_0x860a=function(){return _0x5e148a;};return _0x860a();}import{readFileSync}from'node:fs';import'../shared/providers/claude-provider.js';import'../shared/providers/openai-provider.js';import{createTokenProvider}from'../shared/token-provider.js';export function analyzeText(_0x1acc81,_0x4ab9b3=_0x5259c3(0x16e),_0x3a741c){const _0x23655e=_0x5259c3,_0x5654ed={'QrbjG':'claude-sonnet-4-20250514','YIbhU':_0x23655e(0x166)},_0x84fb69=_0x3a741c??('claude'===_0x4ab9b3?_0x5654ed[_0x23655e(0x164)]:_0x5654ed['YIbhU']),_0x5c05e6=createTokenProvider(_0x4ab9b3,_0x84fb69),_0x1d1c24=_0x1acc81[_0x23655e(0x169)](/\s+/)[_0x23655e(0x170)](Boolean)['length'];return{'tokens':_0x5c05e6[_0x23655e(0x173)](_0x1acc81),'estimate':_0x5c05e6['estimateTokens'](_0x1acc81),'provider':_0x4ab9b3,'model':_0x84fb69,'chars':_0x1acc81['length'],'words':_0x1d1c24};}function _0x3348(_0x3aff35,_0x1ea973){_0x3aff35=_0x3aff35-0x162;const _0x860a9f=_0x860a();let _0x334852=_0x860a9f[_0x3aff35];return _0x334852;}export function analyzeFile(_0x407290,_0x5ddfe4=_0x5259c3(0x16e),_0x11070d){const _0x517829=_0x5259c3,_0x5b7959={'fLAFs':function(_0x479d97,_0x39fb77,_0x445e58){return _0x479d97(_0x39fb77,_0x445e58);},'leVGT':'utf-8'};return analyzeText(_0x5b7959[_0x517829(0x171)](readFileSync,_0x407290,_0x5b7959[_0x517829(0x162)]),_0x5ddfe4,_0x11070d);}export function compareProviders(_0x17d16f){const _0x2905cd=_0x5259c3,_0x32d9fa={'gFpOX':function(_0x397a3d,_0x4a44ee,_0x3c85bc){return _0x397a3d(_0x4a44ee,_0x3c85bc);}};return{'claude':_0x32d9fa[_0x2905cd(0x175)](analyzeText,_0x17d16f,_0x2905cd(0x16e)),'openai':analyzeText(_0x17d16f,_0x2905cd(0x16d))};}
1
+ (function(_0x446757,_0x30be30){const _0x20beeb=_0x5d02,_0xbe5d60=_0x446757();while(!![]){try{const _0x3c568f=parseInt(_0x20beeb(0x158))/0x1*(-parseInt(_0x20beeb(0x161))/0x2)+-parseInt(_0x20beeb(0x15e))/0x3*(-parseInt(_0x20beeb(0x155))/0x4)+-parseInt(_0x20beeb(0x163))/0x5*(parseInt(_0x20beeb(0x15c))/0x6)+-parseInt(_0x20beeb(0x159))/0x7+parseInt(_0x20beeb(0x157))/0x8+-parseInt(_0x20beeb(0x166))/0x9+parseInt(_0x20beeb(0x164))/0xa;if(_0x3c568f===_0x30be30)break;else _0xbe5d60['push'](_0xbe5d60['shift']());}catch(_0x5334ad){_0xbe5d60['push'](_0xbe5d60['shift']());}}}(_0x74b3,0x308a3));function _0x74b3(){const _0x75b8fe=['1240155UBFHzs','JaSyT','filter','ALDxA','4KwMnSD','fCHTj','2061664DCCGiF','20KaDHXL','1701931wJsIjG','split','length','66RQZOnK','BmbzA','658395PpOXvL','openai','claude-sonnet-4-20250514','18686FoOjbx','kiJru','151620bnUjUl','6229980AzhEdu','gpt-4o'];_0x74b3=function(){return _0x75b8fe;};return _0x74b3();}function _0x5d02(_0x2f8bc3,_0x45be67){_0x2f8bc3=_0x2f8bc3-0x153;const _0x74b36a=_0x74b3();let _0x5d0290=_0x74b36a[_0x2f8bc3];return _0x5d0290;}import{readFileSync}from'node:fs';import'../shared/providers/claude-provider.js';import'../shared/providers/openai-provider.js';import{createTokenProvider}from'../shared/token-provider.js';export function analyzeText(_0x230a1a,_0x3e09ae='claude',_0x5e9ec3){const _0x5737c2=_0x5d02,_0x62be1d={'dJDtQ':function(_0x4ba55c,_0x58ac4e){return _0x4ba55c===_0x58ac4e;},'BmbzA':'claude','ALDxA':_0x5737c2(0x160),'fCHTj':_0x5737c2(0x165),'uLHVx':function(_0x2ec5e6,_0x436ca9,_0x35a7b7){return _0x2ec5e6(_0x436ca9,_0x35a7b7);}},_0x5b431e=_0x5e9ec3??(_0x62be1d['dJDtQ'](_0x62be1d[_0x5737c2(0x15d)],_0x3e09ae)?_0x62be1d[_0x5737c2(0x154)]:_0x62be1d[_0x5737c2(0x156)]),_0x29789d=_0x62be1d['uLHVx'](createTokenProvider,_0x3e09ae,_0x5b431e),_0x286eb2=_0x230a1a[_0x5737c2(0x15a)](/\s+/)[_0x5737c2(0x153)](Boolean)[_0x5737c2(0x15b)];return{'tokens':_0x29789d['countTokens'](_0x230a1a),'estimate':_0x29789d['estimateTokens'](_0x230a1a),'provider':_0x3e09ae,'model':_0x5b431e,'chars':_0x230a1a[_0x5737c2(0x15b)],'words':_0x286eb2};}export function analyzeFile(_0x41b35f,_0x51420a='claude',_0x578a0e){const _0x371207=_0x5d02,_0x1e5137={'JaSyT':function(_0xcc8908,_0x1189d8,_0x4c3dbf){return _0xcc8908(_0x1189d8,_0x4c3dbf);}};return analyzeText(_0x1e5137[_0x371207(0x167)](readFileSync,_0x41b35f,'utf-8'),_0x51420a,_0x578a0e);}export function compareProviders(_0x574829){const _0x2998ba=_0x5d02,_0xac9d50={'kiJru':function(_0xd5697c,_0x1246ad,_0x26bba4){return _0xd5697c(_0x1246ad,_0x26bba4);}};return{'claude':_0xac9d50[_0x2998ba(0x162)](analyzeText,_0x574829,'claude'),'openai':_0xac9d50[_0x2998ba(0x162)](analyzeText,_0x574829,_0x2998ba(0x15f))};}
@@ -1 +1 @@
1
- (function(_0x13f1ad,_0x283aea){const _0x42762a=_0x30e1,_0x283da8=_0x13f1ad();while(!![]){try{const _0x38f449=parseInt(_0x42762a(0xb8))/0x1+parseInt(_0x42762a(0xbb))/0x2+parseInt(_0x42762a(0xbd))/0x3+-parseInt(_0x42762a(0xbf))/0x4+-parseInt(_0x42762a(0xba))/0x5*(-parseInt(_0x42762a(0xc0))/0x6)+parseInt(_0x42762a(0xbe))/0x7+-parseInt(_0x42762a(0xbc))/0x8;if(_0x38f449===_0x283aea)break;else _0x283da8['push'](_0x283da8['shift']());}catch(_0xe0df2c){_0x283da8['push'](_0x283da8['shift']());}}}(_0x43a9,0xdad7d));import'../shared/providers/claude-provider.js';function _0x30e1(_0x3a549b,_0x5cbb6f){_0x3a549b=_0x3a549b-0xb8;const _0x43a96e=_0x43a9();let _0x30e180=_0x43a96e[_0x3a549b];return _0x30e180;}function _0x43a9(){const _0x27bf9c=['2010978UgsmVz','3997539vXdqJh','2158744ngSzJh','246UnXlVw','425129lsKHRo','length','112505bAVjOi','2616758KVFJtU','19691080tohtOt'];_0x43a9=function(){return _0x27bf9c;};return _0x43a9();}import'../shared/providers/openai-provider.js';import{parseConfig}from'../plugin/config-loader.js';export function validateConfigYaml(_0x28dfee){const _0x59ccf4=_0x30e1;try{const _0x3f077c=parseConfig(_0x28dfee);return{'valid':!0x0,'provider':_0x3f077c['provider'],'model':_0x3f077c['model'],'ruleCount':_0x3f077c['rules'][_0x59ccf4(0xb9)]};}catch(_0x32d42b){return{'valid':!0x1,'provider':'','model':'','ruleCount':0x0,'error':_0x32d42b['message']};}}
1
+ function _0x1790(){const _0x44ea86=['6vbFVvQ','422802PGsQeT','3521413XwfkmE','1245736vmOLfj','3713868LvOeGf','58903lzVwMv','ckRiW','45fubLOf','464210hMpMtd','length','1816905feWtkA'];_0x1790=function(){return _0x44ea86;};return _0x1790();}(function(_0x14da15,_0x19fd8d){const _0x144fc6=_0x7683,_0x3b4899=_0x14da15();while(!![]){try{const _0x108269=parseInt(_0x144fc6(0xdb))/0x1+-parseInt(_0x144fc6(0xd3))/0x2+-parseInt(_0x144fc6(0xd7))/0x3+parseInt(_0x144fc6(0xda))/0x4+parseInt(_0x144fc6(0xd5))/0x5+-parseInt(_0x144fc6(0xd6))/0x6*(-parseInt(_0x144fc6(0xd8))/0x7)+parseInt(_0x144fc6(0xd9))/0x8*(-parseInt(_0x144fc6(0xd2))/0x9);if(_0x108269===_0x19fd8d)break;else _0x3b4899['push'](_0x3b4899['shift']());}catch(_0x3c030b){_0x3b4899['push'](_0x3b4899['shift']());}}}(_0x1790,0xab6ea));import'../shared/providers/claude-provider.js';function _0x7683(_0x1d1357,_0x3cae22){_0x1d1357=_0x1d1357-0xd2;const _0x179051=_0x1790();let _0x7683a=_0x179051[_0x1d1357];return _0x7683a;}import'../shared/providers/openai-provider.js';import{parseConfig}from'../plugin/config-loader.js';export function validateConfigYaml(_0x59441d){const _0x45b25f=_0x7683,_0x5a1766={'ckRiW':function(_0x275321,_0x20fc29){return _0x275321(_0x20fc29);}};try{const _0x43c04e=_0x5a1766[_0x45b25f(0xdc)](parseConfig,_0x59441d);return{'valid':!0x0,'provider':_0x43c04e['provider'],'model':_0x43c04e['model'],'ruleCount':_0x43c04e['rules'][_0x45b25f(0xd4)]};}catch(_0x23c6ba){return{'valid':!0x1,'provider':'','model':'','ruleCount':0x0,'error':_0x23c6ba['message']};}}
package/dist/cli/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const _0x533665=_0x8fd7;(function(_0x3f2219,_0x164348){const _0x325cb5=_0x8fd7,_0x32e0cc=_0x3f2219();while(!![]){try{const _0x572951=parseInt(_0x325cb5(0xf9))/0x1*(parseInt(_0x325cb5(0xe9))/0x2)+parseInt(_0x325cb5(0xe6))/0x3*(parseInt(_0x325cb5(0x107))/0x4)+parseInt(_0x325cb5(0x111))/0x5+parseInt(_0x325cb5(0x10b))/0x6+parseInt(_0x325cb5(0xf7))/0x7*(-parseInt(_0x325cb5(0xe1))/0x8)+-parseInt(_0x325cb5(0x106))/0x9*(-parseInt(_0x325cb5(0x10d))/0xa)+parseInt(_0x325cb5(0x112))/0xb*(-parseInt(_0x325cb5(0xf5))/0xc);if(_0x572951===_0x164348)break;else _0x32e0cc['push'](_0x32e0cc['shift']());}catch(_0xec0a44){_0x32e0cc['push'](_0x32e0cc['shift']());}}}(_0x22f4,0x8df13));import{Command}from'commander';import'../shared/providers/claude-provider.js';import'../shared/providers/openai-provider.js';import{createTokenProvider}from'../shared/token-provider.js';function _0x22f4(){const _0x249cb2=['0.7.4','name','Validate\x20configuration\x20file','Analyze\x20inline\x20text\x20instead\x20of\x20file','LLM\x20provider\x20(claude,\x20openai)','message','216896SWKWbN','tokenizer-speedup.yaml','--api-key\x20<key>','YLQTZ','includes','2279961RauDQN','AxIQI','AgPrD','2078BbMBwm','description','-p,\x20--provider\x20<provider>','log','argument','WNfZF','action','rules','[file]','rJKXk','claude-sonnet-4-20250514','apiKey','12yomntL','option','238kekgIJ','config','478wUFIet','../plugin/config-loader.js','Configure\x20TokenizerSpeedUp\x20with\x20your\x20API\x20key\x20and\x20register\x20Claude\x20Code\x20hooks','File\x20to\x20analyze','fTuBs','command','rNlJw','addHelpText','exitCode','setup','wXkIN','sZyFX','stringify','2675565CRmska','4TRarrT','requiredOption','cli/index','Error:\x20','430374xhqskG','argv','30xXgaLO','XyYJf','error','length','183580KInSFF','8290986cvEgsG','provider','utf-8','text','model'];_0x22f4=function(){return _0x249cb2;};return _0x22f4();}import{readFileSync,realpathSync}from'node:fs';import{runSetup}from'./setup-cmd.js';function _0x8fd7(_0x3a7ef4,_0x361bcd){_0x3a7ef4=_0x3a7ef4-0xdb;const _0x22f45f=_0x22f4();let _0x8fd7c7=_0x22f45f[_0x3a7ef4];return _0x8fd7c7;}export function buildCLI(){const _0x2484dd=_0x8fd7,_0x475efe={'rJKXk':function(_0x23fcdc,_0x5deb3a){return _0x23fcdc===_0x5deb3a;},'AxIQI':'gpt-4o','wXkIN':'Error:\x20provide\x20a\x20file\x20argument\x20or\x20--text\x20option','eKEZt':function(_0x1eb5f3,_0x25706d){return _0x1eb5f3>_0x25706d;},'Aecvc':function(_0x5b215c,_0x2f8318){return _0x5b215c??_0x2f8318;},'WNfZF':function(_0x1b7371,_0x4b5208,_0x257571){return _0x1b7371(_0x4b5208,_0x257571);},'fTuBs':function(_0x16b82e,_0x57f554){return _0x16b82e(_0x57f554);},'rNlJw':'Your\x20TokenizerSpeedUp\x20API\x20key\x20(get\x20one\x20at\x20https://tokenizer-speedup.simosphereai.com)','MjnFY':'Analyze\x20token\x20count\x20of\x20a\x20file\x20or\x20text','YLQTZ':_0x2484dd(0xeb),'AgPrD':'claude','PelOx':'-m,\x20--model\x20<model>','sZyFX':'Model\x20name','cdrkM':'-t,\x20--text\x20<text>','FFxrN':_0x2484dd(0xf8),'xnpPl':_0x2484dd(0xdd),'XyYJf':_0x2484dd(0xf1),'iZsxw':'Config\x20file\x20path','JkICn':_0x2484dd(0xe2)},_0x6bc258=new Command();return _0x6bc258[_0x2484dd(0xdc)]('tsu')[_0x2484dd(0xea)]('TokenizerSpeedUp\x20—\x20Multi-LLM\x20Token\x20Optimization\x20CLI')['version'](_0x2484dd(0xdb))[_0x2484dd(0x100)]('after','\x0aExamples:\x0a\x20\x20$\x20tsu\x20setup\x20--api-key\x20YOUR_KEY\x20\x20\x20Configure\x20with\x20your\x20API\x20key\x0a\x20\x20$\x20tsu\x20analyze\x20src/index.ts\x20\x20\x20\x20\x20\x20\x20Count\x20tokens\x20in\x20a\x20file\x0a\x20\x20$\x20tsu\x20analyze\x20--text\x20\x22Hello\x22\x20\x20\x20\x20\x20Count\x20tokens\x20in\x20inline\x20text\x0a\x20\x20$\x20tsu\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Validate\x20tokenizer-speedup.yaml\x0a\x0aQuick\x20Start:\x0a\x20\x201.\x20Get\x20your\x20free\x20API\x20key\x20at\x20https://tokenizer-speedup.simosphereai.com\x0a\x20\x202.\x20Run:\x20tsu\x20setup\x20--api-key\x20YOUR_KEY\x0a\x20\x203.\x20Restart\x20Claude\x20Code\x20—\x20the\x20plugin\x20activates\x20automatically\x0a\x0aDocs:\x20https://tokenizer-speedup.simosphereai.com\x0a'),_0x6bc258[_0x2484dd(0xfe)](_0x2484dd(0x102))['description'](_0x2484dd(0xfb))[_0x2484dd(0x108)](_0x2484dd(0xe3),_0x475efe[_0x2484dd(0xff)])['action'](_0x1001c3=>{const _0x23b0a4=_0x2484dd;runSetup(_0x1001c3[_0x23b0a4(0xf4)]);}),_0x6bc258['command']('analyze')[_0x2484dd(0xea)](_0x475efe['MjnFY'])[_0x2484dd(0xed)]('[file]',_0x2484dd(0xfc))['option'](_0x475efe[_0x2484dd(0xe4)],_0x2484dd(0xdf),_0x475efe[_0x2484dd(0xe8)])[_0x2484dd(0xf6)](_0x475efe['PelOx'],_0x475efe[_0x2484dd(0x104)])[_0x2484dd(0xf6)](_0x475efe['cdrkM'],_0x2484dd(0xde))[_0x2484dd(0xef)]((_0x394e9c,_0x40a41c)=>{const _0x288e80=_0x2484dd,_0x4a042f=_0x40a41c[_0x288e80(0x116)]??(_0x475efe[_0x288e80(0xf2)]('claude',_0x40a41c[_0x288e80(0x113)])?_0x288e80(0xf3):_0x475efe[_0x288e80(0xe7)]);let _0xb878cd,_0x2f2513;try{_0xb878cd=createTokenProvider(_0x40a41c[_0x288e80(0x113)],_0x4a042f);}catch(_0x13f61f){return console['error'](_0x288e80(0x10a)+_0x13f61f[_0x288e80(0xe0)]),void(process[_0x288e80(0x101)]=0x1);}if(void 0x0!==_0x40a41c[_0x288e80(0x115)])_0x2f2513=_0x40a41c[_0x288e80(0x115)];else{if(!_0x394e9c)return console[_0x288e80(0x10f)](_0x475efe[_0x288e80(0x103)]),void(process[_0x288e80(0x101)]=0x1);_0x2f2513=readFileSync(_0x394e9c,'utf-8');}_0x475efe['eKEZt'](_0x2f2513[_0x288e80(0x110)],0x7a120)&&console[_0x288e80(0x10f)]('Warning:\x20large\x20input\x20('+(_0x2f2513[_0x288e80(0x110)]/0x3e8)['toFixed'](0x0)+'K\x20chars)\x20—\x20processing\x20may\x20be\x20slow.');const _0x1d6fc0=_0xb878cd['countTokens'](_0x2f2513),_0x3de2a9=_0xb878cd['estimateTokens'](_0x2f2513);console['log'](JSON['stringify']({'file':_0x475efe['Aecvc'](_0x394e9c,'(inline)'),'tokens':_0x1d6fc0,'estimate':_0x3de2a9,'provider':_0x40a41c['provider'],'model':_0x4a042f}));}),_0x6bc258['command'](_0x475efe['FFxrN'])[_0x2484dd(0xea)](_0x475efe['xnpPl'])[_0x2484dd(0xed)](_0x475efe[_0x2484dd(0x10e)],_0x475efe['iZsxw'],_0x475efe['JkICn'])['action'](async _0x174bfd=>{const _0x1def43=_0x2484dd;try{const _0x4f6f96=_0x475efe[_0x1def43(0xee)](readFileSync,_0x174bfd,_0x1def43(0x114)),{parseConfig:_0x17e74d}=await import(_0x1def43(0xfa)),_0x1698a8=_0x475efe[_0x1def43(0xfd)](_0x17e74d,_0x4f6f96);console['log'](JSON[_0x1def43(0x105)]({'valid':!0x0,'provider':_0x1698a8['provider'],'model':_0x1698a8['model'],'ruleCount':_0x1698a8[_0x1def43(0xf0)]['length']}));}catch(_0x171f05){console[_0x1def43(0xec)](JSON['stringify']({'valid':!0x1,'error':_0x171f05[_0x1def43(0xe0)]})),process[_0x1def43(0x101)]=0x1;}}),_0x6bc258;}const resolvedArgv1=((()=>{const _0x4bf85a=_0x8fd7;try{return realpathSync(process[_0x4bf85a(0x10c)][0x1]??'')['replace'](/\\/g,'/');}catch{return process['argv'][0x1]?.['replace'](/\\/g,'/')??'';}})());resolvedArgv1[_0x533665(0xe5)](_0x533665(0x109))&&buildCLI()['parse']();
2
+ const _0x5b2d42=_0x3098;(function(_0x3658ec,_0x3df8db){const _0x5a22d5=_0x3098,_0x30ab2=_0x3658ec();while(!![]){try{const _0x38e196=parseInt(_0x5a22d5(0x111))/0x1*(-parseInt(_0x5a22d5(0x12b))/0x2)+-parseInt(_0x5a22d5(0x12d))/0x3+-parseInt(_0x5a22d5(0x108))/0x4+-parseInt(_0x5a22d5(0x112))/0x5*(-parseInt(_0x5a22d5(0x137))/0x6)+parseInt(_0x5a22d5(0x115))/0x7+-parseInt(_0x5a22d5(0x131))/0x8*(parseInt(_0x5a22d5(0x12e))/0x9)+parseInt(_0x5a22d5(0xfe))/0xa*(parseInt(_0x5a22d5(0x10e))/0xb);if(_0x38e196===_0x3df8db)break;else _0x30ab2['push'](_0x30ab2['shift']());}catch(_0x33eee1){_0x30ab2['push'](_0x30ab2['shift']());}}}(_0x37a8,0x2943e));function _0x3098(_0xc2c608,_0x4d5e6d){_0xc2c608=_0xc2c608-0xf8;const _0x37a847=_0x37a8();let _0x3098e2=_0x37a847[_0xc2c608];return _0x3098e2;}import{Command}from'commander';import'../shared/providers/claude-provider.js';import'../shared/providers/openai-provider.js';import{createTokenProvider}from'../shared/token-provider.js';import{readFileSync,realpathSync}from'node:fs';import{runSetup}from'./setup-cmd.js';import{runInit}from'./init-cmd.js';export function buildCLI(){const _0xeebdcf=_0x3098,_0x162e45={'jSBca':function(_0xbf387c,_0x3d1716){return _0xbf387c===_0x3d1716;},'ARLDb':_0xeebdcf(0x11f),'rftfZ':function(_0x4ca0e9,_0xda157c,_0x2cfa0f){return _0x4ca0e9(_0xda157c,_0x2cfa0f);},'joUpH':function(_0x35fbd9,_0x6a4756){return _0x35fbd9!==_0x6a4756;},'SrFNN':_0xeebdcf(0x100),'CuhNU':'1.3','ocQCw':'utf-8','MqHER':'../plugin/config-loader.js','BYrJR':function(_0x42fd6a,_0x8acae9){return _0x42fd6a(_0x8acae9);},'BSlxA':function(_0x54a31e){return _0x54a31e();},'ApjTL':_0xeebdcf(0x132),'LkCZO':'after','WDkSx':_0xeebdcf(0x10a),'WTUKx':_0xeebdcf(0x130),'IXsVb':_0xeebdcf(0xfd),'mjgrW':_0xeebdcf(0x118),'HHSMz':'File\x20to\x20analyze','DZAXb':'-p,\x20--provider\x20<provider>','vruks':_0xeebdcf(0x121),'acgSQ':'claude','ULUuA':'Model\x20name','hkXzq':'-t,\x20--text\x20<text>','BrBeW':_0xeebdcf(0x10b),'VKMyF':_0xeebdcf(0x12f),'ZiPZv':'tokenizer-speedup.yaml','Oxukq':'Create\x20a\x20starter\x20tokenizer-speedup.yaml\x20in\x20the\x20current\x20directory'},_0x230de6=new Command();return _0x230de6[_0xeebdcf(0x133)](_0x162e45[_0xeebdcf(0x134)])[_0xeebdcf(0x11e)](_0xeebdcf(0x114))[_0xeebdcf(0x11a)]('0.8.0')[_0xeebdcf(0x11d)](_0x162e45[_0xeebdcf(0x126)],_0x162e45[_0xeebdcf(0x10d)]),_0x230de6[_0xeebdcf(0x106)](_0x162e45[_0xeebdcf(0x12a)])[_0xeebdcf(0x11e)](_0x162e45['IXsVb'])['requiredOption'](_0x162e45[_0xeebdcf(0x135)],'Your\x20TokenizerSpeedUp\x20API\x20key\x20(get\x20one\x20at\x20https://tokenizer-speedup.simosphereai.com)')['action'](_0x551f60=>{runSetup(_0x551f60['apiKey']);}),_0x230de6[_0xeebdcf(0x106)](_0xeebdcf(0x120))[_0xeebdcf(0x11e)](_0xeebdcf(0xf9))['argument']('[file]',_0x162e45['HHSMz'])[_0xeebdcf(0x117)](_0x162e45[_0xeebdcf(0x101)],_0x162e45['vruks'],_0x162e45[_0xeebdcf(0xf8)])[_0xeebdcf(0x117)]('-m,\x20--model\x20<model>',_0x162e45[_0xeebdcf(0x138)])[_0xeebdcf(0x117)](_0x162e45[_0xeebdcf(0x123)],'Analyze\x20inline\x20text\x20instead\x20of\x20file')[_0xeebdcf(0xfb)]((_0x5053c1,_0x2c879e)=>{const _0x459e26=_0xeebdcf,_0x150843=_0x2c879e['model']??(_0x162e45[_0x459e26(0x10f)]('claude',_0x2c879e['provider'])?_0x459e26(0x105):_0x162e45['ARLDb']);let _0x32043b,_0x21c16e;try{_0x32043b=_0x162e45['rftfZ'](createTokenProvider,_0x2c879e[_0x459e26(0x103)],_0x150843);}catch(_0x4ec082){return console['error'](_0x459e26(0x109)+_0x4ec082['message']),void(process[_0x459e26(0x129)]=0x1);}if(_0x162e45[_0x459e26(0x124)](void 0x0,_0x2c879e[_0x459e26(0xfc)]))_0x21c16e=_0x2c879e['text'];else{if(!_0x5053c1)return console[_0x459e26(0x104)](_0x162e45[_0x459e26(0x110)]),void(process['exitCode']=0x1);_0x21c16e=readFileSync(_0x5053c1,'utf-8');}_0x21c16e['length']>0x7a120&&console['error'](_0x459e26(0x10c)+(_0x21c16e[_0x459e26(0x136)]/0x3e8)[_0x459e26(0x122)](0x0)+'K\x20chars)\x20—\x20processing\x20may\x20be\x20slow.');const _0x45f4ec=_0x32043b[_0x459e26(0x125)](_0x21c16e),_0x5d9188=_0x32043b['estimateTokens'](_0x21c16e);console['log'](JSON['stringify']({'file':_0x5053c1??'(inline)','tokens':_0x45f4ec,'tokens_method':_0x459e26(0xfa),'estimate':_0x5d9188,'estimate_method':_0x459e26(0x107)+(_0x162e45[_0x459e26(0x10f)]('openai',_0x2c879e['provider'])?_0x162e45['CuhNU']:_0x459e26(0xff))+')','provider':_0x2c879e[_0x459e26(0x103)],'model':_0x150843}));}),_0x230de6['command'](_0xeebdcf(0x12c))['description']('Validate\x20configuration\x20file')[_0xeebdcf(0x116)](_0x162e45['BrBeW'],_0x162e45['VKMyF'],_0x162e45[_0xeebdcf(0x128)])[_0xeebdcf(0xfb)](async _0x3a1cfc=>{const _0x158e69=_0xeebdcf;try{const _0x2b7d9d=readFileSync(_0x3a1cfc,_0x162e45['ocQCw']),{parseConfig:_0x461a03}=await import(_0x162e45[_0x158e69(0x127)]),_0x2e9399=_0x162e45['BYrJR'](_0x461a03,_0x2b7d9d);console[_0x158e69(0x11c)](JSON[_0x158e69(0x113)]({'valid':!0x0,'provider':_0x2e9399['provider'],'model':_0x2e9399['model'],'ruleCount':_0x2e9399[_0x158e69(0x119)]['length']}));}catch(_0x4f62ec){console[_0x158e69(0x11c)](JSON[_0x158e69(0x113)]({'valid':!0x1,'error':_0x4f62ec['message']})),process['exitCode']=0x1;}}),_0x230de6['command']('init')['description'](_0x162e45['Oxukq'])['action'](()=>{_0x162e45['BSlxA'](runInit);}),_0x230de6;}function _0x37a8(){const _0x2c72ca=['Error:\x20','\x0aExamples:\x0a\x20\x20$\x20tsu\x20setup\x20--api-key\x20YOUR_KEY\x20\x20\x20Configure\x20and\x20register\x20Claude\x20Code\x20hooks\x0a\x20\x20$\x20tsu\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20starter\x20tokenizer-speedup.yaml\x0a\x20\x20$\x20tsu\x20analyze\x20src/index.ts\x20\x20\x20\x20\x20\x20\x20Count\x20tokens\x20in\x20a\x20file\x0a\x20\x20$\x20tsu\x20analyze\x20--text\x20\x22Hello\x22\x20\x20\x20\x20\x20Count\x20tokens\x20in\x20inline\x20text\x0a\x20\x20$\x20tsu\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Validate\x20tokenizer-speedup.yaml\x0a\x0aQuick\x20Start:\x0a\x20\x201.\x20Get\x20your\x20free\x20API\x20key\x20at\x20https://tokenizer-speedup.simosphereai.com\x0a\x20\x202.\x20Run:\x20tsu\x20setup\x20--api-key\x20YOUR_KEY\x0a\x20\x203.\x20Optional:\x20tsu\x20init\x20(creates\x20project-level\x20config)\x0a\x20\x204.\x20Restart\x20Claude\x20Code\x20—\x20the\x20plugin\x20activates\x20automatically\x0a\x0aConfiguration\x20(tokenizer-speedup.yaml):\x0a\x20\x20Place\x20in\x20your\x20project\x20root.\x20Defines\x20keyword\x20triggers,\x20file\x20patterns,\x0a\x20\x20and\x20token\x20limits.\x20Run\x20\x27tsu\x20init\x27\x20to\x20generate\x20a\x20starter\x20config.\x0a\x20\x20Docs:\x20https://tokenizer-speedup.simosphereai.com/#integration\x0a','[file]','Warning:\x20large\x20input\x20(','WDkSx','1289101lqrJjh','jSBca','SrFNN','11ekiSBX','430EhSHdx','stringify','TokenizerSpeedUp\x20—\x20Multi-LLM\x20Token\x20Optimization\x20CLI','827071UsuxQP','argument','option','--api-key\x20<key>','rules','version','cli/index','log','addHelpText','description','gpt-4o','analyze','LLM\x20provider\x20(claude,\x20openai)','toFixed','hkXzq','joUpH','countTokens','LkCZO','MqHER','ZiPZv','exitCode','WTUKx','29294hZnKvY','config','94539DauXAh','317349JaObpn','Config\x20file\x20path','setup','16PjIFbH','tsu','name','ApjTL','mjgrW','length','18726djPpVC','ULUuA','acgSQ','Analyze\x20token\x20count\x20of\x20a\x20file\x20or\x20text','BPE\x20tokenizer\x20(accurate)','action','text','Configure\x20TokenizerSpeedUp\x20with\x20your\x20API\x20key\x20and\x20register\x20Claude\x20Code\x20hooks','10bEHbMF','1.4','Error:\x20provide\x20a\x20file\x20argument\x20or\x20--text\x20option','DZAXb','replace','provider','error','claude-sonnet-4-20250514','command','word\x20heuristic\x20(words\x20×\x20','286304IAtUJd'];_0x37a8=function(){return _0x2c72ca;};return _0x37a8();}const resolvedArgv1=((()=>{const _0x3498a1=_0x3098,_0x42e80a={'myGCx':function(_0x4dc601,_0x13912a){return _0x4dc601(_0x13912a);}};try{return _0x42e80a['myGCx'](realpathSync,process['argv'][0x1]??'')[_0x3498a1(0x102)](/\\/g,'/');}catch{return process['argv'][0x1]?.['replace'](/\\/g,'/')??'';}})());resolvedArgv1['includes'](_0x5b2d42(0x11b))&&buildCLI()['parse']();
@@ -0,0 +1 @@
1
+ function _0x3129(_0x352ab5,_0x436333){_0x352ab5=_0x352ab5-0xba;const _0x1d575c=_0x1d57();let _0x312966=_0x1d575c[_0x352ab5];return _0x312966;}const _0x2a9457=_0x3129;(function(_0x5a71d9,_0x5dfcf2){const _0x240227=_0x3129,_0xa57a91=_0x5a71d9();while(!![]){try{const _0x503491=parseInt(_0x240227(0xc8))/0x1+parseInt(_0x240227(0xc0))/0x2*(parseInt(_0x240227(0xc2))/0x3)+parseInt(_0x240227(0xba))/0x4*(-parseInt(_0x240227(0xc6))/0x5)+-parseInt(_0x240227(0xbf))/0x6*(-parseInt(_0x240227(0xbb))/0x7)+parseInt(_0x240227(0xc3))/0x8+parseInt(_0x240227(0xcc))/0x9*(-parseInt(_0x240227(0xcd))/0xa)+-parseInt(_0x240227(0xbe))/0xb*(-parseInt(_0x240227(0xcb))/0xc);if(_0x503491===_0x5dfcf2)break;else _0xa57a91['push'](_0xa57a91['shift']());}catch(_0x28891f){_0xa57a91['push'](_0xa57a91['shift']());}}}(_0x1d57,0x5a436));function _0x1d57(){const _0x1ef261=['Next\x20steps:','701272fITBmS','2238QJOOyZ','66206uggTbA','exitCode','6lNZFbK','3263792nXWvoX','tokenizer-speedup.yaml','log','335qEJvar','#\x20tokenizer-speedup.yaml\x20—\x20Project\x20Configuration\x0a#\x20Docs:\x20https://tokenizer-speedup.simosphereai.com/#integration\x0aversion:\x201\x0a\x0arules:\x0a\x20\x20-\x20trigger:\x20[\x22fix\x22,\x20\x22bug\x22,\x20\x22error\x22,\x20\x22crash\x22]\x0a\x20\x20\x20\x20load:\x20\x22docs/lessons-learned/*.md\x22\x0a\x20\x20\x20\x20max_tokens:\x202000\x0a\x0a\x20\x20-\x20trigger:\x20[\x22design\x22,\x20\x22brand\x22,\x20\x22theme\x22]\x0a\x20\x20\x20\x20load:\x20\x22docs/design/*.md\x22\x0a\x20\x20\x20\x20summary_only:\x20true\x0a\x0acontext_limits:\x0a\x20\x20max_injected_tokens:\x204000\x0a\x20\x20max_file_tokens:\x201500\x0a\x20\x20compress_above:\x20800\x0a\x0ametering:\x0a\x20\x20endpoint:\x20\x22https://api.simosphere.ai/v1/meter\x22\x0a\x20\x20batch_interval:\x2060\x0a\x20\x20send_content:\x20false\x0a','20949RtyTYK','VJABy','\x20\x203.\x20Restart\x20Claude\x20Code\x20to\x20pick\x20up\x20the\x20new\x20config','96BzPpbR','2587392iofAEu','20RwCWdq','cwd','34028BXoBPi','9562mazAXN','Created\x20tokenizer-speedup.yaml'];_0x1d57=function(){return _0x1ef261;};return _0x1d57();}import{writeFileSync,existsSync}from'node:fs';import{join}from'node:path';const STARTER_CONFIG=_0x2a9457(0xc7);export function runInit(){const _0x30adaa=_0x2a9457,_0x513bfc={'cOdoH':function(_0x16f44c,_0x208f6c,_0x4b9a5f){return _0x16f44c(_0x208f6c,_0x4b9a5f);},'VJABy':'tokenizer-speedup.yaml\x20already\x20exists\x20in\x20this\x20directory.','FwoPI':_0x30adaa(0xbd),'oltdH':'\x20\x201.\x20Edit\x20the\x20rules\x20to\x20match\x20your\x20project\x20structure','HRMSj':'\x20\x202.\x20Run:\x20tsu\x20config\x20tokenizer-speedup.yaml\x20\x20(to\x20validate)','klCuE':_0x30adaa(0xca)},_0x5ef78d=_0x513bfc['cOdoH'](join,process[_0x30adaa(0xce)](),_0x30adaa(0xc4));if(existsSync(_0x5ef78d))return console['error'](_0x513bfc[_0x30adaa(0xc9)]),void(process[_0x30adaa(0xc1)]=0x1);writeFileSync(_0x5ef78d,STARTER_CONFIG,'utf-8'),console['log'](_0x30adaa(0xbc)),console['log'](''),console[_0x30adaa(0xc5)](_0x513bfc['FwoPI']),console[_0x30adaa(0xc5)](_0x513bfc['oltdH']),console['log'](_0x513bfc['HRMSj']),console[_0x30adaa(0xc5)](_0x513bfc['klCuE']);}
@@ -1 +1 @@
1
- const _0x2583ba=_0x2317;(function(_0x4d3510,_0x25d5d8){const _0x1ba371=_0x2317,_0x229628=_0x4d3510();while(!![]){try{const _0x3f6665=-parseInt(_0x1ba371(0x1e5))/0x1+-parseInt(_0x1ba371(0x1e9))/0x2*(-parseInt(_0x1ba371(0x1ff))/0x3)+-parseInt(_0x1ba371(0x1ee))/0x4*(-parseInt(_0x1ba371(0x1f0))/0x5)+-parseInt(_0x1ba371(0x1f5))/0x6+parseInt(_0x1ba371(0x1ef))/0x7*(parseInt(_0x1ba371(0x1fd))/0x8)+parseInt(_0x1ba371(0x200))/0x9+-parseInt(_0x1ba371(0x1fe))/0xa;if(_0x3f6665===_0x25d5d8)break;else _0x229628['push'](_0x229628['shift']());}catch(_0x10c574){_0x229628['push'](_0x229628['shift']());}}}(_0x3e78,0x58f88));import{readFileSync,writeFileSync,mkdirSync}from'node:fs';import{join}from'node:path';import{homedir}from'node:os';const CONFIG_DIR=join(homedir(),'.config','tokenizer-speedup'),CONFIG_FILE=join(CONFIG_DIR,_0x2583ba(0x1ec)),CLAUDE_SETTINGS_FILE=join(homedir(),'.claude',_0x2583ba(0x1e7));export function runSetup(_0x27f32f){const _0x4d21f4=_0x2583ba,_0x24e5fe={'NYdFc':'✅\x20API\x20key\x20saved\x20successfully.','hCgYV':_0x4d21f4(0x1eb),'gTdVb':'✅\x20Hooks\x20registered\x20in\x20Claude\x20Code\x20settings.'};try{if(!_0x27f32f||0x0===_0x27f32f['trim']()[_0x4d21f4(0x1f4)])return console['error'](_0x4d21f4(0x202)),void(process['exitCode']=0x1);if(_0x27f32f[_0x4d21f4(0x1e8)]()[_0x4d21f4(0x1f4)]<0x8)return console['error']('❌\x20API\x20key\x20is\x20too\x20short\x20(minimum\x208\x20characters).'),void(process[_0x4d21f4(0x204)]=0x1);saveApiKey(_0x27f32f[_0x4d21f4(0x1e8)]()),console['log'](_0x24e5fe[_0x4d21f4(0x1e6)]),console['log'](_0x24e5fe[_0x4d21f4(0x1f9)]),registerHooks(),console['log'](_0x24e5fe[_0x4d21f4(0x1f7)]),console['log'](''),console[_0x4d21f4(0x1f3)]('Setup\x20complete.\x20Please\x20restart\x20Claude\x20Code\x20to\x20activate\x20the\x20plugin.');}catch(_0x5943ee){console[_0x4d21f4(0x203)](_0x4d21f4(0x1f2)+_0x5943ee['message']),process['exitCode']=0x1;}}function saveApiKey(_0x2fa3c8){const _0x36abcd=_0x2583ba,_0x2242a7={'Krxur':_0x36abcd(0x1f6),'oGYzA':function(_0x3c4787,_0x42908d){return _0x3c4787+_0x42908d;}};mkdirSync(CONFIG_DIR,{'recursive':!0x0});let _0x196c2a={};try{_0x196c2a=JSON['parse'](readFileSync(CONFIG_FILE,_0x2242a7[_0x36abcd(0x1fa)]));}catch{}_0x196c2a['apiKey']=_0x2fa3c8,writeFileSync(CONFIG_FILE,_0x2242a7['oGYzA'](JSON[_0x36abcd(0x1ed)](_0x196c2a,null,0x2),'\x0a'),_0x2242a7[_0x36abcd(0x1fa)]);}function _0x3e78(){const _0x37b861=['5425880GCDgYR','3hLuRyI','4110192uAoBvQ','MraSQ','❌\x20API\x20key\x20cannot\x20be\x20empty.','error','exitCode','708682vQcCcf','NYdFc','settings.local.json','trim','1300408rBPNul','command','⚠️\x20\x20Claude\x20Code\x20will\x20restart\x20automatically\x20to\x20load\x20the\x20plugin.\x20This\x20is\x20expected\x20behavior.','config.json','stringify','263372fKhAMD','35lnxkeo','15gJRSRC','JxODq','❌\x20Setup\x20failed:\x20','log','length','2255892PPyMJB','utf-8','gTdVb','ZvgQm','hCgYV','Krxur','parse','dieIt','1099608YCrpyx'];_0x3e78=function(){return _0x37b861;};return _0x3e78();}function _0x2317(_0x56721f,_0xee2385){_0x56721f=_0x56721f-0x1e5;const _0x3e7827=_0x3e78();let _0x23179e=_0x3e7827[_0x56721f];return _0x23179e;}function registerHooks(){const _0xeec747=_0x2583ba,_0x1992f1={'ZvgQm':function(_0x26652d,_0x4a6a1a,_0x541135){return _0x26652d(_0x4a6a1a,_0x541135);},'JxODq':function(_0x4fc184,_0x401995,_0x156d13){return _0x4fc184(_0x401995,_0x156d13);},'MraSQ':'.claude','mdXdE':_0xeec747(0x1f6),'wiGLP':'command','YhXlU':'tokenizer-speedup','dieIt':function(_0x4fbfa6,_0x484170,_0x5803b6,_0x513af2){return _0x4fbfa6(_0x484170,_0x5803b6,_0x513af2);}};_0x1992f1[_0xeec747(0x1f8)](mkdirSync,_0x1992f1['JxODq'](join,homedir(),_0x1992f1[_0xeec747(0x201)]),{'recursive':!0x0});let _0x296bf1={};try{_0x296bf1=JSON['parse'](_0x1992f1[_0xeec747(0x1f1)](readFileSync,CLAUDE_SETTINGS_FILE,_0x1992f1['mdXdE']));}catch{}const _0x2b182b=_0x296bf1['hooks']??{};_0x2b182b['UserPromptSubmit']=[{'matcher':'','hooks':[{'type':_0x1992f1['wiGLP'],'command':_0x1992f1['YhXlU']}]}],_0x2b182b['Stop']=[{'matcher':'','hooks':[{'type':_0xeec747(0x1ea),'command':_0x1992f1['YhXlU'],'timeout':0xa}]}],_0x296bf1['hooks']=_0x2b182b,_0x1992f1[_0xeec747(0x1fc)](writeFileSync,CLAUDE_SETTINGS_FILE,JSON['stringify'](_0x296bf1,null,0x2)+'\x0a',_0x1992f1['mdXdE']);}export function loadApiKeyFromConfig(){const _0x2e3f83=_0x2583ba;try{return JSON[_0x2e3f83(0x1fb)](readFileSync(CONFIG_FILE,_0x2e3f83(0x1f6)))['apiKey']??void 0x0;}catch{return;}}
1
+ const _0x41617e=_0x1534;(function(_0x1991c3,_0x5b6b77){const _0x3357c9=_0x1534,_0x5cc092=_0x1991c3();while(!![]){try{const _0x2bac3d=-parseInt(_0x3357c9(0xdc))/0x1+-parseInt(_0x3357c9(0xf3))/0x2+-parseInt(_0x3357c9(0xf0))/0x3*(-parseInt(_0x3357c9(0xe3))/0x4)+parseInt(_0x3357c9(0xdd))/0x5*(-parseInt(_0x3357c9(0xe4))/0x6)+parseInt(_0x3357c9(0xef))/0x7*(-parseInt(_0x3357c9(0xe2))/0x8)+-parseInt(_0x3357c9(0xea))/0x9*(parseInt(_0x3357c9(0xf1))/0xa)+parseInt(_0x3357c9(0xd3))/0xb;if(_0x2bac3d===_0x5b6b77)break;else _0x5cc092['push'](_0x5cc092['shift']());}catch(_0xb1525a){_0x5cc092['push'](_0x5cc092['shift']());}}}(_0x53da,0xb8f92));function _0x53da(){const _0x21194f=['✅\x20Hooks\x20registered\x20in\x20Claude\x20Code\x20settings.','.config','utf-8','PreCompact','error','hrVEm','46712743DeExJZ','NbwkE','❌\x20API\x20key\x20cannot\x20be\x20empty.','lGVpC','config.json','log','lXiFR','apiKey','length','423534uxGErS','205szHoLN','message','settings.local.json','tokenizer-speedup','command','1663848lGQALM','4XVzMBu','135390mfRMiT','hooks','QCPZi','⚠️\x20\x20Claude\x20Code\x20will\x20restart\x20automatically\x20to\x20load\x20the\x20plugin.\x20This\x20is\x20expected\x20behavior.','oisXX','mtLUV','1152VDUgev','.claude','exitCode','stringify','fdKUz','21gCACdf','362694VDruru','31830wiGVPF','qjgbs','2459590Usjhai'];_0x53da=function(){return _0x21194f;};return _0x53da();}import{readFileSync,writeFileSync,mkdirSync}from'node:fs';import{join}from'node:path';import{homedir}from'node:os';const CONFIG_DIR=join(homedir(),_0x41617e(0xf5),'tokenizer-speedup'),CONFIG_FILE=join(CONFIG_DIR,_0x41617e(0xd7)),CLAUDE_SETTINGS_FILE=join(homedir(),'.claude',_0x41617e(0xdf));export function runSetup(_0x2c0af7){const _0x9abaca=_0x41617e,_0x5e3470={'psMIf':_0x9abaca(0xd5),'hrVEm':'❌\x20API\x20key\x20is\x20too\x20short\x20(minimum\x208\x20characters).','eXTct':'✅\x20API\x20key\x20saved\x20successfully.','QCPZi':'Setup\x20complete.\x20Please\x20restart\x20Claude\x20Code\x20to\x20activate\x20the\x20plugin.'};try{if(!_0x2c0af7||0x0===_0x2c0af7['trim']()[_0x9abaca(0xdb)])return console['error'](_0x5e3470['psMIf']),void(process['exitCode']=0x1);if(_0x2c0af7['trim']()['length']<0x8)return console[_0x9abaca(0xd1)](_0x5e3470[_0x9abaca(0xd2)]),void(process[_0x9abaca(0xec)]=0x1);saveApiKey(_0x2c0af7['trim']()),console['log'](_0x5e3470['eXTct']),console[_0x9abaca(0xd8)](_0x9abaca(0xe7)),registerHooks(),console[_0x9abaca(0xd8)](_0x9abaca(0xf4)),console[_0x9abaca(0xd8)](''),console[_0x9abaca(0xd8)](_0x5e3470[_0x9abaca(0xe6)]);}catch(_0x1d8f76){console[_0x9abaca(0xd1)]('❌\x20Setup\x20failed:\x20'+_0x1d8f76[_0x9abaca(0xde)]),process[_0x9abaca(0xec)]=0x1;}}function _0x1534(_0x2450fd,_0x4cd41b){_0x2450fd=_0x2450fd-0xd0;const _0x53dafe=_0x53da();let _0x153457=_0x53dafe[_0x2450fd];return _0x153457;}function saveApiKey(_0x2c6c80){const _0x5513e1=_0x41617e,_0x42a7df={'mtLUV':function(_0x202be1,_0x3af6d1,_0x3c56dc){return _0x202be1(_0x3af6d1,_0x3c56dc);},'KXaVn':_0x5513e1(0xf6),'BANGU':function(_0x3bbdfe,_0x45cfe5,_0xc47ec0,_0x31a142){return _0x3bbdfe(_0x45cfe5,_0xc47ec0,_0x31a142);}};mkdirSync(CONFIG_DIR,{'recursive':!0x0});let _0x1a4fe7={};try{_0x1a4fe7=JSON['parse'](_0x42a7df[_0x5513e1(0xe9)](readFileSync,CONFIG_FILE,_0x42a7df['KXaVn']));}catch{}_0x1a4fe7['apiKey']=_0x2c6c80,_0x42a7df['BANGU'](writeFileSync,CONFIG_FILE,JSON['stringify'](_0x1a4fe7,null,0x2)+'\x0a','utf-8');}function registerHooks(){const _0x2c408b=_0x41617e,_0x2ff5d7={'lGVpC':function(_0x5131c2,_0x138f27,_0x3f58d5){return _0x5131c2(_0x138f27,_0x3f58d5);},'qjgbs':_0x2c408b(0xeb),'lXiFR':_0x2c408b(0xf6),'NbwkE':'command','fdKUz':'tokenizer-speedup','oisXX':function(_0x337289,_0xab3af5){return _0x337289+_0xab3af5;}};_0x2ff5d7[_0x2c408b(0xd6)](mkdirSync,join(homedir(),_0x2ff5d7[_0x2c408b(0xf2)]),{'recursive':!0x0});let _0x312547={};try{_0x312547=JSON['parse'](_0x2ff5d7[_0x2c408b(0xd6)](readFileSync,CLAUDE_SETTINGS_FILE,_0x2ff5d7[_0x2c408b(0xd9)]));}catch{}const _0x569757=_0x312547[_0x2c408b(0xe5)]??{};_0x569757['SessionStart']=[{'matcher':'startup|resume|clear|compact','hooks':[{'type':_0x2ff5d7[_0x2c408b(0xd4)],'command':_0x2ff5d7['fdKUz'],'timeout':0x5}]}],_0x569757['UserPromptSubmit']=[{'matcher':'','hooks':[{'type':'command','command':_0x2ff5d7[_0x2c408b(0xee)]}]}],_0x569757[_0x2c408b(0xd0)]=[{'matcher':'','hooks':[{'type':_0x2c408b(0xe1),'command':'tokenizer-speedup','timeout':0xa}]}],_0x569757['Stop']=[{'matcher':'','hooks':[{'type':'command','command':_0x2c408b(0xe0),'timeout':0xa}]}],_0x312547[_0x2c408b(0xe5)]=_0x569757,writeFileSync(CLAUDE_SETTINGS_FILE,_0x2ff5d7[_0x2c408b(0xe8)](JSON[_0x2c408b(0xed)](_0x312547,null,0x2),'\x0a'),_0x2ff5d7['lXiFR']);}export function loadApiKeyFromConfig(){const _0x57178d=_0x41617e,_0x58ea5a={'TxvHz':'utf-8'};try{return JSON['parse'](readFileSync(CONFIG_FILE,_0x58ea5a['TxvHz']))[_0x57178d(0xda)]??void 0x0;}catch{return;}}
@@ -1 +1 @@
1
- (function(_0x27a6a9,_0x48c54e){const _0x23c912=_0x4f39,_0x46f64b=_0x27a6a9();while(!![]){try{const _0x1da112=-parseInt(_0x23c912(0x74))/0x1*(-parseInt(_0x23c912(0x79))/0x2)+-parseInt(_0x23c912(0x6e))/0x3*(-parseInt(_0x23c912(0x70))/0x4)+-parseInt(_0x23c912(0x76))/0x5*(-parseInt(_0x23c912(0x71))/0x6)+-parseInt(_0x23c912(0x6d))/0x7+parseInt(_0x23c912(0x6f))/0x8*(-parseInt(_0x23c912(0x7b))/0x9)+parseInt(_0x23c912(0x72))/0xa*(-parseInt(_0x23c912(0x73))/0xb)+-parseInt(_0x23c912(0x77))/0xc*(-parseInt(_0x23c912(0x78))/0xd);if(_0x1da112===_0x48c54e)break;else _0x46f64b['push'](_0x46f64b['shift']());}catch(_0x3ea3de){_0x46f64b['push'](_0x46f64b['shift']());}}}(_0x462e,0xd0bfb));export function buildCheckoutParams(_0x403987){const _0x1e67db=_0x4f39,_0x253055={'MmJAP':_0x1e67db(0x7a)},_0x325382=[{'price':_0x403987[_0x1e67db(0x6c)],'quantity':0x1}];return _0x403987[_0x1e67db(0x75)]&&_0x325382['push']({'price':_0x403987['meteredPriceId']}),{'customer':_0x403987['customerId'],'mode':_0x253055['MmJAP'],'line_items':_0x325382,'success_url':_0x403987['successUrl'],'cancel_url':_0x403987['cancelUrl'],'metadata':{'tier':_0x403987['tier']}};}function _0x4f39(_0x3029dd,_0x58a08c){_0x3029dd=_0x3029dd-0x6c;const _0x462ed5=_0x462e();let _0x4f3917=_0x462ed5[_0x3029dd];return _0x4f3917;}function _0x462e(){const _0x2b219e=['meteredPriceId','5vcrEcS','24sfddIz','10942672DuLHbq','455234dgPvwr','subscription','9475965NwSKbg','recurringPriceId','7716499DvLCdn','366OuGudu','8UkyACr','7564TPYHOi','9448836fbAKbC','40iCHHAl','1942424medQRU','1XMfFWr'];_0x462e=function(){return _0x2b219e;};return _0x462e();}
1
+ (function(_0x228326,_0x4f9e3e){const _0x5ddeb3=_0x5a65,_0xfdd56f=_0x228326();while(!![]){try{const _0x3ec4f9=parseInt(_0x5ddeb3(0x6e))/0x1*(parseInt(_0x5ddeb3(0x74))/0x2)+parseInt(_0x5ddeb3(0x68))/0x3+-parseInt(_0x5ddeb3(0x67))/0x4*(-parseInt(_0x5ddeb3(0x70))/0x5)+-parseInt(_0x5ddeb3(0x69))/0x6*(parseInt(_0x5ddeb3(0x6d))/0x7)+-parseInt(_0x5ddeb3(0x72))/0x8*(parseInt(_0x5ddeb3(0x66))/0x9)+-parseInt(_0x5ddeb3(0x73))/0xa*(-parseInt(_0x5ddeb3(0x6c))/0xb)+parseInt(_0x5ddeb3(0x65))/0xc*(parseInt(_0x5ddeb3(0x6b))/0xd);if(_0x3ec4f9===_0x4f9e3e)break;else _0xfdd56f['push'](_0xfdd56f['shift']());}catch(_0x12acde){_0xfdd56f['push'](_0xfdd56f['shift']());}}}(_0x2f6f,0xe57a5));function _0x5a65(_0x451e02,_0x886a6c){_0x451e02=_0x451e02-0x65;const _0x2f6f2b=_0x2f6f();let _0x5a651f=_0x2f6f2b[_0x451e02];return _0x5a651f;}export function buildCheckoutParams(_0x1228c7){const _0x464578=_0x5a65,_0x4d7733=[{'price':_0x1228c7['recurringPriceId'],'quantity':0x1}];return _0x1228c7['meteredPriceId']&&_0x4d7733['push']({'price':_0x1228c7['meteredPriceId']}),{'customer':_0x1228c7['customerId'],'mode':_0x464578(0x6f),'line_items':_0x4d7733,'success_url':_0x1228c7['successUrl'],'cancel_url':_0x1228c7[_0x464578(0x71)],'metadata':{'tier':_0x1228c7[_0x464578(0x6a)]}};}function _0x2f6f(){const _0x37168c=['6666KUOSzo','3126319QDFizM','1079803fkeRBs','subscription','9830AyJzdI','cancelUrl','201336cTHvSo','3700ntDCTA','2AuGwWb','1221684tSXLeg','270IEbLVJ','1352iToJEN','1366287bsOeEf','18vzJssi','tier','78BBeEIe'];_0x2f6f=function(){return _0x37168c;};return _0x2f6f();}
@@ -1 +1 @@
1
- const _0x45ec3c=_0x512b;function _0x512b(_0x5ca010,_0x28a237){_0x5ca010=_0x5ca010-0x16b;const _0x1501ae=_0x1501();let _0x512b9f=_0x1501ae[_0x5ca010];return _0x512b9f;}function _0x1501(){const _0x5f4e91=['TokenizerSpeedUp\x20Pro','6927010anTjNn','Per-seat\x20pricing.\x20$15/mo/seat\x20+\x208%\x20of\x20savings\x20over\x201M\x20tokens.','11JATHGW','3318SzpifS','32VsUooO','1038243rhmZhz','Unlimited\x20optimization.\x20$5/mo\x20+\x2010%\x20of\x20savings\x20over\x20500K\x20tokens.','5525829SBBiwn','4wJgBYj','2170KYwOJH','302218myMdmz','204XWqVQr','379929xCnTZL','1195YpCiiK'];_0x1501=function(){return _0x5f4e91;};return _0x1501();}(function(_0x1faeda,_0x3b29a7){const _0x4749c8=_0x512b,_0x4356df=_0x1faeda();while(!![]){try{const _0x1ebf40=-parseInt(_0x4749c8(0x174))/0x1*(parseInt(_0x4749c8(0x16c))/0x2)+parseInt(_0x4749c8(0x177))/0x3*(parseInt(_0x4749c8(0x16b))/0x4)+parseInt(_0x4749c8(0x170))/0x5*(-parseInt(_0x4749c8(0x175))/0x6)+-parseInt(_0x4749c8(0x16d))/0x7*(parseInt(_0x4749c8(0x176))/0x8)+parseInt(_0x4749c8(0x179))/0x9+-parseInt(_0x4749c8(0x172))/0xa+-parseInt(_0x4749c8(0x16f))/0xb*(-parseInt(_0x4749c8(0x16e))/0xc);if(_0x1ebf40===_0x3b29a7)break;else _0x4356df['push'](_0x4356df['shift']());}catch(_0x46cd0b){_0x4356df['push'](_0x4356df['shift']());}}}(_0x1501,0x8347e));export const STRIPE_CONFIG={'free':{'name':'TokenizerSpeedUp\x20Free','description':'Up\x20to\x20100K\x20tokens\x20saved/month.\x20Basic\x20dashboard.','recurringPrice':0x0},'pro':{'name':_0x45ec3c(0x171),'description':_0x45ec3c(0x178),'recurringPrice':0x1f4,'meteredUnitAmount':0x1e},'team':{'name':'TokenizerSpeedUp\x20Team','description':_0x45ec3c(0x173),'recurringPrice':0x5dc,'meteredUnitAmount':0x18}};
1
+ function _0x5900(_0xd65b73,_0x29bc61){_0xd65b73=_0xd65b73-0x10e;const _0x3be1be=_0x3be1();let _0x590054=_0x3be1be[_0xd65b73];return _0x590054;}function _0x3be1(){const _0x4fe9a5=['8363560ryLuzF','67839EKdLlg','1408673HnwLSh','196ICYWUb','18oeOAtW','15987544iWtxLw','3186022hTiOtu','3537342eSHLAG','Up\x20to\x20100K\x20tokens\x20saved/month.\x20Basic\x20dashboard.','7864150cOnHkC'];_0x3be1=function(){return _0x4fe9a5;};return _0x3be1();}const _0x4ebbb2=_0x5900;(function(_0x471432,_0x323011){const _0x16406d=_0x5900,_0x270d7e=_0x471432();while(!![]){try{const _0x4b2a5d=-parseInt(_0x16406d(0x111))/0x1+parseInt(_0x16406d(0x115))/0x2+parseInt(_0x16406d(0x110))/0x3*(-parseInt(_0x16406d(0x112))/0x4)+-parseInt(_0x16406d(0x10f))/0x5+parseInt(_0x16406d(0x116))/0x6+-parseInt(_0x16406d(0x10e))/0x7+-parseInt(_0x16406d(0x114))/0x8*(-parseInt(_0x16406d(0x113))/0x9);if(_0x4b2a5d===_0x323011)break;else _0x270d7e['push'](_0x270d7e['shift']());}catch(_0x57fbd2){_0x270d7e['push'](_0x270d7e['shift']());}}}(_0x3be1,0xd3916));export const STRIPE_CONFIG={'free':{'name':'TokenizerSpeedUp\x20Free','description':_0x4ebbb2(0x117),'recurringPrice':0x0},'pro':{'name':'TokenizerSpeedUp\x20Pro','description':'Unlimited\x20optimization.\x20$5/mo\x20+\x2010%\x20of\x20savings\x20over\x20500K\x20tokens.','recurringPrice':0x1f4,'meteredUnitAmount':0x1e},'team':{'name':'TokenizerSpeedUp\x20Team','description':'Per-seat\x20pricing.\x20$15/mo/seat\x20+\x208%\x20of\x20savings\x20over\x201M\x20tokens.','recurringPrice':0x5dc,'meteredUnitAmount':0x18}};
@@ -1 +1 @@
1
- const _0x23a0ad=_0x35ba;function _0x35ba(_0x599b89,_0x515aa3){_0x599b89=_0x599b89-0x1c9;const _0x2e427b=_0x2e42();let _0x35ba11=_0x2e427b[_0x599b89];return _0x35ba11;}function _0x2e42(){const _0x3f8c70=['17155180LgFays','qIptI','1750216eDaNdE','9880038SMWoYJ','meteredUnitAmount','set','pro','floor','2250072UiyYIR','zLLYV','chargeableUnits','4910045tOqMCe','max','4723137gffINd','unitRate','allowance','5548968xdzUXb'];_0x2e42=function(){return _0x3f8c70;};return _0x2e42();}(function(_0x3d87e6,_0x1b1c93){const _0x39e9bd=_0x35ba,_0x1d934e=_0x3d87e6();while(!![]){try{const _0x142f18=parseInt(_0x39e9bd(0x1d0))/0x1+parseInt(_0x39e9bd(0x1d6))/0x2+-parseInt(_0x39e9bd(0x1ca))/0x3+parseInt(_0x39e9bd(0x1cd))/0x4+-parseInt(_0x39e9bd(0x1d9))/0x5+parseInt(_0x39e9bd(0x1d1))/0x6+-parseInt(_0x39e9bd(0x1ce))/0x7;if(_0x142f18===_0x1b1c93)break;else _0x1d934e['push'](_0x1d934e['shift']());}catch(_0x3748d6){_0x1d934e['push'](_0x1d934e['shift']());}}}(_0x2e42,0xdc397));import{STRIPE_CONFIG}from'./stripe-config.js';const TIER_LIMITS={'free':{'allowance':0x186a0,'unitRate':0x0},'pro':{'allowance':0x7a120,'unitRate':STRIPE_CONFIG[_0x23a0ad(0x1d4)][_0x23a0ad(0x1d2)]},'team':{'allowance':0xf4240,'unitRate':STRIPE_CONFIG['team'][_0x23a0ad(0x1d2)]}};export function calculateUsageCharge(_0x9207a9,_0x39f52b){const _0x42d23c=_0x23a0ad,_0x4011de={'qIptI':function(_0xde690,_0x3e11c7){return _0xde690-_0x3e11c7;},'KVeIK':function(_0x48aed9,_0x48896d){return _0x48aed9*_0x48896d;}},_0x2c9513=TIER_LIMITS[_0x9207a9];if(0x0===_0x2c9513[_0x42d23c(0x1cb)])return{'tier':_0x9207a9,'tokensSaved':_0x39f52b,'freeAllowance':_0x2c9513[_0x42d23c(0x1cc)],'chargeableTokens':0x0,'chargeableUnits':0x0,'unitRate':0x0,'amount':0x0};const _0x2dfb8a=Math[_0x42d23c(0x1c9)](0x0,_0x4011de[_0x42d23c(0x1cf)](_0x39f52b,_0x2c9513['allowance'])),_0x2a2bc8=Math['ceil'](_0x2dfb8a/0x186a0),_0x373632=_0x4011de['KVeIK'](_0x2a2bc8,_0x2c9513[_0x42d23c(0x1cb)]);return{'tier':_0x9207a9,'tokensSaved':_0x39f52b,'freeAllowance':_0x2c9513['allowance'],'chargeableTokens':_0x2dfb8a,'chargeableUnits':_0x2a2bc8,'unitRate':_0x2c9513[_0x42d23c(0x1cb)],'amount':_0x373632};}export function buildUsageRecord(_0x42171e,_0x38a766){const _0x34a2a6=_0x23a0ad,_0x5d2948={'oroQn':_0x34a2a6(0x1d3),'eawab':function(_0x3f877a,_0xeb5cbe){return _0x3f877a/_0xeb5cbe;}};return{'subscription_item':_0x42171e,'quantity':_0x38a766,'action':_0x5d2948['oroQn'],'timestamp':Math[_0x34a2a6(0x1d5)](_0x5d2948['eawab'](Date['now'](),0x3e8))};}export function prepareUsageSync(_0x2a72c5,_0x1bb4c5,_0x30bfb6){const _0x5130f5=_0x23a0ad,_0x2ebd99={'zLLYV':function(_0x152615,_0x4ede41,_0xf84f45){return _0x152615(_0x4ede41,_0xf84f45);}};if(!_0x30bfb6)return{'synced':!0x1,'subscriptionItemId':'','chargeableUnits':0x0,'tier':_0x2a72c5,'error':'no\x20subscription_item_id'};const _0x25fea0=_0x2ebd99[_0x5130f5(0x1d7)](calculateUsageCharge,_0x2a72c5,_0x1bb4c5);if(0x0===_0x25fea0['chargeableUnits'])return{'synced':!0x0,'subscriptionItemId':_0x30bfb6,'chargeableUnits':0x0,'tier':_0x2a72c5};return buildUsageRecord(_0x30bfb6,_0x25fea0[_0x5130f5(0x1d8)]),{'synced':!0x0,'subscriptionItemId':_0x30bfb6,'chargeableUnits':_0x25fea0[_0x5130f5(0x1d8)],'tier':_0x2a72c5};}
1
+ const _0x596362=_0x377c;function _0x377c(_0x5604f7,_0x3cd733){_0x5604f7=_0x5604f7-0x82;const _0xff786c=_0xff78();let _0x377cfc=_0xff786c[_0x5604f7];return _0x377cfc;}(function(_0x23cf63,_0x353b48){const _0x5e11b7=_0x377c,_0x255401=_0x23cf63();while(!![]){try{const _0x31a789=parseInt(_0x5e11b7(0x95))/0x1*(-parseInt(_0x5e11b7(0x8d))/0x2)+-parseInt(_0x5e11b7(0x91))/0x3+-parseInt(_0x5e11b7(0x86))/0x4*(parseInt(_0x5e11b7(0x83))/0x5)+parseInt(_0x5e11b7(0x82))/0x6*(parseInt(_0x5e11b7(0x88))/0x7)+parseInt(_0x5e11b7(0x90))/0x8*(-parseInt(_0x5e11b7(0x8f))/0x9)+parseInt(_0x5e11b7(0x8c))/0xa*(parseInt(_0x5e11b7(0x94))/0xb)+parseInt(_0x5e11b7(0x87))/0xc;if(_0x31a789===_0x353b48)break;else _0x255401['push'](_0x255401['shift']());}catch(_0xbf742){_0x255401['push'](_0x255401['shift']());}}}(_0xff78,0xea6cb));function _0xff78(){const _0x5bbe91=['1qatjTv','4816458tiNNMy','2652505fVNOqL','chargeableUnits','xOBnb','4kPmLnb','26485788jJkYcT','7KOhacr','allowance','unitRate','meteredUnitAmount','10iAFRne','1703680PdIYMd','now','190332KHabqB','16eOuyNS','3036207UbeuXX','pro','set','4257187tNzahk'];_0xff78=function(){return _0x5bbe91;};return _0xff78();}import{STRIPE_CONFIG}from'./stripe-config.js';const TIER_LIMITS={'free':{'allowance':0x186a0,'unitRate':0x0},'pro':{'allowance':0x7a120,'unitRate':STRIPE_CONFIG[_0x596362(0x92)][_0x596362(0x8b)]},'team':{'allowance':0xf4240,'unitRate':STRIPE_CONFIG['team'][_0x596362(0x8b)]}};export function calculateUsageCharge(_0x553b14,_0x2a9391){const _0x44dbad=_0x596362,_0x3bae03={'xOBnb':function(_0x3b75e6,_0x3b449e){return _0x3b75e6===_0x3b449e;},'ddtHJ':function(_0x2a8cad,_0x3c3215){return _0x2a8cad-_0x3c3215;},'NhsaK':function(_0x457ae5,_0x260c1a){return _0x457ae5/_0x260c1a;}},_0x334655=TIER_LIMITS[_0x553b14];if(_0x3bae03[_0x44dbad(0x85)](0x0,_0x334655[_0x44dbad(0x8a)]))return{'tier':_0x553b14,'tokensSaved':_0x2a9391,'freeAllowance':_0x334655[_0x44dbad(0x89)],'chargeableTokens':0x0,'chargeableUnits':0x0,'unitRate':0x0,'amount':0x0};const _0x80c74e=Math['max'](0x0,_0x3bae03['ddtHJ'](_0x2a9391,_0x334655[_0x44dbad(0x89)])),_0x158cb4=Math['ceil'](_0x3bae03['NhsaK'](_0x80c74e,0x186a0)),_0xaa8a09=_0x158cb4*_0x334655['unitRate'];return{'tier':_0x553b14,'tokensSaved':_0x2a9391,'freeAllowance':_0x334655['allowance'],'chargeableTokens':_0x80c74e,'chargeableUnits':_0x158cb4,'unitRate':_0x334655['unitRate'],'amount':_0xaa8a09};}export function buildUsageRecord(_0x21fdf3,_0x201194){const _0x2cadde=_0x596362;return{'subscription_item':_0x21fdf3,'quantity':_0x201194,'action':_0x2cadde(0x93),'timestamp':Math['floor'](Date[_0x2cadde(0x8e)]()/0x3e8)};}export function prepareUsageSync(_0x565b00,_0x386054,_0x3e50cd){const _0x1d4321=_0x596362;if(!_0x3e50cd)return{'synced':!0x1,'subscriptionItemId':'','chargeableUnits':0x0,'tier':_0x565b00,'error':'no\x20subscription_item_id'};const _0x457d98=calculateUsageCharge(_0x565b00,_0x386054);if(0x0===_0x457d98[_0x1d4321(0x84)])return{'synced':!0x0,'subscriptionItemId':_0x3e50cd,'chargeableUnits':0x0,'tier':_0x565b00};return buildUsageRecord(_0x3e50cd,_0x457d98[_0x1d4321(0x84)]),{'synced':!0x0,'subscriptionItemId':_0x3e50cd,'chargeableUnits':_0x457d98[_0x1d4321(0x84)],'tier':_0x565b00};}
@@ -1 +1 @@
1
- (function(_0xa8ec47,_0x56b4e6){const _0x2acf3a=_0x5c39,_0x598c85=_0xa8ec47();while(!![]){try{const _0x526163=-parseInt(_0x2acf3a(0x179))/0x1+-parseInt(_0x2acf3a(0x183))/0x2*(parseInt(_0x2acf3a(0x180))/0x3)+parseInt(_0x2acf3a(0x18c))/0x4*(parseInt(_0x2acf3a(0x18e))/0x5)+-parseInt(_0x2acf3a(0x181))/0x6*(-parseInt(_0x2acf3a(0x184))/0x7)+-parseInt(_0x2acf3a(0x189))/0x8+parseInt(_0x2acf3a(0x18a))/0x9*(parseInt(_0x2acf3a(0x17f))/0xa)+-parseInt(_0x2acf3a(0x186))/0xb;if(_0x526163===_0x56b4e6)break;else _0x598c85['push'](_0x598c85['shift']());}catch(_0x53525c){_0x598c85['push'](_0x598c85['shift']());}}}(_0x429b,0x22e27));export function handleWebhookEvent(_0x4d7ccd,_0x5877f8){const _0x45b621=_0x5c39,_0x36b3ba={'xTFcy':'invoice.paid','TwiDH':'customer.subscription.updated','BPWtP':'subscription_updated','aBSVU':function(_0x3ed390,_0x595b4d){return _0x3ed390(_0x595b4d);},'lONTo':_0x45b621(0x191),'ZvGrk':'free'};switch(_0x4d7ccd[_0x45b621(0x185)]){case _0x36b3ba['xTFcy']:{const _0x1be965=_0x4d7ccd['data']['object'];return{'handled':!0x0,'action':_0x45b621(0x177),'customerId':_0x1be965['customer'],'subscriptionId':_0x1be965['subscription']};}case _0x36b3ba['TwiDH']:{const _0x4dfda2=_0x4d7ccd['data'][_0x45b621(0x18f)],_0x215aa2={'handled':!0x0,'action':_0x36b3ba[_0x45b621(0x17a)],'customerId':_0x4dfda2[_0x45b621(0x17b)],'subscriptionId':_0x4dfda2['id']};return _0x5877f8&&_0x5877f8['upsert']({'id':_0x4dfda2['id'],'customerId':_0x4dfda2[_0x45b621(0x17b)],'status':_0x4dfda2['status']||'active','tier':_0x4dfda2['metadata']?.[_0x45b621(0x17c)]||_0x45b621(0x190),'currentPeriodEnd':_0x4dfda2['current_period_end']||0x0,'meteredSubscriptionItemId':_0x36b3ba['aBSVU'](extractMeteredItemId,_0x4dfda2),'updatedAt':''}),_0x215aa2;}case _0x45b621(0x182):{const _0x14804c=_0x4d7ccd['data'][_0x45b621(0x18f)],_0x4a6e93={'handled':!0x0,'action':_0x36b3ba['lONTo'],'customerId':_0x14804c['customer'],'subscriptionId':_0x14804c['id']};return _0x5877f8&&_0x5877f8[_0x45b621(0x17d)]({'id':_0x14804c['id'],'customerId':_0x14804c[_0x45b621(0x17b)],'status':'canceled','tier':_0x14804c['metadata']?.[_0x45b621(0x17c)]||_0x36b3ba[_0x45b621(0x18d)],'currentPeriodEnd':_0x14804c[_0x45b621(0x178)]||0x0,'updatedAt':''}),_0x4a6e93;}default:return{'handled':!0x1,'action':'ignored'};}}function _0x5c39(_0x558b5b,_0x1bd363){_0x558b5b=_0x558b5b-0x177;const _0x429b17=_0x429b();let _0x5c39a7=_0x429b17[_0x558b5b];return _0x5c39a7;}function _0x429b(){const _0x57eec1=['metered','8RvfTGZ','ZvGrk','700745uZtYKT','object','free','subscription_canceled','invoice_paid','current_period_end','169169VzeXJQ','BPWtP','customer','tier','upsert','data','10iMoAvb','555171pXKJtW','1633206fFLTdd','customer.subscription.deleted','2gIApmT','7gRZVKF','type','2344958mSEIDC','find','recurring','223568fPCXGP','1671642mNDMgD'];_0x429b=function(){return _0x57eec1;};return _0x429b();}function extractMeteredItemId(_0x3047b6){const _0x504a01=_0x5c39,_0x4be0d6=_0x3047b6['items'];if(!_0x4be0d6?.[_0x504a01(0x17e)])return;const _0x3e69d4=_0x4be0d6['data'][_0x504a01(0x187)](_0x4791ba=>_0x504a01(0x18b)===_0x4791ba['price']?.[_0x504a01(0x188)]?.['usage_type']);return _0x3e69d4?.['id'];}
1
+ (function(_0xeea41,_0x3bc6c3){const _0x1100dc=_0x5033,_0x295299=_0xeea41();while(!![]){try{const _0x443735=-parseInt(_0x1100dc(0x1b3))/0x1+-parseInt(_0x1100dc(0x1b2))/0x2*(-parseInt(_0x1100dc(0x1a5))/0x3)+parseInt(_0x1100dc(0x1b7))/0x4*(-parseInt(_0x1100dc(0x1ba))/0x5)+-parseInt(_0x1100dc(0x1b6))/0x6*(-parseInt(_0x1100dc(0x1b0))/0x7)+-parseInt(_0x1100dc(0x19f))/0x8*(parseInt(_0x1100dc(0x1a1))/0x9)+parseInt(_0x1100dc(0x1b4))/0xa*(-parseInt(_0x1100dc(0x1ab))/0xb)+parseInt(_0x1100dc(0x1af))/0xc;if(_0x443735===_0x3bc6c3)break;else _0x295299['push'](_0x295299['shift']());}catch(_0x51ad05){_0x295299['push'](_0x295299['shift']());}}}(_0x281c,0x726cd));export function handleWebhookEvent(_0x23fb2e,_0x3fc582){const _0x48a098=_0x5033,_0x492f98={'oztHz':'invoice_paid','oaqqq':_0x48a098(0x1a4),'IIqby':_0x48a098(0x1a2),'ygfdZ':_0x48a098(0x1ae),'aFAtf':function(_0x563fb9,_0x19c2f9){return _0x563fb9(_0x19c2f9);},'PxcBA':'subscription_canceled','ovYHU':'canceled','SSSrJ':'free'};switch(_0x23fb2e[_0x48a098(0x1ad)]){case _0x48a098(0x1bc):{const _0x527e18=_0x23fb2e[_0x48a098(0x1b9)]['object'];return{'handled':!0x0,'action':_0x492f98['oztHz'],'customerId':_0x527e18[_0x48a098(0x1bb)],'subscriptionId':_0x527e18[_0x48a098(0x1b8)]};}case _0x492f98[_0x48a098(0x19c)]:{const _0x18a142=_0x23fb2e['data']['object'],_0x57f18b={'handled':!0x0,'action':_0x492f98['IIqby'],'customerId':_0x18a142['customer'],'subscriptionId':_0x18a142['id']};return _0x3fc582&&_0x3fc582[_0x48a098(0x1a7)]({'id':_0x18a142['id'],'customerId':_0x18a142[_0x48a098(0x1bb)],'status':_0x18a142[_0x48a098(0x1a8)]||_0x492f98['ygfdZ'],'tier':_0x18a142['metadata']?.['tier']||'free','currentPeriodEnd':_0x18a142[_0x48a098(0x1ac)]||0x0,'meteredSubscriptionItemId':_0x492f98[_0x48a098(0x1aa)](extractMeteredItemId,_0x18a142),'updatedAt':''}),_0x57f18b;}case _0x48a098(0x19e):{const _0x4ffe7a=_0x23fb2e['data']['object'],_0x561786={'handled':!0x0,'action':_0x492f98['PxcBA'],'customerId':_0x4ffe7a[_0x48a098(0x1bb)],'subscriptionId':_0x4ffe7a['id']};return _0x3fc582&&_0x3fc582['upsert']({'id':_0x4ffe7a['id'],'customerId':_0x4ffe7a['customer'],'status':_0x492f98[_0x48a098(0x1b5)],'tier':_0x4ffe7a['metadata']?.[_0x48a098(0x1a9)]||_0x492f98[_0x48a098(0x1a6)],'currentPeriodEnd':_0x4ffe7a[_0x48a098(0x1ac)]||0x0,'updatedAt':''}),_0x561786;}default:return{'handled':!0x1,'action':_0x48a098(0x19d)};}}function extractMeteredItemId(_0x5c5a2a){const _0x5f2bcc=_0x5033,_0x269d22=_0x5c5a2a[_0x5f2bcc(0x1a3)];if(!_0x269d22?.['data'])return;const _0x3dba44=_0x269d22['data'][_0x5f2bcc(0x1b1)](_0x2b160b=>'metered'===_0x2b160b[_0x5f2bcc(0x1a0)]?.['recurring']?.['usage_type']);return _0x3dba44?.['id'];}function _0x5033(_0x87105d,_0xc8b0b4){_0x87105d=_0x87105d-0x19c;const _0x281cff=_0x281c();let _0x50332c=_0x281cff[_0x87105d];return _0x50332c;}function _0x281c(){const _0x17e580=['497626XuoFgi','48331fAuQpp','680bDYWba','ovYHU','72tCprbS','1676188GTOcJX','subscription','data','5JuSvdj','customer','invoice.paid','oaqqq','ignored','customer.subscription.deleted','8fPfwBF','price','6004683DPnRuA','subscription_updated','items','customer.subscription.updated','3kMaXEC','SSSrJ','upsert','status','tier','aFAtf','133441pjfuUg','current_period_end','type','active','23454876DKVhes','131117BXBOtt','find'];_0x281c=function(){return _0x17e580;};return _0x281c();}
@@ -1 +1 @@
1
- function _0x144a(){const _0x638725=['8275725OrOMFO','subs','upsert','61913VQLvxj','get','updatedAt','21ORejWw','953475OazLuX','32586eHGQIo','2045196EnQPoE','values','361808YredSr','60lHqttU','816156pHOLcf'];_0x144a=function(){return _0x638725;};return _0x144a();}const _0x4aec0f=_0x3289;function _0x3289(_0x5a8edf,_0x6f2cfd){_0x5a8edf=_0x5a8edf-0x84;const _0x144aa6=_0x144a();let _0x3289cc=_0x144aa6[_0x5a8edf];return _0x3289cc;}(function(_0x384cb6,_0x124f55){const _0x1a35e=_0x3289,_0xae3793=_0x384cb6();while(!![]){try{const _0x5c4336=-parseInt(_0x1a35e(0x91))/0x1+parseInt(_0x1a35e(0x88))/0x2*(parseInt(_0x1a35e(0x8c))/0x3)+parseInt(_0x1a35e(0x8d))/0x4+parseInt(_0x1a35e(0x87))/0x5+parseInt(_0x1a35e(0x89))/0x6+parseInt(_0x1a35e(0x86))/0x7*(parseInt(_0x1a35e(0x8b))/0x8)+-parseInt(_0x1a35e(0x8e))/0x9;if(_0x5c4336===_0x124f55)break;else _0xae3793['push'](_0xae3793['shift']());}catch(_0x40010a){_0xae3793['push'](_0xae3793['shift']());}}}(_0x144a,0x34a94));export class MemorySubscriptionStore{[_0x4aec0f(0x8f)]=new Map();[_0x4aec0f(0x90)](_0x15e057){const _0x1a82bf=_0x4aec0f;_0x15e057[_0x1a82bf(0x85)]=new Date()['toISOString'](),this[_0x1a82bf(0x8f)]['set'](_0x15e057['id'],_0x15e057);}['getByCustomerId'](_0x218662){const _0x33cc49=_0x4aec0f;for(const _0x5ed709 of this[_0x33cc49(0x8f)]['values']())if(_0x5ed709['customerId']===_0x218662)return _0x5ed709;}['getBySubscriptionId'](_0xc5c012){const _0x143898=_0x4aec0f;return this[_0x143898(0x8f)][_0x143898(0x84)](_0xc5c012);}['list'](){const _0x3981ac=_0x4aec0f;return[...this['subs'][_0x3981ac(0x8a)]()];}}
1
+ function _0x354d(){const _0x168ca8=['getBySubscriptionId','subs','getByCustomerId','2224530vEWzly','8BmIGnJ','756695hcaQKZ','4stjVay','1466025InJxEC','194117KuOTBo','610473SrNtod','108DVBpOC','111659KtREms','6scmlVq','toISOString','3924558yixomn','upsert','get','list','values','6KmdwPE'];_0x354d=function(){return _0x168ca8;};return _0x354d();}function _0x53d8(_0x417cd2,_0x4d24eb){_0x417cd2=_0x417cd2-0x8c;const _0x354d6b=_0x354d();let _0x53d82c=_0x354d6b[_0x417cd2];return _0x53d82c;}const _0x3d47e6=_0x53d8;(function(_0x3c0b94,_0x57428a){const _0x2ce616=_0x53d8,_0x21ab15=_0x3c0b94();while(!![]){try{const _0x16ef18=parseInt(_0x2ce616(0x8d))/0x1*(-parseInt(_0x2ce616(0x8e))/0x2)+parseInt(_0x2ce616(0x9f))/0x3*(-parseInt(_0x2ce616(0x9c))/0x4)+parseInt(_0x2ce616(0x9b))/0x5*(-parseInt(_0x2ce616(0x95))/0x6)+-parseInt(_0x2ce616(0x9e))/0x7*(parseInt(_0x2ce616(0x9a))/0x8)+-parseInt(_0x2ce616(0x90))/0x9+parseInt(_0x2ce616(0x99))/0xa+-parseInt(_0x2ce616(0x9d))/0xb*(-parseInt(_0x2ce616(0x8c))/0xc);if(_0x16ef18===_0x57428a)break;else _0x21ab15['push'](_0x21ab15['shift']());}catch(_0x5ba08b){_0x21ab15['push'](_0x21ab15['shift']());}}}(_0x354d,0x41828));export class MemorySubscriptionStore{['subs']=new Map();[_0x3d47e6(0x91)](_0x2d2127){const _0x5702fc=_0x3d47e6;_0x2d2127['updatedAt']=new Date()[_0x5702fc(0x8f)](),this[_0x5702fc(0x97)]['set'](_0x2d2127['id'],_0x2d2127);}[_0x3d47e6(0x98)](_0x45fc90){const _0x248b04=_0x3d47e6;for(const _0x8b450b of this['subs'][_0x248b04(0x94)]())if(_0x8b450b['customerId']===_0x45fc90)return _0x8b450b;}[_0x3d47e6(0x96)](_0x1ef39d){const _0x35a2ad=_0x3d47e6;return this[_0x35a2ad(0x97)][_0x35a2ad(0x92)](_0x1ef39d);}[_0x3d47e6(0x93)](){return[...this['subs']['values']()];}}
@@ -1,37 +1,42 @@
1
1
  {
2
- "version": "0.7.4",
3
- "build": "2026-03-05T07:28:48.533Z",
2
+ "version": "0.8.0",
3
+ "build": "2026-03-06T07:17:53.595Z",
4
4
  "files": {
5
- "cli/analyze.js": "sha256:de1b97165c9428156ac7fce78f5f4783f29303d4d32cd54ddabdc4c7d7ee3e13",
6
- "cli/config-cmd.js": "sha256:99b666d2a5d0d5d83cbf0d549334ffa4956564a2a34f0e7051add2b6ee719f81",
7
- "cli/index.js": "sha256:b84bc6e8fa322addaa6230dd20e52451d7325c73781c69612c9fe9b37b993d28",
8
- "cli/setup-cmd.js": "sha256:845081b06056c8f5c63efd6ecda2e2b2279b7b29c8db8d2321bf53a746fbae1b",
9
- "cloud/stripe-checkout.js": "sha256:63600859eec26b903f937b28bfa1009c55ef9d450c8bb161dcb118edbd5a6b1a",
10
- "cloud/stripe-config.js": "sha256:1b3c87b018011b268f2a2691b96f997d2152086dd11abac8f04d68854b95e21d",
11
- "cloud/stripe-usage.js": "sha256:904e4a816b6c5d24658d645570bf690fc52c95f975bc3ef7ec0b383e0c1c08f2",
12
- "cloud/stripe-webhooks.js": "sha256:57c55429df008a54445d914174d0d25ad18209bac2b1bd4ca5fd77ead557139c",
13
- "cloud/subscription-store.js": "sha256:4e8096575ff8145102ccee5e472a17fd8bb79fd3b4e871a633f3a1e95d31f0a6",
14
- "plugin/cli.js": "sha256:8e8269fc4aadcca233f8a4072d8b80b2c6c4fa7b2ce833c55785131f2dc66f10",
15
- "plugin/config-loader.js": "sha256:f26093ca5dbd3d1795adc7c74245b4f71565899b52b67c1a0431fe50c23674fd",
16
- "plugin/context-compressor.js": "sha256:8e1121d6197278823a6119785646d39d9d0d9e7d34a3b1dc83f12cc6e8f4ce6d",
17
- "plugin/hook-dispatcher.js": "sha256:b0c83d61618c09243cb6386c3eab24dd2b862bf79e9c08d83ee810d0672fd5bd",
18
- "plugin/metering-client.js": "sha256:e61ce0ee45184f562c6e3a491263cd3402cf6eff824dfc4aeac0f8b36472e9dd",
19
- "plugin/metrics-collector.js": "sha256:0670a0d7217681febeea6e501038ac5560c1c94a8af0506f57b658ca229cb62d",
20
- "plugin/onboarding.js": "sha256:97b330d6e1fb1e109bf8491e2377c607d5210847293a78f65d023d59924f8903",
21
- "plugin/precompact-handler.js": "sha256:7b6cfa55eed307108d9be50d26db0c9ec1b587970c87e184778a5620de89f603",
22
- "plugin/report.js": "sha256:10d2b4b87e33bcfc02f47819054a8248009b0fbae01953a594fee81ad656b2d4",
23
- "plugin/rule-analytics-store.js": "sha256:48961785ac7f3315b5ca75e08e6fd1e55ce3b250a060c08ea481a1b06d3db319",
24
- "plugin/rule-analytics.js": "sha256:f638b35b1dbc5ff6bb21d9bfb869276de920edcce753394eb04fd61a82ff817b",
25
- "plugin/rule-engine.js": "sha256:49c94d8bb152cfd8f22fbf51e72434ad6691616ff58cccdaef2a6e355b5550a3",
26
- "plugin/rule-sharing.js": "sha256:3b3a1568c638576abfd1a55e6464686ff0e260b179225953c30c397ffd894356",
27
- "plugin/rule-suggest.js": "sha256:95eb716c9eab8510f901a419e22ad1a6392506aa6018d478308cd75c63e6a04e",
28
- "plugin/session-start.js": "sha256:dfb970dbea11f455fda7a5967f872f16274a6fa611bcc6c330c2eeb46903aeae",
29
- "plugin/smart-context.js": "sha256:a5e86917b0349e3cea56206df66eb397e2fcc445dbe59380f2772cc15ec9866f",
30
- "shared/license.js": "sha256:081d8d02faa1eca18ba1c7dc17de820e519ad80e1fd7834fa5436f4129f09c91",
31
- "shared/providers/claude-provider.js": "sha256:1baa81d1b24e5b1c87785cd5436f3ad6396c998f47b1ab351e6b0a90c0ddc5cd",
32
- "shared/providers/openai-provider.js": "sha256:46f3ce3aead8812c9655e35e5ad27aaccaaef25eb431597089884c62bcb4d9e1",
33
- "shared/token-counter.js": "sha256:e043a9a56141c173a4a9aa0ce978bb0c96571520bb766f12cdade2d638a8c002",
34
- "shared/token-provider.js": "sha256:063e73d5dbaef5162bb04cf9c605dd6b881e26111975e267d12b4b2e3e81700e",
5
+ "cli/analyze.js": "sha256:2660132f164679a1c4bafed6c48f2b6a1ef52783b7a88eef87614d56b5f395e8",
6
+ "cli/config-cmd.js": "sha256:479080c7040c7d5bbefa36cf83c088350ca8297e5fd8ed9231ac857be246d1ca",
7
+ "cli/index.js": "sha256:80281174bd64289d5fd07aee315a6b92a3d023f2175f86140074f44243adf073",
8
+ "cli/init-cmd.js": "sha256:054c0272a2cefb03de1664e7386ba134294a8e5e157a7a84a6f6783e178aea16",
9
+ "cli/setup-cmd.js": "sha256:7fbdc329457ae14900781037b14b979a259ab2b27958d419619d5450e30bf88e",
10
+ "cloud/stripe-checkout.js": "sha256:0d16626a91fbddfa56ce861edf9eb2103478b8e0f0bdbf31e8039ca7bcd50711",
11
+ "cloud/stripe-config.js": "sha256:6874bdc5182cadbef69359a23bd25ca0237ae8efefe7a8eb1e32927b016b42ca",
12
+ "cloud/stripe-usage.js": "sha256:4a1fa80e6a90cd4818ba0c4cd3f8ad143ef022165afc5b3eab98794453647d3d",
13
+ "cloud/stripe-webhooks.js": "sha256:2ed6190b448e744707fb32d4d6d180ccc12732d927a74bd0925005d3d18c8d6a",
14
+ "cloud/subscription-store.js": "sha256:2351edd7b985ea0871ac22202c80675de84ff26e3463b79dc76ac5d85567979c",
15
+ "mcp/index.js": "sha256:2b2dbe5e163559779fbec6368aeaa2a337faf99c73021e8ae78b2af4af21b0bc",
16
+ "mcp/resources.js": "sha256:efff3d4481e85943ce7ff8e650020db52f464405671caf2d3394da61f53bc48f",
17
+ "mcp/session.js": "sha256:74533896a5dce8ebf64c4b8549933a4e205559fcb36318c14098afd82c8c0c99",
18
+ "mcp/tools.js": "sha256:4a4d795ed04955c312d7cf7edbe4ee295039a21010be37ee924014e2f906ed9e",
19
+ "plugin/cli.js": "sha256:13123755c7b0210c781fcfcd5884999b867a72929d522030147ecee698bfbded",
20
+ "plugin/config-loader.js": "sha256:d7c2af4d502e1fa453e0e695cf5db47b996290e87ca269cd0f1fd14aa9f3ac4f",
21
+ "plugin/context-compressor.js": "sha256:db0b53d1d130e89f8613846196de119dfdc21f17f5ba9a4abd7c00fe548b0d0b",
22
+ "plugin/hook-dispatcher.js": "sha256:acd37f235fa04d9d73b3732ca8e5a7319612be79c74fb0910f45b5aaa339c705",
23
+ "plugin/metering-client.js": "sha256:eb69619e4af16afecb4faf436f92523520d3685442fa79c4c2cad0d1cc3d5c04",
24
+ "plugin/metrics-collector.js": "sha256:7bfd5c90c845832f80ff833b3cd36899c837eab1f9bf37f8e5409ea41dfdfc2c",
25
+ "plugin/onboarding.js": "sha256:fa1dcac9b8d6ff0cf39d8a5fd5dc61ace8dfac62442f36ba08aa9c335a40b337",
26
+ "plugin/precompact-handler.js": "sha256:80dc8ccce1c81272e2d1c782a5435628f43a7affe84b884c45f989d52692edbf",
27
+ "plugin/report.js": "sha256:82afb2df8c583f70b1faee3dde21c9bc5506b6e5875f7e3abb02b92504f12374",
28
+ "plugin/rule-analytics-store.js": "sha256:65ef369b40b4d8e52bca884c5da835a315a68feefb90ed3b7e314ddfb5798bde",
29
+ "plugin/rule-analytics.js": "sha256:3054ff3ff8ea5c341d8f1adffda2b1373d6ce44345aa32161ff41c40a07cd9d5",
30
+ "plugin/rule-engine.js": "sha256:84281219abda1340c7bac4177d2551131c65551c4e232f26c6ba59aa70585157",
31
+ "plugin/rule-sharing.js": "sha256:ccdb44b756668e097d723dcd8f710b75457dfd8273fe7b78f8fc3ee98a58e156",
32
+ "plugin/rule-suggest.js": "sha256:261957883fce3c6436f73ebfe4755b160c02b63b70f50fc97a59a088c0caa1f5",
33
+ "plugin/session-start.js": "sha256:3dde7f3921794452194ee67db4103e93e0be0d07acd8568c6a95f57d4b91e7ff",
34
+ "plugin/smart-context.js": "sha256:d3ffca04f311daa3c5123f09aa769718c63dc0688b6b94dc56359f7a93fb6130",
35
+ "shared/license.js": "sha256:fb5f8ec80d5ecb94f5dc4cbca36e3b33d11b288ab326c7969bb336ed88f1a6a8",
36
+ "shared/providers/claude-provider.js": "sha256:c6358d056d12cd2a4985cd504fda37b14a940fbd1bd0b4aa014741daf8d92585",
37
+ "shared/providers/openai-provider.js": "sha256:eb4e02edcc3555d37990cae8ec1b1ec60c690fcf5d616712effcb23e8b757183",
38
+ "shared/token-counter.js": "sha256:af0d79a4bd51ee32b37659a1cf5093eaa55f49d14abfc1c3fde8a033edcdb629",
39
+ "shared/token-provider.js": "sha256:e33cd63603c0fadf0d470552dabe5738a7330bea2010b58bb975b0a2b9f505d9",
35
40
  "shared/types.js": "sha256:56e1b0c10087ee6ff7f949b15d1ef63cb11228ff93a159a52f9ad7ef851e4e02"
36
41
  }
37
42
  }
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ function _0x2baf(){const _0x2a4416=['31497180vfWrip','3342668GPXlza','catch','ioGNw','getDispatcher','27ehibrY','error','tokenizer-speedup\x20MCP\x20server\x20failed\x20to\x20start:','tokenizer-speedup','lSIvX','20404eDYAOt','244164zfUIFW','8138079RIcjup','143886uCsVFw','41869MazqHY','AgYTG','exit','HHnFC','220tCEwMC','8KkCbId','SIGINT'];_0x2baf=function(){return _0x2a4416;};return _0x2baf();}const _0x2e956a=_0x3e34;(function(_0x321427,_0x50af4e){const _0x469838=_0x3e34,_0x63fa49=_0x321427();while(!![]){try{const _0x5c5cfb=parseInt(_0x469838(0x100))/0x1+-parseInt(_0x469838(0xfd))/0x2+-parseInt(_0x469838(0xf7))/0x3*(parseInt(_0x469838(0xfc))/0x4)+parseInt(_0x469838(0xef))/0x5*(-parseInt(_0x469838(0xff))/0x6)+-parseInt(_0x469838(0xf3))/0x7+parseInt(_0x469838(0xf0))/0x8*(-parseInt(_0x469838(0xfe))/0x9)+parseInt(_0x469838(0xf2))/0xa;if(_0x5c5cfb===_0x50af4e)break;else _0x63fa49['push'](_0x63fa49['shift']());}catch(_0x4c032b){_0x63fa49['push'](_0x63fa49['shift']());}}}(_0x2baf,0x8f3b5));function _0x3e34(_0x4c3c63,_0x5c7512){_0x4c3c63=_0x4c3c63-0xef;const _0x2baf46=_0x2baf();let _0x3e346e=_0x2baf46[_0x4c3c63];return _0x3e346e;}import'../shared/providers/claude-provider.js';import'../shared/providers/openai-provider.js';import{McpServer}from'@modelcontextprotocol/sdk/server/mcp.js';import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{createSession}from'./session.js';import{registerTools}from'./tools.js';import{registerResources}from'./resources.js';async function main(){const _0x4ae802=_0x3e34,_0x1f135a={'NrkMH':_0x4ae802(0xfa),'aSxGf':'0.8.0','ioGNw':function(_0x5995bd,_0x454619,_0x436788){return _0x5995bd(_0x454619,_0x436788);},'HHnFC':function(_0x4accda,_0x44dfc3,_0x4d938c){return _0x4accda(_0x44dfc3,_0x4d938c);},'AgYTG':_0x4ae802(0xf1),'lSIvX':'tokenizer-speedup\x20MCP\x20server\x20running'},_0x33ad1c=new McpServer({'name':_0x1f135a['NrkMH'],'version':_0x1f135a['aSxGf']}),_0x540fef=createSession();_0x1f135a[_0x4ae802(0xf5)](registerTools,_0x33ad1c,_0x540fef),_0x1f135a[_0x4ae802(0x103)](registerResources,_0x33ad1c,_0x540fef),process['on'](_0x1f135a[_0x4ae802(0x101)],()=>{const _0x24ad0a=_0x4ae802;try{_0x540fef[_0x24ad0a(0xf6)]()['handleSessionStop']();}catch{}process[_0x24ad0a(0x102)](0x0);});const _0x44ec8e=new StdioServerTransport();await _0x33ad1c['connect'](_0x44ec8e),console[_0x4ae802(0xf8)](_0x1f135a[_0x4ae802(0xfb)]);}main()[_0x2e956a(0xf4)](_0x2e06dd=>{const _0x2fe5fb=_0x2e956a;console[_0x2fe5fb(0xf8)](_0x2fe5fb(0xf9),_0x2e06dd),process[_0x2fe5fb(0x102)](0x1);});
@@ -0,0 +1 @@
1
+ (function(_0x2527ed,_0x3bab26){const _0x5052d7=_0x3816,_0x5cf8fe=_0x2527ed();while(!![]){try{const _0xdc2d93=parseInt(_0x5052d7(0x157))/0x1+-parseInt(_0x5052d7(0x151))/0x2*(-parseInt(_0x5052d7(0x14c))/0x3)+parseInt(_0x5052d7(0x15b))/0x4+-parseInt(_0x5052d7(0x153))/0x5+-parseInt(_0x5052d7(0x14e))/0x6*(parseInt(_0x5052d7(0x156))/0x7)+-parseInt(_0x5052d7(0x158))/0x8*(-parseInt(_0x5052d7(0x14f))/0x9)+-parseInt(_0x5052d7(0x152))/0xa;if(_0xdc2d93===_0x3bab26)break;else _0x5cf8fe['push'](_0x5cf8fe['shift']());}catch(_0xa5a8da){_0x5cf8fe['push'](_0x5cf8fe['shift']());}}}(_0x5481,0x2b765));import{generateReport}from'../plugin/report.js';function _0x3816(_0x131ca2,_0x453d65){_0x131ca2=_0x131ca2-0x14a;const _0x5481f2=_0x5481();let _0x38165a=_0x5481f2[_0x131ca2];return _0x38165a;}function _0x5481(){const _0x347dad=['317766IQdRuu','2101750cvPhZF','336915NrUBQh','Returns\x20the\x20current\x20YAML-based\x20plugin\x20configuration\x20as\x20JSON,\x20including\x20rules,\x20context\x20limits,\x20and\x20metering\x20settings.','UTUxN','7YyKQLh','96673kasFEZ','392xFNLWJ','TokenizerSpeedUp\x20Savings\x20Report','registerResource','589412TPagoX','TokenizerSpeedUp\x20Configuration','config','oUXUO','getConfig','stringify','BMxVx','6FiHFFg','href','1905006RsepkG','38808JKJKcd','report'];_0x5481=function(){return _0x347dad;};return _0x5481();}export function registerResources(_0x383c2f,_0x20fa6e){const _0xe822e2=_0x3816,_0x6c79c={'BMxVx':'No\x20metrics\x20data\x20available\x20yet.\x20Run\x20at\x20least\x20one\x20optimized\x20session\x20to\x20generate\x20a\x20report.','oUXUO':_0xe822e2(0x15d),'UTUxN':_0xe822e2(0x15c),'DvTMc':_0xe822e2(0x150),'sAUxb':'tokenizer-speedup://report','VZbJm':'Returns\x20an\x20aggregated\x20report\x20of\x20token\x20savings\x20across\x20all\x20recorded\x20sessions,\x20including\x20baseline\x20vs.\x20optimized\x20counts,\x20cost\x20estimates,\x20and\x20rule\x20trigger\x20statistics.','wTpff':'application/json'};_0x383c2f[_0xe822e2(0x15a)](_0x6c79c[_0xe822e2(0x15e)],'tokenizer-speedup://config',{'title':_0x6c79c[_0xe822e2(0x155)],'description':_0xe822e2(0x154),'mimeType':'application/json'},async _0x5d4805=>{const _0x6b7c0a=_0xe822e2,_0x2d189b=_0x20fa6e[_0x6b7c0a(0x15f)]();return{'contents':[{'uri':_0x5d4805['href'],'text':JSON[_0x6b7c0a(0x14a)](_0x2d189b,null,0x2)}]};}),_0x383c2f[_0xe822e2(0x15a)](_0x6c79c['DvTMc'],_0x6c79c['sAUxb'],{'title':_0xe822e2(0x159),'description':_0x6c79c['VZbJm'],'mimeType':_0x6c79c['wTpff']},async _0x7923a9=>{const _0x4b67d7=_0xe822e2;try{const _0x43166f=generateReport(_0x20fa6e['projectRoot']);return{'contents':[{'uri':_0x7923a9['href'],'text':JSON[_0x4b67d7(0x14a)](_0x43166f,null,0x2)}]};}catch{return{'contents':[{'uri':_0x7923a9[_0x4b67d7(0x14d)],'text':JSON[_0x4b67d7(0x14a)]({'message':_0x6c79c[_0x4b67d7(0x14b)],'sessions_count':0x0,'total_baseline':0x0,'total_optimized':0x0,'total_delta':0x0,'savings_percent':0x0,'total_prompts':0x0,'rules_triggered':{},'estimated_cost_saved_usd':0x0,'period_start':'','period_end':''},null,0x2)}]};}});}
@@ -0,0 +1 @@
1
+ const _0x1f7586=_0x2dda;(function(_0x45a5e3,_0x24f6fb){const _0x17fb2e=_0x2dda,_0x1628a1=_0x45a5e3();while(!![]){try{const _0x530e05=parseInt(_0x17fb2e(0x14c))/0x1*(-parseInt(_0x17fb2e(0x146))/0x2)+parseInt(_0x17fb2e(0x14f))/0x3*(parseInt(_0x17fb2e(0x153))/0x4)+-parseInt(_0x17fb2e(0x145))/0x5*(parseInt(_0x17fb2e(0x14d))/0x6)+parseInt(_0x17fb2e(0x152))/0x7+parseInt(_0x17fb2e(0x148))/0x8+parseInt(_0x17fb2e(0x14e))/0x9+parseInt(_0x17fb2e(0x14a))/0xa;if(_0x530e05===_0x24f6fb)break;else _0x1628a1['push'](_0x1628a1['shift']());}catch(_0x250972){_0x1628a1['push'](_0x1628a1['shift']());}}}(_0x5dd0,0x6106f));import{loadConfig,DEFAULT_LIMITS,DEFAULT_METERING}from'../plugin/config-loader.js';import{HookDispatcher}from'../plugin/hook-dispatcher.js';import{MetricsCollector}from'../plugin/metrics-collector.js';import{createTokenProvider}from'../shared/token-provider.js';const DEFAULT_CONFIG={'version':0x1,'provider':_0x1f7586(0x154),'model':'claude-sonnet-4-20250514','rules':[],'context_limits':DEFAULT_LIMITS,'metering':DEFAULT_METERING};function _0x2dda(_0x1cbc2a,_0x4793b2){_0x1cbc2a=_0x1cbc2a-0x145;const _0x5dd015=_0x5dd0();let _0x2dda7f=_0x5dd015[_0x1cbc2a];return _0x2dda7f;}function _0x5dd0(){const _0x3db1e4=['1454280mHJAkq','provider','12834nGlkQn','3836766pBaFtb','1990422yoSOCE','183zdWcLE','getConfig','mcp-session-','4126717ZydQdc','49420YLSbny','claude','cwd','5gFfKRa','108bFacoz','ZIGAU','161184adzizP','now'];_0x5dd0=function(){return _0x3db1e4;};return _0x5dd0();}export function createSession(_0x1a063f){const _0x391b88=_0x1f7586,_0x3cab36={'ZIGAU':function(_0x239065,_0x31dccb,_0x725c6f){return _0x239065(_0x31dccb,_0x725c6f);}};let _0x12e6fa=_0x1a063f??process[_0x391b88(0x155)](),_0xd86850=null,_0x552123=null;const _0x13b849=_0x391b88(0x151)+Date[_0x391b88(0x149)]();let _0x5424cc=new MetricsCollector(_0x12e6fa,_0x13b849);const _0x20be5d={get 'projectRoot'(){return _0x12e6fa;},get 'config'(){return _0xd86850;},get 'collector'(){return _0x5424cc;},get 'sessionId'(){return _0x13b849;},'getConfig':()=>(_0xd86850||(_0xd86850=(function(){try{return loadConfig(_0x12e6fa);}catch{return structuredClone(DEFAULT_CONFIG);}}())),_0xd86850),'getDispatcher'(){if(!_0x552123){const _0x6014c4=_0x20be5d['getConfig']();_0x552123=new HookDispatcher(_0x6014c4,_0x12e6fa,_0x13b849);}return _0x552123;},'getTokenProvider'(_0x29b913,_0x460515){const _0x47d33d=_0x391b88,_0x471c9f=_0x20be5d[_0x47d33d(0x150)]();return _0x3cab36[_0x47d33d(0x147)](createTokenProvider,_0x29b913??_0x471c9f[_0x47d33d(0x14b)],_0x460515??_0x471c9f['model']);},'setProjectRoot'(_0x5e0759){_0x12e6fa=_0x5e0759,_0xd86850=null,_0x552123=null,_0x5424cc=new MetricsCollector(_0x12e6fa,_0x13b849);}};return _0x20be5d;}
@@ -0,0 +1 @@
1
+ (function(_0x30a787,_0x13a2d0){const _0x5c8833=_0x597b,_0xdf8202=_0x30a787();while(!![]){try{const _0x27c627=-parseInt(_0x5c8833(0x110))/0x1*(parseInt(_0x5c8833(0x12b))/0x2)+-parseInt(_0x5c8833(0x13a))/0x3*(parseInt(_0x5c8833(0x133))/0x4)+-parseInt(_0x5c8833(0x137))/0x5+parseInt(_0x5c8833(0x111))/0x6+-parseInt(_0x5c8833(0x139))/0x7*(parseInt(_0x5c8833(0x120))/0x8)+parseInt(_0x5c8833(0x115))/0x9*(parseInt(_0x5c8833(0x135))/0xa)+parseInt(_0x5c8833(0x12a))/0xb;if(_0x27c627===_0x13a2d0)break;else _0xdf8202['push'](_0xdf8202['shift']());}catch(_0x195854){_0xdf8202['push'](_0xdf8202['shift']());}}}(_0x4667,0xca30d));import{readFile}from'node:fs/promises';function _0x597b(_0x3c5c6f,_0x26d945){_0x3c5c6f=_0x3c5c6f-0x108;const _0x466714=_0x4667();let _0x597b6e=_0x466714[_0x3c5c6f];return _0x597b6e;}import{resolve}from'node:path';import{z}from'zod';function _0x4667(){const _0x58c9da=['Optimize\x20LLM\x20context\x20for\x20a\x20given\x20prompt.\x20Returns\x20matched\x20rules,\x20injected\x20context\x20and\x20token\x20savings.','handleUserPromptSubmit','getSessionSummary','startsWith','16YrHRUb','projectRoot','80EgwdwX','zMlSJ','7916285rjmdVL','iGzhS','7729589vIoqil','590748RgyLAt','uReVR','describe','NHqFt','estimateTokens','file_path\x20escapes\x20project\x20root.','getTokenProvider','text','stringify','getDispatcher','pEKnh','countTokens','setProjectRoot','xbAhm','openai','registerTool','160966HDaRIm','3400974TNLqnA','optimize-context','sessionId','total_delta','97101LgRhMQ','Inline\x20text\x20to\x20analyze','total_baseline','Path\x20to\x20a\x20file\x20to\x20analyze','rules_triggered','kAzWe','provider','epPFo','ksXZL','gpt-4o','get-savings','8DHQSIi','optional','QTQRG','prompts_count','Count\x20and\x20estimate\x20tokens\x20for\x20a\x20given\x20text\x20or\x20file.\x20Returns\x20exact\x20BPE\x20count\x20and\x20word-based\x20heuristic\x20estimate.','utf-8','string','Return\x20cumulative\x20token\x20savings\x20for\x20the\x20current\x20MCP\x20session.\x20Shows\x20baseline\x20vs\x20optimized\x20token\x20counts\x20and\x20per-rule\x20trigger\x20counts.','getConfig','savings_percent','49005110rxkCbn','10JQtpTe','sHYWP','message','Failed\x20to\x20read\x20file:\x20'];_0x4667=function(){return _0x58c9da;};return _0x4667();}import{countTokens}from'../shared/token-counter.js';export function registerTools(_0x378f56,_0x244b3a){const _0x426e41=_0x597b,_0xcc4961={'QTQRG':'UserPromptSubmit','pEKnh':function(_0x459aef,_0x165a47){return _0x459aef(_0x165a47);},'epPFo':_0x426e41(0x141),'zMlSJ':function(_0x5d382a,_0x228d03){return _0x5d382a===_0x228d03;},'NHqFt':function(_0x54a518,_0x619415){return _0x54a518 instanceof _0x619415;},'iGzhS':function(_0x460aed,_0x2d64d3){return _0x460aed(_0x2d64d3);},'PXHEB':function(_0x476e91,_0x2cf427){return _0x476e91!==_0x2cf427;},'uReVR':function(_0x5cc0e6,_0xd23f7e,_0x1a466b){return _0x5cc0e6(_0xd23f7e,_0x1a466b);},'mhhbu':function(_0x133f60,_0x24362a,_0x2b7e0a){return _0x133f60(_0x24362a,_0x2b7e0a);},'cdptz':_0x426e41(0x125),'xbAhm':function(_0x245e22,_0x3cd9d0){return _0x245e22(_0x3cd9d0);},'ordUT':'BPE\x20tokenizer\x20(accurate)','Gsnoo':'1.4','uMIrF':_0x426e41(0x12f),'sHYWP':'The\x20user\x20prompt\x20to\x20optimize','RZTsm':'analyze-tokens','bUWBh':_0x426e41(0x124),'sXQKu':_0x426e41(0x118),'QEFwT':'LLM\x20provider\x20(claude,\x20openai).\x20Defaults\x20to\x20config\x20provider.','ksXZL':'Model\x20name.\x20Defaults\x20to\x20config\x20model.','iNbfQ':_0x426e41(0x11f),'kAzWe':_0x426e41(0x127)};_0x378f56[_0x426e41(0x10f)](_0x426e41(0x112),{'description':_0xcc4961['uMIrF'],'inputSchema':{'prompt':z['string']()[_0x426e41(0x13c)](_0xcc4961[_0x426e41(0x12c)]),'project_path':z['string']()[_0x426e41(0x121)]()[_0x426e41(0x13c)]('Optional\x20project\x20root\x20path;\x20re-loads\x20config\x20if\x20provided')}},async({prompt:_0x4d204e,project_path:_0x1ecc9b})=>{const _0x5214f1=_0x426e41;_0x1ecc9b&&_0x244b3a[_0x5214f1(0x10c)](_0x1ecc9b);const _0x52936e=_0x244b3a['getDispatcher'](),_0x2ed40a=_0x52936e['getSessionSummary'](),_0x2f7d53={'session_id':_0x244b3a[_0x5214f1(0x113)],'cwd':_0x244b3a[_0x5214f1(0x134)],'prompt':_0x4d204e,'hook_event_name':_0xcc4961[_0x5214f1(0x122)]},_0x10c7a=_0x52936e[_0x5214f1(0x130)](_0x2f7d53),_0x5015b0=_0x52936e[_0x5214f1(0x131)]()[_0x5214f1(0x114)]-_0x2ed40a[_0x5214f1(0x114)],_0x1853cb=_0x10c7a['additionalContext']??'',_0x12eab2=_0x1853cb['length']>0x0?_0xcc4961[_0x5214f1(0x10a)](countTokens,_0x1853cb):0x0,_0x46bc63=[..._0x1853cb['matchAll'](/^\[([^\]]+)\]/gm)]['map'](_0x188c54=>_0x188c54[0x1]),_0x4c7f48={'context':_0x1853cb,'rules_matched':_0x46bc63,'tokens_injected':_0x12eab2,'tokens_saved':_0x5015b0};return{'content':[{'type':_0xcc4961[_0x5214f1(0x11c)],'text':JSON['stringify'](_0x4c7f48)}]};}),_0x378f56[_0x426e41(0x10f)](_0xcc4961['RZTsm'],{'description':_0xcc4961['bUWBh'],'inputSchema':{'text':z['string']()['optional']()['describe'](_0x426e41(0x116)),'file_path':z['string']()['optional']()[_0x426e41(0x13c)](_0xcc4961['sXQKu']),'provider':z[_0x426e41(0x126)]()['optional']()['describe'](_0xcc4961['QEFwT']),'model':z[_0x426e41(0x126)]()[_0x426e41(0x121)]()[_0x426e41(0x13c)](_0xcc4961[_0x426e41(0x11d)])}},async({text:_0x31cd0c,file_path:_0x54c89c,provider:_0x909eb0,model:_0x34def5})=>{const _0x529d45=_0x426e41;if(_0xcc4961['zMlSJ'](void 0x0,_0x31cd0c)&&void 0x0===_0x54c89c)return{'content':[{'type':_0xcc4961['epPFo'],'text':JSON[_0x529d45(0x108)]({'error':'Either\x20text\x20or\x20file_path\x20must\x20be\x20provided.'})}],'isError':!0x0};const _0x24a96f=_0x909eb0??_0x244b3a['getConfig']()[_0x529d45(0x11b)],_0x2c661d=_0x34def5??(_0xcc4961[_0x529d45(0x136)](_0x529d45(0x10e),_0x24a96f)?_0x529d45(0x11e):_0x244b3a[_0x529d45(0x128)]()['model']);let _0x49300d,_0x276138;try{_0x49300d=_0x244b3a[_0x529d45(0x140)](_0x24a96f,_0x2c661d);}catch(_0x429dad){const _0x44733a=_0xcc4961[_0x529d45(0x13d)](_0x429dad,Error)?_0x429dad['message']:_0xcc4961[_0x529d45(0x138)](String,_0x429dad);return{'content':[{'type':_0x529d45(0x141),'text':JSON['stringify']({'error':_0x44733a})}],'isError':!0x0};}if(_0xcc4961['PXHEB'](void 0x0,_0x31cd0c))_0x276138=_0x31cd0c;else{const _0xe17e31=_0xcc4961[_0x529d45(0x13b)](resolve,_0x244b3a['projectRoot'],_0x54c89c);if(!_0xe17e31[_0x529d45(0x132)](_0x244b3a[_0x529d45(0x134)]))return{'content':[{'type':'text','text':JSON[_0x529d45(0x108)]({'error':_0x529d45(0x13f)})}],'isError':!0x0};try{_0x276138=await _0xcc4961['mhhbu'](readFile,_0xe17e31,_0xcc4961['cdptz']);}catch(_0xd30b95){const _0x132ccc=_0xd30b95 instanceof Error?_0xd30b95[_0x529d45(0x12d)]:_0xcc4961[_0x529d45(0x10d)](String,_0xd30b95);return{'content':[{'type':_0xcc4961[_0x529d45(0x11c)],'text':JSON['stringify']({'error':_0x529d45(0x12e)+_0x132ccc})}],'isError':!0x0};}}const _0x54995c={'tokens':_0x49300d[_0x529d45(0x10b)](_0x276138),'tokens_method':_0xcc4961['ordUT'],'estimate':_0x49300d[_0x529d45(0x13e)](_0x276138),'estimate_method':'word\x20heuristic\x20(words\x20×\x20'+(_0xcc4961['zMlSJ']('openai',_0x24a96f)?'1.3':_0xcc4961['Gsnoo'])+')','provider':_0x24a96f,'model':_0x2c661d};return{'content':[{'type':'text','text':JSON[_0x529d45(0x108)](_0x54995c)}]};}),_0x378f56[_0x426e41(0x10f)](_0xcc4961['iNbfQ'],{'description':_0xcc4961[_0x426e41(0x11a)]},async()=>{const _0x549634=_0x426e41,_0xf9cdb6=_0x244b3a[_0x549634(0x109)]()[_0x549634(0x131)](),_0xbb2285={'baseline_tokens':_0xf9cdb6[_0x549634(0x117)],'optimized_tokens':_0xf9cdb6['total_optimized'],'saved_tokens':_0xf9cdb6[_0x549634(0x114)],'saved_percent':_0xf9cdb6[_0x549634(0x129)],'prompts_count':_0xf9cdb6[_0x549634(0x123)],'rules_triggered':_0xf9cdb6[_0x549634(0x119)]};return{'content':[{'type':'text','text':JSON['stringify'](_0xbb2285)}]};});}
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const _0x48fd4c=_0xea48;(function(_0x4b3336,_0x3ff85f){const _0x6c95c0=_0xea48,_0x449250=_0x4b3336();while(!![]){try{const _0x89a70e=parseInt(_0x6c95c0(0x120))/0x1+-parseInt(_0x6c95c0(0x110))/0x2*(parseInt(_0x6c95c0(0x11d))/0x3)+-parseInt(_0x6c95c0(0x128))/0x4*(-parseInt(_0x6c95c0(0x114))/0x5)+-parseInt(_0x6c95c0(0x11c))/0x6+parseInt(_0x6c95c0(0x11b))/0x7*(parseInt(_0x6c95c0(0x12a))/0x8)+-parseInt(_0x6c95c0(0x119))/0x9*(-parseInt(_0x6c95c0(0x112))/0xa)+parseInt(_0x6c95c0(0x111))/0xb*(parseInt(_0x6c95c0(0x125))/0xc);if(_0x89a70e===_0x3ff85f)break;else _0x449250['push'](_0x449250['shift']());}catch(_0xb9b7a8){_0x449250['push'](_0x449250['shift']());}}}(_0x330d,0x587a8));import{resolve}from'node:path';function _0xea48(_0x1b651e,_0x37492e){_0x1b651e=_0x1b651e-0x110;const _0x330dd2=_0x330d();let _0xea4892=_0x330dd2[_0x1b651e];return _0xea4892;}import{loadConfig}from'./config-loader.js';function _0x330d(){const _0x3ad850=['exit','utf-8','provider','metering','hook_event_name','1390NkyTCW','836SnDMjC','33890LhZCQv','cwd','77590VpoLGN','QMJKe','QcUiC','additionalContext','handlePreCompact','135RuncGS','write','2753177WjOYoT','3835344kknVVT','2094vgeHlg','parse','filter','36970WjaYdE','handleSessionStop','kmbYC','model','prompt','146532Fnxzlv','ZOdOK','session_id','20FvJsST','send','8VABQMR'];_0x330d=function(){return _0x3ad850;};return _0x330d();}import{HookDispatcher}from'./hook-dispatcher.js';import{buildSessionStartContext}from'./session-start.js';import{buildSmartContext}from'./smart-context.js';import{MeteringClient,buildMeterPayload}from'./metering-client.js';import{loadApiKeyFromConfig}from'../cli/setup-cmd.js';if(!process.env.TOKENIZER_API_KEY){const t=loadApiKeyFromConfig();t&&(process.env.TOKENIZER_API_KEY=t);}async function main(){const _0x537e38=_0xea48,_0x1d2a35={'QcUiC':_0x537e38(0x12c),'ZOdOK':function(_0x321423,_0x1466a9){return _0x321423(_0x1466a9);},'NAHdr':function(_0x2e4b5d,_0x47ff9f,_0xa0eaa3){return _0x2e4b5d(_0x47ff9f,_0xa0eaa3);},'pqjZS':'../..','QMJKe':'SessionStart','kmbYC':'UserPromptSubmit','bTlmb':function(_0x437e89,_0x202d8f){return _0x437e89(_0x202d8f);}},_0x11a082=[];for await(const _0x44cf62 of process['stdin'])_0x11a082['push'](_0x44cf62);const _0x2415f2=Buffer['concat'](_0x11a082)['toString'](_0x1d2a35[_0x537e38(0x116)]);let _0x5312fd;try{_0x5312fd=JSON[_0x537e38(0x11e)](_0x2415f2);}catch{process[_0x537e38(0x12b)](0x0);}const _0x52b002=_0x5312fd[_0x537e38(0x113)]||process[_0x537e38(0x113)](),_0x37b295=_0x5312fd[_0x537e38(0x12f)];let _0x2b634e;try{_0x2b634e=_0x1d2a35[_0x537e38(0x126)](loadConfig,_0x52b002);}catch{const _0x4040ec=process.env.CLAUDE_PLUGIN_ROOT||_0x1d2a35['NAHdr'](resolve,import.meta.dirname,_0x1d2a35['pqjZS']);_0x2b634e=_0x1d2a35['ZOdOK'](loadConfig,_0x4040ec);}const _0x58cb74=new HookDispatcher(_0x2b634e,_0x52b002,_0x5312fd[_0x537e38(0x127)]);let _0x32640b={};switch(_0x37b295){case _0x1d2a35[_0x537e38(0x115)]:_0x32640b=buildSessionStartContext({'cwd':_0x52b002});break;case _0x1d2a35[_0x537e38(0x122)]:{const _0x5f12db=_0x58cb74['handleUserPromptSubmit'](_0x5312fd),_0x78dc06=_0x1d2a35['bTlmb'](buildSmartContext,{'prompt':_0x5312fd[_0x537e38(0x124)]||'','cwd':_0x52b002}),_0x2862d9=[_0x5f12db[_0x537e38(0x117)],_0x78dc06[_0x537e38(0x117)]][_0x537e38(0x11f)](Boolean);_0x32640b=_0x2862d9['length']>0x0?{'additionalContext':_0x2862d9['join']('\x0a')}:{};break;}case'PreCompact':_0x32640b=_0x58cb74[_0x537e38(0x118)](_0x5312fd);break;case'Stop':{const _0x374a36=_0x58cb74[_0x537e38(0x121)](),_0x101ee3=new MeteringClient(_0x2b634e[_0x537e38(0x12e)]['endpoint']),_0x5ac8fc=buildMeterPayload(_0x374a36,{'provider':_0x2b634e[_0x537e38(0x12d)],'model':_0x2b634e[_0x537e38(0x123)]});await _0x101ee3[_0x537e38(0x129)](_0x5ac8fc);break;}}process['stdout'][_0x537e38(0x11a)](JSON['stringify'](_0x32640b)),process[_0x537e38(0x12b)](0x0);}main()['catch'](()=>process[_0x48fd4c(0x12b)](0x0));
2
+ const _0x453c87=_0x4b81;(function(_0x2c6fbb,_0x476ddd){const _0x385df5=_0x4b81,_0x5372d1=_0x2c6fbb();while(!![]){try{const _0x6d5839=parseInt(_0x385df5(0x8a))/0x1+parseInt(_0x385df5(0x87))/0x2*(parseInt(_0x385df5(0x6d))/0x3)+-parseInt(_0x385df5(0x8b))/0x4*(-parseInt(_0x385df5(0x83))/0x5)+parseInt(_0x385df5(0x75))/0x6*(-parseInt(_0x385df5(0x7a))/0x7)+parseInt(_0x385df5(0x7e))/0x8+parseInt(_0x385df5(0x8c))/0x9*(parseInt(_0x385df5(0x85))/0xa)+-parseInt(_0x385df5(0x82))/0xb*(parseInt(_0x385df5(0x80))/0xc);if(_0x6d5839===_0x476ddd)break;else _0x5372d1['push'](_0x5372d1['shift']());}catch(_0x3089a1){_0x5372d1['push'](_0x5372d1['shift']());}}}(_0x25a5,0xc62be));import{resolve}from'node:path';import{loadConfig}from'./config-loader.js';import{HookDispatcher}from'./hook-dispatcher.js';import{buildSessionStartContext}from'./session-start.js';import{buildSmartContext}from'./smart-context.js';import{MeteringClient,buildMeterPayload}from'./metering-client.js';import{loadApiKeyFromConfig}from'../cli/setup-cmd.js';if(!process.env.TOKENIZER_API_KEY){const t=loadApiKeyFromConfig();t&&(process.env.TOKENIZER_API_KEY=t);}function _0x25a5(){const _0x15f93b=['434526QHllih','send','length','uQnmZ','stringify','63mFzJUq','filter','metering','Stop','491232fSCMDZ','../..','11807592bosEuu','CwEyX','11rIISvy','944045MOzbvS','provider','11270PHmcVy','prompt','5278XMPhMu','cwd','JUsag','308237lALwsX','28bEHpFc','2772njlXFb','XTblr','465tGLNaP','additionalContext','ncTFC','concat','utf-8','exit','handleSessionStop','toString'];_0x25a5=function(){return _0x15f93b;};return _0x25a5();}async function main(){const _0x210523=_0x4b81,_0x3ee16e={'ahjNH':_0x210523(0x71),'XTblr':function(_0x485dcb,_0x4baa2b){return _0x485dcb(_0x4baa2b);},'ncTFC':function(_0x23f318,_0x5cf060,_0x38b0ee){return _0x23f318(_0x5cf060,_0x38b0ee);},'uQnmZ':'SessionStart','CwEyX':function(_0x13f848,_0x2a4391){return _0x13f848(_0x2a4391);},'SthZM':'UserPromptSubmit','JUsag':function(_0x48c46a,_0x3e6770){return _0x48c46a>_0x3e6770;}},_0x487dcf=[];for await(const _0x3df128 of process['stdin'])_0x487dcf['push'](_0x3df128);const _0x19b8f2=Buffer[_0x210523(0x70)](_0x487dcf)[_0x210523(0x74)](_0x3ee16e['ahjNH']);let _0xd72f60;try{_0xd72f60=JSON['parse'](_0x19b8f2);}catch{process[_0x210523(0x72)](0x0);}const _0xd976d1=_0xd72f60['cwd']||process[_0x210523(0x88)](),_0x23a3b5=_0xd72f60['hook_event_name'];let _0x260365;try{_0x260365=_0x3ee16e[_0x210523(0x6c)](loadConfig,_0xd976d1);}catch{const _0x2dd91e=process.env.CLAUDE_PLUGIN_ROOT||_0x3ee16e[_0x210523(0x6f)](resolve,import.meta.dirname,_0x210523(0x7f));_0x260365=_0x3ee16e[_0x210523(0x6c)](loadConfig,_0x2dd91e);}const _0x7e9fca=new HookDispatcher(_0x260365,_0xd976d1,_0xd72f60['session_id']);let _0x4b6b0e={};switch(_0x23a3b5){case _0x3ee16e[_0x210523(0x78)]:_0x4b6b0e=_0x3ee16e[_0x210523(0x81)](buildSessionStartContext,{'cwd':_0xd976d1});break;case _0x3ee16e['SthZM']:{const _0x5bfe56=_0x7e9fca['handleUserPromptSubmit'](_0xd72f60),_0x407fb6=buildSmartContext({'prompt':_0xd72f60[_0x210523(0x86)]||'','cwd':_0xd976d1}),_0x47ada0=[_0x5bfe56['additionalContext'],_0x407fb6[_0x210523(0x6e)]][_0x210523(0x7b)](Boolean);_0x4b6b0e=_0x3ee16e[_0x210523(0x89)](_0x47ada0[_0x210523(0x77)],0x0)?{'additionalContext':_0x47ada0['join']('\x0a')}:{};break;}case'PreCompact':_0x4b6b0e=_0x7e9fca['handlePreCompact'](_0xd72f60);break;case _0x210523(0x7d):{const _0x36df29=_0x7e9fca[_0x210523(0x73)](),_0x3aaa52=new MeteringClient(_0x260365[_0x210523(0x7c)]['endpoint']),_0x25598f=buildMeterPayload(_0x36df29,{'provider':_0x260365[_0x210523(0x84)],'model':_0x260365['model']});await _0x3aaa52[_0x210523(0x76)](_0x25598f);break;}}process['stdout']['write'](JSON[_0x210523(0x79)](_0x4b6b0e)),process[_0x210523(0x72)](0x0);}function _0x4b81(_0x2ef05c,_0x4e9e41){_0x2ef05c=_0x2ef05c-0x6c;const _0x25a5f6=_0x25a5();let _0x4b815e=_0x25a5f6[_0x2ef05c];return _0x4b815e;}main()['catch'](()=>process[_0x453c87(0x72)](0x0));
@@ -1 +1 @@
1
- function _0x3210(_0x4d176d,_0x45c380){_0x4d176d=_0x4d176d-0x138;const _0x318fc5=_0x318f();let _0x3210eb=_0x318fc5[_0x4d176d];return _0x3210eb;}const _0x1a90c2=_0x3210;(function(_0x18f7b1,_0xefbf16){const _0x4038f5=_0x3210,_0x1e9282=_0x18f7b1();while(!![]){try{const _0x47cb68=parseInt(_0x4038f5(0x14b))/0x1*(parseInt(_0x4038f5(0x13b))/0x2)+parseInt(_0x4038f5(0x143))/0x3*(-parseInt(_0x4038f5(0x13c))/0x4)+-parseInt(_0x4038f5(0x14c))/0x5+parseInt(_0x4038f5(0x13f))/0x6+parseInt(_0x4038f5(0x142))/0x7+-parseInt(_0x4038f5(0x138))/0x8+parseInt(_0x4038f5(0x149))/0x9;if(_0x47cb68===_0xefbf16)break;else _0x1e9282['push'](_0x1e9282['shift']());}catch(_0x43aba3){_0x1e9282['push'](_0x1e9282['shift']());}}}(_0x318f,0x1ba40));import{readFileSync}from'node:fs';import{join}from'node:path';import _0x1526aa from'js-yaml';import'../shared/providers/claude-provider.js';import'../shared/providers/openai-provider.js';import{listProviders}from'../shared/token-provider.js';const CONFIG_FILENAME=_0x1a90c2(0x13a),DEFAULT_LIMITS={'max_injected_tokens':0xfa0,'max_file_tokens':0x5dc,'compress_above':0x320},DEFAULT_METERING={'endpoint':_0x1a90c2(0x13e),'batch_interval':0x3c,'send_content':!0x1};export function parseConfig(_0x54684f){const _0x57b48a=_0x1a90c2,_0x135a3d={'BUFKN':function(_0x298fb9,_0xa53cae){return _0x298fb9!=_0xa53cae;},'uQbIR':'number','HURIv':_0x57b48a(0x14d),'diAbi':_0x57b48a(0x140),'HauUS':'gpt-4o','LvpRE':function(_0x4c1f75){return _0x4c1f75();}},_0x32548a=_0x1526aa['load'](_0x54684f);if(!_0x32548a||_0x135a3d['BUFKN'](_0x135a3d['uQbIR'],typeof _0x32548a['version']))throw new Error(_0x135a3d['HURIv']);const _0x37d3eb=_0x32548a['provider']??'claude',_0x38ecaa=_0x32548a['model']??(_0x57b48a(0x139)===_0x37d3eb?_0x135a3d[_0x57b48a(0x141)]:_0x135a3d['HauUS']),_0x47936f=_0x135a3d[_0x57b48a(0x147)](listProviders);if(!_0x47936f['includes'](_0x37d3eb))throw new Error('Unknown\x20provider:\x20'+_0x37d3eb+_0x57b48a(0x13d)+_0x47936f[_0x57b48a(0x144)](',\x20'));const _0x403d46=Array['isArray'](_0x32548a['rules'])?_0x32548a['rules']:[],_0x1ee14e=_0x32548a[_0x57b48a(0x145)]??DEFAULT_LIMITS,_0x592582=_0x32548a['metering']??DEFAULT_METERING;return{'version':_0x32548a[_0x57b48a(0x14a)],'provider':_0x37d3eb,'model':_0x38ecaa,'rules':_0x403d46,'context_limits':_0x1ee14e,'metering':_0x592582};}export function loadConfigFromString(_0x45ebbb){const _0x49445d=_0x1a90c2,_0x4b786b={'eJRUx':function(_0x17e5ae,_0x406af4){return _0x17e5ae(_0x406af4);}};return _0x4b786b[_0x49445d(0x146)](parseConfig,_0x45ebbb);}function _0x318f(){const _0x2fe798=['version','4798wRpbFo','717490vlpgdi','Invalid\x20config:\x20missing\x20or\x20invalid\x20\x22version\x22\x20field','289144iJbOAB','claude','tokenizer-speedup.yaml','28xzIwJg','4kmPBLm','.\x20Known:\x20','https://api.simosphere.ai/v1/meter','10794icwTnG','claude-sonnet-4-20250514','diAbi','1169469SwCylF','122847MBviJZ','join','context_limits','eJRUx','LvpRE','utf-8','879912gCmVmj'];_0x318f=function(){return _0x2fe798;};return _0x318f();}export function loadConfig(_0x38dd17){const _0x49ba2f=_0x1a90c2,_0x517ac6={'PUKHr':function(_0x387f11,_0x3f7f35){return _0x387f11(_0x3f7f35);}},_0x3c0e74=join(_0x38dd17,CONFIG_FILENAME);return _0x517ac6['PUKHr'](parseConfig,readFileSync(_0x3c0e74,_0x49ba2f(0x148)));}
1
+ const _0x1e346e=_0xa3c5;(function(_0x3d3110,_0x83fe2e){const _0x18fe6a=_0xa3c5,_0x51ef31=_0x3d3110();while(!![]){try{const _0x3df35a=parseInt(_0x18fe6a(0xb1))/0x1*(parseInt(_0x18fe6a(0xc8))/0x2)+-parseInt(_0x18fe6a(0xbc))/0x3*(-parseInt(_0x18fe6a(0xc5))/0x4)+parseInt(_0x18fe6a(0xb4))/0x5*(parseInt(_0x18fe6a(0xc7))/0x6)+-parseInt(_0x18fe6a(0xc1))/0x7+-parseInt(_0x18fe6a(0xcd))/0x8*(parseInt(_0x18fe6a(0xc4))/0x9)+parseInt(_0x18fe6a(0xcc))/0xa*(-parseInt(_0x18fe6a(0xb5))/0xb)+parseInt(_0x18fe6a(0xbd))/0xc*(parseInt(_0x18fe6a(0xca))/0xd);if(_0x3df35a===_0x83fe2e)break;else _0x51ef31['push'](_0x51ef31['shift']());}catch(_0x43b2de){_0x51ef31['push'](_0x51ef31['shift']());}}}(_0x5e7e,0xa4c8e));import{readFileSync}from'node:fs';function _0xa3c5(_0x41c68a,_0x460050){_0x41c68a=_0x41c68a-0xb1;const _0x5e7e65=_0x5e7e();let _0xa3c5f3=_0x5e7e65[_0x41c68a];return _0xa3c5f3;}function _0x5e7e(){const _0x3d53bf=['version','number','gpt-4o','147813tMJOoJ','7867164SVcUcb','includes','metering','Unknown\x20provider:\x20','7576534rqtQcC','load','https://api.simosphere.ai/v1/meter','27kDIuCB','4qnWNIb','provider','2349318XFIzie','4AoJJgq','claude','26PZnxPa','ubEig','10aPZvkE','1590536ZOHeLv','HecbS','387149NxrnHM','.\x20Known:\x20','HjDMc','15YACXaA','10512161LgWPiF','utf-8','rules','Invalid\x20config:\x20missing\x20or\x20invalid\x20\x22version\x22\x20field'];_0x5e7e=function(){return _0x3d53bf;};return _0x5e7e();}import{join}from'node:path';import _0x2e6842 from'js-yaml';import'../shared/providers/claude-provider.js';import'../shared/providers/openai-provider.js';import{listProviders}from'../shared/token-provider.js';const CONFIG_FILENAME='tokenizer-speedup.yaml';export const DEFAULT_LIMITS={'max_injected_tokens':0xfa0,'max_file_tokens':0x5dc,'compress_above':0x320};export const DEFAULT_METERING={'endpoint':_0x1e346e(0xc3),'batch_interval':0x3c,'send_content':!0x1};export function parseConfig(_0x5361c6){const _0x4d672b=_0x1e346e,_0x45d318={'HecbS':_0x4d672b(0xbb),'ZHFdl':function(_0x5b7ae7){return _0x5b7ae7();}},_0x4a3852=_0x2e6842[_0x4d672b(0xc2)](_0x5361c6);if(!_0x4a3852||_0x4d672b(0xba)!=typeof _0x4a3852[_0x4d672b(0xb9)])throw new Error(_0x4d672b(0xb8));const _0x4dfaf1=_0x4a3852[_0x4d672b(0xc6)]??_0x4d672b(0xc9),_0x281765=_0x4a3852['model']??('claude'===_0x4dfaf1?'claude-sonnet-4-20250514':_0x45d318[_0x4d672b(0xce)]),_0x29397b=_0x45d318['ZHFdl'](listProviders);if(!_0x29397b[_0x4d672b(0xbe)](_0x4dfaf1))throw new Error(_0x4d672b(0xc0)+_0x4dfaf1+_0x4d672b(0xb2)+_0x29397b['join'](',\x20'));const _0x3cf490=Array['isArray'](_0x4a3852[_0x4d672b(0xb7)])?_0x4a3852['rules']:[],_0x4247a6=_0x4a3852['context_limits']??DEFAULT_LIMITS,_0x52b2b5=_0x4a3852[_0x4d672b(0xbf)]??DEFAULT_METERING;return{'version':_0x4a3852[_0x4d672b(0xb9)],'provider':_0x4dfaf1,'model':_0x281765,'rules':_0x3cf490,'context_limits':_0x4247a6,'metering':_0x52b2b5};}export function loadConfigFromString(_0xc8fea9){return parseConfig(_0xc8fea9);}export function loadConfig(_0x5710c6){const _0x46d78c=_0x1e346e,_0x56104b={'ubEig':function(_0x12f0bf,_0x27c575,_0x4837e0){return _0x12f0bf(_0x27c575,_0x4837e0);},'HjDMc':function(_0x201790,_0x35e18d){return _0x201790(_0x35e18d);},'ZoAni':function(_0x1a9411,_0x150e43,_0x4858b2){return _0x1a9411(_0x150e43,_0x4858b2);},'pWnea':_0x46d78c(0xb6)},_0x329096=_0x56104b[_0x46d78c(0xcb)](join,_0x5710c6,CONFIG_FILENAME);return _0x56104b[_0x46d78c(0xb3)](parseConfig,_0x56104b['ZoAni'](readFileSync,_0x329096,_0x56104b['pWnea']));}
@@ -1 +1 @@
1
- function _0x1300(){const _0x49cb75=['246120qAzAZE','83238phprBO','8033LOfyFk','369960lpbIFf','knWYk','8HmSMed','map','ebFwM','split','576225IElGEH','YFsOu','28ljwyGC','jFKDB','eRuxg','floor','1663974wRzOkh','58buboij','5634450zXBsqx'];_0x1300=function(){return _0x49cb75;};return _0x1300();}(function(_0x18c6a6,_0x29fbbb){const _0x2a6706=_0x2db0,_0xbc28f=_0x18c6a6();while(!![]){try{const _0x1ef033=parseInt(_0x2a6706(0x122))/0x1*(parseInt(_0x2a6706(0x11e))/0x2)+parseInt(_0x2a6706(0x129))/0x3+parseInt(_0x2a6706(0x123))/0x4+-parseInt(_0x2a6706(0x120))/0x5+parseInt(_0x2a6706(0x121))/0x6*(parseInt(_0x2a6706(0x12b))/0x7)+parseInt(_0x2a6706(0x125))/0x8*(parseInt(_0x2a6706(0x11d))/0x9)+-parseInt(_0x2a6706(0x11f))/0xa;if(_0x1ef033===_0x29fbbb)break;else _0xbc28f['push'](_0xbc28f['shift']());}catch(_0x4f8894){_0xbc28f['push'](_0xbc28f['shift']());}}}(_0x1300,0x2374f));import{countTokens}from'../shared/token-counter.js';export function compressContext(_0x55ed8a,_0xd12028){const _0x41c54e=_0x2db0,_0x102456={'plCNP':function(_0x4e6468,_0xbe066e){return _0x4e6468<=_0xbe066e;},'Gnqmi':function(_0x48312e,_0x534965){return _0x48312e+_0x534965;},'DgJQW':function(_0x4d0d0f,_0x45e7eb){return _0x4d0d0f>_0x45e7eb;},'jFKDB':function(_0x5ac0ee,_0x3bfef3){return _0x5ac0ee>_0x3bfef3;},'sUFiN':function(_0x254f09,_0x83f35c){return _0x254f09(_0x83f35c);},'JqiCI':function(_0xe01b3e,_0xfa5f64){return _0xe01b3e+_0xfa5f64;},'YFsOu':function(_0x58981c,_0x40bae3){return _0x58981c+_0x40bae3;},'EZBlA':'\x20→\x20','eRuxg':'\x20Token]','knWYk':function(_0xd57a22,_0x4b5746){return _0xd57a22(_0x4b5746);}};if(!_0x55ed8a)return{'text':'','originalTokens':0x0,'compressedTokens':0x0,'wasTruncated':!0x1};const _0x3e63a4=countTokens(_0x55ed8a);if(_0x102456['plCNP'](_0x3e63a4,_0xd12028))return{'text':_0x55ed8a,'originalTokens':_0x3e63a4,'compressedTokens':_0x3e63a4,'wasTruncated':!0x1};const _0x352ee0=_0x55ed8a['split']('\x0a\x0a');let _0x270d19='',_0x28e3da=0x0;for(const _0x57f0ed of _0x352ee0){const _0x10ca4a=_0x270d19?_0x102456['Gnqmi'](_0x270d19+'\x0a\x0a',_0x57f0ed):_0x57f0ed,_0x1a4796=countTokens(_0x10ca4a);if(_0x1a4796>_0xd12028)break;_0x270d19=_0x10ca4a,_0x28e3da=_0x1a4796;}if(!_0x270d19&&_0x102456['DgJQW'](_0x352ee0['length'],0x0)){const _0x1c1086=_0x352ee0[0x0][_0x41c54e(0x128)](/\s+/);let _0x7a6f1e='';for(const _0x1a259c of _0x1c1086){const _0x366e73=_0x7a6f1e?_0x7a6f1e+'\x20'+_0x1a259c:_0x1a259c;if(_0x102456[_0x41c54e(0x11a)](countTokens(_0x366e73),_0xd12028-0x5))break;_0x7a6f1e=_0x366e73;}_0x270d19=_0x7a6f1e,_0x28e3da=_0x102456['sUFiN'](countTokens,_0x270d19);}const _0x36de16=_0x102456['JqiCI'](_0x102456[_0x41c54e(0x12a)](_0x102456['Gnqmi'](_0x270d19,'\x0a\x0a[...\x20gekuerzt,\x20'),_0x3e63a4)+_0x102456['EZBlA']+_0x28e3da,_0x102456[_0x41c54e(0x11b)]);return{'text':_0x36de16,'originalTokens':_0x3e63a4,'compressedTokens':_0x102456[_0x41c54e(0x124)](countTokens,_0x36de16),'wasTruncated':!0x0};}function _0x2db0(_0x52fde1,_0x5bd573){_0x52fde1=_0x52fde1-0x11a;const _0x13001e=_0x1300();let _0x2db0aa=_0x13001e[_0x52fde1];return _0x2db0aa;}export function compressContextBudget(_0x523868,_0x2787af){const _0x4f9a1a=_0x2db0,_0x934589={'ebFwM':function(_0x5384da,_0x519510){return _0x5384da/_0x519510;}},_0x479fb2=Math[_0x4f9a1a(0x11c)](_0x934589[_0x4f9a1a(0x127)](_0x2787af,Math['max'](_0x523868['length'],0x1)));return _0x523868[_0x4f9a1a(0x126)](({label:_0x53eb79,text:_0x4d1e41})=>({'label':_0x53eb79,'result':compressContext(_0x4d1e41,_0x479fb2)}));}
1
+ (function(_0x5cb8b5,_0x18bd0b){const _0x3fc6c9=_0x5f17,_0x5732b6=_0x5cb8b5();while(!![]){try{const _0x302371=-parseInt(_0x3fc6c9(0x10c))/0x1*(-parseInt(_0x3fc6c9(0x107))/0x2)+-parseInt(_0x3fc6c9(0x10f))/0x3*(-parseInt(_0x3fc6c9(0x11a))/0x4)+parseInt(_0x3fc6c9(0x108))/0x5*(-parseInt(_0x3fc6c9(0x119))/0x6)+-parseInt(_0x3fc6c9(0x111))/0x7+parseInt(_0x3fc6c9(0x118))/0x8+parseInt(_0x3fc6c9(0x116))/0x9*(parseInt(_0x3fc6c9(0x115))/0xa)+-parseInt(_0x3fc6c9(0x112))/0xb;if(_0x302371===_0x18bd0b)break;else _0x5732b6['push'](_0x5732b6['shift']());}catch(_0x292f0e){_0x5732b6['push'](_0x5732b6['shift']());}}}(_0x1dd7,0x95be7));import{countTokens}from'../shared/token-counter.js';export function compressContext(_0xc50905,_0x53cb58){const _0x21bd6a=_0x5f17,_0x46358a={'CZXXN':function(_0x1b8f18,_0x30a5fb){return _0x1b8f18(_0x30a5fb);},'CRGXf':function(_0x291966,_0x26bb7b){return _0x291966+_0x26bb7b;},'NSCtC':function(_0x4fcc8e,_0x53b0a2){return _0x4fcc8e>_0x53b0a2;},'yiMlb':function(_0x509212,_0x58f031){return _0x509212>_0x58f031;},'uBpAz':function(_0x92aada,_0x44c03e){return _0x92aada+_0x44c03e;},'KygTI':function(_0x49941f,_0x43a0db){return _0x49941f>_0x43a0db;},'OfCYr':function(_0x167ba7,_0x5784af){return _0x167ba7+_0x5784af;},'VnATP':function(_0x5a5b16,_0x2015c3){return _0x5a5b16+_0x2015c3;}};if(!_0xc50905)return{'text':'','originalTokens':0x0,'compressedTokens':0x0,'wasTruncated':!0x1};const _0x323af8=_0x46358a['CZXXN'](countTokens,_0xc50905);if(_0x323af8<=_0x53cb58)return{'text':_0xc50905,'originalTokens':_0x323af8,'compressedTokens':_0x323af8,'wasTruncated':!0x1};const _0xafd42f=_0xc50905['split']('\x0a\x0a');let _0xc3201='',_0x37d7ba=0x0;for(const _0x1953f7 of _0xafd42f){const _0x5a825f=_0xc3201?_0x46358a[_0x21bd6a(0x117)](_0xc3201+'\x0a\x0a',_0x1953f7):_0x1953f7,_0x3aabde=countTokens(_0x5a825f);if(_0x46358a[_0x21bd6a(0x10b)](_0x3aabde,_0x53cb58))break;_0xc3201=_0x5a825f,_0x37d7ba=_0x3aabde;}if(!_0xc3201&&_0x46358a['yiMlb'](_0xafd42f['length'],0x0)){const _0x208f1a=_0xafd42f[0x0][_0x21bd6a(0x10d)](/\s+/);let _0x264d62='';for(const _0x442551 of _0x208f1a){const _0x1166b5=_0x264d62?_0x46358a['uBpAz'](_0x264d62+'\x20',_0x442551):_0x442551;if(_0x46358a[_0x21bd6a(0x109)](_0x46358a[_0x21bd6a(0x10a)](countTokens,_0x1166b5),_0x53cb58-0x5))break;_0x264d62=_0x1166b5;}_0xc3201=_0x264d62,_0x37d7ba=countTokens(_0xc3201);}const _0x10cba7=_0x46358a[_0x21bd6a(0x110)](_0x46358a[_0x21bd6a(0x106)](_0x46358a['VnATP'](_0xc3201,_0x21bd6a(0x11d)),_0x323af8)+_0x21bd6a(0x114)+_0x37d7ba,_0x21bd6a(0x11b));return{'text':_0x10cba7,'originalTokens':_0x323af8,'compressedTokens':countTokens(_0x10cba7),'wasTruncated':!0x0};}function _0x5f17(_0x29bec3,_0x5179ff){_0x29bec3=_0x29bec3-0x106;const _0x1dd707=_0x1dd7();let _0x5f1704=_0x1dd707[_0x29bec3];return _0x5f1704;}function _0x1dd7(){const _0x11ccb1=['1740807vlcqZC','CRGXf','5752608DnPgbn','42ENCaKt','556492ZRCljg','\x20Token]','map','\x0a\x0a[...\x20gekuerzt,\x20','uBpAz','78QWAUsL','585160rvWLVb','KygTI','CZXXN','NSCtC','18931OcUWDc','split','floor','18KxcMRR','OfCYr','2401833QgFzyP','7808372RAgIit','max','\x20→\x20','10QXYIyC'];_0x1dd7=function(){return _0x11ccb1;};return _0x1dd7();}export function compressContextBudget(_0x33e97b,_0x25f8ce){const _0x43ac8e=_0x5f17,_0x2a92bb=Math[_0x43ac8e(0x10e)](_0x25f8ce/Math[_0x43ac8e(0x113)](_0x33e97b['length'],0x1));return _0x33e97b[_0x43ac8e(0x11c)](({label:_0x12be2a,text:_0x163a11})=>({'label':_0x12be2a,'result':compressContext(_0x163a11,_0x2a92bb)}));}
@@ -1 +1 @@
1
- const _0x55d095=_0x2602;function _0x3133(){const _0x414fef=['text','mOxEx','join','4592tPYkya','record','\x20laden.','6987075vubLiu','collector','288940DIspPZ','push','prompt','limits','projectRoot','max_file_tokens','engine','222WYfhwd','user','hook_event_name','82612pVCSQD','length','min','QiWYi','1289866CbaciY','708fgEuBS','now','max_injected_tokens','getSessionSummary','load','11151864ircQtC','content','handlePreCompact','7262019EmgIzI'];_0x3133=function(){return _0x414fef;};return _0x3133();}(function(_0x2bed0f,_0x1dae52){const _0x381ad8=_0x2602,_0xa08133=_0x2bed0f();while(!![]){try{const _0x4d29c2=parseInt(_0x381ad8(0xbe))/0x1+parseInt(_0x381ad8(0xb0))/0x2+parseInt(_0x381ad8(0xb7))/0x3*(-parseInt(_0x381ad8(0xba))/0x4)+-parseInt(_0x381ad8(0xae))/0x5+-parseInt(_0x381ad8(0xbf))/0x6*(-parseInt(_0x381ad8(0xab))/0x7)+parseInt(_0x381ad8(0xa4))/0x8+parseInt(_0x381ad8(0xa7))/0x9;if(_0x4d29c2===_0x1dae52)break;else _0xa08133['push'](_0xa08133['shift']());}catch(_0x410cb5){_0xa08133['push'](_0xa08133['shift']());}}}(_0x3133,0xc01c1));import{RuleEngine}from'./rule-engine.js';import{MetricsCollector}from'./metrics-collector.js';import{compressContext}from'./context-compressor.js';function _0x2602(_0x470d61,_0x4c98b9){_0x470d61=_0x470d61-0xa1;const _0x3133c9=_0x3133();let _0x2602ba=_0x3133c9[_0x470d61];return _0x2602ba;}import{prioritizeContext}from'./precompact-handler.js';import{countTokens}from'../shared/token-counter.js';export class HookDispatcher{['engine'];[_0x55d095(0xaf)];[_0x55d095(0xb4)];constructor(_0xb56715,_0x2873c0,_0x437a35){const _0x1af629=_0x55d095;this[_0x1af629(0xb6)]=new RuleEngine(_0xb56715),this['projectRoot']=_0x2873c0,this['collector']=new MetricsCollector(_0x2873c0,_0x437a35||'session-'+Date[_0x1af629(0xc0)]());}['handleUserPromptSubmit'](_0x7963e){const _0xbf38bf=_0x55d095,_0x10e71e={'CMTtT':function(_0x4d0ad9,_0x16a42f){return _0x4d0ad9===_0x16a42f;},'tVReL':function(_0x4119db,_0x26b203){return _0x4119db(_0x26b203);},'mOxEx':function(_0x2c5933,_0x1d4720){return _0x2c5933+_0x1d4720;}},_0x25f38c=_0x7963e[_0xbf38bf(0xb2)]||'',_0x183dc4=this['engine']['match'](_0x25f38c);if(_0x10e71e['CMTtT'](0x0,_0x183dc4[_0xbf38bf(0xbb)])){const _0x69b07=_0x10e71e['tVReL'](countTokens,_0x25f38c);return this[_0xbf38bf(0xaf)]['record']({'hook_event':_0x7963e['hook_event_name'],'baseline_tokens':_0x69b07,'optimized_tokens':_0x69b07,'rule_matched':null}),{};}const _0x4cab3e=[],_0x364b6c=[];for(const _0x2bdfe4 of _0x183dc4)_0x364b6c[_0xbf38bf(0xb1)](_0x2bdfe4['trigger'][0x0]),_0x2bdfe4['summary_only']?_0x4cab3e[_0xbf38bf(0xb1)]('['+_0x2bdfe4['trigger'][0x0]+']\x20Fuer\x20Details:\x20'+_0x2bdfe4[_0xbf38bf(0xa3)]+_0xbf38bf(0xad)):_0x4cab3e[_0xbf38bf(0xb1)]('['+_0x2bdfe4['trigger'][0x0]+']\x20Relevanter\x20Kontext:\x20'+_0x2bdfe4['load']+'\x20(max\x20'+(_0x2bdfe4['max_tokens']||this[_0xbf38bf(0xb6)][_0xbf38bf(0xb3)][_0xbf38bf(0xb5)])+'\x20Token)');let _0x2f456d=_0x4cab3e[_0xbf38bf(0xaa)]('\x0a');const _0x10cb1f=this['engine'][_0xbf38bf(0xb3)]['compress_above'];_0x10cb1f>0x0&&(_0x2f456d=compressContext(_0x2f456d,_0x10cb1f)[_0xbf38bf(0xa8)]);const _0x19ea5f=countTokens(_0x25f38c),_0x333c20=countTokens(_0x2f456d),_0x457c20=_0x10e71e['mOxEx'](_0x19ea5f,this['engine']['limits']['max_injected_tokens']),_0x57a1d4=_0x10e71e[_0xbf38bf(0xa9)](_0x19ea5f,Math[_0xbf38bf(0xbc)](_0x333c20,this['engine']['limits'][_0xbf38bf(0xa1)]));return this['collector']['record']({'hook_event':_0x7963e['hook_event_name'],'baseline_tokens':_0x457c20,'optimized_tokens':_0x57a1d4,'rule_matched':_0x364b6c[_0xbf38bf(0xaa)]('+')}),{'additionalContext':_0x2f456d};}[_0x55d095(0xa6)](_0x1f4360){const _0x1ad578=_0x55d095,_0x599484={'QiWYi':function(_0x3bbf58,_0x5d9121,_0x55a3d6){return _0x3bbf58(_0x5d9121,_0x55a3d6);}},_0x2d8b8a=[];if(_0x1f4360[_0x1ad578(0xb2)]&&_0x2d8b8a[_0x1ad578(0xb1)]({'role':_0x1ad578(0xb8),'content':_0x1f4360[_0x1ad578(0xb2)],'turnIndex':0x0}),0x0===_0x2d8b8a['length'])return{};const _0x4f218f=_0x599484[_0x1ad578(0xbd)](prioritizeContext,_0x2d8b8a,this['engine'][_0x1ad578(0xb3)]),_0x594b12=_0x4f218f['prioritized']['map'](_0x2ed017=>_0x2ed017[_0x1ad578(0xa5)])[_0x1ad578(0xaa)]('\x0a\x0a');return this[_0x1ad578(0xaf)][_0x1ad578(0xac)]({'hook_event':_0x1f4360[_0x1ad578(0xb9)],'baseline_tokens':_0x4f218f['totalOriginalTokens'],'optimized_tokens':_0x4f218f['totalCompressedTokens'],'rule_matched':null}),{'additionalContext':_0x594b12};}['handleSessionStop'](){const _0x157f22=_0x55d095;return this[_0x157f22(0xaf)]['flush'](),this['collector']['getSummary']();}[_0x55d095(0xa2)](){const _0x4f7507=_0x55d095;return this[_0x4f7507(0xaf)]['getSummary']();}}
1
+ const _0x43f9a0=_0x4faf;(function(_0xb71165,_0xc9c6e2){const _0x514a40=_0x4faf,_0x21996f=_0xb71165();while(!![]){try{const _0x583607=parseInt(_0x514a40(0x18c))/0x1+parseInt(_0x514a40(0x18d))/0x2*(parseInt(_0x514a40(0x182))/0x3)+-parseInt(_0x514a40(0x183))/0x4*(parseInt(_0x514a40(0x189))/0x5)+-parseInt(_0x514a40(0x16a))/0x6*(parseInt(_0x514a40(0x173))/0x7)+-parseInt(_0x514a40(0x16c))/0x8*(parseInt(_0x514a40(0x17a))/0x9)+-parseInt(_0x514a40(0x17e))/0xa+parseInt(_0x514a40(0x18b))/0xb;if(_0x583607===_0xc9c6e2)break;else _0x21996f['push'](_0x21996f['shift']());}catch(_0x25b4b0){_0x21996f['push'](_0x21996f['shift']());}}}(_0x4fe7,0x324ad));import{RuleEngine}from'./rule-engine.js';function _0x4faf(_0x54f71f,_0x5ca93b){_0x54f71f=_0x54f71f-0x165;const _0x4fe764=_0x4fe7();let _0x4fafee=_0x4fe764[_0x54f71f];return _0x4fafee;}import{MetricsCollector}from'./metrics-collector.js';import{compressContext}from'./context-compressor.js';import{prioritizeContext}from'./precompact-handler.js';import{countTokens}from'../shared/token-counter.js';export class HookDispatcher{[_0x43f9a0(0x172)];[_0x43f9a0(0x171)];[_0x43f9a0(0x185)];constructor(_0x36e519,_0x2ad317,_0x2659b1){const _0x4439c5=_0x43f9a0;this[_0x4439c5(0x172)]=new RuleEngine(_0x36e519),this['projectRoot']=_0x2ad317,this[_0x4439c5(0x171)]=new MetricsCollector(_0x2ad317,_0x2659b1||_0x4439c5(0x177)+Date[_0x4439c5(0x170)]());}['handleUserPromptSubmit'](_0x1960aa){const _0x4168dd=_0x43f9a0,_0x4ab0bb={'eqGGE':function(_0x70a4cb,_0x422f8b){return _0x70a4cb===_0x422f8b;},'aZqPg':function(_0x41f015,_0x1952da){return _0x41f015(_0x1952da);},'EKjBq':function(_0x51a67f,_0xfdded7){return _0x51a67f>_0xfdded7;},'fpSwl':function(_0x1ea732,_0x2899c9){return _0x1ea732(_0x2899c9);},'kiuWs':function(_0x39b9e0,_0x561205){return _0x39b9e0(_0x561205);},'raunl':function(_0x251441,_0x1e53a1){return _0x251441+_0x1e53a1;}},_0x415215=_0x1960aa['prompt']||'',_0x19c843=this[_0x4168dd(0x172)][_0x4168dd(0x167)](_0x415215);if(_0x4ab0bb[_0x4168dd(0x178)](0x0,_0x19c843[_0x4168dd(0x179)])){const _0x93c469=_0x4ab0bb['aZqPg'](countTokens,_0x415215);return this[_0x4168dd(0x171)]['record']({'hook_event':_0x1960aa['hook_event_name'],'baseline_tokens':_0x93c469,'optimized_tokens':_0x93c469,'rule_matched':null}),{};}const _0x3a98de=[],_0x59877b=[];for(const _0x40f0c3 of _0x19c843)_0x59877b[_0x4168dd(0x16b)](_0x40f0c3[_0x4168dd(0x165)][0x0]),_0x40f0c3[_0x4168dd(0x17b)]?_0x3a98de[_0x4168dd(0x16b)]('['+_0x40f0c3['trigger'][0x0]+']\x20Fuer\x20Details:\x20'+_0x40f0c3[_0x4168dd(0x16f)]+'\x20laden.'):_0x3a98de[_0x4168dd(0x16b)]('['+_0x40f0c3[_0x4168dd(0x165)][0x0]+']\x20Relevanter\x20Kontext:\x20'+_0x40f0c3[_0x4168dd(0x16f)]+_0x4168dd(0x184)+(_0x40f0c3[_0x4168dd(0x166)]||this['engine']['limits']['max_file_tokens'])+'\x20Token)');let _0x32c9c2=_0x3a98de['join']('\x0a');const _0x45bcb1=this['engine'][_0x4168dd(0x18a)][_0x4168dd(0x17c)];_0x4ab0bb['EKjBq'](_0x45bcb1,0x0)&&(_0x32c9c2=compressContext(_0x32c9c2,_0x45bcb1)[_0x4168dd(0x180)]);const _0x545a6d=_0x4ab0bb[_0x4168dd(0x18e)](countTokens,_0x415215),_0x2cbab9=_0x4ab0bb[_0x4168dd(0x17f)](countTokens,_0x32c9c2),_0x1afa29=_0x4ab0bb['raunl'](_0x545a6d,this[_0x4168dd(0x172)]['limits'][_0x4168dd(0x175)]),_0x567097=_0x545a6d+Math['min'](_0x2cbab9,this['engine']['limits'][_0x4168dd(0x175)]);return this[_0x4168dd(0x171)]['record']({'hook_event':_0x1960aa['hook_event_name'],'baseline_tokens':_0x1afa29,'optimized_tokens':_0x567097,'rule_matched':_0x59877b['join']('+')}),{'additionalContext':_0x32c9c2};}[_0x43f9a0(0x181)](_0x2210e3){const _0x3b7fd7=_0x43f9a0,_0x5e1b6e={'Fnzay':function(_0x4b49ad,_0x2d5a6b){return _0x4b49ad===_0x2d5a6b;},'wNisH':function(_0x55baec,_0xb13e74,_0x177e32){return _0x55baec(_0xb13e74,_0x177e32);}},_0x25a4c9=[];if(_0x2210e3[_0x3b7fd7(0x16d)]&&_0x25a4c9['push']({'role':'user','content':_0x2210e3[_0x3b7fd7(0x16d)],'turnIndex':0x0}),_0x5e1b6e[_0x3b7fd7(0x176)](0x0,_0x25a4c9[_0x3b7fd7(0x179)]))return{};const _0x5199e7=_0x5e1b6e[_0x3b7fd7(0x168)](prioritizeContext,_0x25a4c9,this[_0x3b7fd7(0x172)][_0x3b7fd7(0x18a)]),_0x1e6630=_0x5199e7['prioritized'][_0x3b7fd7(0x169)](_0x2b5ffd=>_0x2b5ffd[_0x3b7fd7(0x186)])['join']('\x0a\x0a');return this['collector'][_0x3b7fd7(0x187)]({'hook_event':_0x2210e3[_0x3b7fd7(0x17d)],'baseline_tokens':_0x5199e7[_0x3b7fd7(0x174)],'optimized_tokens':_0x5199e7['totalCompressedTokens'],'rule_matched':null}),{'additionalContext':_0x1e6630};}['handleSessionStop'](){const _0x458c38=_0x43f9a0;return this['collector']['flush'](),this['collector'][_0x458c38(0x188)]();}[_0x43f9a0(0x16e)](){return this['collector']['getSummary']();}}function _0x4fe7(){const _0xc8bdcc=['now','collector','engine','512806sKEwMr','totalOriginalTokens','max_injected_tokens','Fnzay','session-','eqGGE','length','51453AECtQp','summary_only','compress_above','hook_event_name','1757350wRAfuL','kiuWs','text','handlePreCompact','303891WFiCUL','5612QaMKUM','\x20(max\x20','projectRoot','content','record','getSummary','755wMVqKP','limits','8359285GgfsLr','192787HCULMF','4bhntWy','fpSwl','trigger','max_tokens','match','wNisH','map','24KEfkNJ','push','376RhQTab','prompt','getSessionSummary','load'];_0x4fe7=function(){return _0xc8bdcc;};return _0x4fe7();}
@@ -1 +1 @@
1
- const _0x801554=_0x1d5f;function _0x1d5f(_0x317379,_0xb7f1b7){_0x317379=_0x317379-0x1c4;const _0x3e71de=_0x3e71();let _0x1d5fc6=_0x3e71de[_0x317379];return _0x1d5fc6;}(function(_0x3f96bb,_0x1cc520){const _0x56cdb8=_0x1d5f,_0x4b72d4=_0x3f96bb();while(!![]){try{const _0x17ff98=-parseInt(_0x56cdb8(0x1d3))/0x1+parseInt(_0x56cdb8(0x1cd))/0x2+-parseInt(_0x56cdb8(0x1c7))/0x3+parseInt(_0x56cdb8(0x1cc))/0x4+parseInt(_0x56cdb8(0x1d6))/0x5*(-parseInt(_0x56cdb8(0x1c8))/0x6)+parseInt(_0x56cdb8(0x1ce))/0x7+-parseInt(_0x56cdb8(0x1ca))/0x8*(-parseInt(_0x56cdb8(0x1cf))/0x9);if(_0x17ff98===_0x1cc520)break;else _0x4b72d4['push'](_0x4b72d4['shift']());}catch(_0x1a3d3f){_0x4b72d4['push'](_0x4b72d4['shift']());}}}(_0x3e71,0xb63a1));export function buildMeterPayload(_0x15ee37,_0x58e505){const _0x4dfccb=_0x1d5f;return{'session_id':_0x15ee37['session_id'],'tokens_saved':_0x15ee37[_0x4dfccb(0x1c5)],'baseline_tokens':_0x15ee37['total_baseline'],'optimized_tokens':_0x15ee37[_0x4dfccb(0x1d7)],'hook_event':'Stop','provider':_0x58e505[_0x4dfccb(0x1c9)],'model':_0x58e505[_0x4dfccb(0x1d9)],'team_id':_0x58e505['team_id']??''};}function _0x3e71(){const _0x106060=['no_endpoint','zuSGa','616123jqOWeD','send','http_','83200pwyPKB','total_optimized','timeout','model','status','application/json','total_delta','Yecha','4473453OUTmlz','450pxlcNx','provider','160SWDAWS','network_error','1954232fYBdGP','771902RrHCCy','5362042afqHqK','1107522gqYlWB','endpoint'];_0x3e71=function(){return _0x106060;};return _0x3e71();}export class MeteringClient{['endpoint'];constructor(_0x70d3e8){this['endpoint']=_0x70d3e8;}async[_0x801554(0x1d4)](_0x549e9d){const _0x5532ef=_0x801554,_0x29c51e={'MfKaz':function(_0x91b11f,_0x36ebcf,_0x3d2861){return _0x91b11f(_0x36ebcf,_0x3d2861);},'zuSGa':_0x5532ef(0x1c4),'Yecha':_0x5532ef(0x1cb)};if(!this['endpoint'])return{'sent':!0x1,'reason':_0x5532ef(0x1d1)};try{const _0x275307=await _0x29c51e['MfKaz'](fetch,this[_0x5532ef(0x1d0)],{'method':'POST','headers':{'Content-Type':_0x29c51e[_0x5532ef(0x1d2)],'Authorization':'Bearer\x20'+(process.env.TOKENIZER_API_KEY||'')},'body':JSON['stringify'](_0x549e9d),'signal':AbortSignal[_0x5532ef(0x1d8)](0x1388)});return _0x275307['ok']?{'sent':!0x0}:{'sent':!0x1,'reason':_0x5532ef(0x1d5)+_0x275307[_0x5532ef(0x1da)]};}catch{return{'sent':!0x1,'reason':_0x29c51e[_0x5532ef(0x1c6)]};}}}
1
+ const _0x402584=_0x4e34;function _0x4fca(){const _0x5a275d=['timeout','15673WnXMuF','network_error','http_','9830vKQTDO','9094921BvgWnr','total_baseline','2416BqiCCW','provider','274928TIUQvs','862527iXsWth','5283805naylsP','endpoint','6VJZxWV','18JtgBMA','stringify','12eSsotz','send','4745344UKMylG','POST','11367jsYZiA'];_0x4fca=function(){return _0x5a275d;};return _0x4fca();}function _0x4e34(_0x4c5f04,_0x2a1e25){_0x4c5f04=_0x4c5f04-0xec;const _0x4fca75=_0x4fca();let _0x4e34b4=_0x4fca75[_0x4c5f04];return _0x4e34b4;}(function(_0x3d18eb,_0x5372ba){const _0x3deea5=_0x4e34,_0x5cd418=_0x3d18eb();while(!![]){try{const _0x36f9fa=parseInt(_0x3deea5(0xee))/0x1+-parseInt(_0x3deea5(0xed))/0x2*(-parseInt(_0x3deea5(0xf2))/0x3)+parseInt(_0x3deea5(0xf6))/0x4+parseInt(_0x3deea5(0xef))/0x5*(-parseInt(_0x3deea5(0xf1))/0x6)+parseInt(_0x3deea5(0xfa))/0x7*(-parseInt(_0x3deea5(0x100))/0x8)+parseInt(_0x3deea5(0xf8))/0x9*(-parseInt(_0x3deea5(0xfd))/0xa)+-parseInt(_0x3deea5(0xfe))/0xb*(-parseInt(_0x3deea5(0xf4))/0xc);if(_0x36f9fa===_0x5372ba)break;else _0x5cd418['push'](_0x5cd418['shift']());}catch(_0x4378d4){_0x5cd418['push'](_0x5cd418['shift']());}}}(_0x4fca,0xb13e6));export function buildMeterPayload(_0x5cedc2,_0x46c0b9){const _0x469e0c=_0x4e34,_0x451813={'OkAJb':'Stop'};return{'session_id':_0x5cedc2['session_id'],'tokens_saved':_0x5cedc2['total_delta'],'baseline_tokens':_0x5cedc2[_0x469e0c(0xff)],'optimized_tokens':_0x5cedc2['total_optimized'],'hook_event':_0x451813['OkAJb'],'provider':_0x46c0b9[_0x469e0c(0xec)],'model':_0x46c0b9['model'],'team_id':_0x46c0b9['team_id']??''};}export class MeteringClient{[_0x402584(0xf0)];constructor(_0x101a52){const _0x4504bd=_0x402584;this[_0x4504bd(0xf0)]=_0x101a52;}async[_0x402584(0xf5)](_0x1ae484){const _0x2fddd7=_0x402584,_0x206d3a={'odmSa':'no_endpoint','bYMOE':function(_0x1f7859,_0x701a19,_0xfc151e){return _0x1f7859(_0x701a19,_0xfc151e);},'pYCdN':'application/json'};if(!this[_0x2fddd7(0xf0)])return{'sent':!0x1,'reason':_0x206d3a['odmSa']};try{const _0x27ad28=await _0x206d3a['bYMOE'](fetch,this[_0x2fddd7(0xf0)],{'method':_0x2fddd7(0xf7),'headers':{'Content-Type':_0x206d3a['pYCdN'],'Authorization':'Bearer\x20'+(process.env.TOKENIZER_API_KEY||'')},'body':JSON[_0x2fddd7(0xf3)](_0x1ae484),'signal':AbortSignal[_0x2fddd7(0xf9)](0x1388)});return _0x27ad28['ok']?{'sent':!0x0}:{'sent':!0x1,'reason':_0x2fddd7(0xfc)+_0x27ad28['status']};}catch{return{'sent':!0x1,'reason':_0x2fddd7(0xfb)};}}}
@@ -1 +1 @@
1
- function _0x4aac(_0x513fb2,_0x5d5c81){_0x513fb2=_0x513fb2-0x93;const _0x4a361b=_0x4a36();let _0x4aacd2=_0x4a361b[_0x513fb2];return _0x4aacd2;}const _0xfbb764=_0x4aac;(function(_0x4669f3,_0x1b1d36){const _0x4de77a=_0x4aac,_0x35b38d=_0x4669f3();while(!![]){try{const _0xa28a5e=-parseInt(_0x4de77a(0xa5))/0x1*(-parseInt(_0x4de77a(0x9a))/0x2)+parseInt(_0x4de77a(0x98))/0x3*(parseInt(_0x4de77a(0xa9))/0x4)+-parseInt(_0x4de77a(0x99))/0x5+-parseInt(_0x4de77a(0xab))/0x6*(-parseInt(_0x4de77a(0xa4))/0x7)+-parseInt(_0x4de77a(0x97))/0x8*(-parseInt(_0x4de77a(0xa6))/0x9)+-parseInt(_0x4de77a(0xa1))/0xa*(parseInt(_0x4de77a(0xae))/0xb)+-parseInt(_0x4de77a(0x9c))/0xc*(parseInt(_0x4de77a(0x95))/0xd);if(_0xa28a5e===_0x1b1d36)break;else _0x35b38d['push'](_0x35b38d['shift']());}catch(_0x3a4041){_0x35b38d['push'](_0x35b38d['shift']());}}}(_0x4a36,0x5abf8));import{mkdirSync,writeFileSync}from'node:fs';import{join}from'node:path';function _0x4a36(){const _0x437f21=['11YbPcAP','baseline_tokens','utf-8','stringify','reduce','1651wDsZln','startedAt','8TwwGRs','3JalYAg','1462525hEmLHW','949174fesQQn','record','51708LdwMTS','optimized_tokens','hook_event','oJfcq','flush','214190PWQpZe','metrics','rule_matched','710381ojFOCm','1gdmoDd','4421961Neoxkj','lkyBr','length','661888aeXDVe','sessionId','6abbhft','projectRoot','push'];_0x4a36=function(){return _0x437f21;};return _0x4a36();}const METRICS_DIR='.tokenizer-speedup';export class MetricsCollector{['metrics']=[];[_0xfbb764(0xaa)];['projectRoot'];[_0xfbb764(0x96)];constructor(_0x5e68ed,_0x4192b8){const _0x46fa50=_0xfbb764;this[_0x46fa50(0xac)]=_0x5e68ed,this[_0x46fa50(0xaa)]=_0x4192b8,this[_0x46fa50(0x96)]=new Date()['toISOString']();}[_0xfbb764(0x9b)](_0x45a01e){const _0x2912cc=_0xfbb764;this['metrics'][_0x2912cc(0xad)]({'session_id':this[_0x2912cc(0xaa)],'timestamp':new Date()['toISOString'](),'hook_event':_0x45a01e[_0x2912cc(0x9e)],'baseline_tokens':_0x45a01e['baseline_tokens'],'optimized_tokens':_0x45a01e[_0x2912cc(0x9d)],'delta':_0x45a01e['baseline_tokens']-_0x45a01e['optimized_tokens'],'rule_matched':_0x45a01e[_0x2912cc(0xa3)]});}['getMetrics'](){return[...this['metrics']];}['getSummary'](){const _0x55c40b=_0xfbb764,_0x14deb7={'oJfcq':function(_0x2b5ef1,_0x472921){return _0x2b5ef1+_0x472921;},'lkyBr':function(_0x3fc7bc,_0x228b2c){return _0x3fc7bc*_0x228b2c;},'FNGIe':function(_0x1ed7b9,_0x4378a0){return _0x1ed7b9/_0x4378a0;}},_0x199bac=this[_0x55c40b(0xa2)][_0x55c40b(0x94)]((_0x4b9983,_0x502e98)=>_0x4b9983+_0x502e98[_0x55c40b(0xaf)],0x0),_0x49d8dd=this[_0x55c40b(0xa2)][_0x55c40b(0x94)]((_0x211773,_0x4f55a8)=>_0x211773+_0x4f55a8['optimized_tokens'],0x0),_0x5d821e=_0x199bac-_0x49d8dd,_0x49b9bc={};for(const _0x3fb470 of this['metrics'])_0x3fb470['rule_matched']&&(_0x49b9bc[_0x3fb470[_0x55c40b(0xa3)]]=_0x14deb7[_0x55c40b(0x9f)](_0x49b9bc[_0x3fb470[_0x55c40b(0xa3)]]||0x0,0x1));return{'session_id':this[_0x55c40b(0xaa)],'started_at':this[_0x55c40b(0x96)],'ended_at':new Date()['toISOString'](),'total_baseline':_0x199bac,'total_optimized':_0x49d8dd,'total_delta':_0x5d821e,'savings_percent':_0x199bac>0x0?_0x14deb7[_0x55c40b(0xa7)](_0x14deb7['FNGIe'](_0x5d821e,_0x199bac),0x64):0x0,'prompts_count':this[_0x55c40b(0xa2)][_0x55c40b(0xa8)],'rules_triggered':_0x49b9bc};}[_0xfbb764(0xa0)](){const _0x4de828=_0xfbb764,_0xd264a={'setBQ':function(_0x11eba0,_0xac0670,_0xd1c156){return _0x11eba0(_0xac0670,_0xd1c156);}},_0x270b33=join(this['projectRoot'],METRICS_DIR);_0xd264a['setBQ'](mkdirSync,_0x270b33,{'recursive':!0x0});const _0x5507f8={'metrics':this['metrics'],'summary':this['getSummary']()};writeFileSync(join(_0x270b33,this['sessionId']+'.json'),JSON[_0x4de828(0x93)](_0x5507f8,null,0x2),_0x4de828(0xb0));}}
1
+ const _0x37eeeb=_0x41c3;(function(_0x10a204,_0x4f33f1){const _0xa579c9=_0x41c3,_0x22110f=_0x10a204();while(!![]){try{const _0x4f9506=-parseInt(_0xa579c9(0x1a9))/0x1+parseInt(_0xa579c9(0x1a6))/0x2+-parseInt(_0xa579c9(0x19b))/0x3+-parseInt(_0xa579c9(0x1b1))/0x4*(-parseInt(_0xa579c9(0x194))/0x5)+-parseInt(_0xa579c9(0x196))/0x6+parseInt(_0xa579c9(0x19a))/0x7+parseInt(_0xa579c9(0x1a7))/0x8;if(_0x4f9506===_0x4f33f1)break;else _0x22110f['push'](_0x22110f['shift']());}catch(_0x49effb){_0x22110f['push'](_0x22110f['shift']());}}}(_0x4732,0xbe795));import{mkdirSync,writeFileSync}from'node:fs';import{join}from'node:path';const METRICS_DIR='.tokenizer-speedup';function _0x41c3(_0x4a5580,_0x20f655){_0x4a5580=_0x4a5580-0x193;const _0x473275=_0x4732();let _0x41c33a=_0x473275[_0x4a5580];return _0x41c33a;}function _0x4732(){const _0x3d3bd8=['URYiD','projectRoot','sessionId','.json','length','uonjU','1344246uVHtHl','11984392BDvGYL','baseline_tokens','780913PfXQoh','metrics','getSummary','reduce','hook_event','eAYfV','record','flush','42780ptlJWo','toISOString','310fRXuZU','utf-8','8025528rnIiIZ','optimized_tokens','stringify','startedAt','3466232QaQSZU','1289268RJYeyo','push','grlDI','Quwpn','rule_matched'];_0x4732=function(){return _0x3d3bd8;};return _0x4732();}export class MetricsCollector{[_0x37eeeb(0x1aa)]=[];['sessionId'];[_0x37eeeb(0x1a1)];[_0x37eeeb(0x199)];constructor(_0x1f6de4,_0x12d111){const _0x200826=_0x37eeeb;this['projectRoot']=_0x1f6de4,this[_0x200826(0x1a2)]=_0x12d111,this['startedAt']=new Date()['toISOString']();}[_0x37eeeb(0x1af)](_0x4642d7){const _0x314f26=_0x37eeeb,_0x564053={'grlDI':function(_0x39facf,_0x3bf071){return _0x39facf-_0x3bf071;}};this[_0x314f26(0x1aa)][_0x314f26(0x19c)]({'session_id':this[_0x314f26(0x1a2)],'timestamp':new Date()[_0x314f26(0x193)](),'hook_event':_0x4642d7[_0x314f26(0x1ad)],'baseline_tokens':_0x4642d7['baseline_tokens'],'optimized_tokens':_0x4642d7[_0x314f26(0x197)],'delta':_0x564053[_0x314f26(0x19d)](_0x4642d7['baseline_tokens'],_0x4642d7[_0x314f26(0x197)]),'rule_matched':_0x4642d7[_0x314f26(0x19f)]});}['getMetrics'](){return[...this['metrics']];}[_0x37eeeb(0x1ab)](){const _0x3c61f8=_0x37eeeb,_0x1641eb={'MZvue':function(_0x386822,_0x1493dd){return _0x386822-_0x1493dd;},'uonjU':function(_0x521ad3,_0x43da58){return _0x521ad3/_0x43da58;}},_0x549d8e=this[_0x3c61f8(0x1aa)]['reduce']((_0x3b5b6f,_0x48934e)=>_0x3b5b6f+_0x48934e[_0x3c61f8(0x1a8)],0x0),_0x4e8d6d=this[_0x3c61f8(0x1aa)][_0x3c61f8(0x1ac)]((_0x4765ec,_0x32956e)=>_0x4765ec+_0x32956e[_0x3c61f8(0x197)],0x0),_0x5892cf=_0x1641eb['MZvue'](_0x549d8e,_0x4e8d6d),_0x2e7e11={};for(const _0x536f29 of this['metrics'])_0x536f29['rule_matched']&&(_0x2e7e11[_0x536f29[_0x3c61f8(0x19f)]]=(_0x2e7e11[_0x536f29['rule_matched']]||0x0)+0x1);return{'session_id':this[_0x3c61f8(0x1a2)],'started_at':this['startedAt'],'ended_at':new Date()['toISOString'](),'total_baseline':_0x549d8e,'total_optimized':_0x4e8d6d,'total_delta':_0x5892cf,'savings_percent':_0x549d8e>0x0?_0x1641eb[_0x3c61f8(0x1a5)](_0x5892cf,_0x549d8e)*0x64:0x0,'prompts_count':this['metrics'][_0x3c61f8(0x1a4)],'rules_triggered':_0x2e7e11};}[_0x37eeeb(0x1b0)](){const _0x4cb4ae=_0x37eeeb,_0x4dd34c={'Quwpn':function(_0x5681f0,_0x362471,_0x14fe95){return _0x5681f0(_0x362471,_0x14fe95);},'pGiSt':function(_0x1d6295,_0x54fb64,_0xf46b9e,_0xb3bc0f){return _0x1d6295(_0x54fb64,_0xf46b9e,_0xb3bc0f);},'eAYfV':function(_0x19df83,_0x3f041d,_0x4e605d){return _0x19df83(_0x3f041d,_0x4e605d);},'URYiD':_0x4cb4ae(0x195)},_0x443546=_0x4dd34c[_0x4cb4ae(0x19e)](join,this[_0x4cb4ae(0x1a1)],METRICS_DIR);mkdirSync(_0x443546,{'recursive':!0x0});const _0x30dadb={'metrics':this[_0x4cb4ae(0x1aa)],'summary':this[_0x4cb4ae(0x1ab)]()};_0x4dd34c['pGiSt'](writeFileSync,_0x4dd34c[_0x4cb4ae(0x1ae)](join,_0x443546,this['sessionId']+_0x4cb4ae(0x1a3)),JSON[_0x4cb4ae(0x198)](_0x30dadb,null,0x2),_0x4dd34c[_0x4cb4ae(0x1a0)]);}}
@@ -1 +1 @@
1
- (function(_0x3c5ef6,_0x5ec286){const _0x365489=_0x1896,_0x5d37ca=_0x3c5ef6();while(!![]){try{const _0x5e602b=-parseInt(_0x365489(0x126))/0x1*(-parseInt(_0x365489(0x117))/0x2)+parseInt(_0x365489(0x118))/0x3+parseInt(_0x365489(0x124))/0x4+-parseInt(_0x365489(0x125))/0x5*(parseInt(_0x365489(0x120))/0x6)+-parseInt(_0x365489(0x121))/0x7*(parseInt(_0x365489(0x111))/0x8)+-parseInt(_0x365489(0x11e))/0x9+parseInt(_0x365489(0x112))/0xa*(parseInt(_0x365489(0x10c))/0xb);if(_0x5e602b===_0x5ec286)break;else _0x5d37ca['push'](_0x5d37ca['shift']());}catch(_0x4100ed){_0x5d37ca['push'](_0x5d37ca['shift']());}}}(_0x2005,0xab0e7));import{existsSync,readdirSync}from'node:fs';import{join}from'node:path';import _0x187745 from'js-yaml';export function detectProjectDocs(_0x39777d){const _0x3fc662=_0x1896,_0x152ffb={'WkGqc':function(_0x4d3e4d,_0xdb9605){return _0x4d3e4d(_0xdb9605);},'NkZqj':function(_0x52d8b9,_0x25b007){return _0x52d8b9(_0x25b007);},'GYkxz':function(_0x3247d3,_0x5abbb6,_0x1b5026){return _0x3247d3(_0x5abbb6,_0x1b5026);},'AcbEy':'CLAUDE.md','jaoet':function(_0x2d9104,_0x3f93cc,_0x1c939f){return _0x2d9104(_0x3f93cc,_0x1c939f);},'oOTls':'docs/lessons-learned'},_0x2d0ae1=join(_0x39777d,'docs'),_0x1542a2=_0x152ffb['WkGqc'](existsSync,_0x2d0ae1),_0x3527b6=_0x152ffb[_0x3fc662(0x11c)](existsSync,_0x152ffb[_0x3fc662(0x110)](join,_0x39777d,_0x152ffb[_0x3fc662(0x123)])),_0xb65cd5=existsSync(_0x152ffb['jaoet'](join,_0x39777d,_0x152ffb[_0x3fc662(0x122)]));let _0x6251b7=[];if(_0x1542a2)try{_0x6251b7=_0x152ffb[_0x3fc662(0x115)](readdirSync,_0x2d0ae1,{'withFileTypes':!0x0})['filter'](_0x4fe2a8=>_0x4fe2a8['isDirectory']())['map'](_0x343041=>_0x343041[_0x3fc662(0x116)]);}catch{}return{'hasDocsDir':_0x1542a2,'hasClaudeMd':_0x3527b6,'hasLessonsLearned':_0xb65cd5,'docSubdirs':_0x6251b7};}function _0x1896(_0x1e3309,_0x4b4a03){_0x1e3309=_0x1e3309-0x10c;const _0x2005c9=_0x2005();let _0x189605=_0x2005c9[_0x1e3309];return _0x189605;}export function generateDefaultConfig(_0x5378f6){const _0x37db0c=_0x1896,_0x1c5bca={'WRdlu':'fix','BTxvj':_0x37db0c(0x11a),'VMYKk':'error','weWfb':_0x37db0c(0x10e),'osxFK':'architecture','LkYet':_0x37db0c(0x11d),'KijEl':'requirement','TBCSv':'https://api.simosphereai.com/v1/meter'},_0x300036={'version':0x1,'rules':[{'trigger':[_0x1c5bca['WRdlu'],_0x1c5bca['BTxvj'],_0x1c5bca[_0x37db0c(0x114)],'problem'],'load':_0x5378f6[_0x37db0c(0x119)]+_0x37db0c(0x10d),'max_tokens':0x7d0,'summary_only':!0x1},{'trigger':[_0x1c5bca['weWfb'],_0x1c5bca[_0x37db0c(0x11f)],_0x1c5bca['LkYet']],'load':_0x5378f6['docsDir']+_0x37db0c(0x11b),'max_tokens':0xbb8,'summary_only':!0x0},{'trigger':[_0x37db0c(0x113),'spec',_0x1c5bca[_0x37db0c(0x10f)]],'load':_0x5378f6['docsDir']+'features/*.md','max_tokens':0xbb8,'summary_only':!0x0}],'context_limits':{'max_injected_tokens':0x1f40,'max_file_tokens':0xfa0,'compress_above':0xbb8},'metering':{'endpoint':_0x1c5bca['TBCSv'],'batch_interval':0x3c,'send_content':!0x1}};return _0x187745['dump'](_0x300036,{'lineWidth':0x78});}function _0x2005(){const _0x5d205a=['VMYKk','jaoet','name','373348PIBthk','659082BZUAcI','docsDir','bug','decisions/*.md','NkZqj','refactor','4087062QNAicG','osxFK','96972lnOdTX','7mlomHd','oOTls','AcbEy','4750832oAeQZy','50UQIdkr','5yBkyjm','48466kVYUsQ','lessons-learned/*.md','design','KijEl','GYkxz','8265592LZEDUu','20gPhbwE','feature'];_0x2005=function(){return _0x5d205a;};return _0x2005();}
1
+ function _0x24e8(_0x152179,_0x5a7767){_0x152179=_0x152179-0x15d;const _0x49b57b=_0x49b5();let _0x24e8d1=_0x49b57b[_0x152179];return _0x24e8d1;}(function(_0x41a8e3,_0xe4e5a0){const _0x50ceb4=_0x24e8,_0x3c22dc=_0x41a8e3();while(!![]){try{const _0x26f4c9=parseInt(_0x50ceb4(0x165))/0x1*(-parseInt(_0x50ceb4(0x167))/0x2)+parseInt(_0x50ceb4(0x173))/0x3*(-parseInt(_0x50ceb4(0x170))/0x4)+-parseInt(_0x50ceb4(0x175))/0x5*(-parseInt(_0x50ceb4(0x16a))/0x6)+-parseInt(_0x50ceb4(0x163))/0x7+-parseInt(_0x50ceb4(0x179))/0x8+parseInt(_0x50ceb4(0x16c))/0x9+parseInt(_0x50ceb4(0x15f))/0xa;if(_0x26f4c9===_0xe4e5a0)break;else _0x3c22dc['push'](_0x3c22dc['shift']());}catch(_0x8c0e53){_0x3c22dc['push'](_0x3c22dc['shift']());}}}(_0x49b5,0xe2455));import{existsSync,readdirSync}from'node:fs';import{join}from'node:path';import _0x3dbaaa from'js-yaml';export function detectProjectDocs(_0x29e4f9){const _0x274f10=_0x24e8,_0x5d9a28={'lHBDU':function(_0x16e311,_0x52a2e7,_0x1d23e9){return _0x16e311(_0x52a2e7,_0x1d23e9);},'PliYA':function(_0x5392e6,_0x2b3cc2){return _0x5392e6(_0x2b3cc2);},'OMZnP':'CLAUDE.md','QhmbU':_0x274f10(0x15e)},_0x21d6ec=_0x5d9a28['lHBDU'](join,_0x29e4f9,_0x274f10(0x16b)),_0x3ba73e=existsSync(_0x21d6ec),_0x4ee28b=_0x5d9a28['PliYA'](existsSync,_0x5d9a28['lHBDU'](join,_0x29e4f9,_0x5d9a28[_0x274f10(0x177)])),_0x2c5e86=existsSync(join(_0x29e4f9,_0x5d9a28[_0x274f10(0x16f)]));let _0x160875=[];if(_0x3ba73e)try{_0x160875=_0x5d9a28[_0x274f10(0x174)](readdirSync,_0x21d6ec,{'withFileTypes':!0x0})['filter'](_0x1b73ac=>_0x1b73ac[_0x274f10(0x164)]())[_0x274f10(0x161)](_0x4426d5=>_0x4426d5[_0x274f10(0x171)]);}catch{}return{'hasDocsDir':_0x3ba73e,'hasClaudeMd':_0x4ee28b,'hasLessonsLearned':_0x2c5e86,'docSubdirs':_0x160875};}function _0x49b5(){const _0x1337cd=['docs/lessons-learned','11632540yqrsCd','https://api.simosphereai.com/v1/meter','map','mRvhm','6316366StzbdM','isDirectory','1643qtGsFc','features/*.md','206aeLdtQ','docsDir','error','60GEozFP','docs','13649715gAYTeV','problem','design','QhmbU','14644hQTeUG','name','spec','843nnQvfD','lHBDU','416440hjklvZ','ZNPsL','OMZnP','ltNTN','3885248CGNqxL','bug'];_0x49b5=function(){return _0x1337cd;};return _0x49b5();}export function generateDefaultConfig(_0x291819){const _0x29d350=_0x24e8,_0x1a0236={'xGHfs':'fix','ZNPsL':_0x29d350(0x15d),'nTWho':_0x29d350(0x169),'ltNTN':_0x29d350(0x16e),'ZKWxM':'architecture','mRvhm':'refactor','pbWzS':'feature','LtpSC':_0x29d350(0x160)},_0x31fd54={'version':0x1,'rules':[{'trigger':[_0x1a0236['xGHfs'],_0x1a0236[_0x29d350(0x176)],_0x1a0236['nTWho'],_0x29d350(0x16d)],'load':_0x291819['docsDir']+'lessons-learned/*.md','max_tokens':0x7d0,'summary_only':!0x1},{'trigger':[_0x1a0236[_0x29d350(0x178)],_0x1a0236['ZKWxM'],_0x1a0236[_0x29d350(0x162)]],'load':_0x291819[_0x29d350(0x168)]+'decisions/*.md','max_tokens':0xbb8,'summary_only':!0x0},{'trigger':[_0x1a0236['pbWzS'],_0x29d350(0x172),'requirement'],'load':_0x291819['docsDir']+_0x29d350(0x166),'max_tokens':0xbb8,'summary_only':!0x0}],'context_limits':{'max_injected_tokens':0x1f40,'max_file_tokens':0xfa0,'compress_above':0xbb8},'metering':{'endpoint':_0x1a0236['LtpSC'],'batch_interval':0x3c,'send_content':!0x1}};return _0x3dbaaa['dump'](_0x31fd54,{'lineWidth':0x78});}
@@ -1 +1 @@
1
- function _0x1718(){const _0x415000=['push','6904644SUbfzp','max','max_injected_tokens','30ldzlBT','gxrmi','290XgVOzv','1107342NSMOqJ','33UEIDak','18StjGNo','1100060oINDke','compressedTokens','slice','content','217596FKyOpj','filter','turn-','role','turnIndex','951265uAkbkG','4houQJZ','wasTruncated','4098LyScVb','originalTokens','system','3613216piHLoU'];_0x1718=function(){return _0x415000;};return _0x1718();}(function(_0x379130,_0x134c07){const _0x182320=_0x5e04,_0x405e60=_0x379130();while(!![]){try{const _0x5b4294=-parseInt(_0x182320(0x1d9))/0x1+parseInt(_0x182320(0x1d1))/0x2*(parseInt(_0x182320(0x1c7))/0x3)+-parseInt(_0x182320(0x1c5))/0x4*(parseInt(_0x182320(0x1d5))/0x5)+parseInt(_0x182320(0x1d4))/0x6*(-parseInt(_0x182320(0x1c4))/0x7)+-parseInt(_0x182320(0x1ca))/0x8+-parseInt(_0x182320(0x1d2))/0x9*(parseInt(_0x182320(0x1cf))/0xa)+-parseInt(_0x182320(0x1d3))/0xb*(-parseInt(_0x182320(0x1cc))/0xc);if(_0x5b4294===_0x134c07)break;else _0x405e60['push'](_0x405e60['shift']());}catch(_0xf10b5d){_0x405e60['push'](_0x405e60['shift']());}}}(_0x1718,0x3f07c));import{compressContextBudget}from'./context-compressor.js';import{countTokens}from'../shared/token-counter.js';function _0x5e04(_0x5a5384,_0x159da1){_0x5a5384=_0x5a5384-0x1c1;const _0x171853=_0x1718();let _0x5e04ad=_0x171853[_0x5a5384];return _0x5e04ad;}export function prioritizeContext(_0x8d21f7,_0x4e1ff0,_0x2a584e=0x4){const _0x5c41cf=_0x5e04,_0x540f5c={'gxrmi':function(_0x2275ed,_0x4c35e7){return _0x2275ed===_0x4c35e7;},'ebXtB':function(_0x50c8b2,_0x28729b){return _0x50c8b2(_0x28729b);},'MftQP':function(_0x4d5a67,_0x38ccab){return _0x4d5a67(_0x38ccab);}};if(_0x540f5c[_0x5c41cf(0x1d0)](0x0,_0x8d21f7['length']))return{'prioritized':[],'totalOriginalTokens':0x0,'totalCompressedTokens':0x0,'segmentsDropped':0x0};const _0x280f5b=_0x4e1ff0[_0x5c41cf(0x1ce)],_0x21b9d5=_0x8d21f7[_0x5c41cf(0x1da)](_0x45f6b6=>_0x5c41cf(0x1c9)===_0x45f6b6['role']),_0x2bac6f=_0x8d21f7[_0x5c41cf(0x1da)](_0xc21745=>_0x5c41cf(0x1c9)!==_0xc21745[_0x5c41cf(0x1c2)]),_0x407816=Math['max'](0x0,_0x2bac6f['length']-_0x2a584e),_0x3fee03=_0x2bac6f['slice'](_0x407816),_0x34947d=_0x2bac6f[_0x5c41cf(0x1d7)](0x0,_0x407816),_0x3f1174=[];let _0x2f97a4=0x0,_0x5557be=0x0,_0x59920f=0x0;for(const _0x1556ab of _0x21b9d5){const _0x361fba=_0x540f5c['ebXtB'](countTokens,_0x1556ab['content']);_0x2f97a4+=_0x361fba,_0x5557be+=_0x361fba,_0x3f1174[_0x5c41cf(0x1cb)]({'role':_0x1556ab[_0x5c41cf(0x1c2)],'content':_0x1556ab['content'],'turnIndex':_0x1556ab['turnIndex'],'compressed':!0x1});}for(const _0x470494 of _0x3fee03){const _0xc94518=_0x540f5c['ebXtB'](countTokens,_0x470494['content']);_0x2f97a4+=_0xc94518,_0x5557be+=_0xc94518,_0x3f1174[_0x5c41cf(0x1cb)]({'role':_0x470494['role'],'content':_0x470494[_0x5c41cf(0x1d8)],'turnIndex':_0x470494[_0x5c41cf(0x1c3)],'compressed':!0x1});}if(_0x34947d['length']>0x0){const _0x457d68=_0x5557be,_0x3ab885=Math[_0x5c41cf(0x1cd)](0x0,_0x280f5b-_0x457d68);if(_0x3ab885>0x0){const _0x5e61f0=_0x34947d['map'](_0x8d5ba2=>({'label':_0x5c41cf(0x1c1)+_0x8d5ba2['turnIndex'],'text':_0x8d5ba2[_0x5c41cf(0x1d8)]})),_0x9c085d=compressContextBudget(_0x5e61f0,_0x3ab885);for(let _0x4946bd=0x0;_0x4946bd<_0x34947d['length'];_0x4946bd++){const _0x1a2e94=_0x34947d[_0x4946bd],_0x24e537=_0x9c085d[_0x4946bd]['result'];_0x2f97a4+=_0x24e537[_0x5c41cf(0x1c8)],_0x24e537[_0x5c41cf(0x1d6)]>0x0?(_0x5557be+=_0x24e537['compressedTokens'],_0x3f1174[_0x5c41cf(0x1cb)]({'role':_0x1a2e94['role'],'content':_0x24e537['text'],'turnIndex':_0x1a2e94['turnIndex'],'compressed':_0x24e537[_0x5c41cf(0x1c6)]})):(_0x59920f++,_0x2f97a4+=0x0);}}else{for(const _0x7aa8f3 of _0x34947d)_0x2f97a4+=_0x540f5c['MftQP'](countTokens,_0x7aa8f3[_0x5c41cf(0x1d8)]),_0x59920f++;}}return _0x3f1174['sort']((_0x5d46c6,_0x37a48d)=>_0x5d46c6['turnIndex']-_0x37a48d['turnIndex']),{'prioritized':_0x3f1174,'totalOriginalTokens':_0x2f97a4,'totalCompressedTokens':_0x5557be,'segmentsDropped':_0x59920f};}
1
+ (function(_0x14c87a,_0x5bdb79){const _0x4df410=_0x40fa,_0x22a67e=_0x14c87a();while(!![]){try{const _0x3e47d1=-parseInt(_0x4df410(0x70))/0x1+-parseInt(_0x4df410(0x6e))/0x2+-parseInt(_0x4df410(0x72))/0x3*(-parseInt(_0x4df410(0x78))/0x4)+parseInt(_0x4df410(0x73))/0x5*(-parseInt(_0x4df410(0x77))/0x6)+-parseInt(_0x4df410(0x82))/0x7+parseInt(_0x4df410(0x79))/0x8+parseInt(_0x4df410(0x87))/0x9*(parseInt(_0x4df410(0x85))/0xa);if(_0x3e47d1===_0x5bdb79)break;else _0x22a67e['push'](_0x22a67e['shift']());}catch(_0x4b9f4f){_0x22a67e['push'](_0x22a67e['shift']());}}}(_0x1734,0x90d60));import{compressContextBudget}from'./context-compressor.js';import{countTokens}from'../shared/token-counter.js';export function prioritizeContext(_0xb7a732,_0x45b990,_0x200892=0x4){const _0x2085d8=_0x40fa,_0x42c609={'iFdQO':function(_0x4707bf,_0x3cfe61){return _0x4707bf===_0x3cfe61;},'LMaJF':function(_0x1f5590,_0x3597ba){return _0x1f5590-_0x3597ba;},'oFAqe':function(_0x3cc655,_0x537e55){return _0x3cc655<_0x537e55;},'PoSIh':function(_0x38bcf2,_0x502d3c){return _0x38bcf2>_0x502d3c;},'ItnZF':function(_0x59d4c9,_0x29f397){return _0x59d4c9(_0x29f397);}};if(_0x42c609['iFdQO'](0x0,_0xb7a732[_0x2085d8(0x84)]))return{'prioritized':[],'totalOriginalTokens':0x0,'totalCompressedTokens':0x0,'segmentsDropped':0x0};const _0x397c8d=_0x45b990['max_injected_tokens'],_0x2725a4=_0xb7a732[_0x2085d8(0x7f)](_0x1f4624=>_0x2085d8(0x7a)===_0x1f4624[_0x2085d8(0x74)]),_0x702cf0=_0xb7a732[_0x2085d8(0x7f)](_0x50fe52=>'system'!==_0x50fe52['role']),_0x340a2c=Math['max'](0x0,_0x42c609[_0x2085d8(0x80)](_0x702cf0[_0x2085d8(0x84)],_0x200892)),_0x234e43=_0x702cf0[_0x2085d8(0x7e)](_0x340a2c),_0x1de4f6=_0x702cf0[_0x2085d8(0x7e)](0x0,_0x340a2c),_0x310b60=[];let _0x112c4c=0x0,_0x573590=0x0,_0x5478a7=0x0;for(const _0x564e5a of _0x2725a4){const _0xdbf51e=countTokens(_0x564e5a['content']);_0x112c4c+=_0xdbf51e,_0x573590+=_0xdbf51e,_0x310b60[_0x2085d8(0x7d)]({'role':_0x564e5a[_0x2085d8(0x74)],'content':_0x564e5a[_0x2085d8(0x7c)],'turnIndex':_0x564e5a[_0x2085d8(0x76)],'compressed':!0x1});}for(const _0x347e57 of _0x234e43){const _0x4cec0c=countTokens(_0x347e57['content']);_0x112c4c+=_0x4cec0c,_0x573590+=_0x4cec0c,_0x310b60['push']({'role':_0x347e57['role'],'content':_0x347e57[_0x2085d8(0x7c)],'turnIndex':_0x347e57[_0x2085d8(0x76)],'compressed':!0x1});}if(_0x1de4f6['length']>0x0){const _0x53971d=_0x573590,_0x30680d=Math[_0x2085d8(0x75)](0x0,_0x42c609[_0x2085d8(0x80)](_0x397c8d,_0x53971d));if(_0x30680d>0x0){const _0x2aaa30=_0x1de4f6['map'](_0x2d2a4d=>({'label':_0x2085d8(0x71)+_0x2d2a4d['turnIndex'],'text':_0x2d2a4d['content']})),_0x4ff7e6=compressContextBudget(_0x2aaa30,_0x30680d);for(let _0x366b34=0x0;_0x42c609['oFAqe'](_0x366b34,_0x1de4f6['length']);_0x366b34++){const _0x24558c=_0x1de4f6[_0x366b34],_0x4d55be=_0x4ff7e6[_0x366b34][_0x2085d8(0x81)];_0x112c4c+=_0x4d55be['originalTokens'],_0x42c609[_0x2085d8(0x86)](_0x4d55be['compressedTokens'],0x0)?(_0x573590+=_0x4d55be[_0x2085d8(0x7b)],_0x310b60[_0x2085d8(0x7d)]({'role':_0x24558c[_0x2085d8(0x74)],'content':_0x4d55be[_0x2085d8(0x83)],'turnIndex':_0x24558c['turnIndex'],'compressed':_0x4d55be[_0x2085d8(0x6f)]})):(_0x5478a7++,_0x112c4c+=0x0);}}else{for(const _0x33b501 of _0x1de4f6)_0x112c4c+=_0x42c609['ItnZF'](countTokens,_0x33b501['content']),_0x5478a7++;}}return _0x310b60[_0x2085d8(0x88)]((_0x52c4bd,_0xbee95b)=>_0x52c4bd[_0x2085d8(0x76)]-_0xbee95b['turnIndex']),{'prioritized':_0x310b60,'totalOriginalTokens':_0x112c4c,'totalCompressedTokens':_0x573590,'segmentsDropped':_0x5478a7};}function _0x40fa(_0x177487,_0x1a7f3b){_0x177487=_0x177487-0x6e;const _0x1734a6=_0x1734();let _0x40fab1=_0x1734a6[_0x177487];return _0x40fab1;}function _0x1734(){const _0x5acb4a=['length','3469530LfFuxu','PoSIh','63BJPHqZ','sort','721212CUTkxQ','wasTruncated','781556shNgnJ','turn-','9807uOEInI','1425bUEMme','role','max','turnIndex','1722zjBWaS','68CnlLws','3337576Xvocen','system','compressedTokens','content','push','slice','filter','LMaJF','result','7589652kEdCDb','text'];_0x1734=function(){return _0x5acb4a;};return _0x1734();}
@@ -1 +1 @@
1
- function _0x1f66(_0x176cf7,_0x2b49f0){_0x176cf7=_0x176cf7-0x10d;const _0x359133=_0x3591();let _0x1f6603=_0x359133[_0x176cf7];return _0x1f6603;}function _0x3591(){const _0x41aee4=['parse','reduce','sort','3127868LrMBnA','rules_triggered','2608896PMZHPV','entries','745213GwQIYU','LQKxP','22562epfHGn','length','4330YUeRMn','25875864UPafSi','started_at','map','Nllap','7299816HdILee','46yPPGOa','mrTFe','4788CeUenl'];_0x3591=function(){return _0x41aee4;};return _0x3591();}(function(_0x32b395,_0x1b75cf){const _0x12529e=_0x1f66,_0x5e2f6f=_0x32b395();while(!![]){try{const _0x10b6e3=-parseInt(_0x12529e(0x11e))/0x1*(parseInt(_0x12529e(0x116))/0x2)+-parseInt(_0x12529e(0x112))/0x3+-parseInt(_0x12529e(0x110))/0x4+-parseInt(_0x12529e(0x118))/0x5*(-parseInt(_0x12529e(0x120))/0x6)+parseInt(_0x12529e(0x114))/0x7+-parseInt(_0x12529e(0x11d))/0x8+parseInt(_0x12529e(0x119))/0x9;if(_0x10b6e3===_0x1b75cf)break;else _0x5e2f6f['push'](_0x5e2f6f['shift']());}catch(_0x3ab3b0){_0x5e2f6f['push'](_0x5e2f6f['shift']());}}}(_0x3591,0x8ff35));import{readdirSync,readFileSync}from'node:fs';import{join}from'node:path';const METRICS_DIR='.tokenizer-speedup',COST_PER_MILLION_TOKENS=0x3;export function generateReport(_0x58bd11){const _0x2dd36e=_0x1f66,_0x325188={'mrTFe':function(_0x7a1354,_0x9d42d6){return _0x7a1354(_0x9d42d6);},'eQHbN':function(_0x3d88c0,_0x171db5){return _0x3d88c0+_0x171db5;},'Nllap':function(_0x3736f7,_0x287391){return _0x3736f7/_0x287391;},'LQKxP':function(_0x4dc03e,_0x1dd31b){return _0x4dc03e*_0x1dd31b;}},_0x274458=join(_0x58bd11,METRICS_DIR),_0x1b638e=_0x325188[_0x2dd36e(0x11f)](readdirSync,_0x274458)['filter'](_0x55e07a=>_0x55e07a['endsWith']('.json'))[_0x2dd36e(0x11b)](_0x184ffe=>JSON[_0x2dd36e(0x10d)](readFileSync(join(_0x274458,_0x184ffe),'utf-8'))['summary']),_0x25e336=_0x1b638e['reduce']((_0x1e3608,_0x49fd51)=>_0x1e3608+_0x49fd51['total_baseline'],0x0),_0x56bec6=_0x1b638e['reduce']((_0x48ab59,_0x5ee309)=>_0x48ab59+_0x5ee309['total_optimized'],0x0),_0x104086=_0x25e336-_0x56bec6,_0x59b422={};for(const _0x56e0a9 of _0x1b638e)for(const [_0xcf3a75,_0x5b9505]of Object[_0x2dd36e(0x113)](_0x56e0a9[_0x2dd36e(0x111)]))_0x59b422[_0xcf3a75]=_0x325188['eQHbN'](_0x59b422[_0xcf3a75]||0x0,_0x5b9505);const _0x55d941=_0x1b638e['map'](_0x83aef=>_0x83aef[_0x2dd36e(0x11a)])[_0x2dd36e(0x10f)]();return{'sessions_count':_0x1b638e['length'],'total_baseline':_0x25e336,'total_optimized':_0x56bec6,'total_delta':_0x104086,'savings_percent':_0x25e336>0x0?_0x325188[_0x2dd36e(0x11c)](_0x104086,_0x25e336)*0x64:0x0,'total_prompts':_0x1b638e[_0x2dd36e(0x10e)]((_0xd3dbe2,_0x2286fd)=>_0xd3dbe2+_0x2286fd['prompts_count'],0x0),'rules_triggered':_0x59b422,'estimated_cost_saved_usd':_0x325188[_0x2dd36e(0x115)](_0x325188[_0x2dd36e(0x11c)](_0x104086,0xf4240),0x3),'period_start':_0x55d941[0x0]||'','period_end':_0x55d941[_0x55d941[_0x2dd36e(0x117)]-0x1]||''};}
1
+ const _0x2fa841=_0xc1d4;(function(_0x4080ae,_0x12d8af){const _0x29d4ce=_0xc1d4,_0x4ff6e3=_0x4080ae();while(!![]){try{const _0x44e6d0=parseInt(_0x29d4ce(0xfb))/0x1+-parseInt(_0x29d4ce(0x100))/0x2*(parseInt(_0x29d4ce(0xf5))/0x3)+-parseInt(_0x29d4ce(0xf1))/0x4+parseInt(_0x29d4ce(0xf2))/0x5+-parseInt(_0x29d4ce(0x105))/0x6*(parseInt(_0x29d4ce(0xf7))/0x7)+parseInt(_0x29d4ce(0xf6))/0x8+parseInt(_0x29d4ce(0xfe))/0x9;if(_0x44e6d0===_0x12d8af)break;else _0x4ff6e3['push'](_0x4ff6e3['shift']());}catch(_0x1de147){_0x4ff6e3['push'](_0x4ff6e3['shift']());}}}(_0x17de,0x4e12c));function _0x17de(){const _0x5266f9=['.json','360ZAzcnM','3490448iSKevq','42KmKBuP','endsWith','prompts_count','entries','388837aUWZnF','map','reduce','8388432FzHzeB','jAQOS','9364hmFeRb','.tokenizer-speedup','utf-8','length','parse','417936TWsbOz','2140820CRzqoN','387890kmnjhk','started_at'];_0x17de=function(){return _0x5266f9;};return _0x17de();}import{readdirSync,readFileSync}from'node:fs';import{join}from'node:path';function _0xc1d4(_0x28b359,_0x3a83e1){_0x28b359=_0x28b359-0xf1;const _0x17de17=_0x17de();let _0xc1d478=_0x17de17[_0x28b359];return _0xc1d478;}const METRICS_DIR=_0x2fa841(0x101),COST_PER_MILLION_TOKENS=0x3;export function generateReport(_0x12f4b3){const _0x4f8dca=_0x2fa841,_0x30a74b={'jAQOS':function(_0x39a84a,_0x53371b){return _0x39a84a>_0x53371b;},'dDNvC':function(_0x106fd4,_0x1c6090){return _0x106fd4/_0x1c6090;}},_0x2c8959=join(_0x12f4b3,METRICS_DIR),_0x5f56a7=readdirSync(_0x2c8959)['filter'](_0x3d2a53=>_0x3d2a53[_0x4f8dca(0xf8)](_0x4f8dca(0xf4)))[_0x4f8dca(0xfc)](_0x2c6045=>JSON[_0x4f8dca(0x104)](readFileSync(join(_0x2c8959,_0x2c6045),_0x4f8dca(0x102)))['summary']),_0x5c2d7f=_0x5f56a7[_0x4f8dca(0xfd)]((_0x28a699,_0x711fc4)=>_0x28a699+_0x711fc4['total_baseline'],0x0),_0x1ff7bb=_0x5f56a7['reduce']((_0x43c373,_0x5236b9)=>_0x43c373+_0x5236b9['total_optimized'],0x0),_0x539e21=_0x5c2d7f-_0x1ff7bb,_0x4d76f1={};for(const _0x4a8d0a of _0x5f56a7)for(const [_0x59033a,_0x41ff86]of Object[_0x4f8dca(0xfa)](_0x4a8d0a['rules_triggered']))_0x4d76f1[_0x59033a]=(_0x4d76f1[_0x59033a]||0x0)+_0x41ff86;const _0x501198=_0x5f56a7[_0x4f8dca(0xfc)](_0x303a38=>_0x303a38[_0x4f8dca(0xf3)])['sort']();return{'sessions_count':_0x5f56a7[_0x4f8dca(0x103)],'total_baseline':_0x5c2d7f,'total_optimized':_0x1ff7bb,'total_delta':_0x539e21,'savings_percent':_0x30a74b[_0x4f8dca(0xff)](_0x5c2d7f,0x0)?_0x539e21/_0x5c2d7f*0x64:0x0,'total_prompts':_0x5f56a7[_0x4f8dca(0xfd)]((_0x27c279,_0x5b5cd0)=>_0x27c279+_0x5b5cd0[_0x4f8dca(0xf9)],0x0),'rules_triggered':_0x4d76f1,'estimated_cost_saved_usd':_0x30a74b['dDNvC'](_0x539e21,0xf4240)*0x3,'period_start':_0x501198[0x0]||'','period_end':_0x501198[_0x501198['length']-0x1]||''};}
@@ -1 +1 @@
1
- (function(_0x395505,_0x2cb079){const _0x3029fa=_0x30d1,_0x4bd664=_0x395505();while(!![]){try{const _0x3b3c4e=-parseInt(_0x3029fa(0x8d))/0x1+parseInt(_0x3029fa(0x89))/0x2*(-parseInt(_0x3029fa(0x88))/0x3)+-parseInt(_0x3029fa(0x86))/0x4*(-parseInt(_0x3029fa(0x87))/0x5)+parseInt(_0x3029fa(0x83))/0x6*(parseInt(_0x3029fa(0x84))/0x7)+-parseInt(_0x3029fa(0x94))/0x8*(-parseInt(_0x3029fa(0x93))/0x9)+parseInt(_0x3029fa(0x91))/0xa*(-parseInt(_0x3029fa(0x8a))/0xb)+-parseInt(_0x3029fa(0x8c))/0xc*(parseInt(_0x3029fa(0x8b))/0xd);if(_0x3b3c4e===_0x2cb079)break;else _0x4bd664['push'](_0x4bd664['shift']());}catch(_0x375e50){_0x4bd664['push'](_0x4bd664['shift']());}}}(_0x55d5,0x794c1));function _0x30d1(_0x37eadd,_0x5ae8ca){_0x37eadd=_0x37eadd-0x82;const _0x55d54b=_0x55d5();let _0x30d1d0=_0x55d54b[_0x37eadd];return _0x30d1d0;}import{RuleAnalytics}from'./rule-analytics.js';export function serializeAnalytics(_0x423595){const _0x4e3e99=_0x30d1,_0x1a5863=_0x423595[_0x4e3e99(0x95)]()['map'](_0x5a0874=>({'rule':_0x5a0874['rule'],'fires':_0x5a0874['fires'],'totalTokensSaved':_0x5a0874['totalTokensSaved']}));return JSON['stringify'](_0x1a5863);}export function deserializeAnalytics(_0x2966b7){const _0x529439=_0x30d1,_0x5f2041={'ImZHV':function(_0x2665e6,_0x401298){return _0x2665e6>_0x401298;}},_0x22781f=new RuleAnalytics();try{const _0x79b4ce=JSON[_0x529439(0x90)](_0x2966b7);for(const _0x19f789 of _0x79b4ce){const _0x16d8bb=_0x5f2041['ImZHV'](_0x19f789[_0x529439(0x85)],0x0)?Math[_0x529439(0x82)](_0x19f789[_0x529439(0x8e)]/_0x19f789[_0x529439(0x85)]):0x0;for(let _0x6c9741=0x0;_0x6c9741<_0x19f789['fires'];_0x6c9741++)_0x22781f[_0x529439(0x92)](_0x19f789[_0x529439(0x8f)],_0x16d8bb);}}catch{}return _0x22781f;}function _0x55d5(){const _0x9de52a=['134770HulkBj','999mRlAXa','802VRUKJJ','11OkUWjd','224731rpyRnL','120nCxWnY','625641QzQHYh','totalTokensSaved','rule','parse','25920XVXLgk','recordFire','1197QNJDMA','47496olbXcW','getRanking','round','6bvgYUp','153342fUvEbq','fires','92GPsxBn'];_0x55d5=function(){return _0x9de52a;};return _0x55d5();}
1
+ function _0x2b49(){const _0x301d34=['3314jvULtY','315993fPMySA','3215760IuZFCk','totalTokensSaved','parse','525epShRj','1314096wYuTAV','IgaQX','rule','10MwFAXn','getRanking','8245818DBBmXf','6BkuNVi','465305WqUzRK','875812lvYURM','fires'];_0x2b49=function(){return _0x301d34;};return _0x2b49();}(function(_0x5bce8b,_0x247997){const _0xb854fd=_0x55f1,_0x2fe63b=_0x5bce8b();while(!![]){try{const _0x148928=parseInt(_0xb854fd(0x1d8))/0x1+-parseInt(_0xb854fd(0x1d7))/0x2*(-parseInt(_0xb854fd(0x1dc))/0x3)+parseInt(_0xb854fd(0x1d5))/0x4+-parseInt(_0xb854fd(0x1d4))/0x5*(-parseInt(_0xb854fd(0x1d3))/0x6)+-parseInt(_0xb854fd(0x1dd))/0x7+parseInt(_0xb854fd(0x1d9))/0x8+-parseInt(_0xb854fd(0x1d2))/0x9*(parseInt(_0xb854fd(0x1d0))/0xa);if(_0x148928===_0x247997)break;else _0x2fe63b['push'](_0x2fe63b['shift']());}catch(_0x161bb4){_0x2fe63b['push'](_0x2fe63b['shift']());}}}(_0x2b49,0x34bd6));function _0x55f1(_0x4e5bea,_0x5106c6){_0x4e5bea=_0x4e5bea-0x1ce;const _0x2b4952=_0x2b49();let _0x55f1e6=_0x2b4952[_0x4e5bea];return _0x55f1e6;}import{RuleAnalytics}from'./rule-analytics.js';export function serializeAnalytics(_0x1b95c8){const _0x39cf96=_0x55f1,_0x249b9d=_0x1b95c8[_0x39cf96(0x1d1)]()['map'](_0x52f682=>({'rule':_0x52f682[_0x39cf96(0x1cf)],'fires':_0x52f682['fires'],'totalTokensSaved':_0x52f682[_0x39cf96(0x1da)]}));return JSON['stringify'](_0x249b9d);}export function deserializeAnalytics(_0x1acaf8){const _0x448b06=_0x55f1,_0x5a7a3c={'IgaQX':function(_0x12fcda,_0x235844){return _0x12fcda>_0x235844;},'hfvzS':function(_0x25b7d8,_0x2e91ea){return _0x25b7d8<_0x2e91ea;}},_0x457c17=new RuleAnalytics();try{const _0x2d7647=JSON[_0x448b06(0x1db)](_0x1acaf8);for(const _0x34b5c5 of _0x2d7647){const _0x32f69d=_0x5a7a3c[_0x448b06(0x1ce)](_0x34b5c5['fires'],0x0)?Math['round'](_0x34b5c5['totalTokensSaved']/_0x34b5c5['fires']):0x0;for(let _0x47dad2=0x0;_0x5a7a3c['hfvzS'](_0x47dad2,_0x34b5c5[_0x448b06(0x1d6)]);_0x47dad2++)_0x457c17['recordFire'](_0x34b5c5[_0x448b06(0x1cf)],_0x32f69d);}}catch{}return _0x457c17;}
@@ -1 +1 @@
1
- function _0x3772(_0x348a49,_0x847e1a){_0x348a49=_0x348a49-0xb9;const _0x388f78=_0x388f();let _0x377297=_0x388f78[_0x348a49];return _0x377297;}const _0x27954c=_0x3772;(function(_0x4f68eb,_0x3f8452){const _0xffaff2=_0x3772,_0x24b81f=_0x4f68eb();while(!![]){try{const _0x4a5c4d=-parseInt(_0xffaff2(0xbb))/0x1*(parseInt(_0xffaff2(0xc6))/0x2)+-parseInt(_0xffaff2(0xc5))/0x3*(-parseInt(_0xffaff2(0xc9))/0x4)+parseInt(_0xffaff2(0xcb))/0x5+-parseInt(_0xffaff2(0xc8))/0x6*(-parseInt(_0xffaff2(0xbe))/0x7)+parseInt(_0xffaff2(0xba))/0x8*(-parseInt(_0xffaff2(0xbf))/0x9)+parseInt(_0xffaff2(0xc1))/0xa+parseInt(_0xffaff2(0xb9))/0xb;if(_0x4a5c4d===_0x3f8452)break;else _0x24b81f['push'](_0x24b81f['shift']());}catch(_0x4b472f){_0x24b81f['push'](_0x24b81f['shift']());}}}(_0x388f,0x88487));function _0x388f(){const _0x2b20f8=['fires','634945rwhfKo','10253199HFtreJ','1661960CMysme','149jplMXt','from','keys','7ERYxJb','45vqAGYt','totalTokensSaved','1660530GGCMnK','data','get','getStats','2626629ZUhIeq','11678UHSKIe','getRanking','2197542WSsUME','4oEzFFZ'];_0x388f=function(){return _0x2b20f8;};return _0x388f();}export class RuleAnalytics{[_0x27954c(0xc2)]=new Map();['recordFire'](_0x53fb69,_0x5e990c){const _0x33cfcf=_0x27954c,_0x1ccc2e=this['data']['get'](_0x53fb69)??{'fires':0x0,'totalTokensSaved':0x0};_0x1ccc2e['fires']++,_0x1ccc2e[_0x33cfcf(0xc0)]+=_0x5e990c,this['data']['set'](_0x53fb69,_0x1ccc2e);}['getStats'](_0x546a6b){const _0x5dee9e=_0x27954c,_0xaba5e6={'YFRtn':function(_0x10cd06,_0x326984){return _0x10cd06/_0x326984;}},_0x38573b=this[_0x5dee9e(0xc2)][_0x5dee9e(0xc3)](_0x546a6b);return _0x38573b?{'rule':_0x546a6b,'fires':_0x38573b[_0x5dee9e(0xca)],'totalTokensSaved':_0x38573b['totalTokensSaved'],'avgTokensSaved':Math['round'](_0xaba5e6['YFRtn'](_0x38573b['totalTokensSaved'],_0x38573b['fires']))}:{'rule':_0x546a6b,'fires':0x0,'totalTokensSaved':0x0,'avgTokensSaved':0x0};}[_0x27954c(0xc7)](){const _0x57f9a7=_0x27954c;return Array[_0x57f9a7(0xbc)](this['data'][_0x57f9a7(0xbd)]())['map'](_0x10c7c8=>this[_0x57f9a7(0xc4)](_0x10c7c8))['sort']((_0x287c3c,_0x12c70f)=>_0x12c70f['avgTokensSaved']-_0x287c3c['avgTokensSaved']);}}
1
+ const _0x1a3ec6=_0x2ef9;(function(_0x11e7ee,_0xfc95d5){const _0x5849f3=_0x2ef9,_0x491e55=_0x11e7ee();while(!![]){try{const _0x78e444=parseInt(_0x5849f3(0x73))/0x1+-parseInt(_0x5849f3(0x79))/0x2*(-parseInt(_0x5849f3(0x78))/0x3)+-parseInt(_0x5849f3(0x7c))/0x4*(-parseInt(_0x5849f3(0x83))/0x5)+-parseInt(_0x5849f3(0x7f))/0x6*(parseInt(_0x5849f3(0x7b))/0x7)+parseInt(_0x5849f3(0x7e))/0x8*(-parseInt(_0x5849f3(0x74))/0x9)+-parseInt(_0x5849f3(0x77))/0xa*(-parseInt(_0x5849f3(0x82))/0xb)+parseInt(_0x5849f3(0x72))/0xc;if(_0x78e444===_0xfc95d5)break;else _0x491e55['push'](_0x491e55['shift']());}catch(_0x2310e3){_0x491e55['push'](_0x491e55['shift']());}}}(_0x2997,0xd275e));function _0x2ef9(_0x24fe22,_0x1643b2){_0x24fe22=_0x24fe22-0x6e;const _0x2997ec=_0x2997();let _0x2ef96e=_0x2997ec[_0x24fe22];return _0x2ef96e;}export class RuleAnalytics{[_0x1a3ec6(0x7d)]=new Map();['recordFire'](_0x33fb77,_0x383517){const _0x8cf9dc=_0x1a3ec6,_0x53e818=this['data'][_0x8cf9dc(0x71)](_0x33fb77)??{'fires':0x0,'totalTokensSaved':0x0};_0x53e818[_0x8cf9dc(0x81)]++,_0x53e818[_0x8cf9dc(0x80)]+=_0x383517,this['data'][_0x8cf9dc(0x70)](_0x33fb77,_0x53e818);}[_0x1a3ec6(0x76)](_0x4b29a5){const _0x435ea7=_0x1a3ec6,_0x214872={'AZRNR':function(_0x24648a,_0x3f6f6b){return _0x24648a/_0x3f6f6b;}},_0x54a410=this['data'][_0x435ea7(0x71)](_0x4b29a5);return _0x54a410?{'rule':_0x4b29a5,'fires':_0x54a410['fires'],'totalTokensSaved':_0x54a410[_0x435ea7(0x80)],'avgTokensSaved':Math[_0x435ea7(0x7a)](_0x214872['AZRNR'](_0x54a410[_0x435ea7(0x80)],_0x54a410['fires']))}:{'rule':_0x4b29a5,'fires':0x0,'totalTokensSaved':0x0,'avgTokensSaved':0x0};}['getRanking'](){const _0xf72b53=_0x1a3ec6;return Array['from'](this['data'][_0xf72b53(0x75)]())['map'](_0x203497=>this[_0xf72b53(0x76)](_0x203497))[_0xf72b53(0x6f)]((_0xb183dc,_0x58394f)=>_0x58394f[_0xf72b53(0x6e)]-_0xb183dc[_0xf72b53(0x6e)]);}}function _0x2997(){const _0x1f0f1e=['getStats','1547530vtBjCv','21WJSMDC','214666WEQEVq','round','84QSFRzb','4tbSXHe','data','4952aByrPi','601776iByDjr','totalTokensSaved','fires','22hMKuNi','7786690KWOBHG','avgTokensSaved','sort','set','get','11213472fOLYMC','213979uGPYwH','24732TMycuS','keys'];_0x2997=function(){return _0x1f0f1e;};return _0x2997();}
@@ -1 +1 @@
1
- const _0x57774a=_0x2535;(function(_0x4f8ac4,_0x319ed7){const _0x188769=_0x2535,_0x332854=_0x4f8ac4();while(!![]){try{const _0x38ed0f=-parseInt(_0x188769(0x87))/0x1+parseInt(_0x188769(0x88))/0x2*(-parseInt(_0x188769(0x8f))/0x3)+parseInt(_0x188769(0x98))/0x4*(-parseInt(_0x188769(0x94))/0x5)+parseInt(_0x188769(0x8a))/0x6*(-parseInt(_0x188769(0x95))/0x7)+-parseInt(_0x188769(0x8e))/0x8+-parseInt(_0x188769(0x8c))/0x9*(parseInt(_0x188769(0x97))/0xa)+parseInt(_0x188769(0x91))/0xb;if(_0x38ed0f===_0x319ed7)break;else _0x332854['push'](_0x332854['shift']());}catch(_0x1509c1){_0x332854['push'](_0x332854['shift']());}}}(_0x1e54,0x2b7ce));function _0x2535(_0x308163,_0x4dbae8){_0x308163=_0x308163-0x87;const _0x1e54b5=_0x1e54();let _0x2535ab=_0x1e54b5[_0x308163];return _0x2535ab;}export class RuleEngine{['rules'];[_0x57774a(0x92)];[_0x57774a(0x90)];constructor(_0x1b39d0){const _0x56e647=_0x57774a;this[_0x56e647(0x90)]=_0x1b39d0,this['rules']=_0x1b39d0['rules'],this['limits']=_0x1b39d0['context_limits'];}['match'](_0x1a0370){const _0x4f75f5=_0x57774a,_0x400021=_0x1a0370[_0x4f75f5(0x93)]();return this[_0x4f75f5(0x96)][_0x4f75f5(0x8b)](_0x193ef3=>_0x193ef3['trigger']['some'](_0x22ecca=>_0x400021['includes'](_0x22ecca[_0x4f75f5(0x93)]())));}get[_0x57774a(0x89)](){const _0x143ff1=_0x57774a;return this['config'][_0x143ff1(0x8d)];}}function _0x1e54(){const _0x581707=['331836KEninl','8934bUWixV','meteringConfig','1446gSCzbl','filter','367641qGarVs','metering','1045208AWFDas','9jfWlcd','config','14274161GVTitf','limits','toLowerCase','20MyzPTd','5474yXnhPW','rules','30gAtxyX','332628SJirxJ'];_0x1e54=function(){return _0x581707;};return _0x1e54();}
1
+ function _0x4334(_0x3d9a9d,_0x4daa16){_0x3d9a9d=_0x3d9a9d-0x106;const _0x1a4339=_0x1a43();let _0x4334ab=_0x1a4339[_0x3d9a9d];return _0x4334ab;}const _0x413f59=_0x4334;(function(_0x1a6bab,_0x43bb93){const _0x4ae5cb=_0x4334,_0x2a90a3=_0x1a6bab();while(!![]){try{const _0x544954=-parseInt(_0x4ae5cb(0x117))/0x1*(-parseInt(_0x4ae5cb(0x10b))/0x2)+-parseInt(_0x4ae5cb(0x108))/0x3*(parseInt(_0x4ae5cb(0x118))/0x4)+-parseInt(_0x4ae5cb(0x116))/0x5*(-parseInt(_0x4ae5cb(0x109))/0x6)+-parseInt(_0x4ae5cb(0x106))/0x7+-parseInt(_0x4ae5cb(0x113))/0x8+parseInt(_0x4ae5cb(0x110))/0x9+-parseInt(_0x4ae5cb(0x10d))/0xa;if(_0x544954===_0x43bb93)break;else _0x2a90a3['push'](_0x2a90a3['shift']());}catch(_0x4e2d53){_0x2a90a3['push'](_0x2a90a3['shift']());}}}(_0x1a43,0xb0e29));function _0x1a43(){const _0x519825=['97628oOYNOZ','4gLiCRG','2022825zWiJKQ','filter','1744287FOgXMw','6VmoTCg','some','20SeFtOu','limits','458240mvsOdC','rules','toLowerCase','9314730RpGrls','includes','context_limits','8021712LEdrPc','meteringConfig','config','3161065XqwbSc'];_0x1a43=function(){return _0x519825;};return _0x1a43();}export class RuleEngine{['rules'];[_0x413f59(0x10c)];[_0x413f59(0x115)];constructor(_0x587acb){const _0x18ac73=_0x413f59;this[_0x18ac73(0x115)]=_0x587acb,this['rules']=_0x587acb[_0x18ac73(0x10e)],this['limits']=_0x587acb[_0x18ac73(0x112)];}['match'](_0x41c9b6){const _0x3f4c71=_0x413f59,_0x585730=_0x41c9b6['toLowerCase']();return this[_0x3f4c71(0x10e)][_0x3f4c71(0x107)](_0x254680=>_0x254680['trigger'][_0x3f4c71(0x10a)](_0x54b511=>_0x585730[_0x3f4c71(0x111)](_0x54b511[_0x3f4c71(0x10f)]())));}get[_0x413f59(0x114)](){return this['config']['metering'];}}
@@ -1 +1 @@
1
- function _0x461d(_0x28f823,_0x5c027e){_0x28f823=_0x28f823-0x68;const _0x163db1=_0x163d();let _0x461df8=_0x163db1[_0x28f823];return _0x461df8;}(function(_0x1f0e78,_0x1c3ccc){const _0x518a7d=_0x461d,_0x57dec8=_0x1f0e78();while(!![]){try{const _0x36700f=parseInt(_0x518a7d(0x6d))/0x1+-parseInt(_0x518a7d(0x6b))/0x2*(-parseInt(_0x518a7d(0x6a))/0x3)+-parseInt(_0x518a7d(0x72))/0x4+-parseInt(_0x518a7d(0x74))/0x5*(-parseInt(_0x518a7d(0x80))/0x6)+parseInt(_0x518a7d(0x70))/0x7+-parseInt(_0x518a7d(0x77))/0x8+parseInt(_0x518a7d(0x6c))/0x9;if(_0x36700f===_0x1c3ccc)break;else _0x57dec8['push'](_0x57dec8['shift']());}catch(_0x2f6cd0){_0x57dec8['push'](_0x57dec8['shift']());}}}(_0x163d,0xdee54));import _0x3d5fb4 from'js-yaml';function _0x163d(){const _0x2a84d8=['rules','invalid\x20YAML\x20structure','length','map','name','each\x20rule\x20must\x20have\x20trigger\x20array\x20and\x20load\x20path','vpKFm','27858wIeAqo','load','trigger','description','jCAwo','dump','1611939EqBMbT','2qHOwcd','2348550JoCbBi','301712cKsLIN','summary_only','invalid\x20YAML','4212474dsuyUc','spxWF','304332wdOygt','imported','1065SJvDrT','custom-rules','GYBdk','13613224lOOuCy','isArray'];_0x163d=function(){return _0x2a84d8;};return _0x163d();}export function exportRuleBundle(_0x4a1668,_0x1ff9c0){const _0x5d82e5=_0x461d,_0x5120f4={'spxWF':_0x5d82e5(0x75)},_0x2f4e18={'name':_0x1ff9c0[_0x5d82e5(0x7d)]??_0x5120f4[_0x5d82e5(0x71)],'author':_0x1ff9c0['author'],'description':_0x1ff9c0[_0x5d82e5(0x83)],'rules':_0x4a1668};return _0x3d5fb4[_0x5d82e5(0x69)](_0x2f4e18,{'lineWidth':0x78});}export function importRuleBundle(_0x413a86){const _0x422b89=_0x461d,_0x48d77a={'jCAwo':'unknown'},_0xc11d1e=_0x3d5fb4[_0x422b89(0x81)](_0x413a86);return{'name':_0xc11d1e['name']??_0x422b89(0x73),'author':_0xc11d1e['author']??_0x48d77a[_0x422b89(0x68)],'description':_0xc11d1e[_0x422b89(0x83)]??'','rules':(_0xc11d1e[_0x422b89(0x79)]??[])[_0x422b89(0x7c)](_0x29e44d=>({'trigger':_0x29e44d['trigger'],'load':_0x29e44d[_0x422b89(0x81)],'max_tokens':_0x29e44d['max_tokens'],'summary_only':_0x29e44d[_0x422b89(0x6e)]}))};}export function validateRuleBundle(_0x3edefb){const _0x52bf4d=_0x461d,_0x1b7203={'ziWVU':_0x52bf4d(0x7a),'GYBdk':'bundle\x20must\x20contain\x20rules\x20array','vpKFm':_0x52bf4d(0x7e)};try{const _0x3f7c5d=_0x3d5fb4['load'](_0x3edefb);if(!_0x3f7c5d||'object'!=typeof _0x3f7c5d)return{'valid':!0x1,'error':_0x1b7203['ziWVU']};if(!Array[_0x52bf4d(0x78)](_0x3f7c5d['rules'])||0x0===_0x3f7c5d['rules'][_0x52bf4d(0x7b)])return{'valid':!0x1,'error':_0x1b7203[_0x52bf4d(0x76)]};for(const _0x362846 of _0x3f7c5d[_0x52bf4d(0x79)])if(!Array['isArray'](_0x362846[_0x52bf4d(0x82)])||!_0x362846['load'])return{'valid':!0x1,'error':_0x1b7203[_0x52bf4d(0x7f)]};return{'valid':!0x0};}catch{return{'valid':!0x1,'error':_0x52bf4d(0x6f)};}}
1
+ (function(_0x547c57,_0xfc7be3){const _0x15f44c=_0x3654,_0x3db087=_0x547c57();while(!![]){try{const _0x478c25=parseInt(_0x15f44c(0x10e))/0x1+-parseInt(_0x15f44c(0x10f))/0x2*(parseInt(_0x15f44c(0x101))/0x3)+-parseInt(_0x15f44c(0x108))/0x4*(-parseInt(_0x15f44c(0x105))/0x5)+parseInt(_0x15f44c(0xff))/0x6*(parseInt(_0x15f44c(0x112))/0x7)+-parseInt(_0x15f44c(0x10a))/0x8*(parseInt(_0x15f44c(0x111))/0x9)+parseInt(_0x15f44c(0x10b))/0xa*(parseInt(_0x15f44c(0x100))/0xb)+-parseInt(_0x15f44c(0x10d))/0xc;if(_0x478c25===_0xfc7be3)break;else _0x3db087['push'](_0x3db087['shift']());}catch(_0x3e2499){_0x3db087['push'](_0x3db087['shift']());}}}(_0x2163,0x40476));function _0x2163(){const _0x1f3cb7=['1449300KPZwwz','494030QFLYAa','13312vONctN','map','666SNpNlR','103761RGuOOG','custom-rules','24qmKsuY','649HvBZGz','129iQBJTP','rules','author','trigger','1261705gtfrza','FTScV','unknown','4HHrzul','name','52040WJQgni','58640cYTLZc','load'];_0x2163=function(){return _0x1f3cb7;};return _0x2163();}import _0xaf2f52 from'js-yaml';export function exportRuleBundle(_0x308197,_0x4d2d54){const _0x3a0447=_0x3654,_0x14df48={'name':_0x4d2d54['name']??_0x3a0447(0xfe),'author':_0x4d2d54[_0x3a0447(0x103)],'description':_0x4d2d54['description'],'rules':_0x308197};return _0xaf2f52['dump'](_0x14df48,{'lineWidth':0x78});}export function importRuleBundle(_0x3e12af){const _0x381301=_0x3654,_0x35c382={'OBDtR':_0x381301(0x107)},_0x784e12=_0xaf2f52[_0x381301(0x10c)](_0x3e12af);return{'name':_0x784e12[_0x381301(0x109)]??'imported','author':_0x784e12[_0x381301(0x103)]??_0x35c382['OBDtR'],'description':_0x784e12['description']??'','rules':(_0x784e12['rules']??[])[_0x381301(0x110)](_0x5d7526=>({'trigger':_0x5d7526[_0x381301(0x104)],'load':_0x5d7526['load'],'max_tokens':_0x5d7526['max_tokens'],'summary_only':_0x5d7526['summary_only']}))};}function _0x3654(_0x11f5cc,_0xa84e51){_0x11f5cc=_0x11f5cc-0xfe;const _0x21633e=_0x2163();let _0x36549c=_0x21633e[_0x11f5cc];return _0x36549c;}export function validateRuleBundle(_0x409173){const _0x4650a2=_0x3654,_0x4f4232={'wsFOx':function(_0xe197e9,_0x280e58){return _0xe197e9!=_0x280e58;},'KaVWR':'invalid\x20YAML\x20structure','WAoYk':function(_0x283020,_0x50e8e0){return _0x283020===_0x50e8e0;},'FTScV':'invalid\x20YAML'};try{const _0x3905c7=_0xaf2f52['load'](_0x409173);if(!_0x3905c7||_0x4f4232['wsFOx']('object',typeof _0x3905c7))return{'valid':!0x1,'error':_0x4f4232['KaVWR']};if(!Array['isArray'](_0x3905c7['rules'])||_0x4f4232['WAoYk'](0x0,_0x3905c7[_0x4650a2(0x102)]['length']))return{'valid':!0x1,'error':'bundle\x20must\x20contain\x20rules\x20array'};for(const _0x4a4954 of _0x3905c7[_0x4650a2(0x102)])if(!Array['isArray'](_0x4a4954[_0x4650a2(0x104)])||!_0x4a4954['load'])return{'valid':!0x1,'error':'each\x20rule\x20must\x20have\x20trigger\x20array\x20and\x20load\x20path'};return{'valid':!0x0};}catch{return{'valid':!0x1,'error':_0x4f4232[_0x4650a2(0x106)]};}}
@@ -1 +1 @@
1
- const _0x2febdb=_0x4044;(function(_0x54d15c,_0x50af07){const _0x4daa5e=_0x4044,_0x100fea=_0x54d15c();while(!![]){try{const _0x29c2c3=parseInt(_0x4daa5e(0x6c))/0x1+-parseInt(_0x4daa5e(0x69))/0x2*(-parseInt(_0x4daa5e(0x81))/0x3)+parseInt(_0x4daa5e(0x6a))/0x4+-parseInt(_0x4daa5e(0x68))/0x5+-parseInt(_0x4daa5e(0x78))/0x6*(parseInt(_0x4daa5e(0x6f))/0x7)+parseInt(_0x4daa5e(0x80))/0x8*(parseInt(_0x4daa5e(0x73))/0x9)+parseInt(_0x4daa5e(0x85))/0xa*(parseInt(_0x4daa5e(0x71))/0xb);if(_0x29c2c3===_0x50af07)break;else _0x100fea['push'](_0x100fea['shift']());}catch(_0x5ba92b){_0x100fea['push'](_0x100fea['shift']());}}}(_0x4b63,0x9af25));const STOP_WORDS=new Set([_0x2febdb(0x83),'a','an','is',_0x2febdb(0x7b),_0x2febdb(0x7d),'were','be','been','to','of','in',_0x2febdb(0x79),'on','with','at','by','from','it','this','that','and','or',_0x2febdb(0x6d),_0x2febdb(0x7c),'no','i','my','me','we',_0x2febdb(0x7e),_0x2febdb(0x75),'your']);export function suggestRules(_0x1bc0ae,_0x22b813,_0x43430a){const _0x19912d=_0x2febdb,_0x54cef6={'nsoqe':function(_0x3be2b6,_0x4dc8a3){return _0x3be2b6<_0x4dc8a3;}},_0x335975=new Set();for(const _0x1a4f7b of _0x1bc0ae)for(const _0x791d42 of _0x1a4f7b['trigger'])_0x335975['add'](_0x791d42[_0x19912d(0x77)]());const _0x106006=new Map();for(const _0x2b1093 of _0x22b813){const _0x329aec=_0x2b1093[_0x19912d(0x77)]()[_0x19912d(0x82)](/\s+/);for(const _0x575640 of _0x329aec){const _0x302771=_0x575640[_0x19912d(0x70)](/[^a-z0-9-]/g,'');_0x54cef6['nsoqe'](_0x302771[_0x19912d(0x6b)],0x3)||STOP_WORDS[_0x19912d(0x7f)](_0x302771)||_0x335975[_0x19912d(0x7f)](_0x302771)||_0x106006[_0x19912d(0x72)](_0x302771,(_0x106006[_0x19912d(0x6e)](_0x302771)??0x0)+0x1);}}return Array[_0x19912d(0x76)](_0x106006['entries']())[_0x19912d(0x7a)](([,_0x1c7321])=>_0x1c7321>=_0x43430a)[_0x19912d(0x84)](([,_0x8f7e72],[,_0x11963a])=>_0x11963a-_0x8f7e72)['map'](([_0x53d843,_0xaa0268])=>({'keyword':_0x53d843,'frequency':_0xaa0268,'suggestedLoad':_0x19912d(0x74)+_0x53d843+'/*.md'}));}function _0x4044(_0x3c2770,_0x4721f0){_0x3c2770=_0x3c2770-0x68;const _0x4b63d7=_0x4b63();let _0x40440f=_0x4b63d7[_0x3c2770];return _0x40440f;}function _0x4b63(){const _0x3f5995=['docs/','you','from','toLowerCase','2010UhaAdk','for','filter','are','not','was','our','has','33320pbtUsD','332298iRpWLM','split','the','sort','5450RtesyU','4738170GbcMJX','10Zlcpst','1573680OhGveG','length','10350UZvZsO','but','get','25690yKzKfR','replace','13717wgSSha','set','2538gVJQZd'];_0x4b63=function(){return _0x3f5995;};return _0x4b63();}
1
+ function _0x258e(_0x55670c,_0x410a1d){_0x55670c=_0x55670c-0x18b;const _0x5c5b82=_0x5c5b();let _0x258eb8=_0x5c5b82[_0x55670c];return _0x258eb8;}const _0xb91c02=_0x258e;(function(_0x1dedfa,_0x3753e6){const _0x2a92a3=_0x258e,_0x4bea64=_0x1dedfa();while(!![]){try{const _0x2a3f8d=parseInt(_0x2a92a3(0x1a0))/0x1*(-parseInt(_0x2a92a3(0x199))/0x2)+parseInt(_0x2a92a3(0x18d))/0x3+parseInt(_0x2a92a3(0x1a2))/0x4+parseInt(_0x2a92a3(0x18e))/0x5*(parseInt(_0x2a92a3(0x191))/0x6)+-parseInt(_0x2a92a3(0x19e))/0x7+parseInt(_0x2a92a3(0x1a1))/0x8*(-parseInt(_0x2a92a3(0x18f))/0x9)+parseInt(_0x2a92a3(0x1a6))/0xa*(parseInt(_0x2a92a3(0x196))/0xb);if(_0x2a3f8d===_0x3753e6)break;else _0x4bea64['push'](_0x4bea64['shift']());}catch(_0x5d2b63){_0x4bea64['push'](_0x4bea64['shift']());}}}(_0x5c5b,0xd4838));const STOP_WORDS=new Set(['the','a','an','is',_0xb91c02(0x198),_0xb91c02(0x1a5),'were','be','been','to','of','in',_0xb91c02(0x197),'on',_0xb91c02(0x19b),'at','by',_0xb91c02(0x193),'it','this','that',_0xb91c02(0x18b),'or',_0xb91c02(0x194),'not','no','i','my','me','we','our',_0xb91c02(0x195),'your']);function _0x5c5b(){const _0x1675c2=['replace','was','300XGPNOD','get','and','filter','3920937VOFeCe','4570wDNSBv','284310nvWzSz','sBkkH','4626oFPgJh','sort','from','but','you','84073eoeeHP','for','are','982kgcJuE','has','with','trigger','split','6132595zUrPBw','entries','1127VCPSFk','144IaxKdo','2510220XkfXbN','toLowerCase'];_0x5c5b=function(){return _0x1675c2;};return _0x5c5b();}export function suggestRules(_0x9eb151,_0x10a881,_0x31518f){const _0x18c369=_0xb91c02,_0x4b5a26={'sBkkH':function(_0x1ac36e,_0x2daa77){return _0x1ac36e+_0x2daa77;}},_0x47ec6c=new Set();for(const _0x44a55e of _0x9eb151)for(const _0x44d1d4 of _0x44a55e[_0x18c369(0x19c)])_0x47ec6c['add'](_0x44d1d4[_0x18c369(0x1a3)]());const _0x1f5d2b=new Map();for(const _0xf72bb5 of _0x10a881){const _0x2ef3f1=_0xf72bb5['toLowerCase']()[_0x18c369(0x19d)](/\s+/);for(const _0x924da0 of _0x2ef3f1){const _0x87ce6=_0x924da0[_0x18c369(0x1a4)](/[^a-z0-9-]/g,'');_0x87ce6['length']<0x3||STOP_WORDS[_0x18c369(0x19a)](_0x87ce6)||_0x47ec6c[_0x18c369(0x19a)](_0x87ce6)||_0x1f5d2b['set'](_0x87ce6,_0x4b5a26[_0x18c369(0x190)](_0x1f5d2b[_0x18c369(0x1a7)](_0x87ce6)??0x0,0x1));}}return Array['from'](_0x1f5d2b[_0x18c369(0x19f)]())[_0x18c369(0x18c)](([,_0x51276e])=>_0x51276e>=_0x31518f)[_0x18c369(0x192)](([,_0x2c4dfe],[,_0x3e8256])=>_0x3e8256-_0x2c4dfe)['map'](([_0x408b53,_0x34bbab])=>({'keyword':_0x408b53,'frequency':_0x34bbab,'suggestedLoad':'docs/'+_0x408b53+'/*.md'}));}
@@ -1 +1 @@
1
- (function(_0xf03913,_0x3c67b8){const _0x19d227=_0x1185,_0x384df9=_0xf03913();while(!![]){try{const _0xe923dd=-parseInt(_0x19d227(0x13e))/0x1*(-parseInt(_0x19d227(0x128))/0x2)+-parseInt(_0x19d227(0x13b))/0x3+-parseInt(_0x19d227(0x132))/0x4*(parseInt(_0x19d227(0x134))/0x5)+parseInt(_0x19d227(0x13c))/0x6+-parseInt(_0x19d227(0x136))/0x7*(-parseInt(_0x19d227(0x137))/0x8)+parseInt(_0x19d227(0x12c))/0x9*(parseInt(_0x19d227(0x127))/0xa)+parseInt(_0x19d227(0x139))/0xb*(-parseInt(_0x19d227(0x129))/0xc);if(_0xe923dd===_0x3c67b8)break;else _0x384df9['push'](_0x384df9['shift']());}catch(_0x56963c){_0x384df9['push'](_0x384df9['shift']());}}}(_0x8542,0xe2c8b));import{execSync}from'node:child_process';function _0x1185(_0x34094d,_0x3f7989){_0x34094d=_0x34094d-0x127;const _0x8542d0=_0x8542();let _0x1185b7=_0x8542d0[_0x34094d];return _0x1185b7;}import{readdirSync}from'node:fs';function _0x8542(){const _0x2003f9=['60kMcumv','length','Git:\x20','11289681yfDWfS','git\x20branch\x20--show-current','push','\x20Lessons\x20Learned\x20vorhanden\x20in\x20docs/lessons-learned/','filter','pipe','277892tfePHi','git\x20log\x20--oneline\x20-1','90wLZpQs','BWESk','2171463YeMmnW','24jOZEKu','olhPk','2829167NIsmrn','detached','1034940uDgsck','894708CyCwzZ','xrejC','20792KAAoUQ','10kDPmjs','142aFKidg'];_0x8542=function(){return _0x2003f9;};return _0x8542();}import{join}from'node:path';export function buildSessionStartContext(_0xf5dc6d){const _0x2d42b1=_0x1185,_0x3e9a83={'BWESk':'utf-8','olhPk':_0x2d42b1(0x131),'ecweq':_0x2d42b1(0x13a),'SvqlC':'docs/lessons-learned','UhwJd':function(_0x4f3e63,_0x33b1c1){return _0x4f3e63(_0x33b1c1);},'Iogaa':function(_0x6c4fc2,_0x23ae9f){return _0x6c4fc2>_0x23ae9f;},'xrejC':function(_0x4ff366,_0x568d91){return _0x4ff366===_0x568d91;}},{cwd:_0x1d51e6}=_0xf5dc6d;if(!_0x1d51e6)return{};const _0x1a3d70=[];try{const _0x1d39f2=execSync(_0x2d42b1(0x12d),{'cwd':_0x1d51e6,'encoding':_0x3e9a83[_0x2d42b1(0x135)],'stdio':[_0x2d42b1(0x131),'pipe',_0x3e9a83[_0x2d42b1(0x138)]]})['trim']()||_0x3e9a83['ecweq'],_0x46ce6e=execSync(_0x2d42b1(0x133),{'cwd':_0x1d51e6,'encoding':_0x3e9a83[_0x2d42b1(0x135)],'stdio':[_0x3e9a83['olhPk'],_0x3e9a83['olhPk'],_0x2d42b1(0x131)]})['trim']();_0x1a3d70['push'](_0x2d42b1(0x12b)+_0x1d39f2+'\x20|\x20'+_0x46ce6e);}catch{}try{const _0x363c62=join(_0x1d51e6,_0x3e9a83['SvqlC']),_0x114221=_0x3e9a83['UhwJd'](readdirSync,_0x363c62)[_0x2d42b1(0x130)](_0x340f7a=>_0x340f7a['endsWith']('.md')&&'_template.md'!==_0x340f7a);_0x3e9a83['Iogaa'](_0x114221['length'],0x0)&&_0x1a3d70[_0x2d42b1(0x12e)]('DNA\x203:\x20'+_0x114221[_0x2d42b1(0x12a)]+_0x2d42b1(0x12f));}catch{}return _0x3e9a83[_0x2d42b1(0x13d)](0x0,_0x1a3d70['length'])?{}:{'additionalContext':_0x1a3d70['join']('\x0a')};}
1
+ function _0x2abe(){const _0x5ce7b1=['git\x20branch\x20--show-current','EWKXL','69808SyetUX','5559448zUhsul','detached','akIIk','length','\x20Lessons\x20Learned\x20vorhanden\x20in\x20docs/lessons-learned/','_template.md','endsWith','9nBGcPq','git\x20log\x20--oneline\x20-1','docs/lessons-learned','\x20|\x20','pJWXg','DNA\x203:\x20','jREUG','filter','jLWeT','push','6904366lKFlMm','772601IzpMNA','10591998bmTyWq','41073660eZKfdV','ZQOxE','trim','300AiPTrc','4RblSwj','173499wyqOah'];_0x2abe=function(){return _0x5ce7b1;};return _0x2abe();}function _0x3e43(_0x3c960e,_0x5254c0){_0x3c960e=_0x3c960e-0x100;const _0x2abe1f=_0x2abe();let _0x3e4304=_0x2abe1f[_0x3c960e];return _0x3e4304;}(function(_0x170cec,_0x23e121){const _0x39f534=_0x3e43,_0x5df447=_0x170cec();while(!![]){try{const _0x32b02b=-parseInt(_0x39f534(0x100))/0x1+parseInt(_0x39f534(0x106))/0x2*(parseInt(_0x39f534(0x107))/0x3)+-parseInt(_0x39f534(0x10a))/0x4*(parseInt(_0x39f534(0x105))/0x5)+-parseInt(_0x39f534(0x101))/0x6+parseInt(_0x39f534(0x11c))/0x7+-parseInt(_0x39f534(0x10b))/0x8*(parseInt(_0x39f534(0x112))/0x9)+parseInt(_0x39f534(0x102))/0xa;if(_0x32b02b===_0x23e121)break;else _0x5df447['push'](_0x5df447['shift']());}catch(_0x495c31){_0x5df447['push'](_0x5df447['shift']());}}}(_0x2abe,0xe2e69));import{execSync}from'node:child_process';import{readdirSync}from'node:fs';import{join}from'node:path';export function buildSessionStartContext(_0x73b40a){const _0x5029ba=_0x3e43,_0x4695e7={'ZQOxE':function(_0x572fbd,_0x3d8d58,_0x2b6461){return _0x572fbd(_0x3d8d58,_0x2b6461);},'EWKXL':'utf-8','jREUG':'pipe','pJWXg':_0x5029ba(0x10c),'AzUyn':_0x5029ba(0x113),'jLWeT':function(_0x46d580,_0x987e85,_0x11a322){return _0x46d580(_0x987e85,_0x11a322);},'akIIk':function(_0x712b22,_0xd73185){return _0x712b22>_0xd73185;}},{cwd:_0x326676}=_0x73b40a;if(!_0x326676)return{};const _0x12b636=[];try{const _0x264b1a=_0x4695e7[_0x5029ba(0x103)](execSync,_0x5029ba(0x108),{'cwd':_0x326676,'encoding':_0x4695e7['EWKXL'],'stdio':['pipe',_0x4695e7[_0x5029ba(0x118)],_0x4695e7[_0x5029ba(0x118)]]})['trim']()||_0x4695e7[_0x5029ba(0x116)],_0x1e0a4d=execSync(_0x4695e7['AzUyn'],{'cwd':_0x326676,'encoding':_0x4695e7[_0x5029ba(0x109)],'stdio':['pipe','pipe',_0x4695e7[_0x5029ba(0x118)]]})[_0x5029ba(0x104)]();_0x12b636[_0x5029ba(0x11b)]('Git:\x20'+_0x264b1a+_0x5029ba(0x115)+_0x1e0a4d);}catch{}try{const _0x4540ca=_0x4695e7[_0x5029ba(0x11a)](join,_0x326676,_0x5029ba(0x114)),_0x2a41c9=readdirSync(_0x4540ca)[_0x5029ba(0x119)](_0x28abb0=>_0x28abb0[_0x5029ba(0x111)]('.md')&&_0x5029ba(0x110)!==_0x28abb0);_0x4695e7[_0x5029ba(0x10d)](_0x2a41c9['length'],0x0)&&_0x12b636[_0x5029ba(0x11b)](_0x5029ba(0x117)+_0x2a41c9[_0x5029ba(0x10e)]+_0x5029ba(0x10f));}catch{}return 0x0===_0x12b636['length']?{}:{'additionalContext':_0x12b636['join']('\x0a')};}
@@ -1 +1 @@
1
- function _0x25fa(){const _0x6ea0ac=['pgMtn','filter','WXdfI','566363sJmYeE','docs/strategy/geschaeftsgrundsaetze.md','[Logo]\x20SIMO_CI_ROOT\x20nicht\x20konfiguriert.\x20Setze\x20Env-Variable\x20fuer\x20Logo-Pfade.','endsWith','split','16lzCWym','---\x20','JSEBO','trim','4697475ujSmWT','/04_Schriftarten/Inter/\x20|\x20FA\x20Pro:\x20','build','join','(SIMO_WORKSPACE_ROOT\x20nicht\x20gesetzt)','30zDeSkL','push','map','[Strategie]\x20Gesetze\x201(Schmerz),3(Wahrnehmung),5(Werttausch)\x20beachten.\x0a','.md','\x20|\x20Bootstrap:\x20./bootstrap.sh','44SVrpkA','FImfP','[Strategie]\x20Gesetze\x201(Schmerz),3(Wahrnehmung),5(Werttausch)\x20beachten.','4195773Ddfney','pattern','PUhpg','4603792sBfmME','2yYKqWh','VRfeJ','11197660pJuCtx','prompt','slice','1685820HjcsFK','[Workspace]\x20Config:\x20','cwd','617293bhDvzF'];_0x25fa=function(){return _0x6ea0ac;};return _0x25fa();}function _0x20a1(_0xcbf843,_0x1de8e1){_0xcbf843=_0xcbf843-0xe5;const _0x25fa1d=_0x25fa();let _0x20a127=_0x25fa1d[_0xcbf843];return _0x20a127;}const _0x5918c3=_0x20a1;(function(_0x83f593,_0x17fcef){const _0x421a0e=_0x20a1,_0x51df02=_0x83f593();while(!![]){try{const _0x5a0355=-parseInt(_0x421a0e(0xe6))/0x1+-parseInt(_0x421a0e(0x105))/0x2*(parseInt(_0x421a0e(0x10a))/0x3)+-parseInt(_0x421a0e(0x104))/0x4+-parseInt(_0x421a0e(0xf3))/0x5+parseInt(_0x421a0e(0xf8))/0x6*(parseInt(_0x421a0e(0xea))/0x7)+parseInt(_0x421a0e(0xef))/0x8*(-parseInt(_0x421a0e(0x101))/0x9)+parseInt(_0x421a0e(0x107))/0xa*(parseInt(_0x421a0e(0xfe))/0xb);if(_0x5a0355===_0x17fcef)break;else _0x51df02['push'](_0x51df02['shift']());}catch(_0x4fb43e){_0x51df02['push'](_0x51df02['shift']());}}}(_0x25fa,0xa6643));import{readdirSync,readFileSync,existsSync}from'node:fs';import{join}from'node:path';const keywordRules=[{'pattern':/\b(fix|bug|error|fehler|problem|broken|kaputt|crash|fail)\b/i,'build':_0x189964=>{const _0x4a61c6=_0x20a1,_0xf84649={'WXdfI':'docs/lessons-learned','IWasL':function(_0x4bba8b,_0x1a135d){return _0x4bba8b>_0x1a135d;}},_0x152148=[];if(_0x189964['cwd'])try{const _0x432341=join(_0x189964[_0x4a61c6(0xe5)],_0xf84649[_0x4a61c6(0xe9)]),_0x10b2b4=readdirSync(_0x432341)[_0x4a61c6(0xe8)](_0x378257=>_0x378257[_0x4a61c6(0xed)](_0x4a61c6(0xfc))&&'_template.md'!==_0x378257);if(_0xf84649['IWasL'](_0x10b2b4['length'],0x0)){const _0x961855=_0x10b2b4['slice'](0x0,0x5)[_0x4a61c6(0xfa)](_0x27854f=>_0x4a61c6(0xf0)+_0x27854f+':\x20'+readFileSync(join(_0x432341,_0x27854f),'utf-8')[_0x4a61c6(0xee)]('\x0a')[_0x4a61c6(0x109)](0x0,0x5)[_0x4a61c6(0xf6)]('\x20')[_0x4a61c6(0xf2)]());_0x152148['push']('[DNA\x203]\x20Lessons\x20Learned\x20pruefen:\x0a'+_0x961855['join']('\x0a'));}}catch{}return _0x152148[_0x4a61c6(0xf9)]('[DNA\x203]\x20NACH\x20Fix:\x20Root\x20Cause\x20in\x20docs/lessons-learned/\x20dokumentieren.'),_0x152148['join']('\x0a');}},{'pattern':/\b(design|ci|brand|farbe|color|theme|liquid.?glass|praesentation|marketing)\b/i,'build':()=>'[CI]\x20Teal\x20#5EBFBF,\x20Dark\x20BG\x20#1A1A1A,\x20Uni\x20Neue\x20(Brand),\x20Inter\x20(App).\x20Fuer\x20Details:\x20simo-brand-guidelines\x20Skill\x20laden.'},{'pattern':/\b(logo|favicon|icon|wordmark|svg)\b/i,'build':()=>{const _0x1cb287=_0x20a1,_0x50d502={'PUhpg':_0x1cb287(0xec)},_0x43ec83=process.env.SIMO_CI_ROOT||'';return _0x43ec83?'[Logo-Pfade]\x20SIMOSphere:\x20'+_0x43ec83+'/02_SIMOSphere-AI/Logos/\x20|\x20SIMO:\x20'+_0x43ec83+'/01_SIMO-GmbH/Logos/\x20|\x20Favicon:\x20'+_0x43ec83+'/02_SIMOSphere-AI/Favicon/':_0x50d502[_0x1cb287(0x103)];}},{'pattern':/\b(pricing|preis|angebot|pitch|proposal|kunde|customer|vertrieb|sales)\b/i,'build':_0x259b72=>{const _0x2f3102=_0x20a1,_0x443995={'DxWHr':function(_0x3b4481,_0x9e805e,_0xc56594){return _0x3b4481(_0x9e805e,_0xc56594);},'FImfP':_0x2f3102(0xeb),'JSEBO':function(_0x539ba1,_0x2a531e){return _0x539ba1(_0x2a531e);},'BHKiL':'utf-8','VRfeJ':_0x2f3102(0x100)};if(_0x259b72[_0x2f3102(0xe5)]){const _0x25e1bf=_0x443995['DxWHr'](join,_0x259b72['cwd'],_0x443995[_0x2f3102(0xff)]);if(_0x443995[_0x2f3102(0xf1)](existsSync,_0x25e1bf))return _0x2f3102(0xfb)+readFileSync(_0x25e1bf,_0x443995['BHKiL'])[_0x2f3102(0xee)]('\x0a')[_0x2f3102(0x109)](0x0,0x28)['join']('\x0a');}return _0x443995[_0x2f3102(0x106)];}},{'pattern':/\b(firma|impressum|vertrag|contract|legal|handelsregister|steuernummer|geschaeftsfuehr)\b/i,'build':_0xed8ac2=>{const _0x1289f7=_0x20a1,_0x3a5dc6={'SoNQl':function(_0x582039,_0xf4e471,_0x1d94d7){return _0x582039(_0xf4e471,_0x1d94d7);},'pgMtn':'[Firma]\x20SIMO\x20GmbH,\x20Aschaffenburg,\x20Bavaria,\x20Germany\x20|\x20info@simo-online.com'};if(_0xed8ac2[_0x1289f7(0xe5)]){const _0x38b91d=_0x3a5dc6['SoNQl'](join,_0xed8ac2['cwd'],'docs/company/simo-gmbh-profil.md');if(existsSync(_0x38b91d))return'[Firma]\x20'+_0x3a5dc6['SoNQl'](readFileSync,_0x38b91d,'utf-8');}return _0x3a5dc6[_0x1289f7(0xe7)];}},{'pattern':/\b(setup|init|bootstrap|template|neues.?projekt|new.?project)\b/i,'build':()=>_0x5918c3(0x10b)+(process.env.SIMO_WORKSPACE_ROOT||''||_0x5918c3(0xf7))+_0x5918c3(0xfd)},{'pattern':/\b(font|schrift|typo|woff|otf|uni.?neue|inter.?display)\b/i,'build':()=>{const _0xfe02a1=_0x5918c3,_0x4eeddb=process.env.SIMO_CI_ROOT||'';return _0x4eeddb?'[Font-Pfade]\x20Uni\x20Neue:\x20'+_0x4eeddb+'/04_Schriftarten/Uni\x20Neue-Desktop/\x20|\x20Inter:\x20'+_0x4eeddb+_0xfe02a1(0xf4)+_0x4eeddb+'/04_Schriftarten/fontawesome-pro-7.1.0-web/':'[Fonts]\x20SIMO_CI_ROOT\x20nicht\x20konfiguriert.';}}];export function buildSmartContext(_0x23a3fa){const _0x4e7137=_0x5918c3,_0x5967bc=[];for(const _0x48c2b0 of keywordRules)if(_0x48c2b0[_0x4e7137(0x102)]['test'](_0x23a3fa[_0x4e7137(0x108)])){const _0xae9207=_0x48c2b0[_0x4e7137(0xf5)](_0x23a3fa);_0xae9207&&_0x5967bc[_0x4e7137(0xf9)](_0xae9207);}return 0x0===_0x5967bc['length']?{}:{'additionalContext':_0x5967bc['join']('\x0a')};}
1
+ const _0x59a96c=_0x13ad;(function(_0x1d7264,_0x4a168f){const _0x14c88e=_0x13ad,_0x4af852=_0x1d7264();while(!![]){try{const _0x3acfd7=parseInt(_0x14c88e(0x194))/0x1+-parseInt(_0x14c88e(0x19c))/0x2*(parseInt(_0x14c88e(0x18f))/0x3)+parseInt(_0x14c88e(0x1b6))/0x4+-parseInt(_0x14c88e(0x1aa))/0x5*(parseInt(_0x14c88e(0x19f))/0x6)+-parseInt(_0x14c88e(0x1b1))/0x7+parseInt(_0x14c88e(0x1a3))/0x8+parseInt(_0x14c88e(0x192))/0x9;if(_0x3acfd7===_0x4a168f)break;else _0x4af852['push'](_0x4af852['shift']());}catch(_0x3c34df){_0x4af852['push'](_0x4af852['shift']());}}}(_0x2d72,0x937ec));function _0x2d72(){const _0x177e9c=['tOkGI','1038670CNDDws','[Logo]\x20SIMO_CI_ROOT\x20nicht\x20konfiguriert.\x20Setze\x20Env-Variable\x20fuer\x20Logo-Pfade.','HhNlD','length','/04_Schriftarten/fontawesome-pro-7.1.0-web/','prompt','DyRjk','4291532nxrqKG','map','build','.md','slice','252748zKOIPr','3LpcNxj','[Firma]\x20','utf-8','7858485dhTieq','zCVdk','613883cYzAlC','join','---\x20','[DNA\x203]\x20NACH\x20Fix:\x20Root\x20Cause\x20in\x20docs/lessons-learned/\x20dokumentieren.','split','uOVVJ','[DNA\x203]\x20Lessons\x20Learned\x20pruefen:\x0a','trim','1176092LRglsW','/04_Schriftarten/Inter/\x20|\x20FA\x20Pro:\x20','/04_Schriftarten/Uni\x20Neue-Desktop/\x20|\x20Inter:\x20','12EMSBdr','[Strategie]\x20Gesetze\x201(Schmerz),3(Wahrnehmung),5(Werttausch)\x20beachten.\x0a','push','test','5363960aBBMxH','cwd','pattern','(SIMO_WORKSPACE_ROOT\x20nicht\x20gesetzt)','SQXeS','/01_SIMO-GmbH/Logos/\x20|\x20Favicon:\x20'];_0x2d72=function(){return _0x177e9c;};return _0x2d72();}import{readdirSync,readFileSync,existsSync}from'node:fs';import{join}from'node:path';function _0x13ad(_0x574e19,_0x2574cf){_0x574e19=_0x574e19-0x18f;const _0x2d728f=_0x2d72();let _0x13ad36=_0x2d728f[_0x574e19];return _0x13ad36;}const keywordRules=[{'pattern':/\b(fix|bug|error|fehler|problem|broken|kaputt|crash|fail)\b/i,'build':_0x26904d=>{const _0x328118=_0x13ad,_0x1e344f={'zYGtm':function(_0x41dc1d,_0x211878,_0x50535d){return _0x41dc1d(_0x211878,_0x50535d);},'SQXeS':'docs/lessons-learned','zCVdk':function(_0x9224ac,_0x129367){return _0x9224ac>_0x129367;},'tOkGI':_0x328118(0x197)},_0x3fcdd9=[];if(_0x26904d['cwd'])try{const _0x3d746e=_0x1e344f['zYGtm'](join,_0x26904d[_0x328118(0x1a4)],_0x1e344f[_0x328118(0x1a7)]),_0x268e7f=readdirSync(_0x3d746e)['filter'](_0xf0350b=>_0xf0350b['endsWith'](_0x328118(0x1b4))&&'_template.md'!==_0xf0350b);if(_0x1e344f[_0x328118(0x193)](_0x268e7f[_0x328118(0x1ad)],0x0)){const _0x17bca3=_0x268e7f[_0x328118(0x1b5)](0x0,0x5)[_0x328118(0x1b2)](_0xaabd46=>_0x328118(0x196)+_0xaabd46+':\x20'+readFileSync(join(_0x3d746e,_0xaabd46),_0x328118(0x191))[_0x328118(0x198)]('\x0a')[_0x328118(0x1b5)](0x0,0x5)['join']('\x20')[_0x328118(0x19b)]());_0x3fcdd9['push'](_0x328118(0x19a)+_0x17bca3['join']('\x0a'));}}catch{}return _0x3fcdd9[_0x328118(0x1a1)](_0x1e344f[_0x328118(0x1a9)]),_0x3fcdd9['join']('\x0a');}},{'pattern':/\b(design|ci|brand|farbe|color|theme|liquid.?glass|praesentation|marketing)\b/i,'build':()=>'[CI]\x20Teal\x20#5EBFBF,\x20Dark\x20BG\x20#1A1A1A,\x20Uni\x20Neue\x20(Brand),\x20Inter\x20(App).\x20Fuer\x20Details:\x20simo-brand-guidelines\x20Skill\x20laden.'},{'pattern':/\b(logo|favicon|icon|wordmark|svg)\b/i,'build':()=>{const _0x419a77=_0x13ad,_0x51dd58=process.env.SIMO_CI_ROOT||'';return _0x51dd58?'[Logo-Pfade]\x20SIMOSphere:\x20'+_0x51dd58+'/02_SIMOSphere-AI/Logos/\x20|\x20SIMO:\x20'+_0x51dd58+_0x419a77(0x1a8)+_0x51dd58+'/02_SIMOSphere-AI/Favicon/':_0x419a77(0x1ab);}},{'pattern':/\b(pricing|preis|angebot|pitch|proposal|kunde|customer|vertrieb|sales)\b/i,'build':_0x3d2729=>{const _0x26bc51=_0x13ad,_0x51a565={'xufxI':function(_0x2547e3,_0x596e67,_0x403598){return _0x2547e3(_0x596e67,_0x403598);},'lascC':function(_0x52250c,_0x23accd){return _0x52250c(_0x23accd);}};if(_0x3d2729['cwd']){const _0x4eb9ec=_0x51a565['xufxI'](join,_0x3d2729['cwd'],'docs/strategy/geschaeftsgrundsaetze.md');if(_0x51a565['lascC'](existsSync,_0x4eb9ec))return _0x26bc51(0x1a0)+readFileSync(_0x4eb9ec,'utf-8')[_0x26bc51(0x198)]('\x0a')[_0x26bc51(0x1b5)](0x0,0x28)['join']('\x0a');}return'[Strategie]\x20Gesetze\x201(Schmerz),3(Wahrnehmung),5(Werttausch)\x20beachten.';}},{'pattern':/\b(firma|impressum|vertrag|contract|legal|handelsregister|steuernummer|geschaeftsfuehr)\b/i,'build':_0x44c04e=>{const _0xd22c08=_0x13ad,_0x5b82b6={'SBklu':function(_0x1025d2,_0xca38bf){return _0x1025d2(_0xca38bf);},'HhNlD':function(_0x3618a9,_0x3d6df8,_0x1ea428){return _0x3618a9(_0x3d6df8,_0x1ea428);},'hjspo':'utf-8'};if(_0x44c04e['cwd']){const _0x1059af=join(_0x44c04e['cwd'],'docs/company/simo-gmbh-profil.md');if(_0x5b82b6['SBklu'](existsSync,_0x1059af))return _0xd22c08(0x190)+_0x5b82b6[_0xd22c08(0x1ac)](readFileSync,_0x1059af,_0x5b82b6['hjspo']);}return'[Firma]\x20SIMO\x20GmbH,\x20Aschaffenburg,\x20Bavaria,\x20Germany\x20|\x20info@simo-online.com';}},{'pattern':/\b(setup|init|bootstrap|template|neues.?projekt|new.?project)\b/i,'build':()=>'[Workspace]\x20Config:\x20'+(process.env.SIMO_WORKSPACE_ROOT||''||_0x59a96c(0x1a6))+'\x20|\x20Bootstrap:\x20./bootstrap.sh'},{'pattern':/\b(font|schrift|typo|woff|otf|uni.?neue|inter.?display)\b/i,'build':()=>{const _0x262b86=_0x59a96c,_0xdd1127={'DyRjk':'[Fonts]\x20SIMO_CI_ROOT\x20nicht\x20konfiguriert.'},_0x48dcbf=process.env.SIMO_CI_ROOT||'';return _0x48dcbf?'[Font-Pfade]\x20Uni\x20Neue:\x20'+_0x48dcbf+_0x262b86(0x19e)+_0x48dcbf+_0x262b86(0x19d)+_0x48dcbf+_0x262b86(0x1ae):_0xdd1127[_0x262b86(0x1b0)];}}];export function buildSmartContext(_0x11376e){const _0xd7bf41=_0x59a96c,_0x1237a8={'uOVVJ':function(_0x1d4744,_0x4c8db9){return _0x1d4744===_0x4c8db9;}},_0x439fbf=[];for(const _0x3201c8 of keywordRules)if(_0x3201c8[_0xd7bf41(0x1a5)][_0xd7bf41(0x1a2)](_0x11376e[_0xd7bf41(0x1af)])){const _0x232fc3=_0x3201c8[_0xd7bf41(0x1b3)](_0x11376e);_0x232fc3&&_0x439fbf['push'](_0x232fc3);}return _0x1237a8[_0xd7bf41(0x199)](0x0,_0x439fbf['length'])?{}:{'additionalContext':_0x439fbf[_0xd7bf41(0x195)]('\x0a')};}
@@ -1 +1 @@
1
- function _0x2382(_0x3103ef,_0x28c61b){_0x3103ef=_0x3103ef-0xac;const _0x24daa4=_0x24da();let _0x23825e=_0x24daa4[_0x3103ef];return _0x23825e;}(function(_0x404024,_0x3c2c27){const _0x3c6dec=_0x2382,_0x36dc5d=_0x404024();while(!![]){try{const _0x38a0fa=-parseInt(_0x3c6dec(0xad))/0x1+-parseInt(_0x3c6dec(0xb4))/0x2+-parseInt(_0x3c6dec(0xb2))/0x3*(-parseInt(_0x3c6dec(0xb5))/0x4)+-parseInt(_0x3c6dec(0xb0))/0x5+-parseInt(_0x3c6dec(0xb1))/0x6*(parseInt(_0x3c6dec(0xb3))/0x7)+parseInt(_0x3c6dec(0xac))/0x8*(-parseInt(_0x3c6dec(0xaf))/0x9)+parseInt(_0x3c6dec(0xae))/0xa;if(_0x38a0fa===_0x3c2c27)break;else _0x36dc5d['push'](_0x36dc5d['shift']());}catch(_0x286484){_0x36dc5d['push'](_0x36dc5d['shift']());}}}(_0x24da,0x4b35d));function _0x24da(){const _0x348b39=['1869KXzGPB','19114MoOYnJ','16XXsHuZ','32QTTxlC','209904snavVd','5193760WgvUFk','545337EHkNoT','477925GkMVqc','5514ALgzaq','443607ifqFLi'];_0x24da=function(){return _0x348b39;};return _0x24da();}const LICENSE_KEY_REGEX=/^tsu_lic_(free|pro|team|enterprise)_[a-f0-9]{32}$/;export function validateLicenseFormat(_0x24030f){return LICENSE_KEY_REGEX['test'](_0x24030f);}export function parseLicenseKey(_0x46fcb5){const _0x669a84=_0x46fcb5['split']('_');return{'tier':_0x669a84[0x2],'hash':_0x669a84[0x3]};}export function isLicenseExpired(_0x59db47){const _0x5412c1={'AzoRw':function(_0x43989d,_0x46786e){return _0x43989d<_0x46786e;}};return _0x5412c1['AzoRw'](new Date(_0x59db47),new Date());}
1
+ (function(_0x27b258,_0xbcc885){const _0xd4afe=_0x332a,_0x99b3da=_0x27b258();while(!![]){try{const _0xb327d6=parseInt(_0xd4afe(0xaa))/0x1*(parseInt(_0xd4afe(0xb2))/0x2)+-parseInt(_0xd4afe(0xac))/0x3*(-parseInt(_0xd4afe(0xb1))/0x4)+parseInt(_0xd4afe(0xb3))/0x5+parseInt(_0xd4afe(0xb4))/0x6+-parseInt(_0xd4afe(0xb5))/0x7*(parseInt(_0xd4afe(0xb0))/0x8)+parseInt(_0xd4afe(0xb6))/0x9*(parseInt(_0xd4afe(0xad))/0xa)+parseInt(_0xd4afe(0xae))/0xb*(-parseInt(_0xd4afe(0xab))/0xc);if(_0xb327d6===_0xbcc885)break;else _0x99b3da['push'](_0x99b3da['shift']());}catch(_0x21a463){_0x99b3da['push'](_0x99b3da['shift']());}}}(_0x6945,0x4a9b1));const LICENSE_KEY_REGEX=/^tsu_lic_(free|pro|team|enterprise)_[a-f0-9]{32}$/;function _0x6945(){const _0x2432ed=['5712WWLGxT','158643UpEtEV','1cvoNFr','31908mnxhNI','639GYHhyj','90KhvgsQ','979lkLYVv','test','4464BDognw','3672OpwgMs','447266jUpmqD','999455UPGUIS','1319178dVxvFq'];_0x6945=function(){return _0x2432ed;};return _0x6945();}function _0x332a(_0x21f8a0,_0x1cc4e7){_0x21f8a0=_0x21f8a0-0xaa;const _0x694500=_0x6945();let _0x332a1b=_0x694500[_0x21f8a0];return _0x332a1b;}export function validateLicenseFormat(_0x50a3cb){const _0x45d166=_0x332a;return LICENSE_KEY_REGEX[_0x45d166(0xaf)](_0x50a3cb);}export function parseLicenseKey(_0x38704d){const _0x5c64f1=_0x38704d['split']('_');return{'tier':_0x5c64f1[0x2],'hash':_0x5c64f1[0x3]};}export function isLicenseExpired(_0x28a719){const _0x3bd4d6={'MSQVZ':function(_0x557447,_0x1aa770){return _0x557447<_0x1aa770;}};return _0x3bd4d6['MSQVZ'](new Date(_0x28a719),new Date());}
@@ -1 +1 @@
1
- const _0x4ad5c9=_0x3bc0;function _0x3bc0(_0x5527fc,_0x1781fa){_0x5527fc=_0x5527fc-0xb3;const _0x42d4f4=_0x42d4();let _0x3bc062=_0x42d4f4[_0x5527fc];return _0x3bc062;}(function(_0x9acfb1,_0x36e049){const _0xd47005=_0x3bc0,_0x1751fe=_0x9acfb1();while(!![]){try{const _0x46cfb2=parseInt(_0xd47005(0xb5))/0x1*(parseInt(_0xd47005(0xbd))/0x2)+-parseInt(_0xd47005(0xbb))/0x3*(parseInt(_0xd47005(0xb8))/0x4)+-parseInt(_0xd47005(0xb9))/0x5*(-parseInt(_0xd47005(0xb4))/0x6)+-parseInt(_0xd47005(0xc2))/0x7+-parseInt(_0xd47005(0xbc))/0x8*(parseInt(_0xd47005(0xc3))/0x9)+parseInt(_0xd47005(0xc1))/0xa*(parseInt(_0xd47005(0xb7))/0xb)+parseInt(_0xd47005(0xba))/0xc*(-parseInt(_0xd47005(0xb6))/0xd);if(_0x46cfb2===_0x36e049)break;else _0x1751fe['push'](_0x1751fe['shift']());}catch(_0x537a2c){_0x1751fe['push'](_0x1751fe['shift']());}}}(_0x42d4,0x51d3f));import{encode}from'gpt-tokenizer';function _0x42d4(){const _0x220c10=['3ekiosy','1064AFfyox','50WHiyjv','length','split','ceil','3254590DZshEi','1821449BtBVGd','12708TkdyIL','claude','60uTrmte','17503VdHxwW','12662YDNRIE','11dZdcet','1677640UlLmhD','220260FWiBVS','12QuOmHb'];_0x42d4=function(){return _0x220c10;};return _0x42d4();}import{registerProvider}from'../token-provider.js';export function createClaudeProvider(_0x2d1e18){const _0x195569=_0x3bc0;return{'name':'claude','countTokens':_0x1c8982=>_0x1c8982?encode(_0x1c8982)[_0x195569(0xbe)]:0x0,'estimateTokens'(_0x35f961){const _0x151e3c=_0x195569;if(!_0x35f961)return 0x0;const _0x35b489=_0x35f961[_0x151e3c(0xbf)](/\s+/)['filter'](Boolean)['length'];return Math[_0x151e3c(0xc0)](1.4*_0x35b489);}};}registerProvider(_0x4ad5c9(0xb3),createClaudeProvider);
1
+ const _0x1ed65c=_0x2013;(function(_0x413e2e,_0x13b9d1){const _0x5707ee=_0x2013,_0x3ae3c3=_0x413e2e();while(!![]){try{const _0x4dbf31=parseInt(_0x5707ee(0x153))/0x1*(parseInt(_0x5707ee(0x159))/0x2)+parseInt(_0x5707ee(0x158))/0x3*(-parseInt(_0x5707ee(0x15b))/0x4)+parseInt(_0x5707ee(0x15a))/0x5*(-parseInt(_0x5707ee(0x152))/0x6)+-parseInt(_0x5707ee(0x14f))/0x7*(parseInt(_0x5707ee(0x157))/0x8)+parseInt(_0x5707ee(0x150))/0x9*(-parseInt(_0x5707ee(0x154))/0xa)+parseInt(_0x5707ee(0x15c))/0xb*(-parseInt(_0x5707ee(0x14c))/0xc)+-parseInt(_0x5707ee(0x151))/0xd*(-parseInt(_0x5707ee(0x155))/0xe);if(_0x4dbf31===_0x13b9d1)break;else _0x3ae3c3['push'](_0x3ae3c3['shift']());}catch(_0x41eee8){_0x3ae3c3['push'](_0x3ae3c3['shift']());}}}(_0x9053,0xe47be));import{encode}from'gpt-tokenizer';import{registerProvider}from'../token-provider.js';function _0x2013(_0x5aa95d,_0x1fd60b){_0x5aa95d=_0x5aa95d-0x14b;const _0x9053d3=_0x9053();let _0x2013d1=_0x9053d3[_0x5aa95d];return _0x2013d1;}export function createClaudeProvider(_0x144bcd){return{'name':'claude','countTokens':_0x55b1bf=>_0x55b1bf?encode(_0x55b1bf)['length']:0x0,'estimateTokens'(_0x313664){const _0x475223=_0x2013;if(!_0x313664)return 0x0;const _0x4e3643=_0x313664[_0x475223(0x156)](/\s+/)[_0x475223(0x14e)](Boolean)['length'];return Math[_0x475223(0x14d)](1.4*_0x4e3643);}};}registerProvider(_0x1ed65c(0x14b),createClaudeProvider);function _0x9053(){const _0x5e635d=['filter','189HfjccV','9ZrsKyw','27434589RbzqcJ','11203998qmaTJk','212470ENmuSN','5994190qSpMXz','28ZRCFoH','split','260216hzcfWo','3125142YuNVTn','14njYWUW','5vIqCRm','4wgEeUk','1413247nWldeX','claude','36CZpMbr','ceil'];_0x9053=function(){return _0x5e635d;};return _0x9053();}
@@ -1 +1 @@
1
- const _0x381a7b=_0x4527;(function(_0x1e7dd3,_0x45fe78){const _0x103755=_0x4527,_0x591e87=_0x1e7dd3();while(!![]){try{const _0x3906f6=-parseInt(_0x103755(0x199))/0x1+parseInt(_0x103755(0x194))/0x2*(-parseInt(_0x103755(0x19e))/0x3)+-parseInt(_0x103755(0x1a1))/0x4*(parseInt(_0x103755(0x1a0))/0x5)+-parseInt(_0x103755(0x197))/0x6*(-parseInt(_0x103755(0x19a))/0x7)+parseInt(_0x103755(0x19c))/0x8+parseInt(_0x103755(0x19f))/0x9+-parseInt(_0x103755(0x195))/0xa;if(_0x3906f6===_0x45fe78)break;else _0x591e87['push'](_0x591e87['shift']());}catch(_0x371912){_0x591e87['push'](_0x591e87['shift']());}}}(_0xa47d,0x6b395));import{encode}from'gpt-tokenizer';function _0x4527(_0x135e0e,_0x202b20){_0x135e0e=_0x135e0e-0x194;const _0xa47dee=_0xa47d();let _0x452776=_0xa47dee[_0x135e0e];return _0x452776;}import{registerProvider}from'../token-provider.js';export function createOpenAIProvider(_0x1b8b36){const _0x3f8534=_0x4527,_0x32befa={'pUiyH':_0x3f8534(0x198)};return{'name':_0x32befa[_0x3f8534(0x19b)],'countTokens':_0x2e7ac5=>_0x2e7ac5?encode(_0x2e7ac5)[_0x3f8534(0x19d)]:0x0,'estimateTokens'(_0x1e2bc2){const _0x19f74a=_0x3f8534;if(!_0x1e2bc2)return 0x0;const _0x5ea7d8=_0x1e2bc2['split'](/\s+/)['filter'](Boolean)[_0x19f74a(0x19d)];return Math[_0x19f74a(0x196)](1.3*_0x5ea7d8);}};}registerProvider(_0x381a7b(0x198),createOpenAIProvider);function _0xa47d(){const _0x3e8344=['6HbjQMy','4682484LvhGAv','32680QnYACb','40UZnuXY','530012aIHjwe','5843570cEWGAa','ceil','18BpdhcA','openai','46977JFwRjG','1147951zELxLh','pUiyH','5229120JtmCjZ','length'];_0xa47d=function(){return _0x3e8344;};return _0xa47d();}
1
+ function _0x52b3(_0x356cd7,_0x1891fb){_0x356cd7=_0x356cd7-0x185;const _0x34c7d4=_0x34c7();let _0x52b3d4=_0x34c7d4[_0x356cd7];return _0x52b3d4;}function _0x34c7(){const _0x161ea5=['28UEgUvo','2124956LiMHnr','1621146PSlvta','429416vjlDAc','length','cVhsv','52sJTAMd','27SAUpIX','openai','filter','split','333777pvUljA','710058XfKsCn','1722095RxSbwV','Wahrt','6902200unfToj'];_0x34c7=function(){return _0x161ea5;};return _0x34c7();}const _0x53ed09=_0x52b3;(function(_0x51038b,_0x43d7b9){const _0x62aa22=_0x52b3,_0x4127ea=_0x51038b();while(!![]){try{const _0x153880=parseInt(_0x62aa22(0x187))/0x1+-parseInt(_0x62aa22(0x18c))/0x2+-parseInt(_0x62aa22(0x186))/0x3*(-parseInt(_0x62aa22(0x191))/0x4)+-parseInt(_0x62aa22(0x188))/0x5+parseInt(_0x62aa22(0x18d))/0x6*(parseInt(_0x62aa22(0x18b))/0x7)+parseInt(_0x62aa22(0x18e))/0x8*(-parseInt(_0x62aa22(0x192))/0x9)+-parseInt(_0x62aa22(0x18a))/0xa;if(_0x153880===_0x43d7b9)break;else _0x4127ea['push'](_0x4127ea['shift']());}catch(_0x46d823){_0x4127ea['push'](_0x4127ea['shift']());}}}(_0x34c7,0xef061));import{encode}from'gpt-tokenizer';import{registerProvider}from'../token-provider.js';export function createOpenAIProvider(_0xeaac01){const _0x441137=_0x52b3,_0x1ba7a4={'cVhsv':function(_0x53edbd,_0x3dd48b){return _0x53edbd*_0x3dd48b;},'Wahrt':'openai'};return{'name':_0x1ba7a4[_0x441137(0x189)],'countTokens':_0xee77cd=>_0xee77cd?encode(_0xee77cd)[_0x441137(0x18f)]:0x0,'estimateTokens'(_0xb2988c){const _0x5ee3c7=_0x441137;if(!_0xb2988c)return 0x0;const _0x4f98d2=_0xb2988c[_0x5ee3c7(0x185)](/\s+/)[_0x5ee3c7(0x194)](Boolean)[_0x5ee3c7(0x18f)];return Math['ceil'](_0x1ba7a4[_0x5ee3c7(0x190)](1.3,_0x4f98d2));}};}registerProvider(_0x53ed09(0x193),createOpenAIProvider);
@@ -1 +1 @@
1
- const _0x113c7d=_0x5e72;function _0x593f(){const _0x58a918=['13pXYpig','48184xRQUYC','573912LCBYDa','396SRZcAi','5LOnNXm','1252640BfEsKL','3LkuBcz','claude','countTokens','1864760qejKRx','495707QVMlyP','estimateTokens','22XtEkIe','716502nWaCZn','8659236VPOOEV','7XpKOhU'];_0x593f=function(){return _0x58a918;};return _0x593f();}(function(_0xc4ed8,_0x5151bc){const _0x3d9c64=_0x5e72,_0x4132e5=_0xc4ed8();while(!![]){try{const _0xed7724=parseInt(_0x3d9c64(0x19e))/0x1+-parseInt(_0x3d9c64(0x1a6))/0x2*(-parseInt(_0x3d9c64(0x1aa))/0x3)+-parseInt(_0x3d9c64(0x1a9))/0x4*(parseInt(_0x3d9c64(0x1a8))/0x5)+parseInt(_0x3d9c64(0x1a1))/0x6*(-parseInt(_0x3d9c64(0x1a3))/0x7)+-parseInt(_0x3d9c64(0x1a5))/0x8*(-parseInt(_0x3d9c64(0x1a7))/0x9)+-parseInt(_0x3d9c64(0x19d))/0xa*(-parseInt(_0x3d9c64(0x1a0))/0xb)+-parseInt(_0x3d9c64(0x1a2))/0xc*(parseInt(_0x3d9c64(0x1a4))/0xd);if(_0xed7724===_0x5151bc)break;else _0x4132e5['push'](_0x4132e5['shift']());}catch(_0x1daa63){_0x4132e5['push'](_0x4132e5['shift']());}}}(_0x593f,0x410cf));function _0x5e72(_0x183929,_0x207fa7){_0x183929=_0x183929-0x19b;const _0x593ffe=_0x593f();let _0x5e7280=_0x593ffe[_0x183929];return _0x5e7280;}import'./providers/claude-provider.js';import{createTokenProvider}from'./token-provider.js';const defaultProvider=createTokenProvider(_0x113c7d(0x19b));export function countTokens(_0x4ab8d2){const _0xea8a4d=_0x113c7d;return defaultProvider[_0xea8a4d(0x19c)](_0x4ab8d2);}export function estimateTokens(_0x1e5b0d){const _0x4c579d=_0x113c7d;return defaultProvider[_0x4c579d(0x19f)](_0x1e5b0d);}
1
+ (function(_0x3d9ed9,_0x40f46d){const _0x221689=_0x1f5d,_0x236fbf=_0x3d9ed9();while(!![]){try{const _0x375a8f=-parseInt(_0x221689(0x187))/0x1+-parseInt(_0x221689(0x186))/0x2+-parseInt(_0x221689(0x185))/0x3+-parseInt(_0x221689(0x180))/0x4*(parseInt(_0x221689(0x18a))/0x5)+parseInt(_0x221689(0x188))/0x6*(parseInt(_0x221689(0x181))/0x7)+-parseInt(_0x221689(0x18b))/0x8*(-parseInt(_0x221689(0x189))/0x9)+parseInt(_0x221689(0x182))/0xa*(parseInt(_0x221689(0x184))/0xb);if(_0x375a8f===_0x40f46d)break;else _0x236fbf['push'](_0x236fbf['shift']());}catch(_0x336f96){_0x236fbf['push'](_0x236fbf['shift']());}}}(_0x25a9,0x2b4e7));function _0x25a9(){const _0x2d8445=['countTokens','224708mimDGY','532350dDvWhA','524544pqcKPp','64469wCtcvM','1398SWgNqn','47295XImKYf','1236555URNkZQ','88fKIWOF','4HLFkOV','8372ZghQcW','290dUBNmE'];_0x25a9=function(){return _0x2d8445;};return _0x25a9();}import'./providers/claude-provider.js';function _0x1f5d(_0xed96dd,_0x43f09d){_0xed96dd=_0xed96dd-0x180;const _0x25a99f=_0x25a9();let _0x1f5d31=_0x25a99f[_0xed96dd];return _0x1f5d31;}import{createTokenProvider}from'./token-provider.js';const defaultProvider=createTokenProvider('claude');export function countTokens(_0x148008){const _0x1f6d58=_0x1f5d;return defaultProvider[_0x1f6d58(0x183)](_0x148008);}export function estimateTokens(_0x226796){return defaultProvider['estimateTokens'](_0x226796);}
@@ -1 +1 @@
1
- const _0x24117e=_0x1a75;(function(_0x5df27b,_0xff261){const _0xe273ca=_0x1a75,_0x1975e8=_0x5df27b();while(!![]){try{const _0x41c0ef=-parseInt(_0xe273ca(0x9e))/0x1*(parseInt(_0xe273ca(0x9c))/0x2)+-parseInt(_0xe273ca(0x9d))/0x3+-parseInt(_0xe273ca(0xa4))/0x4*(-parseInt(_0xe273ca(0x99))/0x5)+-parseInt(_0xe273ca(0x9a))/0x6+parseInt(_0xe273ca(0xa6))/0x7+-parseInt(_0xe273ca(0xa7))/0x8+-parseInt(_0xe273ca(0x9f))/0x9*(-parseInt(_0xe273ca(0xa3))/0xa);if(_0x41c0ef===_0xff261)break;else _0x1975e8['push'](_0x1975e8['shift']());}catch(_0x331fec){_0x1975e8['push'](_0x1975e8['shift']());}}}(_0x4bc9,0x40f6f));function _0x1a75(_0x35b899,_0x342b74){_0x35b899=_0x35b899-0x99;const _0x4bc948=_0x4bc9();let _0x1a7513=_0x4bc948[_0x35b899];return _0x1a7513;}const registry=new Map();export function registerProvider(_0x2e2de1,_0x5f79db){const _0x566bb5=_0x1a75;registry[_0x566bb5(0xa9)](_0x2e2de1,_0x5f79db);}export function createTokenProvider(_0x384717='claude',_0x1b9936=_0x24117e(0x9b)){const _0x330ca9=_0x24117e,_0x3d3872={'ygwWk':function(_0x22a29d,_0x10a977){return _0x22a29d(_0x10a977);}},_0x9bcf02=registry[_0x330ca9(0xa2)](_0x384717);if(!_0x9bcf02){const _0x41f657=Array['from'](registry['keys']())[_0x330ca9(0xa5)](',\x20');throw new Error(_0x330ca9(0xaa)+_0x384717+_0x330ca9(0xa1)+_0x41f657);}return _0x3d3872['ygwWk'](_0x9bcf02,_0x1b9936);}function _0x4bc9(){const _0x2a2bd5=['4XFTqOG','join','3641407HmJXTf','81584mxWoZL','from','set','Unknown\x20provider:\x20\x22','745025UCWFgX','924108XAqEDG','claude-sonnet-4-20250514','6ugzqMS','1359072MSxJuD','30025kykHFr','36GKTsWb','keys','\x22.\x20Available\x20providers:\x20','get','760510TqceUn'];_0x4bc9=function(){return _0x2a2bd5;};return _0x4bc9();}export function listProviders(){const _0x5d7777=_0x24117e;return Array[_0x5d7777(0xa8)](registry[_0x5d7777(0xa0)]());}
1
+ const _0x70b261=_0x20ce;(function(_0x2a15ce,_0x43109f){const _0x3dd27a=_0x20ce,_0x262496=_0x2a15ce();while(!![]){try{const _0x2a2bbf=-parseInt(_0x3dd27a(0x171))/0x1+-parseInt(_0x3dd27a(0x16e))/0x2+parseInt(_0x3dd27a(0x16a))/0x3*(-parseInt(_0x3dd27a(0x16f))/0x4)+parseInt(_0x3dd27a(0x172))/0x5+parseInt(_0x3dd27a(0x166))/0x6+-parseInt(_0x3dd27a(0x16c))/0x7*(-parseInt(_0x3dd27a(0x167))/0x8)+parseInt(_0x3dd27a(0x174))/0x9;if(_0x2a2bbf===_0x43109f)break;else _0x262496['push'](_0x262496['shift']());}catch(_0x562af2){_0x262496['push'](_0x262496['shift']());}}}(_0x54d0,0x8623a));const registry=new Map();export function registerProvider(_0xc1cf60,_0x16d4b5){registry['set'](_0xc1cf60,_0x16d4b5);}export function createTokenProvider(_0x342f17='claude',_0x201e93=_0x70b261(0x16b)){const _0x31bd3f=_0x70b261,_0x510bc3={'FlhNv':function(_0x513948,_0x35b21c){return _0x513948(_0x35b21c);}},_0x5305ac=registry[_0x31bd3f(0x169)](_0x342f17);if(!_0x5305ac){const _0x4b4a07=Array['from'](registry[_0x31bd3f(0x170)]())['join'](',\x20');throw new Error('Unknown\x20provider:\x20\x22'+_0x342f17+_0x31bd3f(0x16d)+_0x4b4a07);}return _0x510bc3[_0x31bd3f(0x173)](_0x5305ac,_0x201e93);}function _0x54d0(){const _0x4c710b=['claude-sonnet-4-20250514','1665363aeOKOp','\x22.\x20Available\x20providers:\x20','2089362ljHXWa','4hBgAvs','keys','695682jNsbHj','4343795GiJGkf','FlhNv','11483154AUyfFM','109296TXhknF','8WxhkBD','from','get','332979ebFHUe'];_0x54d0=function(){return _0x4c710b;};return _0x54d0();}function _0x20ce(_0x340c54,_0xf253d4){_0x340c54=_0x340c54-0x166;const _0x54d054=_0x54d0();let _0x20ce1b=_0x54d054[_0x340c54];return _0x20ce1b;}export function listProviders(){const _0x4fc0c1=_0x70b261;return Array[_0x4fc0c1(0x168)](registry[_0x4fc0c1(0x170)]());}
package/package.json CHANGED
@@ -1,17 +1,19 @@
1
1
  {
2
2
  "name": "@simosphere/tokenizer-speedup",
3
- "version": "0.7.4",
3
+ "version": "0.8.0",
4
4
  "description": "Intelligent context optimization for LLM sessions",
5
5
  "type": "module",
6
6
  "main": "dist/plugin/cli.js",
7
7
  "bin": {
8
8
  "tokenizer-speedup": "./dist/plugin/cli.js",
9
- "tsu": "./dist/cli/index.js"
9
+ "tsu": "./dist/cli/index.js",
10
+ "tsu-mcp": "./dist/mcp/index.js"
10
11
  },
11
12
  "scripts": {
12
13
  "build": "tsc && node --import tsx scripts/minify.ts && node --import tsx scripts/build-manifest.ts",
13
14
  "build:prod": "tsc && node --import tsx scripts/minify.ts && node --import tsx scripts/obfuscate.ts && node --import tsx scripts/build-manifest.ts",
14
15
  "cli": "node --import tsx src/cli/index.ts",
16
+ "mcp": "node --import tsx src/mcp/index.ts",
15
17
  "test": "vitest run",
16
18
  "test:watch": "vitest",
17
19
  "prepare": "husky",
@@ -63,9 +65,11 @@
63
65
  "vitest": "^3.0.0"
64
66
  },
65
67
  "dependencies": {
68
+ "@modelcontextprotocol/sdk": "^1.27.0",
66
69
  "commander": "^14.0.3",
67
70
  "gpt-tokenizer": "^2.8.0",
68
71
  "js-yaml": "^4.1.0",
69
- "stripe": "^20.4.0"
72
+ "stripe": "^20.4.0",
73
+ "zod": "^3.25.0"
70
74
  }
71
75
  }