@simosphere/tokenizer-speedup 0.7.3 → 0.7.4

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 (95) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/dist/cli/analyze.js +1 -1
  3. package/dist/cli/config-cmd.js +1 -1
  4. package/dist/cli/index.js +1 -1
  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 +32 -63
  12. package/dist/plugin/cli.js +1 -1
  13. package/dist/plugin/config-loader.js +1 -1
  14. package/dist/plugin/context-compressor.js +1 -1
  15. package/dist/plugin/hook-dispatcher.js +1 -1
  16. package/dist/plugin/metering-client.js +1 -1
  17. package/dist/plugin/metrics-collector.js +1 -1
  18. package/dist/plugin/onboarding.js +1 -1
  19. package/dist/plugin/precompact-handler.js +1 -1
  20. package/dist/plugin/report.js +1 -1
  21. package/dist/plugin/rule-analytics-store.js +1 -1
  22. package/dist/plugin/rule-analytics.js +1 -1
  23. package/dist/plugin/rule-engine.js +1 -1
  24. package/dist/plugin/rule-sharing.js +1 -1
  25. package/dist/plugin/rule-suggest.js +1 -1
  26. package/dist/plugin/session-start.js +1 -1
  27. package/dist/plugin/smart-context.js +1 -1
  28. package/dist/shared/license.js +1 -1
  29. package/dist/shared/providers/claude-provider.js +1 -1
  30. package/dist/shared/providers/openai-provider.js +1 -1
  31. package/dist/shared/token-counter.js +1 -1
  32. package/dist/shared/token-provider.js +1 -1
  33. package/package.json +1 -1
  34. package/dist/cli/analyze.d.ts +0 -13
  35. package/dist/cli/analyze.js.map +0 -1
  36. package/dist/cli/config-cmd.d.ts +0 -10
  37. package/dist/cli/config-cmd.js.map +0 -1
  38. package/dist/cli/index.d.ts +0 -5
  39. package/dist/cli/index.js.map +0 -1
  40. package/dist/cli/setup-cmd.d.ts +0 -2
  41. package/dist/cli/setup-cmd.js.map +0 -1
  42. package/dist/cloud/stripe-checkout.d.ts +0 -11
  43. package/dist/cloud/stripe-checkout.js.map +0 -1
  44. package/dist/cloud/stripe-config.d.ts +0 -35
  45. package/dist/cloud/stripe-config.js.map +0 -1
  46. package/dist/cloud/stripe-usage.d.ts +0 -30
  47. package/dist/cloud/stripe-usage.js.map +0 -1
  48. package/dist/cloud/stripe-webhooks.d.ts +0 -15
  49. package/dist/cloud/stripe-webhooks.js.map +0 -1
  50. package/dist/cloud/subscription-store.d.ts +0 -23
  51. package/dist/cloud/subscription-store.js.map +0 -1
  52. package/dist/plugin/cli.d.ts +0 -2
  53. package/dist/plugin/cli.js.map +0 -1
  54. package/dist/plugin/config-loader.d.ts +0 -6
  55. package/dist/plugin/config-loader.js.map +0 -1
  56. package/dist/plugin/context-compressor.d.ts +0 -22
  57. package/dist/plugin/context-compressor.js.map +0 -1
  58. package/dist/plugin/hook-dispatcher.d.ts +0 -11
  59. package/dist/plugin/hook-dispatcher.js.map +0 -1
  60. package/dist/plugin/metering-client.d.ts +0 -26
  61. package/dist/plugin/metering-client.js.map +0 -1
  62. package/dist/plugin/metrics-collector.d.ts +0 -19
  63. package/dist/plugin/metrics-collector.js.map +0 -1
  64. package/dist/plugin/onboarding.d.ts +0 -13
  65. package/dist/plugin/onboarding.js.map +0 -1
  66. package/dist/plugin/precompact-handler.d.ts +0 -26
  67. package/dist/plugin/precompact-handler.js.map +0 -1
  68. package/dist/plugin/report.d.ts +0 -13
  69. package/dist/plugin/report.js.map +0 -1
  70. package/dist/plugin/rule-analytics-store.d.ts +0 -3
  71. package/dist/plugin/rule-analytics-store.js.map +0 -1
  72. package/dist/plugin/rule-analytics.d.ts +0 -12
  73. package/dist/plugin/rule-analytics.js.map +0 -1
  74. package/dist/plugin/rule-engine.d.ts +0 -9
  75. package/dist/plugin/rule-engine.js.map +0 -1
  76. package/dist/plugin/rule-sharing.d.ts +0 -19
  77. package/dist/plugin/rule-sharing.js.map +0 -1
  78. package/dist/plugin/rule-suggest.d.ts +0 -7
  79. package/dist/plugin/rule-suggest.js.map +0 -1
  80. package/dist/plugin/session-start.d.ts +0 -6
  81. package/dist/plugin/session-start.js.map +0 -1
  82. package/dist/plugin/smart-context.d.ts +0 -7
  83. package/dist/plugin/smart-context.js.map +0 -1
  84. package/dist/shared/license.d.ts +0 -7
  85. package/dist/shared/license.js.map +0 -1
  86. package/dist/shared/providers/claude-provider.d.ts +0 -2
  87. package/dist/shared/providers/claude-provider.js.map +0 -1
  88. package/dist/shared/providers/openai-provider.d.ts +0 -2
  89. package/dist/shared/providers/openai-provider.js.map +0 -1
  90. package/dist/shared/token-counter.d.ts +0 -10
  91. package/dist/shared/token-counter.js.map +0 -1
  92. package/dist/shared/token-provider.d.ts +0 -10
  93. package/dist/shared/token-provider.js.map +0 -1
  94. package/dist/shared/types.d.ts +0 -62
  95. package/dist/shared/types.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tokenizer-speedup",
3
- "version": "0.7.3",
3
+ "version": "0.7.4",
4
4
  "description": "Intelligent context optimization for LLM sessions — save 30-60% on tokens",
5
5
  "author": {
6
6
  "name": "SIMO GmbH",
@@ -1 +1 @@
1
- function _0x2165(){const _0x1fb7a0=['450696oIMWOC','NxNeZ','738zMywkQ','utf-8','486283ACbYWh','207196fYvWko','4LBSFVt','openai','jqxtu','length','filter','24lBFoJU','claude-sonnet-4-20250514','gEmNm','133302wCftKk','212830nuNWrk','claude','100820OhReth','47980zdkXwa','countTokens'];_0x2165=function(){return _0x1fb7a0;};return _0x2165();}(function(_0x5129b5,_0x2c80c2){const _0x5431a3=_0x4da8,_0x4d4190=_0x5129b5();while(!![]){try{const _0x1a23eb=-parseInt(_0x5431a3(0x155))/0x1*(-parseInt(_0x5431a3(0x160))/0x2)+-parseInt(_0x5431a3(0x15d))/0x3+parseInt(_0x5431a3(0x154))/0x4+-parseInt(_0x5431a3(0x15e))/0x5*(-parseInt(_0x5431a3(0x15a))/0x6)+parseInt(_0x5431a3(0x153))/0x7+parseInt(_0x5431a3(0x14f))/0x8+parseInt(_0x5431a3(0x151))/0x9*(-parseInt(_0x5431a3(0x161))/0xa);if(_0x1a23eb===_0x2c80c2)break;else _0x4d4190['push'](_0x4d4190['shift']());}catch(_0x32f23d){_0x4d4190['push'](_0x4d4190['shift']());}}}(_0x2165,0x1b417));import{readFileSync}from'node:fs';import'../shared/providers/claude-provider.js';import'../shared/providers/openai-provider.js';import{createTokenProvider}from'../shared/token-provider.js';function _0x4da8(_0x54bdb0,_0xb252d){_0x54bdb0=_0x54bdb0-0x14f;const _0x21652c=_0x2165();let _0x4da839=_0x21652c[_0x54bdb0];return _0x4da839;}export function analyzeText(_0x5a45e8,_0x32aeff='claude',_0x55129d){const _0x557331=_0x4da8,_0x5c0b26={'hItcE':function(_0x2297a4,_0x472933){return _0x2297a4===_0x472933;},'NxNeZ':_0x557331(0x15f),'JsMCq':'gpt-4o'},_0x1dda9e=_0x55129d??(_0x5c0b26['hItcE'](_0x5c0b26[_0x557331(0x150)],_0x32aeff)?_0x557331(0x15b):_0x5c0b26['JsMCq']),_0x441756=createTokenProvider(_0x32aeff,_0x1dda9e),_0x2a9852=_0x5a45e8['split'](/\s+/)[_0x557331(0x159)](Boolean)['length'];return{'tokens':_0x441756[_0x557331(0x162)](_0x5a45e8),'estimate':_0x441756['estimateTokens'](_0x5a45e8),'provider':_0x32aeff,'model':_0x1dda9e,'chars':_0x5a45e8[_0x557331(0x158)],'words':_0x2a9852};}export function analyzeFile(_0x1c819b,_0x15b71f='claude',_0x43f683){const _0x23d776=_0x4da8,_0x32ba8b={'kkLsI':_0x23d776(0x152)};return analyzeText(readFileSync(_0x1c819b,_0x32ba8b['kkLsI']),_0x15b71f,_0x43f683);}export function compareProviders(_0x4ebc26){const _0x8c9418=_0x4da8,_0x85697c={'jqxtu':_0x8c9418(0x15f),'gEmNm':function(_0x1242f8,_0x290561,_0x24e2f4){return _0x1242f8(_0x290561,_0x24e2f4);}};return{'claude':analyzeText(_0x4ebc26,_0x85697c[_0x8c9418(0x157)]),'openai':_0x85697c[_0x8c9418(0x15c)](analyzeText,_0x4ebc26,_0x8c9418(0x156))};}
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 +1 @@
1
- function _0x2692(){const _0x5a69a0=['25qEovUA','message','1306640WzTSrR','model','387911DZhAAq','137688tqmHxW','7YLcqhA','1533306OFClaa','279056ywvkam','length','2794242angiom','4986loKABb','provider','25540TsJfoh'];_0x2692=function(){return _0x5a69a0;};return _0x2692();}(function(_0x4d6897,_0x2185bf){const _0x576415=_0x3deb,_0x4be927=_0x4d6897();while(!![]){try{const _0x214302=parseInt(_0x576415(0x121))/0x1+-parseInt(_0x576415(0x12d))/0x2+-parseInt(_0x576415(0x127))/0x3+-parseInt(_0x576415(0x125))/0x4*(-parseInt(_0x576415(0x12b))/0x5)+-parseInt(_0x576415(0x124))/0x6*(-parseInt(_0x576415(0x123))/0x7)+-parseInt(_0x576415(0x122))/0x8+parseInt(_0x576415(0x128))/0x9*(parseInt(_0x576415(0x12a))/0xa);if(_0x214302===_0x2185bf)break;else _0x4be927['push'](_0x4be927['shift']());}catch(_0x15263b){_0x4be927['push'](_0x4be927['shift']());}}}(_0x2692,0xc4985));import'../shared/providers/claude-provider.js';import'../shared/providers/openai-provider.js';import{parseConfig}from'../plugin/config-loader.js';function _0x3deb(_0x2ff9b1,_0x5198e4){_0x2ff9b1=_0x2ff9b1-0x120;const _0x269266=_0x2692();let _0x3deb2c=_0x269266[_0x2ff9b1];return _0x3deb2c;}export function validateConfigYaml(_0x4620ab){const _0x297f38=_0x3deb;try{const _0x46bdb6=parseConfig(_0x4620ab);return{'valid':!0x0,'provider':_0x46bdb6[_0x297f38(0x129)],'model':_0x46bdb6[_0x297f38(0x120)],'ruleCount':_0x46bdb6['rules'][_0x297f38(0x126)]};}catch(_0x379e0f){return{'valid':!0x1,'provider':'','model':'','ruleCount':0x0,'error':_0x379e0f[_0x297f38(0x12c)]};}}
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']};}}
package/dist/cli/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const _0x4c64f3=_0x54af;(function(_0xeafb9d,_0x5f47d2){const _0x36780a=_0x54af,_0x370e14=_0xeafb9d();while(!![]){try{const _0x3ae54e=parseInt(_0x36780a(0xe9))/0x1*(-parseInt(_0x36780a(0xe1))/0x2)+parseInt(_0x36780a(0x101))/0x3*(parseInt(_0x36780a(0xeb))/0x4)+-parseInt(_0x36780a(0xe3))/0x5*(parseInt(_0x36780a(0xd6))/0x6)+-parseInt(_0x36780a(0xd2))/0x7*(-parseInt(_0x36780a(0xe7))/0x8)+parseInt(_0x36780a(0xff))/0x9+-parseInt(_0x36780a(0xd1))/0xa*(-parseInt(_0x36780a(0xee))/0xb)+-parseInt(_0x36780a(0xd3))/0xc*(parseInt(_0x36780a(0xf7))/0xd);if(_0x3ae54e===_0x5f47d2)break;else _0x370e14['push'](_0x370e14['shift']());}catch(_0x5bbb06){_0x370e14['push'](_0x370e14['shift']());}}}(_0x4458,0x9924b));function _0x4458(){const _0x56b3d2=['649550rSdPjT','119sSiXRw','5405844PWlBrj','claude-sonnet-4-20250514','IGeVL','1002RnbEyj','zLJnB','estimateTokens','claude','provider','lQvlu','TokenizerSpeedUp\x20—\x20Multi-LLM\x20Token\x20Optimization\x20CLI','length','cNqij','text','command','5792mPVjmb','log','4115oZTlxs','action','Analyze\x20token\x20count\x20of\x20a\x20file\x20or\x20text','model','457752FHizKW','message','251LfXJBH','toFixed','4hMavAJ','option','Configure\x20TokenizerSpeedUp\x20with\x20your\x20API\x20key\x20and\x20register\x20Claude\x20Code\x20hooks','132DePjxV','stringify','WIvnQ','addHelpText','QZumW','gpt-4o','LxroX','argument','NWiDc','39qwSGsy','exitCode','description','parse','0.7.3','MoaCP','XcTVb','Analyze\x20inline\x20text\x20instead\x20of\x20file','2147076iEjRCu','requiredOption','2556978OjYBKE','includes','[file]','error','LLM\x20provider\x20(claude,\x20openai)','utf-8','K\x20chars)\x20—\x20processing\x20may\x20be\x20slow.','ALXRx','File\x20to\x20analyze','Validate\x20configuration\x20file'];_0x4458=function(){return _0x56b3d2;};return _0x4458();}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}from'node:fs';function _0x54af(_0x57dd71,_0x4c30fb){_0x57dd71=_0x57dd71-0xcb;const _0x4458ae=_0x4458();let _0x54af4d=_0x4458ae[_0x57dd71];return _0x54af4d;}import{runSetup}from'./setup-cmd.js';export function buildCLI(){const _0x339c10=_0x54af,_0x1b3533={'OHnhl':function(_0x2e31a8,_0x4e2d9f){return _0x2e31a8===_0x4e2d9f;},'LxroX':_0x339c10(0xd9),'TywyF':function(_0x40e87e,_0x286ef9,_0x265fc9){return _0x40e87e(_0x286ef9,_0x265fc9);},'Uqaxn':function(_0x2909d4,_0x420b86,_0x4bbc6d){return _0x2909d4(_0x420b86,_0x4bbc6d);},'ALXRx':function(_0x342eef,_0x101c8e){return _0x342eef>_0x101c8e;},'rUGfH':function(_0xa18b47,_0x2c4f17){return _0xa18b47/_0x2c4f17;},'NWiDc':function(_0x56cb32,_0x421f79){return _0x56cb32??_0x421f79;},'lQvlu':'(inline)','WsxFO':function(_0x5d0174,_0x48187a,_0x4f964f){return _0x5d0174(_0x48187a,_0x4f964f);},'MoaCP':function(_0x236107,_0x251af9){return _0x236107(_0x251af9);},'IGeVL':_0x339c10(0xfb),'cNqij':'setup','eiiaA':_0x339c10(0xed),'QasMY':'--api-key\x20<key>','EpcBM':'Your\x20TokenizerSpeedUp\x20API\x20key\x20(get\x20one\x20at\x20https://tokenizer-speedup.simosphereai.com)','zLJnB':'analyze','XcTVb':_0x339c10(0xe5),'YcJIT':_0x339c10(0x103),'WaKUf':'-p,\x20--provider\x20<provider>','GEExY':_0x339c10(0xcb),'NdXBW':'-m,\x20--model\x20<model>','SRqTu':'Model\x20name','aXcdR':_0x339c10(0xfe),'QZumW':'config','WIvnQ':'tokenizer-speedup.yaml'},_0x17d20a=new Command();return _0x17d20a['name']('tsu')[_0x339c10(0xf9)](_0x339c10(0xdc))['version'](_0x1b3533[_0x339c10(0xd5)])[_0x339c10(0xf1)]('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'),_0x17d20a[_0x339c10(0xe0)](_0x1b3533[_0x339c10(0xde)])['description'](_0x1b3533['eiiaA'])[_0x339c10(0x100)](_0x1b3533['QasMY'],_0x1b3533['EpcBM'])[_0x339c10(0xe4)](_0xcc5fea=>{runSetup(_0xcc5fea['apiKey']);}),_0x17d20a['command'](_0x1b3533[_0x339c10(0xd7)])[_0x339c10(0xf9)](_0x1b3533[_0x339c10(0xfd)])[_0x339c10(0xf5)](_0x1b3533['YcJIT'],_0x339c10(0xcf))['option'](_0x1b3533['WaKUf'],_0x1b3533['GEExY'],_0x339c10(0xd9))[_0x339c10(0xec)](_0x1b3533['NdXBW'],_0x1b3533['SRqTu'])[_0x339c10(0xec)]('-t,\x20--text\x20<text>',_0x1b3533['aXcdR'])[_0x339c10(0xe4)]((_0x365a38,_0x5a128b)=>{const _0x4b826c=_0x339c10,_0x165517=_0x5a128b[_0x4b826c(0xe6)]??(_0x1b3533['OHnhl'](_0x1b3533[_0x4b826c(0xf4)],_0x5a128b['provider'])?_0x4b826c(0xd4):_0x4b826c(0xf3));let _0x5432f3,_0x1b004c;try{_0x5432f3=_0x1b3533['TywyF'](createTokenProvider,_0x5a128b[_0x4b826c(0xda)],_0x165517);}catch(_0x1730bc){return console[_0x4b826c(0x104)]('Error:\x20'+_0x1730bc[_0x4b826c(0xe8)]),void(process[_0x4b826c(0xf8)]=0x1);}if(_0x5a128b[_0x4b826c(0xdf)])_0x1b004c=_0x5a128b[_0x4b826c(0xdf)];else{if(!_0x365a38)return console['error']('Error:\x20provide\x20a\x20file\x20argument\x20or\x20--text\x20option'),void(process['exitCode']=0x1);_0x1b004c=_0x1b3533['Uqaxn'](readFileSync,_0x365a38,'utf-8');}_0x1b3533[_0x4b826c(0xce)](_0x1b004c[_0x4b826c(0xdd)],0x7a120)&&console[_0x4b826c(0x104)]('Warning:\x20large\x20input\x20('+_0x1b3533['rUGfH'](_0x1b004c['length'],0x3e8)[_0x4b826c(0xea)](0x0)+_0x4b826c(0xcd));const _0x145ac0=_0x5432f3['countTokens'](_0x1b004c),_0x51291d=_0x5432f3[_0x4b826c(0xd8)](_0x1b004c);console[_0x4b826c(0xe2)](JSON['stringify']({'file':_0x1b3533[_0x4b826c(0xf6)](_0x365a38,_0x1b3533[_0x4b826c(0xdb)]),'tokens':_0x145ac0,'estimate':_0x51291d,'provider':_0x5a128b['provider'],'model':_0x165517}));}),_0x17d20a[_0x339c10(0xe0)](_0x1b3533[_0x339c10(0xf2)])['description'](_0x339c10(0xd0))['argument'](_0x339c10(0x103),'Config\x20file\x20path',_0x1b3533[_0x339c10(0xf0)])[_0x339c10(0xe4)](async _0xfaf2da=>{const _0x3e8e17=_0x339c10;try{const _0x29770d=_0x1b3533['WsxFO'](readFileSync,_0xfaf2da,_0x3e8e17(0xcc)),{parseConfig:_0x21ea4e}=await import('../plugin/config-loader.js'),_0x42a7e4=_0x1b3533[_0x3e8e17(0xfc)](_0x21ea4e,_0x29770d);console[_0x3e8e17(0xe2)](JSON[_0x3e8e17(0xef)]({'valid':!0x0,'provider':_0x42a7e4['provider'],'model':_0x42a7e4['model'],'ruleCount':_0x42a7e4['rules']['length']}));}catch(_0x835668){console[_0x3e8e17(0xe2)](JSON['stringify']({'valid':!0x1,'error':_0x835668['message']})),process[_0x3e8e17(0xf8)]=0x1;}}),_0x17d20a;}process['argv'][0x1]?.['replace'](/\\/g,'/')[_0x4c64f3(0x102)]('cli/index')&&buildCLI()[_0x4c64f3(0xfa)]();
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']();
@@ -1 +1 @@
1
- const _0x287ce3=_0x35bd;(function(_0x54efb2,_0x2af02e){const _0x2da862=_0x35bd,_0x5af7eb=_0x54efb2();while(!![]){try{const _0x23fe89=parseInt(_0x2da862(0x1f0))/0x1*(parseInt(_0x2da862(0x216))/0x2)+-parseInt(_0x2da862(0x20b))/0x3*(-parseInt(_0x2da862(0x1f8))/0x4)+parseInt(_0x2da862(0x208))/0x5*(parseInt(_0x2da862(0x209))/0x6)+parseInt(_0x2da862(0x200))/0x7*(parseInt(_0x2da862(0x1f1))/0x8)+-parseInt(_0x2da862(0x214))/0x9*(parseInt(_0x2da862(0x202))/0xa)+parseInt(_0x2da862(0x1f3))/0xb*(-parseInt(_0x2da862(0x1fe))/0xc)+-parseInt(_0x2da862(0x1f6))/0xd*(parseInt(_0x2da862(0x1f5))/0xe);if(_0x23fe89===_0x2af02e)break;else _0x5af7eb['push'](_0x5af7eb['shift']());}catch(_0x1a8486){_0x5af7eb['push'](_0x5af7eb['shift']());}}}(_0x2c09,0xe64de));import{readFileSync,writeFileSync,mkdirSync}from'node:fs';import{join}from'node:path';import{homedir}from'node:os';const CONFIG_DIR=join(homedir(),_0x287ce3(0x20c),_0x287ce3(0x201)),CONFIG_FILE=join(CONFIG_DIR,_0x287ce3(0x20a)),CLAUDE_SETTINGS_FILE=join(homedir(),'.claude','settings.local.json');export function runSetup(_0x3878cf){const _0x4d6c2f=_0x287ce3,_0x8e43f9={'tfuDU':function(_0x48c646,_0x4606b6){return _0x48c646===_0x4606b6;},'kYESp':'❌\x20API\x20key\x20cannot\x20be\x20empty.','ILqKz':_0x4d6c2f(0x211),'dbRLL':function(_0x323ea0,_0x4d881d){return _0x323ea0(_0x4d881d);},'pMIQS':'✅\x20API\x20key\x20saved\x20successfully.','NpVoR':function(_0x85b4d1){return _0x85b4d1();},'yuWsR':_0x4d6c2f(0x20e)};try{if(!_0x3878cf||_0x8e43f9[_0x4d6c2f(0x20f)](0x0,_0x3878cf['trim']()[_0x4d6c2f(0x1fa)]))return console[_0x4d6c2f(0x207)](_0x8e43f9[_0x4d6c2f(0x205)]),void(process[_0x4d6c2f(0x203)]=0x1);if(_0x3878cf[_0x4d6c2f(0x1fc)]()['length']<0x8)return console['error'](_0x8e43f9['ILqKz']),void(process['exitCode']=0x1);_0x8e43f9['dbRLL'](saveApiKey,_0x3878cf[_0x4d6c2f(0x1fc)]()),console[_0x4d6c2f(0x1ef)](_0x8e43f9[_0x4d6c2f(0x1ee)]),console[_0x4d6c2f(0x1ef)](_0x4d6c2f(0x206)),_0x8e43f9['NpVoR'](registerHooks),console[_0x4d6c2f(0x1ef)]('✅\x20Hooks\x20registered\x20in\x20Claude\x20Code\x20settings.'),console['log'](''),console['log'](_0x8e43f9[_0x4d6c2f(0x212)]);}catch(_0x448260){console[_0x4d6c2f(0x207)](_0x4d6c2f(0x213)+_0x448260['message']),process[_0x4d6c2f(0x203)]=0x1;}}function saveApiKey(_0xe3c5dd){const _0x5178e1=_0x287ce3,_0x20e821={'GbCxy':function(_0x2724c2,_0x19cf34,_0x508c6e){return _0x2724c2(_0x19cf34,_0x508c6e);},'ZTctP':function(_0x19c7e3,_0x4e6bca,_0x127d86,_0x1bba91){return _0x19c7e3(_0x4e6bca,_0x127d86,_0x1bba91);},'IHtRv':function(_0x578980,_0x4e22dd){return _0x578980+_0x4e22dd;}};_0x20e821[_0x5178e1(0x1fd)](mkdirSync,CONFIG_DIR,{'recursive':!0x0});let _0x1387cd={};try{_0x1387cd=JSON[_0x5178e1(0x1f2)](_0x20e821[_0x5178e1(0x1fd)](readFileSync,CONFIG_FILE,'utf-8'));}catch{}_0x1387cd['apiKey']=_0xe3c5dd,_0x20e821[_0x5178e1(0x1fb)](writeFileSync,CONFIG_FILE,_0x20e821['IHtRv'](JSON[_0x5178e1(0x1f7)](_0x1387cd,null,0x2),'\x0a'),'utf-8');}function _0x35bd(_0x346334,_0x2beef2){_0x346334=_0x346334-0x1ee;const _0x2c09a5=_0x2c09();let _0x35bdb0=_0x2c09a5[_0x346334];return _0x35bdb0;}function registerHooks(){const _0x51cebf=_0x287ce3,_0x339937={'benps':function(_0x2593b2,_0x3770ee,_0x3d0380){return _0x2593b2(_0x3770ee,_0x3d0380);},'XuZjb':function(_0xab5015){return _0xab5015();},'tUBeq':_0x51cebf(0x20d),'xrHGY':'utf-8','iMVYN':'command','eLMbr':'tokenizer-speedup','PSMfw':function(_0x1297de,_0x24897b,_0x1fceaa,_0x3d566d){return _0x1297de(_0x24897b,_0x1fceaa,_0x3d566d);}};_0x339937[_0x51cebf(0x1f4)](mkdirSync,_0x339937[_0x51cebf(0x1f4)](join,_0x339937[_0x51cebf(0x210)](homedir),_0x339937['tUBeq']),{'recursive':!0x0});let _0x130c11={};try{_0x130c11=JSON[_0x51cebf(0x1f2)](readFileSync(CLAUDE_SETTINGS_FILE,_0x339937['xrHGY']));}catch{}const _0x40f643=_0x130c11['hooks']??{};_0x40f643['UserPromptSubmit']=[{'matcher':'','hooks':[{'type':_0x51cebf(0x1f9),'command':_0x51cebf(0x201)}]}],_0x40f643[_0x51cebf(0x204)]=[{'matcher':'','hooks':[{'type':_0x339937['iMVYN'],'command':_0x339937['eLMbr'],'timeout':0xa}]}],_0x130c11['hooks']=_0x40f643,_0x339937[_0x51cebf(0x1ff)](writeFileSync,CLAUDE_SETTINGS_FILE,JSON[_0x51cebf(0x1f7)](_0x130c11,null,0x2)+'\x0a','utf-8');}export function loadApiKeyFromConfig(){const _0xd45773=_0x287ce3;try{return JSON[_0xd45773(0x1f2)](readFileSync(CONFIG_FILE,'utf-8'))[_0xd45773(0x215)]??void 0x0;}catch{return;}}function _0x2c09(){const _0x5d6e35=['yuWsR','❌\x20Setup\x20failed:\x20','82818LMjVJv','apiKey','2290016reXdCG','pMIQS','log','1YmOEYY','104wbsXlJ','parse','9757PRcUnY','benps','27608wVzkjr','9503jYXhRf','stringify','910764xdmBvU','command','length','ZTctP','trim','GbCxy','1812cKOoso','PSMfw','91259KCpcyM','tokenizer-speedup','940UOGQCb','exitCode','Stop','kYESp','⚠️\x20\x20Claude\x20Code\x20will\x20restart\x20automatically\x20to\x20load\x20the\x20plugin.\x20This\x20is\x20expected\x20behavior.','error','1158530VOTOtR','30QxuomN','config.json','12zGxPVp','.config','.claude','Setup\x20complete.\x20Please\x20restart\x20Claude\x20Code\x20to\x20activate\x20the\x20plugin.','tfuDU','XuZjb','❌\x20API\x20key\x20is\x20too\x20short\x20(minimum\x208\x20characters).'];_0x2c09=function(){return _0x5d6e35;};return _0x2c09();}
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 +1 @@
1
- function _0x1261(){const _0x19313c=['customerId','1jKNtDI','1784yRtBVH','2135910hFVEtR','1998015CVZcPu','1888116WzAmrp','subscription','6EQgheW','12DXBcsd','893815IfcOYU','1001rpZcGg','295536tHnlky','2135231Vferpy','51498TBWHPj'];_0x1261=function(){return _0x19313c;};return _0x1261();}(function(_0xe5a59,_0x4a983f){const _0x52604d=_0x163b,_0x335012=_0xe5a59();while(!![]){try{const _0x4dc4b0=-parseInt(_0x52604d(0xad))/0x1*(-parseInt(_0x52604d(0xa3))/0x2)+parseInt(_0x52604d(0xa2))/0x3+-parseInt(_0x52604d(0xa6))/0x4*(-parseInt(_0x52604d(0xa7))/0x5)+-parseInt(_0x52604d(0xa5))/0x6*(parseInt(_0x52604d(0xaa))/0x7)+parseInt(_0x52604d(0xae))/0x8*(parseInt(_0x52604d(0xab))/0x9)+-parseInt(_0x52604d(0xa1))/0xa+-parseInt(_0x52604d(0xa8))/0xb*(parseInt(_0x52604d(0xa9))/0xc);if(_0x4dc4b0===_0x4a983f)break;else _0x335012['push'](_0x335012['shift']());}catch(_0x49ad2d){_0x335012['push'](_0x335012['shift']());}}}(_0x1261,0xa1c3a));function _0x163b(_0xf83f9d,_0x5828f4){_0xf83f9d=_0xf83f9d-0xa1;const _0x1261ba=_0x1261();let _0x163b85=_0x1261ba[_0xf83f9d];return _0x163b85;}export function buildCheckoutParams(_0x4b6370){const _0x4c70f7=_0x163b,_0xbe0b80={'nBxOz':_0x4c70f7(0xa4)},_0x2201fe=[{'price':_0x4b6370['recurringPriceId'],'quantity':0x1}];return _0x4b6370['meteredPriceId']&&_0x2201fe['push']({'price':_0x4b6370['meteredPriceId']}),{'customer':_0x4b6370[_0x4c70f7(0xac)],'mode':_0xbe0b80['nBxOz'],'line_items':_0x2201fe,'success_url':_0x4b6370['successUrl'],'cancel_url':_0x4b6370['cancelUrl'],'metadata':{'tier':_0x4b6370['tier']}};}
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 +1 @@
1
- const _0x7a1162=_0x490c;function _0x8a83(){const _0x55752d=['Up\x20to\x20100K\x20tokens\x20saved/month.\x20Basic\x20dashboard.','1046580FwtBhI','109432ExQklb','TokenizerSpeedUp\x20Free','33690710jcUUrx','182RgQONK','175aZRvWa','Unlimited\x20optimization.\x20$5/mo\x20+\x2010%\x20of\x20savings\x20over\x20500K\x20tokens.','4218HZfkIu','111674kIWpnQ','1752656dRsOhF','29KwIcGv','Per-seat\x20pricing.\x20$15/mo/seat\x20+\x208%\x20of\x20savings\x20over\x201M\x20tokens.','14519898RNuodQ'];_0x8a83=function(){return _0x55752d;};return _0x8a83();}(function(_0xb058bd,_0x43d9bb){const _0x4a825a=_0x490c,_0x38bc59=_0xb058bd();while(!![]){try{const _0x468f67=-parseInt(_0x4a825a(0x1ae))/0x1*(parseInt(_0x4a825a(0x1ac))/0x2)+-parseInt(_0x4a825a(0x1b2))/0x3+parseInt(_0x4a825a(0x1b3))/0x4*(parseInt(_0x4a825a(0x1a9))/0x5)+-parseInt(_0x4a825a(0x1ab))/0x6*(-parseInt(_0x4a825a(0x1a8))/0x7)+parseInt(_0x4a825a(0x1ad))/0x8+-parseInt(_0x4a825a(0x1b0))/0x9+parseInt(_0x4a825a(0x1a7))/0xa;if(_0x468f67===_0x43d9bb)break;else _0x38bc59['push'](_0x38bc59['shift']());}catch(_0x386e71){_0x38bc59['push'](_0x38bc59['shift']());}}}(_0x8a83,0xefdea));function _0x490c(_0x510ccf,_0x20f75c){_0x510ccf=_0x510ccf-0x1a7;const _0x8a83a9=_0x8a83();let _0x490c4c=_0x8a83a9[_0x510ccf];return _0x490c4c;}export const STRIPE_CONFIG={'free':{'name':_0x7a1162(0x1b4),'description':_0x7a1162(0x1b1),'recurringPrice':0x0},'pro':{'name':'TokenizerSpeedUp\x20Pro','description':_0x7a1162(0x1aa),'recurringPrice':0x1f4,'meteredUnitAmount':0x1e},'team':{'name':'TokenizerSpeedUp\x20Team','description':_0x7a1162(0x1af),'recurringPrice':0x5dc,'meteredUnitAmount':0x18}};
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 +1 @@
1
- const _0x412ff3=_0x297e;(function(_0x74fbe7,_0x2c0686){const _0x10b410=_0x297e,_0x1e842b=_0x74fbe7();while(!![]){try{const _0x56fcf6=-parseInt(_0x10b410(0x1ea))/0x1*(-parseInt(_0x10b410(0x1df))/0x2)+parseInt(_0x10b410(0x1e4))/0x3+-parseInt(_0x10b410(0x1ed))/0x4+-parseInt(_0x10b410(0x1e9))/0x5+parseInt(_0x10b410(0x1e8))/0x6*(parseInt(_0x10b410(0x1e1))/0x7)+-parseInt(_0x10b410(0x1e0))/0x8*(parseInt(_0x10b410(0x1ee))/0x9)+-parseInt(_0x10b410(0x1eb))/0xa*(-parseInt(_0x10b410(0x1de))/0xb);if(_0x56fcf6===_0x2c0686)break;else _0x1e842b['push'](_0x1e842b['shift']());}catch(_0x34cac0){_0x1e842b['push'](_0x1e842b['shift']());}}}(_0x3744,0x898d5));import{STRIPE_CONFIG}from'./stripe-config.js';function _0x3744(){const _0x3fe7fe=['137efdnjH','20GkpUEq','elAYO','2366820TaZPvy','301122zoBnFQ','3780799fpPNff','4198BiGNdA','16mDncVf','42xNgjhx','allowance','pro','3351123WJYVCh','unitRate','no\x20subscription_item_id','meteredUnitAmount','214872bPSSUv','5424300hvkzUh'];_0x3744=function(){return _0x3fe7fe;};return _0x3744();}const TIER_LIMITS={'free':{'allowance':0x186a0,'unitRate':0x0},'pro':{'allowance':0x7a120,'unitRate':STRIPE_CONFIG[_0x412ff3(0x1e3)][_0x412ff3(0x1e7)]},'team':{'allowance':0xf4240,'unitRate':STRIPE_CONFIG['team'][_0x412ff3(0x1e7)]}};function _0x297e(_0x3da5f3,_0x4599fe){_0x3da5f3=_0x3da5f3-0x1de;const _0x3744a6=_0x3744();let _0x297e93=_0x3744a6[_0x3da5f3];return _0x297e93;}export function calculateUsageCharge(_0x3a7f3d,_0x4ecb2e){const _0x433986=_0x412ff3,_0x476360={'BIXgO':function(_0x5db2b8,_0x24b06e){return _0x5db2b8===_0x24b06e;},'OhgiL':function(_0x202b65,_0x403b34){return _0x202b65/_0x403b34;},'elAYO':function(_0xc1722c,_0x525646){return _0xc1722c*_0x525646;}},_0x152f2b=TIER_LIMITS[_0x3a7f3d];if(_0x476360['BIXgO'](0x0,_0x152f2b[_0x433986(0x1e5)]))return{'tier':_0x3a7f3d,'tokensSaved':_0x4ecb2e,'freeAllowance':_0x152f2b[_0x433986(0x1e2)],'chargeableTokens':0x0,'chargeableUnits':0x0,'unitRate':0x0,'amount':0x0};const _0x3f9474=Math['max'](0x0,_0x4ecb2e-_0x152f2b[_0x433986(0x1e2)]),_0x2e1e06=Math['ceil'](_0x476360['OhgiL'](_0x3f9474,0x186a0)),_0x34f626=_0x476360[_0x433986(0x1ec)](_0x2e1e06,_0x152f2b['unitRate']);return{'tier':_0x3a7f3d,'tokensSaved':_0x4ecb2e,'freeAllowance':_0x152f2b['allowance'],'chargeableTokens':_0x3f9474,'chargeableUnits':_0x2e1e06,'unitRate':_0x152f2b[_0x433986(0x1e5)],'amount':_0x34f626};}export function buildUsageRecord(_0xa7ce79,_0x379cde){const _0x54ee92={'SBCtb':'set','gQoiM':function(_0x29ab51,_0x5d8384){return _0x29ab51/_0x5d8384;}};return{'subscription_item':_0xa7ce79,'quantity':_0x379cde,'action':_0x54ee92['SBCtb'],'timestamp':Math['floor'](_0x54ee92['gQoiM'](Date['now'](),0x3e8))};}export function prepareUsageSync(_0x46a9ff,_0x726a01,_0x24e92f){const _0x50b5c4=_0x412ff3,_0x45a4a7={'kuMEe':function(_0x5945f8,_0x12d090,_0x3cfaf7){return _0x5945f8(_0x12d090,_0x3cfaf7);},'NRoYl':function(_0x478487,_0x53f0cb){return _0x478487===_0x53f0cb;}};if(!_0x24e92f)return{'synced':!0x1,'subscriptionItemId':'','chargeableUnits':0x0,'tier':_0x46a9ff,'error':_0x50b5c4(0x1e6)};const _0xc579b3=_0x45a4a7['kuMEe'](calculateUsageCharge,_0x46a9ff,_0x726a01);if(_0x45a4a7['NRoYl'](0x0,_0xc579b3['chargeableUnits']))return{'synced':!0x0,'subscriptionItemId':_0x24e92f,'chargeableUnits':0x0,'tier':_0x46a9ff};return _0x45a4a7['kuMEe'](buildUsageRecord,_0x24e92f,_0xc579b3['chargeableUnits']),{'synced':!0x0,'subscriptionItemId':_0x24e92f,'chargeableUnits':_0xc579b3['chargeableUnits'],'tier':_0x46a9ff};}
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 +1 @@
1
- function _0x5d9a(_0x223007,_0x1c1a68){_0x223007=_0x223007-0x164;const _0xaaf9db=_0xaaf9();let _0x5d9aa3=_0xaaf9db[_0x223007];return _0x5d9aa3;}(function(_0x5e2960,_0x42ff81){const _0xdd6391=_0x5d9a,_0x1935b6=_0x5e2960();while(!![]){try{const _0x14aab5=-parseInt(_0xdd6391(0x17f))/0x1*(parseInt(_0xdd6391(0x17d))/0x2)+parseInt(_0xdd6391(0x16a))/0x3+-parseInt(_0xdd6391(0x16d))/0x4*(-parseInt(_0xdd6391(0x175))/0x5)+parseInt(_0xdd6391(0x180))/0x6*(parseInt(_0xdd6391(0x177))/0x7)+-parseInt(_0xdd6391(0x169))/0x8+parseInt(_0xdd6391(0x164))/0x9+-parseInt(_0xdd6391(0x17a))/0xa;if(_0x14aab5===_0x42ff81)break;else _0x1935b6['push'](_0x1935b6['shift']());}catch(_0x2ecb40){_0x1935b6['push'](_0x1935b6['shift']());}}}(_0xaaf9,0xeeb0c));export function handleWebhookEvent(_0x3c9c20,_0x55bae9){const _0x4cd09a=_0x5d9a,_0x38cb5c={'ceiUa':'invoice_paid','IEDMu':'subscription_canceled','MVRQf':_0x4cd09a(0x171),'Bfwxw':_0x4cd09a(0x16c)};switch(_0x3c9c20[_0x4cd09a(0x168)]){case'invoice.paid':{const _0x399096=_0x3c9c20['data']['object'];return{'handled':!0x0,'action':_0x38cb5c['ceiUa'],'customerId':_0x399096['customer'],'subscriptionId':_0x399096[_0x4cd09a(0x165)]};}case _0x4cd09a(0x178):{const _0x40d3b4=_0x3c9c20['data']['object'],_0x4338cb={'handled':!0x0,'action':_0x4cd09a(0x17b),'customerId':_0x40d3b4[_0x4cd09a(0x17c)],'subscriptionId':_0x40d3b4['id']};return _0x55bae9&&_0x55bae9['upsert']({'id':_0x40d3b4['id'],'customerId':_0x40d3b4[_0x4cd09a(0x17c)],'status':_0x40d3b4['status']||_0x4cd09a(0x179),'tier':_0x40d3b4[_0x4cd09a(0x173)]?.[_0x4cd09a(0x17e)]||_0x4cd09a(0x16e),'currentPeriodEnd':_0x40d3b4['current_period_end']||0x0,'meteredSubscriptionItemId':extractMeteredItemId(_0x40d3b4),'updatedAt':''}),_0x4338cb;}case'customer.subscription.deleted':{const _0x2e9884=_0x3c9c20[_0x4cd09a(0x176)]['object'],_0x44e77e={'handled':!0x0,'action':_0x38cb5c['IEDMu'],'customerId':_0x2e9884[_0x4cd09a(0x17c)],'subscriptionId':_0x2e9884['id']};return _0x55bae9&&_0x55bae9[_0x4cd09a(0x16f)]({'id':_0x2e9884['id'],'customerId':_0x2e9884['customer'],'status':_0x38cb5c['MVRQf'],'tier':_0x2e9884['metadata']?.['tier']||_0x4cd09a(0x16e),'currentPeriodEnd':_0x2e9884[_0x4cd09a(0x16b)]||0x0,'updatedAt':''}),_0x44e77e;}default:return{'handled':!0x1,'action':_0x38cb5c[_0x4cd09a(0x170)]};}}function extractMeteredItemId(_0x3e77df){const _0x36bdc7=_0x5d9a,_0x5d2c6a=_0x3e77df[_0x36bdc7(0x174)];if(!_0x5d2c6a?.[_0x36bdc7(0x176)])return;const _0x51e9af=_0x5d2c6a[_0x36bdc7(0x176)][_0x36bdc7(0x172)](_0x438415=>_0x36bdc7(0x166)===_0x438415['price']?.['recurring']?.[_0x36bdc7(0x167)]);return _0x51e9af?.['id'];}function _0xaaf9(){const _0x5e07f4=['subscription_updated','customer','2rcKUCx','tier','1175906iEoyCY','32070ZYwXit','8695260iXaHKh','subscription','metered','usage_type','type','12048752uCmFtc','4010151FexDYm','current_period_end','ignored','72592kyOmpC','free','upsert','Bfwxw','canceled','find','metadata','items','340rAeeqm','data','2079GGEpAt','customer.subscription.updated','active','14647100PGhLqk'];_0xaaf9=function(){return _0x5e07f4;};return _0xaaf9();}
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 +1 @@
1
- function _0x4b50(){const _0x5e157e=['143kXTInS','6sgbCGs','835885aAAinJ','7yDZsxV','upsert','1782366UjOgsb','44010636AGPAQi','7710045lujBVy','4769384SlUBwt','4dZiyZN','values','list','900450LkvuOf','9PcSbxW','customerId','subs','122214dwxfab'];_0x4b50=function(){return _0x5e157e;};return _0x4b50();}const _0x43adee=_0x3de1;(function(_0x567ae3,_0x28a4d1){const _0x19cafb=_0x3de1,_0x1c3fd9=_0x567ae3();while(!![]){try{const _0x5d971a=parseInt(_0x19cafb(0x76))/0x1+-parseInt(_0x19cafb(0x73))/0x2*(parseInt(_0x19cafb(0x75))/0x3)+-parseInt(_0x19cafb(0x6c))/0x4*(parseInt(_0x19cafb(0x7b))/0x5)+parseInt(_0x19cafb(0x79))/0x6*(-parseInt(_0x19cafb(0x77))/0x7)+parseInt(_0x19cafb(0x6b))/0x8*(-parseInt(_0x19cafb(0x70))/0x9)+parseInt(_0x19cafb(0x6f))/0xa*(-parseInt(_0x19cafb(0x74))/0xb)+parseInt(_0x19cafb(0x7a))/0xc;if(_0x5d971a===_0x28a4d1)break;else _0x1c3fd9['push'](_0x1c3fd9['shift']());}catch(_0x41350f){_0x1c3fd9['push'](_0x1c3fd9['shift']());}}}(_0x4b50,0xbd4e4));function _0x3de1(_0x3b9621,_0x3d55d4){_0x3b9621=_0x3b9621-0x6b;const _0x4b50c9=_0x4b50();let _0x3de165=_0x4b50c9[_0x3b9621];return _0x3de165;}export class MemorySubscriptionStore{[_0x43adee(0x72)]=new Map();[_0x43adee(0x78)](_0x324b8a){_0x324b8a['updatedAt']=new Date()['toISOString'](),this['subs']['set'](_0x324b8a['id'],_0x324b8a);}['getByCustomerId'](_0x4c5ca4){const _0x143b4e=_0x43adee,_0x448b25={'dmEYD':function(_0x4ba7a8,_0x45d7f2){return _0x4ba7a8===_0x45d7f2;}};for(const _0x23626e of this[_0x143b4e(0x72)][_0x143b4e(0x6d)]())if(_0x448b25['dmEYD'](_0x23626e[_0x143b4e(0x71)],_0x4c5ca4))return _0x23626e;}['getBySubscriptionId'](_0x52a50b){return this['subs']['get'](_0x52a50b);}[_0x43adee(0x6e)](){const _0x12bd2d=_0x43adee;return[...this[_0x12bd2d(0x72)]['values']()];}}
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,68 +1,37 @@
1
1
  {
2
- "version": "0.7.3",
3
- "build": "2026-03-05T06:34:12.842Z",
2
+ "version": "0.7.4",
3
+ "build": "2026-03-05T07:28:48.533Z",
4
4
  "files": {
5
- "cli/analyze.d.ts": "sha256:520ab064dfdf8a4fa95f73d74d4f96add4d60d8a22a32f622f68c4ffbf8e9785",
6
- "cli/analyze.js": "sha256:c56e765aeb9d9883423746f1e251918953d2bdeed3be0e06ef806f4fb9b33466",
7
- "cli/config-cmd.d.ts": "sha256:eeae10f481e1ef2f3c6573d52bbbe1bc6994895a34c5dfc9a7c4e9f89db3460d",
8
- "cli/config-cmd.js": "sha256:9c6082285eec686141f9a0fb6793ef9d55c12279874605f604f988a4848fcbd0",
9
- "cli/index.d.ts": "sha256:2e031d7fa827aeb1cdcdb13aa1a73a6ec1e3e1e0f6d27a874bfc7f69e27e5037",
10
- "cli/index.js": "sha256:4533201fe3dbe6910b65f08327da5f897b4c5170394be5f65b3d5b98dea19876",
11
- "cli/setup-cmd.d.ts": "sha256:5fb0b00fd2b57e681e590153ad8ec33b9619179bfbed635c5ed01c94b232852d",
12
- "cli/setup-cmd.js": "sha256:3b14f349fa7d58eb0cd4e1915bedd4a7fc7ea15aa8ee7bc55651ea507516c6e2",
13
- "cloud/stripe-checkout.d.ts": "sha256:ce58292aa395baf9068d819c4feb5cd29781a05a5f6977024f27b8ac0c839d1e",
14
- "cloud/stripe-checkout.js": "sha256:c72efa5ccb14a3a612a99edd60fa22937d81e2e958f0a16b9c1e6204bb45554a",
15
- "cloud/stripe-config.d.ts": "sha256:b5e4ef4c8d722b239ef13008bd216d3c56291e12ff82e3e9b9c494cd2303d656",
16
- "cloud/stripe-config.js": "sha256:7d55fb8e78abace49aa5045f766e1a484ee524085ddd57153aff7234891a0733",
17
- "cloud/stripe-usage.d.ts": "sha256:134415ce475007c2ed196305ab91489b688d852dda3cbf2f240d1d860d24bd2c",
18
- "cloud/stripe-usage.js": "sha256:1debbfe5306cde51dee7a5edba80c9f8499d71c1d0383d8be4a0f7454575dfa1",
19
- "cloud/stripe-webhooks.d.ts": "sha256:cca005cebcc8f1e916e975d6adef5ad15d09df4249facbb718cbc3f831ff84ab",
20
- "cloud/stripe-webhooks.js": "sha256:b254c4b7b63c7f6554ecf7d78d0fe054a5645facb0ecb74ef95e020d875a00ca",
21
- "cloud/subscription-store.d.ts": "sha256:6e6ba1b28d7b58131aeebd96051dae42a1e9fb5069e48a7e5d042268d5b417ec",
22
- "cloud/subscription-store.js": "sha256:8b1a4e65456fd06d6c7248e99e51d7b44e5f51e0ce6ceb15505f800112e62774",
23
- "plugin/cli.d.ts": "sha256:43e818adf60173644896298637f47b01d5819b17eda46eaa32d0c7d64724d012",
24
- "plugin/cli.js": "sha256:f23065239f79004b9c388e29fecef122bd7dd8a41d334b93873cadff4cdfbbde",
25
- "plugin/config-loader.d.ts": "sha256:d55c9c53c9df25188abd6af71c217bb4a3feee89960ea411e174b10c456177da",
26
- "plugin/config-loader.js": "sha256:8c21ef07945ee9beca96d4e605d0ef9e4a4b45be1e22ec6b3cf85e1ba7dadeb8",
27
- "plugin/context-compressor.d.ts": "sha256:c14912ec73df27f3c49abc84edc510edee126956eb197c446863309348a03412",
28
- "plugin/context-compressor.js": "sha256:1b1397a23b8739a812decf6ac394823b41a35fb40b9138c523c9d63d29ab899c",
29
- "plugin/hook-dispatcher.d.ts": "sha256:ee5a5e5ac92dd5ca872b76611a4531fa074cb077e417f8bc9f97cf750e87aced",
30
- "plugin/hook-dispatcher.js": "sha256:66609b7720432e9780db545eab12f28c915f39e071e4fc9ded90df496b07c845",
31
- "plugin/metering-client.d.ts": "sha256:f0be7100119afdfdb557fdfd4bab872e53d2d472205d8f85fa7241e457c59c19",
32
- "plugin/metering-client.js": "sha256:e14cd43e259cf84f9f3580188c58d3e2415461fa820b3ec258d0fe5725ed7a79",
33
- "plugin/metrics-collector.d.ts": "sha256:91a0b593ff1f9dfbc7f02473ac250e2e875c5ac774000811490c1c1e46987c09",
34
- "plugin/metrics-collector.js": "sha256:7a0e8291002bf007199abf68183c52ae2311084e7d80355e61ceb4dc7576959c",
35
- "plugin/onboarding.d.ts": "sha256:b907ca6fc63a732f28a3c173c4a79e42e84971a0efe7cde39c2d9767376a97b6",
36
- "plugin/onboarding.js": "sha256:0426833434cd7da9cc80bfadfae1556adab6fdf8997d3998f06f4e63a68b0177",
37
- "plugin/precompact-handler.d.ts": "sha256:52b1570601955ed1aa26541f651e3f45fde21ec6ce8042001dd0ac2fab253ccd",
38
- "plugin/precompact-handler.js": "sha256:6f159b359f608cd28caa28104815fdb5984a490ca0994483d8e47ce580ab5b2b",
39
- "plugin/report.d.ts": "sha256:8027321ede260c9302dfd19c73cf48e334595350fee14485475e50008f74645f",
40
- "plugin/report.js": "sha256:11c6486b65fdb8e50d1f55084a7b8ccea0b8110dccbd14275d7a072675521f1c",
41
- "plugin/rule-analytics-store.d.ts": "sha256:710a52c82dc6e4b2998cdd10a51083be8103b39b15b6d6d37ac8272a58e854ec",
42
- "plugin/rule-analytics-store.js": "sha256:842aca0d3ec5ff631af88dbba5d1d235d32a74d3f8101b519e0fb9d5808a0b86",
43
- "plugin/rule-analytics.d.ts": "sha256:cdeffbbc424b5452f57ca697b9c5e5ed0264efc0d56342ce476bd591b564aff3",
44
- "plugin/rule-analytics.js": "sha256:b8e0035fb36ab0b1f82a7872ecbf9cb44700f358c048903a318e3deb54f1c4f9",
45
- "plugin/rule-engine.d.ts": "sha256:e9e9e0c8af47ecf1c039a6db15a656ef3cd28e4a7521204d4eaf076a15ee2cc8",
46
- "plugin/rule-engine.js": "sha256:c55d2b239ea9fc824f2c111f68e57350fe8ad17bf4edfa2c232cd5bb5fa11c23",
47
- "plugin/rule-sharing.d.ts": "sha256:8fc87926ec3752c2e0d21274c98ef3bb21f2a10665eb5536b726ea8d94479a79",
48
- "plugin/rule-sharing.js": "sha256:d4c1a3ef21b6625318e656d0960ec3936b2b660c3f54d980df17b449919fbca5",
49
- "plugin/rule-suggest.d.ts": "sha256:4d12dac9df44bb3adf5b5e9456e683a42625e8b28712c80aa62292a5b3d40be9",
50
- "plugin/rule-suggest.js": "sha256:fb6c57a1b305812bf0ee3d6024891fdf2d1b3e08c80c3fddaca0a4d14b1ab661",
51
- "plugin/session-start.d.ts": "sha256:36cb2cc2a7e09195e650aa7a96b8ae420b612c23907fa35723501d27600d4ff1",
52
- "plugin/session-start.js": "sha256:f0f8392071bf31c9273fab674e25a53c1e1ec83a7301f0f508344670e732ee63",
53
- "plugin/smart-context.d.ts": "sha256:cace6c764ef3cf1a18f87f09ad4650abe69322b7629cd8383a7cc775f7f81be1",
54
- "plugin/smart-context.js": "sha256:7004420859104fdf92f2a6603924b6d1e7984a10c871a69f90c6f897557ec3c1",
55
- "shared/license.d.ts": "sha256:4778f87bbd80b5033479e03556a7e755aa7787707f3b875aa8795c4f1e97ee96",
56
- "shared/license.js": "sha256:3d220e3b09eadec906caaeda93726bc601ea9a75eb92cd7c3fdc294c53cdb22c",
57
- "shared/providers/claude-provider.d.ts": "sha256:58d95cac3a61871425760a3ad7cd4b7749737841d49f84f70e933c52ed297f32",
58
- "shared/providers/claude-provider.js": "sha256:614f01440ddb381dcc47240a0b29436f2716722a5788300a65196c7653f83c0f",
59
- "shared/providers/openai-provider.d.ts": "sha256:2114b5a1dcc4c03c5c26094d941189ffe4d6cb26a9ecc7e102830eb8bcab3cf7",
60
- "shared/providers/openai-provider.js": "sha256:20ae4eaa066a8580974951f3886b021451f33be18b843a480b1f02f367350b66",
61
- "shared/token-counter.d.ts": "sha256:d7e1bfe11fb4893dd936057db98fb4c9e1ee95c3d13b2bc24309fc471512f3b5",
62
- "shared/token-counter.js": "sha256:50f9718629994f2f3e96fcf656025ed3ba1fcaaf74ffc8487095705fafa16e98",
63
- "shared/token-provider.d.ts": "sha256:f3728d375158e79fef3055f56dc247395101ecee4c21911997668de3607aea0e",
64
- "shared/token-provider.js": "sha256:9ddea82d958e1b0fd69d25f191bccb6f0e048072600bd69640db90bed2fb3acb",
65
- "shared/types.d.ts": "sha256:20600b79ba665bdd2200ab8390784c37a508f29b23f1967a4662b86de8baa122",
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",
66
35
  "shared/types.js": "sha256:56e1b0c10087ee6ff7f949b15d1ef63cb11228ff93a159a52f9ad7ef851e4e02"
67
36
  }
68
37
  }
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const _0x20c7b2=_0x2443;(function(_0x42bfdc,_0x1201af){const _0x95bb29=_0x2443,_0x394175=_0x42bfdc();while(!![]){try{const _0x3688ab=parseInt(_0x95bb29(0x1e2))/0x1+-parseInt(_0x95bb29(0x1e5))/0x2*(-parseInt(_0x95bb29(0x202))/0x3)+-parseInt(_0x95bb29(0x204))/0x4*(-parseInt(_0x95bb29(0x1f7))/0x5)+parseInt(_0x95bb29(0x1f3))/0x6*(parseInt(_0x95bb29(0x1e9))/0x7)+parseInt(_0x95bb29(0x1fa))/0x8+-parseInt(_0x95bb29(0x1e1))/0x9+parseInt(_0x95bb29(0x1f5))/0xa*(-parseInt(_0x95bb29(0x1fe))/0xb);if(_0x3688ab===_0x1201af)break;else _0x394175['push'](_0x394175['shift']());}catch(_0x739102){_0x394175['push'](_0x394175['shift']());}}}(_0x5d92,0x8e497));import{resolve}from'node:path';function _0x2443(_0x42c9d2,_0x47ce8d){_0x42c9d2=_0x42c9d2-0x1df;const _0x5d9270=_0x5d92();let _0x2443df=_0x5d9270[_0x42c9d2];return _0x2443df;}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);}async function main(){const _0x5cca1c=_0x2443,_0x30ffcc={'PEsjc':_0x5cca1c(0x1ee),'tOzOw':function(_0x520e2c,_0xe2a711,_0x40e074){return _0x520e2c(_0xe2a711,_0x40e074);},'JgXRH':function(_0xd439f5,_0x148971){return _0xd439f5(_0x148971);},'ieiBi':_0x5cca1c(0x1df),'pbotQ':function(_0x1134c5,_0x38b51b){return _0x1134c5(_0x38b51b);},'HQWsB':_0x5cca1c(0x1f6),'qxmnL':function(_0x5264df,_0x2e6e84){return _0x5264df>_0x2e6e84;},'pPsuE':_0x5cca1c(0x1ed),'lrmnE':_0x5cca1c(0x1fc)},_0x5af603=[];for await(const _0x4f0688 of process['stdin'])_0x5af603[_0x5cca1c(0x1fd)](_0x4f0688);const _0x3123b9=Buffer[_0x5cca1c(0x1f1)](_0x5af603)['toString'](_0x30ffcc[_0x5cca1c(0x1fb)]);let _0x4e9210;try{_0x4e9210=JSON[_0x5cca1c(0x1e0)](_0x3123b9);}catch{process[_0x5cca1c(0x1f4)](0x0);}const _0xff0e23=_0x4e9210['cwd']||process[_0x5cca1c(0x1ef)](),_0x26cb12=_0x4e9210[_0x5cca1c(0x201)];let _0xb37732;try{_0xb37732=loadConfig(_0xff0e23);}catch{const _0x7c36c3=process.env.CLAUDE_PLUGIN_ROOT||_0x30ffcc['tOzOw'](resolve,import.meta.dirname,_0x5cca1c(0x1e8));_0xb37732=_0x30ffcc['JgXRH'](loadConfig,_0x7c36c3);}const _0x53392a=new HookDispatcher(_0xb37732,_0xff0e23,_0x4e9210[_0x5cca1c(0x203)]);let _0x25b7fd={};switch(_0x26cb12){case _0x30ffcc['ieiBi']:_0x25b7fd=_0x30ffcc[_0x5cca1c(0x1e4)](buildSessionStartContext,{'cwd':_0xff0e23});break;case _0x30ffcc[_0x5cca1c(0x200)]:{const _0x228a81=_0x53392a[_0x5cca1c(0x1f0)](_0x4e9210),_0x367393=buildSmartContext({'prompt':_0x4e9210[_0x5cca1c(0x1e6)]||'','cwd':_0xff0e23}),_0x26e6b4=[_0x228a81['additionalContext'],_0x367393['additionalContext']]['filter'](Boolean);_0x25b7fd=_0x30ffcc[_0x5cca1c(0x1ff)](_0x26e6b4['length'],0x0)?{'additionalContext':_0x26e6b4['join']('\x0a')}:{};break;}case _0x30ffcc['pPsuE']:_0x25b7fd=_0x53392a[_0x5cca1c(0x1f2)](_0x4e9210);break;case _0x30ffcc[_0x5cca1c(0x1e3)]:{const _0x5312ff=_0x53392a['handleSessionStop'](),_0xa37d75=new MeteringClient(_0xb37732[_0x5cca1c(0x1eb)][_0x5cca1c(0x1e7)]),_0x1ef567=_0x30ffcc[_0x5cca1c(0x1f9)](buildMeterPayload,_0x5312ff,{'provider':_0xb37732['provider'],'model':_0xb37732['model']});await _0xa37d75['send'](_0x1ef567);break;}}process[_0x5cca1c(0x1ec)]['write'](JSON[_0x5cca1c(0x1f8)](_0x25b7fd)),process[_0x5cca1c(0x1f4)](0x0);}main()[_0x20c7b2(0x1ea)](()=>process[_0x20c7b2(0x1f4)](0x0));function _0x5d92(){const _0x55c31a=['pbotQ','327766XMWcpD','prompt','endpoint','../..','30996UFoLRC','catch','metering','stdout','PreCompact','utf-8','cwd','handleUserPromptSubmit','concat','handlePreCompact','306suXDFB','exit','290Otpqca','UserPromptSubmit','384880BSDomn','stringify','tOzOw','1812064dXhqBu','PEsjc','Stop','push','632357MhdNAC','qxmnL','HQWsB','hook_event_name','21UsSKqy','session_id','8pIoCHJ','SessionStart','parse','2918574sLIbfz','820747PEOlYJ','lrmnE'];_0x5d92=function(){return _0x55c31a;};return _0x5d92();}
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));
@@ -1 +1 @@
1
- (function(_0xb04fea,_0x9f6c09){const _0x1ea7be=_0x5c82,_0x3f2e61=_0xb04fea();while(!![]){try{const _0x3853ed=parseInt(_0x1ea7be(0xc1))/0x1*(parseInt(_0x1ea7be(0xb4))/0x2)+-parseInt(_0x1ea7be(0xca))/0x3+-parseInt(_0x1ea7be(0xbb))/0x4+-parseInt(_0x1ea7be(0xc2))/0x5+-parseInt(_0x1ea7be(0xcb))/0x6+-parseInt(_0x1ea7be(0xc4))/0x7*(-parseInt(_0x1ea7be(0xbd))/0x8)+parseInt(_0x1ea7be(0xc6))/0x9*(parseInt(_0x1ea7be(0xb6))/0xa);if(_0x3853ed===_0x9f6c09)break;else _0x3f2e61['push'](_0x3f2e61['shift']());}catch(_0x3aebef){_0x3f2e61['push'](_0x3f2e61['shift']());}}}(_0x2e0c,0x4df08));import{readFileSync}from'node:fs';function _0x5c82(_0x560e2e,_0x4adde9){_0x560e2e=_0x560e2e-0xb2;const _0x2e0c00=_0x2e0c();let _0x5c821e=_0x2e0c00[_0x560e2e];return _0x5c821e;}import{join}from'node:path';import _0x184a4e 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',DEFAULT_LIMITS={'max_injected_tokens':0xfa0,'max_file_tokens':0x5dc,'compress_above':0x320},DEFAULT_METERING={'endpoint':'https://api.simosphere.ai/v1/meter','batch_interval':0x3c,'send_content':!0x1};function _0x2e0c(){const _0x196e9d=['459546pmPFZJ','gFKBq','60xLoQtv','TusSg','join','number','load','2186120sFkoLq','gpt-4o','1867120KFgzlX','XFjaS','isArray','claude-sonnet-4-20250514','1uzCLvB','243370Etmhno','PCCRs','7xHtpzQ','Unknown\x20provider:\x20','1018287wdJUjw','claude','.\x20Known:\x20','KOTYX','414840dkBvQC','535782gurJTg','context_limits','version'];_0x2e0c=function(){return _0x196e9d;};return _0x2e0c();}export function parseConfig(_0xec588){const _0x251e56=_0x5c82,_0x4f786c={'Owejz':function(_0x41bda2,_0x5d23e5){return _0x41bda2!=_0x5d23e5;},'cxkry':'Invalid\x20config:\x20missing\x20or\x20invalid\x20\x22version\x22\x20field','KOTYX':_0x251e56(0xc7),'wYkEg':function(_0x296f6d,_0x573969){return _0x296f6d===_0x573969;},'TusSg':_0x251e56(0xc0),'PCCRs':function(_0x333c03){return _0x333c03();}},_0x5364bd=_0x184a4e[_0x251e56(0xba)](_0xec588);if(!_0x5364bd||_0x4f786c['Owejz'](_0x251e56(0xb9),typeof _0x5364bd['version']))throw new Error(_0x4f786c['cxkry']);const _0x53481b=_0x5364bd['provider']??_0x4f786c['KOTYX'],_0x1ac2a0=_0x5364bd['model']??(_0x4f786c['wYkEg'](_0x4f786c[_0x251e56(0xc9)],_0x53481b)?_0x4f786c[_0x251e56(0xb7)]:_0x251e56(0xbc)),_0x83eed4=_0x4f786c[_0x251e56(0xc3)](listProviders);if(!_0x83eed4['includes'](_0x53481b))throw new Error(_0x251e56(0xc5)+_0x53481b+_0x251e56(0xc8)+_0x83eed4[_0x251e56(0xb8)](',\x20'));const _0x467392=Array[_0x251e56(0xbf)](_0x5364bd['rules'])?_0x5364bd['rules']:[],_0x4b2872=_0x5364bd[_0x251e56(0xb2)]??DEFAULT_LIMITS,_0x90f1a5=_0x5364bd['metering']??DEFAULT_METERING;return{'version':_0x5364bd[_0x251e56(0xb3)],'provider':_0x53481b,'model':_0x1ac2a0,'rules':_0x467392,'context_limits':_0x4b2872,'metering':_0x90f1a5};}export function loadConfigFromString(_0x49d9bf){return parseConfig(_0x49d9bf);}export function loadConfig(_0x234b11){const _0x50584a=_0x5c82,_0x5753d5={'gFKBq':function(_0x3a8188,_0x568301){return _0x3a8188(_0x568301);},'XFjaS':function(_0x2b85c2,_0x13ff98,_0x350616){return _0x2b85c2(_0x13ff98,_0x350616);}},_0x2bdb21=join(_0x234b11,CONFIG_FILENAME);return _0x5753d5[_0x50584a(0xb5)](parseConfig,_0x5753d5[_0x50584a(0xbe)](readFileSync,_0x2bdb21,'utf-8'));}
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 +1 @@
1
- (function(_0x467bd2,_0x57128a){const _0xfa8c35=_0x5901,_0x1457ba=_0x467bd2();while(!![]){try{const _0x17c292=parseInt(_0xfa8c35(0x16a))/0x1*(parseInt(_0xfa8c35(0x17b))/0x2)+parseInt(_0xfa8c35(0x179))/0x3*(parseInt(_0xfa8c35(0x17d))/0x4)+parseInt(_0xfa8c35(0x174))/0x5*(-parseInt(_0xfa8c35(0x17c))/0x6)+-parseInt(_0xfa8c35(0x170))/0x7+parseInt(_0xfa8c35(0x16e))/0x8*(parseInt(_0xfa8c35(0x172))/0x9)+parseInt(_0xfa8c35(0x177))/0xa+-parseInt(_0xfa8c35(0x17a))/0xb*(parseInt(_0xfa8c35(0x169))/0xc);if(_0x17c292===_0x57128a)break;else _0x1457ba['push'](_0x1457ba['shift']());}catch(_0x1656bd){_0x1457ba['push'](_0x1457ba['shift']());}}}(_0x43f7,0xc22ff));import{countTokens}from'../shared/token-counter.js';export function compressContext(_0x25bedf,_0x1242b7){const _0x5a5976=_0x5901,_0x4ce6ce={'CskWc':function(_0x29b6ff,_0x2b0154){return _0x29b6ff<=_0x2b0154;},'bfhFP':function(_0x429366,_0x320c37){return _0x429366>_0x320c37;},'NLlVD':function(_0x1dcd11,_0x1f02c8){return _0x1dcd11+_0x1f02c8;},'iekOt':function(_0x5ef270,_0x2adda2){return _0x5ef270-_0x2adda2;},'FWivX':function(_0x2bad38,_0x80bd1c){return _0x2bad38(_0x80bd1c);},'CToKQ':function(_0x2adc6b,_0x519e9a){return _0x2adc6b+_0x519e9a;},'zRTfX':function(_0xe0009b,_0x17355a){return _0xe0009b+_0x17355a;},'pAOSm':function(_0x25527d,_0x4d7194){return _0x25527d+_0x4d7194;},'PXaTN':_0x5a5976(0x176),'bVNQd':'\x20→\x20','speeO':'\x20Token]'};if(!_0x25bedf)return{'text':'','originalTokens':0x0,'compressedTokens':0x0,'wasTruncated':!0x1};const _0xf99e67=countTokens(_0x25bedf);if(_0x4ce6ce['CskWc'](_0xf99e67,_0x1242b7))return{'text':_0x25bedf,'originalTokens':_0xf99e67,'compressedTokens':_0xf99e67,'wasTruncated':!0x1};const _0x22755c=_0x25bedf['split']('\x0a\x0a');let _0x500ed7='',_0x3977e0=0x0;for(const _0x27e8c3 of _0x22755c){const _0x46f49c=_0x500ed7?_0x500ed7+'\x0a\x0a'+_0x27e8c3:_0x27e8c3,_0x5aca95=countTokens(_0x46f49c);if(_0x4ce6ce[_0x5a5976(0x171)](_0x5aca95,_0x1242b7))break;_0x500ed7=_0x46f49c,_0x3977e0=_0x5aca95;}if(!_0x500ed7&&_0x4ce6ce[_0x5a5976(0x171)](_0x22755c[_0x5a5976(0x173)],0x0)){const _0xcb9ba7=_0x22755c[0x0][_0x5a5976(0x16b)](/\s+/);let _0x5d597b='';for(const _0x2ffb8e of _0xcb9ba7){const _0x496c7d=_0x5d597b?_0x4ce6ce['NLlVD'](_0x5d597b+'\x20',_0x2ffb8e):_0x2ffb8e;if(countTokens(_0x496c7d)>_0x4ce6ce['iekOt'](_0x1242b7,0x5))break;_0x5d597b=_0x496c7d;}_0x500ed7=_0x5d597b,_0x3977e0=_0x4ce6ce['FWivX'](countTokens,_0x500ed7);}const _0xa5c046=_0x4ce6ce[_0x5a5976(0x16d)](_0x4ce6ce[_0x5a5976(0x175)](_0x4ce6ce['pAOSm'](_0x500ed7,_0x4ce6ce[_0x5a5976(0x16f)]),_0xf99e67),_0x4ce6ce[_0x5a5976(0x168)])+_0x3977e0+_0x4ce6ce['speeO'];return{'text':_0xa5c046,'originalTokens':_0xf99e67,'compressedTokens':countTokens(_0xa5c046),'wasTruncated':!0x0};}function _0x5901(_0x40b4a3,_0x250e21){_0x40b4a3=_0x40b4a3-0x168;const _0x43f739=_0x43f7();let _0x5901ab=_0x43f739[_0x40b4a3];return _0x5901ab;}function _0x43f7(){const _0x3f7430=['zRTfX','\x0a\x0a[...\x20gekuerzt,\x20','6078580KayEZo','JNkeE','12cagdXt','44kNiKiP','802UPDyTr','106494XCoude','900088WbiNaE','bVNQd','1497480kWwIJy','53arwvci','split','floor','CToKQ','8hiwsJI','PXaTN','6215937nAQMfV','bfhFP','11950245YFJdKC','length','190BeSFGx'];_0x43f7=function(){return _0x3f7430;};return _0x43f7();}export function compressContextBudget(_0x3ef7a7,_0x7a1c03){const _0x5934f5=_0x5901,_0x187345={'JNkeE':function(_0x20f234,_0x4da418){return _0x20f234/_0x4da418;}},_0x46bc08=Math[_0x5934f5(0x16c)](_0x187345[_0x5934f5(0x178)](_0x7a1c03,Math['max'](_0x3ef7a7['length'],0x1)));return _0x3ef7a7['map'](({label:_0x4085c3,text:_0x2a14a0})=>({'label':_0x4085c3,'result':compressContext(_0x2a14a0,_0x46bc08)}));}
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 +1 @@
1
- const _0x25abab=_0x5adb;function _0x5adb(_0x30eb72,_0x264b8f){_0x30eb72=_0x30eb72-0x172;const _0x214d2d=_0x214d();let _0x5adbaf=_0x214d2d[_0x30eb72];return _0x5adbaf;}(function(_0x8c71ea,_0x4e3b32){const _0x1966fb=_0x5adb,_0x211e11=_0x8c71ea();while(!![]){try{const _0x586718=parseInt(_0x1966fb(0x193))/0x1+-parseInt(_0x1966fb(0x18c))/0x2+-parseInt(_0x1966fb(0x17b))/0x3+parseInt(_0x1966fb(0x175))/0x4*(parseInt(_0x1966fb(0x194))/0x5)+parseInt(_0x1966fb(0x172))/0x6*(-parseInt(_0x1966fb(0x186))/0x7)+-parseInt(_0x1966fb(0x187))/0x8*(parseInt(_0x1966fb(0x17e))/0x9)+-parseInt(_0x1966fb(0x173))/0xa*(-parseInt(_0x1966fb(0x192))/0xb);if(_0x586718===_0x4e3b32)break;else _0x211e11['push'](_0x211e11['shift']());}catch(_0x5b3459){_0x211e11['push'](_0x211e11['shift']());}}}(_0x214d,0x1d245));import{RuleEngine}from'./rule-engine.js';import{MetricsCollector}from'./metrics-collector.js';function _0x214d(){const _0x141240=['load','join','totalCompressedTokens','text','handleSessionStop','400737oJpMqE','min','trigger','153nTMiGR','\x20Token)','max_injected_tokens','push','projectRoot','engine','hook_event_name',']\x20Relevanter\x20Kontext:\x20','1099tLqCmd','15656MdKuSw','record','getSummary','prompt','VDndv','374688ipFLUn','tYMBe','summary_only','collector','limits','now','99TzTcSb','132745JMWway','265mNaiEq','user','handlePreCompact','map','12ODFwHg','118210zuTNTR','session-','17716dumegT'];_0x214d=function(){return _0x141240;};return _0x214d();}import{compressContext}from'./context-compressor.js';import{prioritizeContext}from'./precompact-handler.js';import{countTokens}from'../shared/token-counter.js';export class HookDispatcher{['engine'];[_0x25abab(0x18f)];[_0x25abab(0x182)];constructor(_0x4b59f3,_0x5562ef,_0x3eba3a){const _0x1f85f7=_0x25abab;this['engine']=new RuleEngine(_0x4b59f3),this[_0x1f85f7(0x182)]=_0x5562ef,this[_0x1f85f7(0x18f)]=new MetricsCollector(_0x5562ef,_0x3eba3a||_0x1f85f7(0x174)+Date[_0x1f85f7(0x191)]());}['handleUserPromptSubmit'](_0x1c051c){const _0x52e7f9=_0x25abab,_0xb9f5fd={'Tbxkx':function(_0x39410b,_0x36efe2){return _0x39410b===_0x36efe2;},'vmxLL':function(_0x34862e,_0x2aedcf){return _0x34862e(_0x2aedcf);},'VDndv':function(_0x16503b,_0x127b43){return _0x16503b(_0x127b43);},'tYMBe':function(_0x35576e,_0x54200e){return _0x35576e+_0x54200e;}},_0x536ef6=_0x1c051c['prompt']||'',_0x51d91c=this[_0x52e7f9(0x183)]['match'](_0x536ef6);if(_0xb9f5fd['Tbxkx'](0x0,_0x51d91c['length'])){const _0x34480d=countTokens(_0x536ef6);return this[_0x52e7f9(0x18f)]['record']({'hook_event':_0x1c051c[_0x52e7f9(0x184)],'baseline_tokens':_0x34480d,'optimized_tokens':_0x34480d,'rule_matched':null}),{};}const _0x2cb53b=[],_0x53d08e=[];for(const _0x4436fc of _0x51d91c)_0x53d08e['push'](_0x4436fc[_0x52e7f9(0x17d)][0x0]),_0x4436fc[_0x52e7f9(0x18e)]?_0x2cb53b['push']('['+_0x4436fc['trigger'][0x0]+']\x20Fuer\x20Details:\x20'+_0x4436fc[_0x52e7f9(0x176)]+'\x20laden.'):_0x2cb53b[_0x52e7f9(0x181)]('['+_0x4436fc[_0x52e7f9(0x17d)][0x0]+_0x52e7f9(0x185)+_0x4436fc[_0x52e7f9(0x176)]+'\x20(max\x20'+(_0x4436fc['max_tokens']||this[_0x52e7f9(0x183)][_0x52e7f9(0x190)]['max_file_tokens'])+_0x52e7f9(0x17f));let _0x2f4f1c=_0x2cb53b[_0x52e7f9(0x177)]('\x0a');const _0x3b666f=this[_0x52e7f9(0x183)][_0x52e7f9(0x190)]['compress_above'];_0x3b666f>0x0&&(_0x2f4f1c=compressContext(_0x2f4f1c,_0x3b666f)[_0x52e7f9(0x179)]);const _0x3b1697=_0xb9f5fd['vmxLL'](countTokens,_0x536ef6),_0x3cdd06=_0xb9f5fd[_0x52e7f9(0x18b)](countTokens,_0x2f4f1c),_0x42aa64=_0x3b1697+this[_0x52e7f9(0x183)]['limits'][_0x52e7f9(0x180)],_0x24b6ec=_0xb9f5fd[_0x52e7f9(0x18d)](_0x3b1697,Math[_0x52e7f9(0x17c)](_0x3cdd06,this[_0x52e7f9(0x183)]['limits'][_0x52e7f9(0x180)]));return this['collector']['record']({'hook_event':_0x1c051c['hook_event_name'],'baseline_tokens':_0x42aa64,'optimized_tokens':_0x24b6ec,'rule_matched':_0x53d08e['join']('+')}),{'additionalContext':_0x2f4f1c};}[_0x25abab(0x196)](_0x7dcdbf){const _0xe69550=_0x25abab,_0xa29d55={'gUatK':function(_0x4d4dd3,_0x5691aa){return _0x4d4dd3===_0x5691aa;}},_0x193464=[];if(_0x7dcdbf[_0xe69550(0x18a)]&&_0x193464[_0xe69550(0x181)]({'role':_0xe69550(0x195),'content':_0x7dcdbf[_0xe69550(0x18a)],'turnIndex':0x0}),_0xa29d55['gUatK'](0x0,_0x193464['length']))return{};const _0x2b8c84=prioritizeContext(_0x193464,this['engine']['limits']),_0x767583=_0x2b8c84['prioritized'][_0xe69550(0x197)](_0xc0f1af=>_0xc0f1af['content'])['join']('\x0a\x0a');return this[_0xe69550(0x18f)][_0xe69550(0x188)]({'hook_event':_0x7dcdbf[_0xe69550(0x184)],'baseline_tokens':_0x2b8c84['totalOriginalTokens'],'optimized_tokens':_0x2b8c84[_0xe69550(0x178)],'rule_matched':null}),{'additionalContext':_0x767583};}[_0x25abab(0x17a)](){const _0x1f5d29=_0x25abab;return this[_0x1f5d29(0x18f)]['flush'](),this['collector']['getSummary']();}['getSessionSummary'](){const _0x2abab4=_0x25abab;return this['collector'][_0x2abab4(0x189)]();}}
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 +1 @@
1
- const _0x26ff70=_0x46be;function _0x28bc(){const _0x458a50=['Bearer\x20','endpoint','473860XUrUid','send','5qVfwrv','2193490Knezda','azCQK','35483074HHksrC','total_baseline','Stop','4046217zusfHc','3041344hHpHjJ','application/json','provider','team_id','2484440KSgNNl','UXNDU','45KWjctr','6mGgbGq','6255HCrWKB','244cCzUfS','no_endpoint','Fgeax','stringify'];_0x28bc=function(){return _0x458a50;};return _0x28bc();}(function(_0x2eec6b,_0x441e65){const _0x410e4c=_0x46be,_0x1b68fe=_0x2eec6b();while(!![]){try{const _0x138eac=parseInt(_0x410e4c(0x1f2))/0x1*(parseInt(_0x410e4c(0x1f0))/0x2)+-parseInt(_0x410e4c(0x1e9))/0x3*(-parseInt(_0x410e4c(0x1ea))/0x4)+parseInt(_0x410e4c(0x1e5))/0x5+parseInt(_0x410e4c(0x1e8))/0x6*(parseInt(_0x410e4c(0x1e0))/0x7)+parseInt(_0x410e4c(0x1e1))/0x8+parseInt(_0x410e4c(0x1e7))/0x9*(parseInt(_0x410e4c(0x1f3))/0xa)+-parseInt(_0x410e4c(0x1f5))/0xb;if(_0x138eac===_0x441e65)break;else _0x1b68fe['push'](_0x1b68fe['shift']());}catch(_0x5bc6fa){_0x1b68fe['push'](_0x1b68fe['shift']());}}}(_0x28bc,0x9bbed));export function buildMeterPayload(_0x179fde,_0x4bda4d){const _0x1da60c=_0x46be;return{'session_id':_0x179fde['session_id'],'tokens_saved':_0x179fde['total_delta'],'baseline_tokens':_0x179fde[_0x1da60c(0x1de)],'optimized_tokens':_0x179fde['total_optimized'],'hook_event':_0x1da60c(0x1df),'provider':_0x4bda4d[_0x1da60c(0x1e3)],'model':_0x4bda4d['model'],'team_id':_0x4bda4d[_0x1da60c(0x1e4)]??''};}function _0x46be(_0x27e91c,_0x4ec330){_0x27e91c=_0x27e91c-0x1de;const _0x28bc25=_0x28bc();let _0x46be7e=_0x28bc25[_0x27e91c];return _0x46be7e;}export class MeteringClient{['endpoint'];constructor(_0x11965e){this['endpoint']=_0x11965e;}async[_0x26ff70(0x1f1)](_0x107152){const _0x53a8fa=_0x26ff70,_0x46a09d={'KADWl':_0x53a8fa(0x1eb),'HXccb':function(_0x5b646b,_0x20fd10,_0x27a427){return _0x5b646b(_0x20fd10,_0x27a427);},'UXNDU':'POST','Fgeax':_0x53a8fa(0x1e2),'azCQK':'network_error'};if(!this[_0x53a8fa(0x1ef)])return{'sent':!0x1,'reason':_0x46a09d['KADWl']};try{const _0x34cf2c=await _0x46a09d['HXccb'](fetch,this[_0x53a8fa(0x1ef)],{'method':_0x46a09d[_0x53a8fa(0x1e6)],'headers':{'Content-Type':_0x46a09d[_0x53a8fa(0x1ec)],'Authorization':_0x53a8fa(0x1ee)+(process.env.TOKENIZER_API_KEY||'')},'body':JSON[_0x53a8fa(0x1ed)](_0x107152),'signal':AbortSignal['timeout'](0x1388)});return _0x34cf2c['ok']?{'sent':!0x0}:{'sent':!0x1,'reason':'http_'+_0x34cf2c['status']};}catch{return{'sent':!0x1,'reason':_0x46a09d[_0x53a8fa(0x1f4)]};}}}
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 +1 @@
1
- const _0x5ac763=_0x3f0f;(function(_0x3b57bf,_0x16da5f){const _0x46a1cb=_0x3f0f,_0x1960b3=_0x3b57bf();while(!![]){try{const _0x574200=-parseInt(_0x46a1cb(0x180))/0x1+-parseInt(_0x46a1cb(0x182))/0x2+parseInt(_0x46a1cb(0x17c))/0x3+-parseInt(_0x46a1cb(0x181))/0x4*(-parseInt(_0x46a1cb(0x174))/0x5)+-parseInt(_0x46a1cb(0x177))/0x6+-parseInt(_0x46a1cb(0x17e))/0x7+parseInt(_0x46a1cb(0x16e))/0x8;if(_0x574200===_0x16da5f)break;else _0x1960b3['push'](_0x1960b3['shift']());}catch(_0x4bfa70){_0x1960b3['push'](_0x1960b3['shift']());}}}(_0x1ee5,0x50b49));function _0x3f0f(_0x8935ea,_0xe22c75){_0x8935ea=_0x8935ea-0x16e;const _0x1ee55c=_0x1ee5();let _0x3f0f11=_0x1ee55c[_0x8935ea];return _0x3f0f11;}function _0x1ee5(){const _0x334e42=['toISOString','157003pSEvVY','push','337844FXqvYv','4yeWiqg','550658gVSlJs','projectRoot','metrics','4274032nXaRRE','getMetrics','baseline_tokens','cerNt','record','sessionId','623495bDMUrR','rule_matched','hook_event','1945902qbEOUK','startedAt','yPUKg','stringify','optimized_tokens','1894605pyWzfs'];_0x1ee5=function(){return _0x334e42;};return _0x1ee5();}import{mkdirSync,writeFileSync}from'node:fs';import{join}from'node:path';const METRICS_DIR='.tokenizer-speedup';export class MetricsCollector{['metrics']=[];['sessionId'];['projectRoot'];['startedAt'];constructor(_0xd1868f,_0x4c77c9){const _0x6fc571=_0x3f0f;this[_0x6fc571(0x183)]=_0xd1868f,this[_0x6fc571(0x173)]=_0x4c77c9,this['startedAt']=new Date()['toISOString']();}[_0x5ac763(0x172)](_0x3fc43d){const _0x24a5cc=_0x5ac763,_0x28c019={'yPUKg':function(_0x5794b8,_0x48b5bb){return _0x5794b8-_0x48b5bb;}};this[_0x24a5cc(0x184)][_0x24a5cc(0x17f)]({'session_id':this[_0x24a5cc(0x173)],'timestamp':new Date()[_0x24a5cc(0x17d)](),'hook_event':_0x3fc43d[_0x24a5cc(0x176)],'baseline_tokens':_0x3fc43d[_0x24a5cc(0x170)],'optimized_tokens':_0x3fc43d['optimized_tokens'],'delta':_0x28c019[_0x24a5cc(0x179)](_0x3fc43d[_0x24a5cc(0x170)],_0x3fc43d[_0x24a5cc(0x17b)]),'rule_matched':_0x3fc43d[_0x24a5cc(0x175)]});}[_0x5ac763(0x16f)](){return[...this['metrics']];}['getSummary'](){const _0x2127cf=_0x5ac763,_0x9427ce={'xsFXj':function(_0x179ef4,_0x592cf3){return _0x179ef4>_0x592cf3;},'cerNt':function(_0x4a91f3,_0x4a2ee3){return _0x4a91f3*_0x4a2ee3;}},_0x33e7f9=this['metrics']['reduce']((_0x406098,_0x28e862)=>_0x406098+_0x28e862['baseline_tokens'],0x0),_0x2ab5ab=this[_0x2127cf(0x184)]['reduce']((_0x5b5d30,_0x348cd6)=>_0x5b5d30+_0x348cd6[_0x2127cf(0x17b)],0x0),_0x31ea9b=_0x33e7f9-_0x2ab5ab,_0x431901={};for(const _0x5a512e of this[_0x2127cf(0x184)])_0x5a512e['rule_matched']&&(_0x431901[_0x5a512e[_0x2127cf(0x175)]]=(_0x431901[_0x5a512e[_0x2127cf(0x175)]]||0x0)+0x1);return{'session_id':this[_0x2127cf(0x173)],'started_at':this[_0x2127cf(0x178)],'ended_at':new Date()[_0x2127cf(0x17d)](),'total_baseline':_0x33e7f9,'total_optimized':_0x2ab5ab,'total_delta':_0x31ea9b,'savings_percent':_0x9427ce['xsFXj'](_0x33e7f9,0x0)?_0x9427ce[_0x2127cf(0x171)](_0x31ea9b/_0x33e7f9,0x64):0x0,'prompts_count':this['metrics']['length'],'rules_triggered':_0x431901};}['flush'](){const _0x259a23=_0x5ac763,_0x76853e={'vXulu':function(_0x53f6a1,_0x5ebfe7,_0x1c24f3){return _0x53f6a1(_0x5ebfe7,_0x1c24f3);},'BDhYK':function(_0x263597,_0x57c895,_0x2f225d,_0x1ae31d){return _0x263597(_0x57c895,_0x2f225d,_0x1ae31d);},'mKcuQ':'utf-8'},_0x13f5a3=join(this['projectRoot'],METRICS_DIR);_0x76853e['vXulu'](mkdirSync,_0x13f5a3,{'recursive':!0x0});const _0x2d0c79={'metrics':this['metrics'],'summary':this['getSummary']()};_0x76853e['BDhYK'](writeFileSync,_0x76853e['vXulu'](join,_0x13f5a3,this['sessionId']+'.json'),JSON[_0x259a23(0x17a)](_0x2d0c79,null,0x2),_0x76853e['mKcuQ']);}}
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));}}