@simosphere/tokenizer-speedup 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/.claude-plugin/plugin.json +22 -14
  2. package/README-plugin.md +17 -1
  3. package/README.de.md +41 -1
  4. package/README.md +41 -1
  5. package/dist/cli/analyze.js +1 -1
  6. package/dist/cli/config-cmd.js +1 -1
  7. package/dist/cli/index.js +1 -1
  8. package/dist/cli/init-cmd.js +1 -1
  9. package/dist/cli/setup-cmd.js +1 -1
  10. package/dist/cloud/stripe-checkout.js +1 -1
  11. package/dist/cloud/stripe-config.js +1 -1
  12. package/dist/cloud/stripe-usage.js +1 -1
  13. package/dist/cloud/stripe-webhooks.js +1 -1
  14. package/dist/cloud/subscription-store.js +1 -1
  15. package/dist/manifest.json +46 -37
  16. package/dist/mcp/index.js +1 -1
  17. package/dist/mcp/resources.js +1 -1
  18. package/dist/mcp/session.js +1 -1
  19. package/dist/mcp/tools.js +1 -1
  20. package/dist/plugin/cli.js +1 -1
  21. package/dist/plugin/compression/chunked.js +1 -0
  22. package/dist/plugin/compression/index.js +1 -0
  23. package/dist/plugin/compression/pipeline.js +1 -0
  24. package/dist/plugin/compression/quality.js +1 -0
  25. package/dist/plugin/compression/rule-based.js +1 -0
  26. package/dist/plugin/compression/structural.js +1 -0
  27. package/dist/plugin/compression/text-utils.js +1 -0
  28. package/dist/plugin/compression/token-budget.js +1 -0
  29. package/dist/plugin/compression/types.js +1 -0
  30. package/dist/plugin/config-loader.js +1 -1
  31. package/dist/plugin/context-compressor.js +1 -1
  32. package/dist/plugin/hook-dispatcher.js +1 -1
  33. package/dist/plugin/metering-client.js +1 -1
  34. package/dist/plugin/metrics-collector.js +1 -1
  35. package/dist/plugin/onboarding.js +1 -1
  36. package/dist/plugin/precompact-handler.js +1 -1
  37. package/dist/plugin/report.js +1 -1
  38. package/dist/plugin/rule-analytics-store.js +1 -1
  39. package/dist/plugin/rule-analytics.js +1 -1
  40. package/dist/plugin/rule-engine.js +1 -1
  41. package/dist/plugin/rule-sharing.js +1 -1
  42. package/dist/plugin/rule-suggest.js +1 -1
  43. package/dist/plugin/session-start.js +1 -1
  44. package/dist/plugin/smart-context.js +1 -1
  45. package/dist/shared/license.js +1 -1
  46. package/dist/shared/providers/claude-provider.js +1 -1
  47. package/dist/shared/providers/openai-provider.js +1 -1
  48. package/dist/shared/token-counter.js +1 -1
  49. package/dist/shared/token-provider.js +1 -1
  50. package/package.json +1 -1
@@ -1,15 +1,23 @@
1
1
  {
2
- "name": "tokenizer-speedup",
3
- "version": "0.7.4",
4
- "description": "Intelligent context optimization for LLM sessions save 30-60% on tokens",
5
- "author": {
6
- "name": "SIMO GmbH",
7
- "email": "info@simo-online.com",
8
- "url": "https://simo-online.com"
9
- },
10
- "homepage": "https://tokenizer-speedup.simosphereai.com",
11
- "repository": "https://github.com/AndreasSchwan-SIMO/tokenizer-speedup",
12
- "license": "BSL-1.1",
13
- "engines": { "node": ">=20.0.0" },
14
- "keywords": ["claude", "token-optimization", "context-management", "cost-reduction", "llm"]
15
- }
2
+ "name": "tokenizer-speedup",
3
+ "version": "0.9.0",
4
+ "description": "Intelligent context optimization for LLM sessions \u2014 save 30-60% on tokens",
5
+ "author": {
6
+ "name": "SIMO GmbH",
7
+ "email": "info@simo-online.com",
8
+ "url": "https://simo-online.com"
9
+ },
10
+ "homepage": "https://tokenizer-speedup.simosphereai.com",
11
+ "repository": "https://gitlab.simo-online.com/simosphereos/tokenizer-speedup",
12
+ "license": "BSL-1.1",
13
+ "engines": {
14
+ "node": ">=20.0.0"
15
+ },
16
+ "keywords": [
17
+ "claude",
18
+ "token-optimization",
19
+ "context-management",
20
+ "cost-reduction",
21
+ "llm"
22
+ ]
23
+ }
package/README-plugin.md CHANGED
@@ -16,6 +16,22 @@ tsu setup --api-key YOUR_KEY
16
16
 
17
17
  The `tsu setup` command configures Claude Code hooks automatically and stores your API key. Restart Claude Code after setup.
18
18
 
19
+ ## Claude Desktop (MCP)
20
+
21
+ Since v0.8.0, an MCP server (`tsu-mcp`) is included. Add to `claude_desktop_config.json`:
22
+
23
+ ```json
24
+ {
25
+ "mcpServers": {
26
+ "tokenizer-speedup": {
27
+ "command": "tsu-mcp"
28
+ }
29
+ }
30
+ }
31
+ ```
32
+
33
+ Tools: `optimize-context`, `analyze-tokens`, `get-savings`
34
+
19
35
  ## How It Works
20
36
 
21
37
  1. **Context Gating** — YAML rules detect what you're working on and load only relevant context
@@ -60,7 +76,7 @@ metering:
60
76
  ## Requirements
61
77
 
62
78
  - Node.js 20+
63
- - Claude Code
79
+ - Claude Code or Claude Desktop
64
80
 
65
81
  ## Links
66
82
 
package/README.de.md CHANGED
@@ -72,6 +72,45 @@ Claude Code neu starten. Fertig.
72
72
 
73
73
  API-Schlüssel erhalten Sie auf [tokenizer-speedup.simosphereai.com](https://tokenizer-speedup.simosphereai.com).
74
74
 
75
+ ## Claude Desktop (MCP)
76
+
77
+ Seit v0.8.0 enthält TokenizerSpeedUp einen MCP-Server für Claude Desktop.
78
+
79
+ ### Einrichtung
80
+
81
+ ```bash
82
+ npm install -g @simosphere/tokenizer-speedup
83
+ ```
84
+
85
+ Fügen Sie folgendes in Ihre `claude_desktop_config.json` ein:
86
+
87
+ ```json
88
+ {
89
+ "mcpServers": {
90
+ "tokenizer-speedup": {
91
+ "command": "tsu-mcp"
92
+ }
93
+ }
94
+ }
95
+ ```
96
+
97
+ Claude Desktop neu starten.
98
+
99
+ ### Verfügbare Tools
100
+
101
+ | Tool | Beschreibung |
102
+ |---|---|
103
+ | `optimize-context` | LLM-Kontext für einen gegebenen Prompt optimieren |
104
+ | `analyze-tokens` | Tokens für Text oder Dateien zählen und schätzen |
105
+ | `get-savings` | Kumulative Session-Einsparungen zurückgeben |
106
+
107
+ ### Verfügbare Ressourcen
108
+
109
+ | Ressource | Beschreibung |
110
+ |---|---|
111
+ | `config://current` | Aktuelle YAML-Konfiguration |
112
+ | `report://savings` | Session-Einsparungsbericht |
113
+
75
114
  ## Ergebnisse
76
115
 
77
116
  Reale Daten der SIMO GmbH (2 Wochen):
@@ -147,11 +186,12 @@ Claude Code
147
186
  - **Rule Engine** — YAML-Konfiguration, Node.js Parser
148
187
  - **Token Meter** — gpt-tokenizer (lokal)
149
188
  - **Cloud** — Metering API + Dashboard + Stripe Billing
189
+ - **MCP Server** — JSON-RPC über stdio, für Claude Desktop
150
190
 
151
191
  ## Voraussetzungen
152
192
 
153
193
  - Node.js 20+
154
- - Claude Code
194
+ - Claude Code oder Claude Desktop
155
195
 
156
196
  ## Links
157
197
 
package/README.md CHANGED
@@ -72,6 +72,45 @@ Restart Claude Code. Done.
72
72
 
73
73
  Get your API key at [tokenizer-speedup.simosphereai.com](https://tokenizer-speedup.simosphereai.com).
74
74
 
75
+ ## Claude Desktop (MCP)
76
+
77
+ Since v0.8.0, TokenizerSpeedUp includes an MCP server for Claude Desktop.
78
+
79
+ ### Setup
80
+
81
+ ```bash
82
+ npm install -g @simosphere/tokenizer-speedup
83
+ ```
84
+
85
+ Add to your `claude_desktop_config.json`:
86
+
87
+ ```json
88
+ {
89
+ "mcpServers": {
90
+ "tokenizer-speedup": {
91
+ "command": "tsu-mcp"
92
+ }
93
+ }
94
+ }
95
+ ```
96
+
97
+ Restart Claude Desktop.
98
+
99
+ ### Available Tools
100
+
101
+ | Tool | Description |
102
+ |---|---|
103
+ | `optimize-context` | Optimize LLM context for a given prompt |
104
+ | `analyze-tokens` | Count and estimate tokens for text or files |
105
+ | `get-savings` | Return cumulative session savings metrics |
106
+
107
+ ### Available Resources
108
+
109
+ | Resource | Description |
110
+ |---|---|
111
+ | `config://current` | Current YAML configuration |
112
+ | `report://savings` | Session savings report |
113
+
75
114
  ## Results
76
115
 
77
116
  Real-world data from SIMO GmbH (2 weeks):
@@ -147,11 +186,12 @@ Claude Code
147
186
  - **Rule Engine** — YAML config, Node.js parser
148
187
  - **Token Meter** — gpt-tokenizer (local)
149
188
  - **Cloud** — Metering API + Dashboard + Stripe Billing
189
+ - **MCP Server** — JSON-RPC over stdio, for Claude Desktop
150
190
 
151
191
  ## Requirements
152
192
 
153
193
  - Node.js 20+
154
- - Claude Code
194
+ - Claude Code or Claude Desktop
155
195
 
156
196
  ## Links
157
197
 
@@ -1 +1 @@
1
- (function(_0x446757,_0x30be30){const _0x20beeb=_0x5d02,_0xbe5d60=_0x446757();while(!![]){try{const _0x3c568f=parseInt(_0x20beeb(0x158))/0x1*(-parseInt(_0x20beeb(0x161))/0x2)+-parseInt(_0x20beeb(0x15e))/0x3*(-parseInt(_0x20beeb(0x155))/0x4)+-parseInt(_0x20beeb(0x163))/0x5*(parseInt(_0x20beeb(0x15c))/0x6)+-parseInt(_0x20beeb(0x159))/0x7+parseInt(_0x20beeb(0x157))/0x8+-parseInt(_0x20beeb(0x166))/0x9+parseInt(_0x20beeb(0x164))/0xa;if(_0x3c568f===_0x30be30)break;else _0xbe5d60['push'](_0xbe5d60['shift']());}catch(_0x5334ad){_0xbe5d60['push'](_0xbe5d60['shift']());}}}(_0x74b3,0x308a3));function _0x74b3(){const _0x75b8fe=['1240155UBFHzs','JaSyT','filter','ALDxA','4KwMnSD','fCHTj','2061664DCCGiF','20KaDHXL','1701931wJsIjG','split','length','66RQZOnK','BmbzA','658395PpOXvL','openai','claude-sonnet-4-20250514','18686FoOjbx','kiJru','151620bnUjUl','6229980AzhEdu','gpt-4o'];_0x74b3=function(){return _0x75b8fe;};return _0x74b3();}function _0x5d02(_0x2f8bc3,_0x45be67){_0x2f8bc3=_0x2f8bc3-0x153;const _0x74b36a=_0x74b3();let _0x5d0290=_0x74b36a[_0x2f8bc3];return _0x5d0290;}import{readFileSync}from'node:fs';import'../shared/providers/claude-provider.js';import'../shared/providers/openai-provider.js';import{createTokenProvider}from'../shared/token-provider.js';export function analyzeText(_0x230a1a,_0x3e09ae='claude',_0x5e9ec3){const _0x5737c2=_0x5d02,_0x62be1d={'dJDtQ':function(_0x4ba55c,_0x58ac4e){return _0x4ba55c===_0x58ac4e;},'BmbzA':'claude','ALDxA':_0x5737c2(0x160),'fCHTj':_0x5737c2(0x165),'uLHVx':function(_0x2ec5e6,_0x436ca9,_0x35a7b7){return _0x2ec5e6(_0x436ca9,_0x35a7b7);}},_0x5b431e=_0x5e9ec3??(_0x62be1d['dJDtQ'](_0x62be1d[_0x5737c2(0x15d)],_0x3e09ae)?_0x62be1d[_0x5737c2(0x154)]:_0x62be1d[_0x5737c2(0x156)]),_0x29789d=_0x62be1d['uLHVx'](createTokenProvider,_0x3e09ae,_0x5b431e),_0x286eb2=_0x230a1a[_0x5737c2(0x15a)](/\s+/)[_0x5737c2(0x153)](Boolean)[_0x5737c2(0x15b)];return{'tokens':_0x29789d['countTokens'](_0x230a1a),'estimate':_0x29789d['estimateTokens'](_0x230a1a),'provider':_0x3e09ae,'model':_0x5b431e,'chars':_0x230a1a[_0x5737c2(0x15b)],'words':_0x286eb2};}export function analyzeFile(_0x41b35f,_0x51420a='claude',_0x578a0e){const _0x371207=_0x5d02,_0x1e5137={'JaSyT':function(_0xcc8908,_0x1189d8,_0x4c3dbf){return _0xcc8908(_0x1189d8,_0x4c3dbf);}};return analyzeText(_0x1e5137[_0x371207(0x167)](readFileSync,_0x41b35f,'utf-8'),_0x51420a,_0x578a0e);}export function compareProviders(_0x574829){const _0x2998ba=_0x5d02,_0xac9d50={'kiJru':function(_0xd5697c,_0x1246ad,_0x26bba4){return _0xd5697c(_0x1246ad,_0x26bba4);}};return{'claude':_0xac9d50[_0x2998ba(0x162)](analyzeText,_0x574829,'claude'),'openai':_0xac9d50[_0x2998ba(0x162)](analyzeText,_0x574829,_0x2998ba(0x15f))};}
1
+ const _0x33b627=_0x121c;(function(_0x5337b9,_0x117087){const _0x288da8=_0x121c,_0x33852e=_0x5337b9();while(!![]){try{const _0x4ea0ae=-parseInt(_0x288da8(0x78))/0x1*(-parseInt(_0x288da8(0x7c))/0x2)+parseInt(_0x288da8(0x7b))/0x3*(parseInt(_0x288da8(0x7a))/0x4)+parseInt(_0x288da8(0x72))/0x5*(parseInt(_0x288da8(0x70))/0x6)+-parseInt(_0x288da8(0x73))/0x7+-parseInt(_0x288da8(0x74))/0x8+-parseInt(_0x288da8(0x79))/0x9+parseInt(_0x288da8(0x6d))/0xa;if(_0x4ea0ae===_0x117087)break;else _0x33852e['push'](_0x33852e['shift']());}catch(_0x213128){_0x33852e['push'](_0x33852e['shift']());}}}(_0x72e1,0x88eab));import{readFileSync}from'node:fs';function _0x121c(_0x44fcb7,_0x2322c6){_0x44fcb7=_0x44fcb7-0x6d;const _0x72e115=_0x72e1();let _0x121cc5=_0x72e115[_0x44fcb7];return _0x121cc5;}import'../shared/providers/claude-provider.js';import'../shared/providers/openai-provider.js';import{createTokenProvider}from'../shared/token-provider.js';export function analyzeText(_0x141a20,_0x405841=_0x33b627(0x6f),_0x3edbc1){const _0x4e90e0=_0x33b627,_0x34b0aa={'iENXt':function(_0x2fcbbd,_0x5cc8b9){return _0x2fcbbd===_0x5cc8b9;},'qUGTP':_0x4e90e0(0x6e)},_0x5874b1=_0x3edbc1??(_0x34b0aa[_0x4e90e0(0x7d)](_0x4e90e0(0x6f),_0x405841)?_0x4e90e0(0x76):_0x34b0aa['qUGTP']),_0x2ab246=createTokenProvider(_0x405841,_0x5874b1),_0x80aeb8=_0x141a20['split'](/\s+/)[_0x4e90e0(0x77)](Boolean)[_0x4e90e0(0x71)];return{'tokens':_0x2ab246['countTokens'](_0x141a20),'estimate':_0x2ab246[_0x4e90e0(0x75)](_0x141a20),'provider':_0x405841,'model':_0x5874b1,'chars':_0x141a20[_0x4e90e0(0x71)],'words':_0x80aeb8};}export function analyzeFile(_0x3c717b,_0x52234a='claude',_0x3b7513){const _0x379107={'vDqek':function(_0x206e8c,_0x1b5eb9,_0x2154fc,_0x2293d2){return _0x206e8c(_0x1b5eb9,_0x2154fc,_0x2293d2);},'RHVGX':'utf-8'};return _0x379107['vDqek'](analyzeText,readFileSync(_0x3c717b,_0x379107['RHVGX']),_0x52234a,_0x3b7513);}function _0x72e1(){const _0x189b0d=['claude','30RYVpKa','length','330895eIiLan','5240354wMCsmh','6519552wOviPN','estimateTokens','claude-sonnet-4-20250514','filter','1wKsjoz','1823868NlIugx','3764uTiOKF','2757kODSxT','1533082mGrAQv','iENXt','3648140OAuigl','gpt-4o'];_0x72e1=function(){return _0x189b0d;};return _0x72e1();}export function compareProviders(_0x5e7f9b){const _0x161c6e={'YUXcE':function(_0x2575c5,_0x17c2e9,_0x299f3c){return _0x2575c5(_0x17c2e9,_0x299f3c);},'koedo':'claude'};return{'claude':_0x161c6e['YUXcE'](analyzeText,_0x5e7f9b,_0x161c6e['koedo']),'openai':_0x161c6e['YUXcE'](analyzeText,_0x5e7f9b,'openai')};}
@@ -1 +1 @@
1
- function _0x1790(){const _0x44ea86=['6vbFVvQ','422802PGsQeT','3521413XwfkmE','1245736vmOLfj','3713868LvOeGf','58903lzVwMv','ckRiW','45fubLOf','464210hMpMtd','length','1816905feWtkA'];_0x1790=function(){return _0x44ea86;};return _0x1790();}(function(_0x14da15,_0x19fd8d){const _0x144fc6=_0x7683,_0x3b4899=_0x14da15();while(!![]){try{const _0x108269=parseInt(_0x144fc6(0xdb))/0x1+-parseInt(_0x144fc6(0xd3))/0x2+-parseInt(_0x144fc6(0xd7))/0x3+parseInt(_0x144fc6(0xda))/0x4+parseInt(_0x144fc6(0xd5))/0x5+-parseInt(_0x144fc6(0xd6))/0x6*(-parseInt(_0x144fc6(0xd8))/0x7)+parseInt(_0x144fc6(0xd9))/0x8*(-parseInt(_0x144fc6(0xd2))/0x9);if(_0x108269===_0x19fd8d)break;else _0x3b4899['push'](_0x3b4899['shift']());}catch(_0x3c030b){_0x3b4899['push'](_0x3b4899['shift']());}}}(_0x1790,0xab6ea));import'../shared/providers/claude-provider.js';function _0x7683(_0x1d1357,_0x3cae22){_0x1d1357=_0x1d1357-0xd2;const _0x179051=_0x1790();let _0x7683a=_0x179051[_0x1d1357];return _0x7683a;}import'../shared/providers/openai-provider.js';import{parseConfig}from'../plugin/config-loader.js';export function validateConfigYaml(_0x59441d){const _0x45b25f=_0x7683,_0x5a1766={'ckRiW':function(_0x275321,_0x20fc29){return _0x275321(_0x20fc29);}};try{const _0x43c04e=_0x5a1766[_0x45b25f(0xdc)](parseConfig,_0x59441d);return{'valid':!0x0,'provider':_0x43c04e['provider'],'model':_0x43c04e['model'],'ruleCount':_0x43c04e['rules'][_0x45b25f(0xd4)]};}catch(_0x23c6ba){return{'valid':!0x1,'provider':'','model':'','ruleCount':0x0,'error':_0x23c6ba['message']};}}
1
+ (function(_0x2a3882,_0x3951e7){const _0x19e074=_0x171d,_0xf6e990=_0x2a3882();while(!![]){try{const _0x1e8e67=parseInt(_0x19e074(0x1e8))/0x1*(parseInt(_0x19e074(0x1e9))/0x2)+parseInt(_0x19e074(0x1e2))/0x3*(parseInt(_0x19e074(0x1db))/0x4)+parseInt(_0x19e074(0x1dd))/0x5*(-parseInt(_0x19e074(0x1df))/0x6)+-parseInt(_0x19e074(0x1dc))/0x7+parseInt(_0x19e074(0x1e3))/0x8*(-parseInt(_0x19e074(0x1d8))/0x9)+parseInt(_0x19e074(0x1e5))/0xa+-parseInt(_0x19e074(0x1e4))/0xb*(-parseInt(_0x19e074(0x1da))/0xc);if(_0x1e8e67===_0x3951e7)break;else _0xf6e990['push'](_0xf6e990['shift']());}catch(_0x5e3e7d){_0xf6e990['push'](_0xf6e990['shift']());}}}(_0x2176,0xad3c2));function _0x2176(){const _0x30daf6=['354GIBHzH','423ofmlPk','length','24dGYKAH','2065924ECUBVy','2277429aGgsoE','560eLDOsV','rules','73614nbJJLg','message','provider','3tHBGFk','140072ezQPHe','7360012PHGHMX','11250780qhwGDN','tolXm','model','1425YJsKZg'];_0x2176=function(){return _0x30daf6;};return _0x2176();}import'../shared/providers/claude-provider.js';function _0x171d(_0x3c9911,_0x243dd4){_0x3c9911=_0x3c9911-0x1d8;const _0x21762e=_0x2176();let _0x171d3c=_0x21762e[_0x3c9911];return _0x171d3c;}import'../shared/providers/openai-provider.js';import{parseConfig}from'../plugin/config-loader.js';export function validateConfigYaml(_0x35778c){const _0x34a9c9=_0x171d,_0x5da43e={'tolXm':function(_0x399588,_0x2469e5){return _0x399588(_0x2469e5);}};try{const _0x431da5=_0x5da43e[_0x34a9c9(0x1e6)](parseConfig,_0x35778c);return{'valid':!0x0,'provider':_0x431da5[_0x34a9c9(0x1e1)],'model':_0x431da5[_0x34a9c9(0x1e7)],'ruleCount':_0x431da5[_0x34a9c9(0x1de)][_0x34a9c9(0x1d9)]};}catch(_0x534e75){return{'valid':!0x1,'provider':'','model':'','ruleCount':0x0,'error':_0x534e75[_0x34a9c9(0x1e0)]};}}
package/dist/cli/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const _0x5b2d42=_0x3098;(function(_0x3658ec,_0x3df8db){const _0x5a22d5=_0x3098,_0x30ab2=_0x3658ec();while(!![]){try{const _0x38e196=parseInt(_0x5a22d5(0x111))/0x1*(-parseInt(_0x5a22d5(0x12b))/0x2)+-parseInt(_0x5a22d5(0x12d))/0x3+-parseInt(_0x5a22d5(0x108))/0x4+-parseInt(_0x5a22d5(0x112))/0x5*(-parseInt(_0x5a22d5(0x137))/0x6)+parseInt(_0x5a22d5(0x115))/0x7+-parseInt(_0x5a22d5(0x131))/0x8*(parseInt(_0x5a22d5(0x12e))/0x9)+parseInt(_0x5a22d5(0xfe))/0xa*(parseInt(_0x5a22d5(0x10e))/0xb);if(_0x38e196===_0x3df8db)break;else _0x30ab2['push'](_0x30ab2['shift']());}catch(_0x33eee1){_0x30ab2['push'](_0x30ab2['shift']());}}}(_0x37a8,0x2943e));function _0x3098(_0xc2c608,_0x4d5e6d){_0xc2c608=_0xc2c608-0xf8;const _0x37a847=_0x37a8();let _0x3098e2=_0x37a847[_0xc2c608];return _0x3098e2;}import{Command}from'commander';import'../shared/providers/claude-provider.js';import'../shared/providers/openai-provider.js';import{createTokenProvider}from'../shared/token-provider.js';import{readFileSync,realpathSync}from'node:fs';import{runSetup}from'./setup-cmd.js';import{runInit}from'./init-cmd.js';export function buildCLI(){const _0xeebdcf=_0x3098,_0x162e45={'jSBca':function(_0xbf387c,_0x3d1716){return _0xbf387c===_0x3d1716;},'ARLDb':_0xeebdcf(0x11f),'rftfZ':function(_0x4ca0e9,_0xda157c,_0x2cfa0f){return _0x4ca0e9(_0xda157c,_0x2cfa0f);},'joUpH':function(_0x35fbd9,_0x6a4756){return _0x35fbd9!==_0x6a4756;},'SrFNN':_0xeebdcf(0x100),'CuhNU':'1.3','ocQCw':'utf-8','MqHER':'../plugin/config-loader.js','BYrJR':function(_0x42fd6a,_0x8acae9){return _0x42fd6a(_0x8acae9);},'BSlxA':function(_0x54a31e){return _0x54a31e();},'ApjTL':_0xeebdcf(0x132),'LkCZO':'after','WDkSx':_0xeebdcf(0x10a),'WTUKx':_0xeebdcf(0x130),'IXsVb':_0xeebdcf(0xfd),'mjgrW':_0xeebdcf(0x118),'HHSMz':'File\x20to\x20analyze','DZAXb':'-p,\x20--provider\x20<provider>','vruks':_0xeebdcf(0x121),'acgSQ':'claude','ULUuA':'Model\x20name','hkXzq':'-t,\x20--text\x20<text>','BrBeW':_0xeebdcf(0x10b),'VKMyF':_0xeebdcf(0x12f),'ZiPZv':'tokenizer-speedup.yaml','Oxukq':'Create\x20a\x20starter\x20tokenizer-speedup.yaml\x20in\x20the\x20current\x20directory'},_0x230de6=new Command();return _0x230de6[_0xeebdcf(0x133)](_0x162e45[_0xeebdcf(0x134)])[_0xeebdcf(0x11e)](_0xeebdcf(0x114))[_0xeebdcf(0x11a)]('0.8.0')[_0xeebdcf(0x11d)](_0x162e45[_0xeebdcf(0x126)],_0x162e45[_0xeebdcf(0x10d)]),_0x230de6[_0xeebdcf(0x106)](_0x162e45[_0xeebdcf(0x12a)])[_0xeebdcf(0x11e)](_0x162e45['IXsVb'])['requiredOption'](_0x162e45[_0xeebdcf(0x135)],'Your\x20TokenizerSpeedUp\x20API\x20key\x20(get\x20one\x20at\x20https://tokenizer-speedup.simosphereai.com)')['action'](_0x551f60=>{runSetup(_0x551f60['apiKey']);}),_0x230de6[_0xeebdcf(0x106)](_0xeebdcf(0x120))[_0xeebdcf(0x11e)](_0xeebdcf(0xf9))['argument']('[file]',_0x162e45['HHSMz'])[_0xeebdcf(0x117)](_0x162e45[_0xeebdcf(0x101)],_0x162e45['vruks'],_0x162e45[_0xeebdcf(0xf8)])[_0xeebdcf(0x117)]('-m,\x20--model\x20<model>',_0x162e45[_0xeebdcf(0x138)])[_0xeebdcf(0x117)](_0x162e45[_0xeebdcf(0x123)],'Analyze\x20inline\x20text\x20instead\x20of\x20file')[_0xeebdcf(0xfb)]((_0x5053c1,_0x2c879e)=>{const _0x459e26=_0xeebdcf,_0x150843=_0x2c879e['model']??(_0x162e45[_0x459e26(0x10f)]('claude',_0x2c879e['provider'])?_0x459e26(0x105):_0x162e45['ARLDb']);let _0x32043b,_0x21c16e;try{_0x32043b=_0x162e45['rftfZ'](createTokenProvider,_0x2c879e[_0x459e26(0x103)],_0x150843);}catch(_0x4ec082){return console['error'](_0x459e26(0x109)+_0x4ec082['message']),void(process[_0x459e26(0x129)]=0x1);}if(_0x162e45[_0x459e26(0x124)](void 0x0,_0x2c879e[_0x459e26(0xfc)]))_0x21c16e=_0x2c879e['text'];else{if(!_0x5053c1)return console[_0x459e26(0x104)](_0x162e45[_0x459e26(0x110)]),void(process['exitCode']=0x1);_0x21c16e=readFileSync(_0x5053c1,'utf-8');}_0x21c16e['length']>0x7a120&&console['error'](_0x459e26(0x10c)+(_0x21c16e[_0x459e26(0x136)]/0x3e8)[_0x459e26(0x122)](0x0)+'K\x20chars)\x20—\x20processing\x20may\x20be\x20slow.');const _0x45f4ec=_0x32043b[_0x459e26(0x125)](_0x21c16e),_0x5d9188=_0x32043b['estimateTokens'](_0x21c16e);console['log'](JSON['stringify']({'file':_0x5053c1??'(inline)','tokens':_0x45f4ec,'tokens_method':_0x459e26(0xfa),'estimate':_0x5d9188,'estimate_method':_0x459e26(0x107)+(_0x162e45[_0x459e26(0x10f)]('openai',_0x2c879e['provider'])?_0x162e45['CuhNU']:_0x459e26(0xff))+')','provider':_0x2c879e[_0x459e26(0x103)],'model':_0x150843}));}),_0x230de6['command'](_0xeebdcf(0x12c))['description']('Validate\x20configuration\x20file')[_0xeebdcf(0x116)](_0x162e45['BrBeW'],_0x162e45['VKMyF'],_0x162e45[_0xeebdcf(0x128)])[_0xeebdcf(0xfb)](async _0x3a1cfc=>{const _0x158e69=_0xeebdcf;try{const _0x2b7d9d=readFileSync(_0x3a1cfc,_0x162e45['ocQCw']),{parseConfig:_0x461a03}=await import(_0x162e45[_0x158e69(0x127)]),_0x2e9399=_0x162e45['BYrJR'](_0x461a03,_0x2b7d9d);console[_0x158e69(0x11c)](JSON[_0x158e69(0x113)]({'valid':!0x0,'provider':_0x2e9399['provider'],'model':_0x2e9399['model'],'ruleCount':_0x2e9399[_0x158e69(0x119)]['length']}));}catch(_0x4f62ec){console[_0x158e69(0x11c)](JSON[_0x158e69(0x113)]({'valid':!0x1,'error':_0x4f62ec['message']})),process['exitCode']=0x1;}}),_0x230de6['command']('init')['description'](_0x162e45['Oxukq'])['action'](()=>{_0x162e45['BSlxA'](runInit);}),_0x230de6;}function _0x37a8(){const _0x2c72ca=['Error:\x20','\x0aExamples:\x0a\x20\x20$\x20tsu\x20setup\x20--api-key\x20YOUR_KEY\x20\x20\x20Configure\x20and\x20register\x20Claude\x20Code\x20hooks\x0a\x20\x20$\x20tsu\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20starter\x20tokenizer-speedup.yaml\x0a\x20\x20$\x20tsu\x20analyze\x20src/index.ts\x20\x20\x20\x20\x20\x20\x20Count\x20tokens\x20in\x20a\x20file\x0a\x20\x20$\x20tsu\x20analyze\x20--text\x20\x22Hello\x22\x20\x20\x20\x20\x20Count\x20tokens\x20in\x20inline\x20text\x0a\x20\x20$\x20tsu\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Validate\x20tokenizer-speedup.yaml\x0a\x0aQuick\x20Start:\x0a\x20\x201.\x20Get\x20your\x20free\x20API\x20key\x20at\x20https://tokenizer-speedup.simosphereai.com\x0a\x20\x202.\x20Run:\x20tsu\x20setup\x20--api-key\x20YOUR_KEY\x0a\x20\x203.\x20Optional:\x20tsu\x20init\x20(creates\x20project-level\x20config)\x0a\x20\x204.\x20Restart\x20Claude\x20Code\x20—\x20the\x20plugin\x20activates\x20automatically\x0a\x0aConfiguration\x20(tokenizer-speedup.yaml):\x0a\x20\x20Place\x20in\x20your\x20project\x20root.\x20Defines\x20keyword\x20triggers,\x20file\x20patterns,\x0a\x20\x20and\x20token\x20limits.\x20Run\x20\x27tsu\x20init\x27\x20to\x20generate\x20a\x20starter\x20config.\x0a\x20\x20Docs:\x20https://tokenizer-speedup.simosphereai.com/#integration\x0a','[file]','Warning:\x20large\x20input\x20(','WDkSx','1289101lqrJjh','jSBca','SrFNN','11ekiSBX','430EhSHdx','stringify','TokenizerSpeedUp\x20—\x20Multi-LLM\x20Token\x20Optimization\x20CLI','827071UsuxQP','argument','option','--api-key\x20<key>','rules','version','cli/index','log','addHelpText','description','gpt-4o','analyze','LLM\x20provider\x20(claude,\x20openai)','toFixed','hkXzq','joUpH','countTokens','LkCZO','MqHER','ZiPZv','exitCode','WTUKx','29294hZnKvY','config','94539DauXAh','317349JaObpn','Config\x20file\x20path','setup','16PjIFbH','tsu','name','ApjTL','mjgrW','length','18726djPpVC','ULUuA','acgSQ','Analyze\x20token\x20count\x20of\x20a\x20file\x20or\x20text','BPE\x20tokenizer\x20(accurate)','action','text','Configure\x20TokenizerSpeedUp\x20with\x20your\x20API\x20key\x20and\x20register\x20Claude\x20Code\x20hooks','10bEHbMF','1.4','Error:\x20provide\x20a\x20file\x20argument\x20or\x20--text\x20option','DZAXb','replace','provider','error','claude-sonnet-4-20250514','command','word\x20heuristic\x20(words\x20×\x20','286304IAtUJd'];_0x37a8=function(){return _0x2c72ca;};return _0x37a8();}const resolvedArgv1=((()=>{const _0x3498a1=_0x3098,_0x42e80a={'myGCx':function(_0x4dc601,_0x13912a){return _0x4dc601(_0x13912a);}};try{return _0x42e80a['myGCx'](realpathSync,process['argv'][0x1]??'')[_0x3498a1(0x102)](/\\/g,'/');}catch{return process['argv'][0x1]?.['replace'](/\\/g,'/')??'';}})());resolvedArgv1['includes'](_0x5b2d42(0x11b))&&buildCLI()['parse']();
2
+ const _0x58bb9f=_0x5603;(function(_0x27152c,_0x38b2f4){const _0x32963d=_0x5603,_0x3069c7=_0x27152c();while(!![]){try{const _0x586a28=parseInt(_0x32963d(0xdb))/0x1+-parseInt(_0x32963d(0xe9))/0x2*(parseInt(_0x32963d(0xfb))/0x3)+-parseInt(_0x32963d(0xef))/0x4+parseInt(_0x32963d(0xe2))/0x5+parseInt(_0x32963d(0xde))/0x6+parseInt(_0x32963d(0xe8))/0x7+-parseInt(_0x32963d(0xf4))/0x8;if(_0x586a28===_0x38b2f4)break;else _0x3069c7['push'](_0x3069c7['shift']());}catch(_0x110e5d){_0x3069c7['push'](_0x3069c7['shift']());}}}(_0x30f3,0x3ab36));import{Command}from'commander';import'../shared/providers/claude-provider.js';import'../shared/providers/openai-provider.js';function _0x30f3(){const _0x2d071c=['option','claude-sonnet-4-20250514','70932rBoRsE','word\x20heuristic\x20(words\x20×\x20','K\x20chars)\x20—\x20processing\x20may\x20be\x20slow.','stringify','BJTol','provider','command','BPE\x20tokenizer\x20(accurate)','argv','1.4','-m,\x20--model\x20<model>','ePKUG','error','after','PsgVn','[file]','XbsTQ','lbqWo','analyze','countTokens','IXsMV','init','Create\x20a\x20starter\x20tokenizer-speedup.yaml\x20in\x20the\x20current\x20directory','hERof','(inline)','utf-8','183351MNMZbm','argument','rules','849876DNQZxQ','cli/index','description','Configure\x20TokenizerSpeedUp\x20with\x20your\x20API\x20key\x20and\x20register\x20Claude\x20Code\x20hooks','962535ZqzFjb','xsVAw','-t,\x20--text\x20<text>','KEmHf','config','Config\x20file\x20path','1833006ERzBzM','16shJlPA','\x0aExamples:\x0a\x20\x20$\x20tsu\x20setup\x20--api-key\x20YOUR_KEY\x20\x20\x20Configure\x20and\x20register\x20Claude\x20Code\x20hooks\x0a\x20\x20$\x20tsu\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20starter\x20tokenizer-speedup.yaml\x0a\x20\x20$\x20tsu\x20analyze\x20src/index.ts\x20\x20\x20\x20\x20\x20\x20Count\x20tokens\x20in\x20a\x20file\x0a\x20\x20$\x20tsu\x20analyze\x20--text\x20\x22Hello\x22\x20\x20\x20\x20\x20Count\x20tokens\x20in\x20inline\x20text\x0a\x20\x20$\x20tsu\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Validate\x20tokenizer-speedup.yaml\x0a\x0aQuick\x20Start:\x0a\x20\x201.\x20Get\x20your\x20free\x20API\x20key\x20at\x20https://tokenizer-speedup.simosphereai.com\x0a\x20\x202.\x20Run:\x20tsu\x20setup\x20--api-key\x20YOUR_KEY\x0a\x20\x203.\x20Optional:\x20tsu\x20init\x20(creates\x20project-level\x20config)\x0a\x20\x204.\x20Restart\x20Claude\x20Code\x20—\x20the\x20plugin\x20activates\x20automatically\x0a\x0aConfiguration\x20(tokenizer-speedup.yaml):\x0a\x20\x20Place\x20in\x20your\x20project\x20root.\x20Defines\x20keyword\x20triggers,\x20file\x20patterns,\x0a\x20\x20and\x20token\x20limits.\x20Run\x20\x27tsu\x20init\x27\x20to\x20generate\x20a\x20starter\x20config.\x0a\x20\x20Docs:\x20https://tokenizer-speedup.simosphereai.com/#integration\x0a','log','claude','Warning:\x20large\x20input\x20(','1.3','910432TzHStC','text','yVQsK','UAbIt','replace','977312UKaiaN','action','message','model','length'];_0x30f3=function(){return _0x2d071c;};return _0x30f3();}import{createTokenProvider}from'../shared/token-provider.js';import{readFileSync,realpathSync}from'node:fs';import{runSetup}from'./setup-cmd.js';import{runInit}from'./init-cmd.js';export function buildCLI(){const _0x112347=_0x5603,_0x2a427e={'xsVAw':function(_0xffe106,_0x592039){return _0xffe106(_0x592039);},'hERof':function(_0x53d2e1,_0x343b48){return _0x53d2e1!==_0x343b48;},'UAbIt':function(_0x1b46a6,_0x32592f){return _0x1b46a6/_0x32592f;},'HCvAK':_0x112347(0xca),'IXsMV':function(_0x47ecb7,_0x3c48c3,_0x54063b){return _0x47ecb7(_0x3c48c3,_0x54063b);},'KEmHf':'tsu','lXeDb':'TokenizerSpeedUp\x20—\x20Multi-LLM\x20Token\x20Optimization\x20CLI','tVwrS':'0.8.1','azlBz':'setup','iSDoZ':_0x112347(0xe1),'XbsTQ':_0x112347(0xd3),'lbqWo':'[file]','BJTol':'File\x20to\x20analyze','PzXjh':'LLM\x20provider\x20(claude,\x20openai)','yVQsK':'claude','ePKUG':'Model\x20name','PsgVn':_0x112347(0xe4),'kfbOp':_0x112347(0xe6),'PSBqQ':'Validate\x20configuration\x20file'},_0x2cbcb0=new Command();return _0x2cbcb0['name'](_0x2a427e[_0x112347(0xe5)])[_0x112347(0xe0)](_0x2a427e['lXeDb'])['version'](_0x2a427e['tVwrS'])['addHelpText'](_0x112347(0xce),_0x112347(0xea)),_0x2cbcb0['command'](_0x2a427e['azlBz'])[_0x112347(0xe0)](_0x2a427e['iSDoZ'])['requiredOption']('--api-key\x20<key>','Your\x20TokenizerSpeedUp\x20API\x20key\x20(get\x20one\x20at\x20https://tokenizer-speedup.simosphereai.com)')[_0x112347(0xf5)](_0x425544=>{_0x2a427e['xsVAw'](runSetup,_0x425544['apiKey']);}),_0x2cbcb0[_0x112347(0xc7)](_0x2a427e[_0x112347(0xd1)])[_0x112347(0xe0)]('Analyze\x20token\x20count\x20of\x20a\x20file\x20or\x20text')[_0x112347(0xdc)](_0x2a427e[_0x112347(0xd2)],_0x2a427e[_0x112347(0xc5)])[_0x112347(0xf9)]('-p,\x20--provider\x20<provider>',_0x2a427e['PzXjh'],_0x2a427e[_0x112347(0xf1)])['option'](_0x112347(0xcb),_0x2a427e[_0x112347(0xcc)])[_0x112347(0xf9)](_0x2a427e[_0x112347(0xcf)],'Analyze\x20inline\x20text\x20instead\x20of\x20file')[_0x112347(0xf5)]((_0x51e019,_0x5759ef)=>{const _0x490451=_0x112347,_0x57de37=_0x5759ef[_0x490451(0xf7)]??(_0x490451(0xec)===_0x5759ef['provider']?_0x490451(0xfa):'gpt-4o');let _0x2e5d7e,_0x4d0691;try{_0x2e5d7e=createTokenProvider(_0x5759ef['provider'],_0x57de37);}catch(_0x5d85bc){return console[_0x490451(0xcd)]('Error:\x20'+_0x5d85bc[_0x490451(0xf6)]),void(process['exitCode']=0x1);}if(_0x2a427e[_0x490451(0xd8)](void 0x0,_0x5759ef['text']))_0x4d0691=_0x5759ef[_0x490451(0xf0)];else{if(!_0x51e019)return console['error']('Error:\x20provide\x20a\x20file\x20argument\x20or\x20--text\x20option'),void(process['exitCode']=0x1);_0x4d0691=readFileSync(_0x51e019,_0x490451(0xda));}_0x4d0691[_0x490451(0xf8)]>0x7a120&&console['error'](_0x490451(0xed)+_0x2a427e[_0x490451(0xf2)](_0x4d0691['length'],0x3e8)['toFixed'](0x0)+_0x490451(0xc3));const _0x5b75e6=_0x2e5d7e[_0x490451(0xd4)](_0x4d0691),_0x1f41cc=_0x2e5d7e['estimateTokens'](_0x4d0691);console[_0x490451(0xeb)](JSON['stringify']({'file':_0x51e019??_0x490451(0xd9),'tokens':_0x5b75e6,'tokens_method':_0x490451(0xc8),'estimate':_0x1f41cc,'estimate_method':_0x490451(0xfc)+('openai'===_0x5759ef[_0x490451(0xc6)]?_0x490451(0xee):_0x2a427e['HCvAK'])+')','provider':_0x5759ef[_0x490451(0xc6)],'model':_0x57de37}));}),_0x2cbcb0[_0x112347(0xc7)](_0x2a427e['kfbOp'])[_0x112347(0xe0)](_0x2a427e['PSBqQ'])['argument'](_0x112347(0xd0),_0x112347(0xe7),'tokenizer-speedup.yaml')['action'](async _0x2a1412=>{const _0xfb2ea=_0x112347;try{const _0x289904=_0x2a427e[_0xfb2ea(0xd5)](readFileSync,_0x2a1412,_0xfb2ea(0xda)),{parseConfig:_0x15f25a}=await import('../plugin/config-loader.js'),_0x5ddab3=_0x2a427e[_0xfb2ea(0xe3)](_0x15f25a,_0x289904);console['log'](JSON['stringify']({'valid':!0x0,'provider':_0x5ddab3[_0xfb2ea(0xc6)],'model':_0x5ddab3['model'],'ruleCount':_0x5ddab3[_0xfb2ea(0xdd)]['length']}));}catch(_0x4e78d9){console['log'](JSON[_0xfb2ea(0xc4)]({'valid':!0x1,'error':_0x4e78d9['message']})),process['exitCode']=0x1;}}),_0x2cbcb0[_0x112347(0xc7)](_0x112347(0xd6))[_0x112347(0xe0)](_0x112347(0xd7))[_0x112347(0xf5)](()=>{runInit();}),_0x2cbcb0;}const resolvedArgv1=((()=>{const _0x3196e9=_0x5603;try{return realpathSync(process[_0x3196e9(0xc9)][0x1]??'')[_0x3196e9(0xf3)](/\\/g,'/');}catch{return process[_0x3196e9(0xc9)][0x1]?.[_0x3196e9(0xf3)](/\\/g,'/')??'';}})());function _0x5603(_0x69cbf1,_0x5d9afc){_0x69cbf1=_0x69cbf1-0xc3;const _0x30f3b0=_0x30f3();let _0x560314=_0x30f3b0[_0x69cbf1];return _0x560314;}resolvedArgv1['includes'](_0x58bb9f(0xdf))&&buildCLI()['parse']();
@@ -1 +1 @@
1
- function _0x3129(_0x352ab5,_0x436333){_0x352ab5=_0x352ab5-0xba;const _0x1d575c=_0x1d57();let _0x312966=_0x1d575c[_0x352ab5];return _0x312966;}const _0x2a9457=_0x3129;(function(_0x5a71d9,_0x5dfcf2){const _0x240227=_0x3129,_0xa57a91=_0x5a71d9();while(!![]){try{const _0x503491=parseInt(_0x240227(0xc8))/0x1+parseInt(_0x240227(0xc0))/0x2*(parseInt(_0x240227(0xc2))/0x3)+parseInt(_0x240227(0xba))/0x4*(-parseInt(_0x240227(0xc6))/0x5)+-parseInt(_0x240227(0xbf))/0x6*(-parseInt(_0x240227(0xbb))/0x7)+parseInt(_0x240227(0xc3))/0x8+parseInt(_0x240227(0xcc))/0x9*(-parseInt(_0x240227(0xcd))/0xa)+-parseInt(_0x240227(0xbe))/0xb*(-parseInt(_0x240227(0xcb))/0xc);if(_0x503491===_0x5dfcf2)break;else _0xa57a91['push'](_0xa57a91['shift']());}catch(_0x28891f){_0xa57a91['push'](_0xa57a91['shift']());}}}(_0x1d57,0x5a436));function _0x1d57(){const _0x1ef261=['Next\x20steps:','701272fITBmS','2238QJOOyZ','66206uggTbA','exitCode','6lNZFbK','3263792nXWvoX','tokenizer-speedup.yaml','log','335qEJvar','#\x20tokenizer-speedup.yaml\x20—\x20Project\x20Configuration\x0a#\x20Docs:\x20https://tokenizer-speedup.simosphereai.com/#integration\x0aversion:\x201\x0a\x0arules:\x0a\x20\x20-\x20trigger:\x20[\x22fix\x22,\x20\x22bug\x22,\x20\x22error\x22,\x20\x22crash\x22]\x0a\x20\x20\x20\x20load:\x20\x22docs/lessons-learned/*.md\x22\x0a\x20\x20\x20\x20max_tokens:\x202000\x0a\x0a\x20\x20-\x20trigger:\x20[\x22design\x22,\x20\x22brand\x22,\x20\x22theme\x22]\x0a\x20\x20\x20\x20load:\x20\x22docs/design/*.md\x22\x0a\x20\x20\x20\x20summary_only:\x20true\x0a\x0acontext_limits:\x0a\x20\x20max_injected_tokens:\x204000\x0a\x20\x20max_file_tokens:\x201500\x0a\x20\x20compress_above:\x20800\x0a\x0ametering:\x0a\x20\x20endpoint:\x20\x22https://api.simosphere.ai/v1/meter\x22\x0a\x20\x20batch_interval:\x2060\x0a\x20\x20send_content:\x20false\x0a','20949RtyTYK','VJABy','\x20\x203.\x20Restart\x20Claude\x20Code\x20to\x20pick\x20up\x20the\x20new\x20config','96BzPpbR','2587392iofAEu','20RwCWdq','cwd','34028BXoBPi','9562mazAXN','Created\x20tokenizer-speedup.yaml'];_0x1d57=function(){return _0x1ef261;};return _0x1d57();}import{writeFileSync,existsSync}from'node:fs';import{join}from'node:path';const STARTER_CONFIG=_0x2a9457(0xc7);export function runInit(){const _0x30adaa=_0x2a9457,_0x513bfc={'cOdoH':function(_0x16f44c,_0x208f6c,_0x4b9a5f){return _0x16f44c(_0x208f6c,_0x4b9a5f);},'VJABy':'tokenizer-speedup.yaml\x20already\x20exists\x20in\x20this\x20directory.','FwoPI':_0x30adaa(0xbd),'oltdH':'\x20\x201.\x20Edit\x20the\x20rules\x20to\x20match\x20your\x20project\x20structure','HRMSj':'\x20\x202.\x20Run:\x20tsu\x20config\x20tokenizer-speedup.yaml\x20\x20(to\x20validate)','klCuE':_0x30adaa(0xca)},_0x5ef78d=_0x513bfc['cOdoH'](join,process[_0x30adaa(0xce)](),_0x30adaa(0xc4));if(existsSync(_0x5ef78d))return console['error'](_0x513bfc[_0x30adaa(0xc9)]),void(process[_0x30adaa(0xc1)]=0x1);writeFileSync(_0x5ef78d,STARTER_CONFIG,'utf-8'),console['log'](_0x30adaa(0xbc)),console['log'](''),console[_0x30adaa(0xc5)](_0x513bfc['FwoPI']),console[_0x30adaa(0xc5)](_0x513bfc['oltdH']),console['log'](_0x513bfc['HRMSj']),console[_0x30adaa(0xc5)](_0x513bfc['klCuE']);}
1
+ const _0x2f47c4=_0xb127;function _0x2f9d(){const _0xc01917=['177lagwAi','tokenizer-speedup.yaml\x20already\x20exists\x20in\x20this\x20directory.','34DurVOM','5TMjBoY','47797QoZqfo','Created\x20tokenizer-speedup.yaml','11256300Yningo','error','48788cXlEQM','vWumu','22140459KIEhLy','exitCode','log','2595342Hbfllv','#\x20tokenizer-speedup.yaml\x20—\x20Project\x20Configuration\x0a#\x20Docs:\x20https://tokenizer-speedup.simosphereai.com/#integration\x0aversion:\x201\x0a\x0arules:\x0a\x20\x20-\x20trigger:\x20[\x22fix\x22,\x20\x22bug\x22,\x20\x22error\x22,\x20\x22crash\x22]\x0a\x20\x20\x20\x20load:\x20\x22docs/lessons-learned/*.md\x22\x0a\x20\x20\x20\x20max_tokens:\x202000\x0a\x0a\x20\x20-\x20trigger:\x20[\x22design\x22,\x20\x22brand\x22,\x20\x22theme\x22]\x0a\x20\x20\x20\x20load:\x20\x22docs/design/*.md\x22\x0a\x20\x20\x20\x20summary_only:\x20true\x0a\x0acontext_limits:\x0a\x20\x20max_injected_tokens:\x204000\x0a\x20\x20max_file_tokens:\x201500\x0a\x20\x20compress_above:\x20800\x0a\x0ametering:\x0a\x20\x20endpoint:\x20\x22https://api.simosphere.ai/v1/meter\x22\x0a\x20\x20batch_interval:\x2060\x0a\x20\x20send_content:\x20false\x0a','717471XpqwGd','\x20\x202.\x20Run:\x20tsu\x20config\x20tokenizer-speedup.yaml\x20\x20(to\x20validate)','8182825fAzWEE','gHGlw','\x20\x203.\x20Restart\x20Claude\x20Code\x20to\x20pick\x20up\x20the\x20new\x20config','utf-8','cwd','168QeyNCu'];_0x2f9d=function(){return _0xc01917;};return _0x2f9d();}(function(_0x106794,_0x1f6546){const _0x5a8954=_0xb127,_0x1b2a65=_0x106794();while(!![]){try{const _0x342fdd=parseInt(_0x5a8954(0xaf))/0x1*(-parseInt(_0x5a8954(0xad))/0x2)+parseInt(_0x5a8954(0xc2))/0x3*(-parseInt(_0x5a8954(0xb3))/0x4)+parseInt(_0x5a8954(0xae))/0x5*(parseInt(_0x5a8954(0xb8))/0x6)+parseInt(_0x5a8954(0xbc))/0x7+parseInt(_0x5a8954(0xc1))/0x8*(parseInt(_0x5a8954(0xba))/0x9)+parseInt(_0x5a8954(0xb1))/0xa+-parseInt(_0x5a8954(0xb5))/0xb;if(_0x342fdd===_0x1f6546)break;else _0x1b2a65['push'](_0x1b2a65['shift']());}catch(_0x571a48){_0x1b2a65['push'](_0x1b2a65['shift']());}}}(_0x2f9d,0xd1100));import{writeFileSync,existsSync}from'node:fs';function _0xb127(_0x15f257,_0x44b6d8){_0x15f257=_0x15f257-0xac;const _0x2f9dc5=_0x2f9d();let _0xb1279e=_0x2f9dc5[_0x15f257];return _0xb1279e;}import{join}from'node:path';const STARTER_CONFIG=_0x2f47c4(0xb9);export function runInit(){const _0x28c6ac=_0x2f47c4,_0xb03cb2={'PyXia':function(_0xe1fbd,_0x1a6593,_0x4c6064){return _0xe1fbd(_0x1a6593,_0x4c6064);},'zozVR':function(_0x29acbf,_0x38c4cc){return _0x29acbf(_0x38c4cc);},'UgPxu':function(_0x41c902,_0x5ea4f8,_0x2734d1,_0x18e5c6){return _0x41c902(_0x5ea4f8,_0x2734d1,_0x18e5c6);},'vWumu':_0x28c6ac(0xb0),'gHGlw':'\x20\x201.\x20Edit\x20the\x20rules\x20to\x20match\x20your\x20project\x20structure','juWzo':_0x28c6ac(0xbe)},_0x3e6e48=_0xb03cb2['PyXia'](join,process[_0x28c6ac(0xc0)](),'tokenizer-speedup.yaml');if(_0xb03cb2['zozVR'](existsSync,_0x3e6e48))return console[_0x28c6ac(0xb2)](_0x28c6ac(0xac)),void(process[_0x28c6ac(0xb6)]=0x1);_0xb03cb2['UgPxu'](writeFileSync,_0x3e6e48,STARTER_CONFIG,_0x28c6ac(0xbf)),console[_0x28c6ac(0xb7)](_0xb03cb2[_0x28c6ac(0xb4)]),console['log'](''),console[_0x28c6ac(0xb7)]('Next\x20steps:'),console[_0x28c6ac(0xb7)](_0xb03cb2[_0x28c6ac(0xbd)]),console['log'](_0x28c6ac(0xbb)),console[_0x28c6ac(0xb7)](_0xb03cb2['juWzo']);}
@@ -1 +1 @@
1
- const _0x41617e=_0x1534;(function(_0x1991c3,_0x5b6b77){const _0x3357c9=_0x1534,_0x5cc092=_0x1991c3();while(!![]){try{const _0x2bac3d=-parseInt(_0x3357c9(0xdc))/0x1+-parseInt(_0x3357c9(0xf3))/0x2+-parseInt(_0x3357c9(0xf0))/0x3*(-parseInt(_0x3357c9(0xe3))/0x4)+parseInt(_0x3357c9(0xdd))/0x5*(-parseInt(_0x3357c9(0xe4))/0x6)+parseInt(_0x3357c9(0xef))/0x7*(-parseInt(_0x3357c9(0xe2))/0x8)+-parseInt(_0x3357c9(0xea))/0x9*(parseInt(_0x3357c9(0xf1))/0xa)+parseInt(_0x3357c9(0xd3))/0xb;if(_0x2bac3d===_0x5b6b77)break;else _0x5cc092['push'](_0x5cc092['shift']());}catch(_0xb1525a){_0x5cc092['push'](_0x5cc092['shift']());}}}(_0x53da,0xb8f92));function _0x53da(){const _0x21194f=['✅\x20Hooks\x20registered\x20in\x20Claude\x20Code\x20settings.','.config','utf-8','PreCompact','error','hrVEm','46712743DeExJZ','NbwkE','❌\x20API\x20key\x20cannot\x20be\x20empty.','lGVpC','config.json','log','lXiFR','apiKey','length','423534uxGErS','205szHoLN','message','settings.local.json','tokenizer-speedup','command','1663848lGQALM','4XVzMBu','135390mfRMiT','hooks','QCPZi','⚠️\x20\x20Claude\x20Code\x20will\x20restart\x20automatically\x20to\x20load\x20the\x20plugin.\x20This\x20is\x20expected\x20behavior.','oisXX','mtLUV','1152VDUgev','.claude','exitCode','stringify','fdKUz','21gCACdf','362694VDruru','31830wiGVPF','qjgbs','2459590Usjhai'];_0x53da=function(){return _0x21194f;};return _0x53da();}import{readFileSync,writeFileSync,mkdirSync}from'node:fs';import{join}from'node:path';import{homedir}from'node:os';const CONFIG_DIR=join(homedir(),_0x41617e(0xf5),'tokenizer-speedup'),CONFIG_FILE=join(CONFIG_DIR,_0x41617e(0xd7)),CLAUDE_SETTINGS_FILE=join(homedir(),'.claude',_0x41617e(0xdf));export function runSetup(_0x2c0af7){const _0x9abaca=_0x41617e,_0x5e3470={'psMIf':_0x9abaca(0xd5),'hrVEm':'❌\x20API\x20key\x20is\x20too\x20short\x20(minimum\x208\x20characters).','eXTct':'✅\x20API\x20key\x20saved\x20successfully.','QCPZi':'Setup\x20complete.\x20Please\x20restart\x20Claude\x20Code\x20to\x20activate\x20the\x20plugin.'};try{if(!_0x2c0af7||0x0===_0x2c0af7['trim']()[_0x9abaca(0xdb)])return console['error'](_0x5e3470['psMIf']),void(process['exitCode']=0x1);if(_0x2c0af7['trim']()['length']<0x8)return console[_0x9abaca(0xd1)](_0x5e3470[_0x9abaca(0xd2)]),void(process[_0x9abaca(0xec)]=0x1);saveApiKey(_0x2c0af7['trim']()),console['log'](_0x5e3470['eXTct']),console[_0x9abaca(0xd8)](_0x9abaca(0xe7)),registerHooks(),console[_0x9abaca(0xd8)](_0x9abaca(0xf4)),console[_0x9abaca(0xd8)](''),console[_0x9abaca(0xd8)](_0x5e3470[_0x9abaca(0xe6)]);}catch(_0x1d8f76){console[_0x9abaca(0xd1)]('❌\x20Setup\x20failed:\x20'+_0x1d8f76[_0x9abaca(0xde)]),process[_0x9abaca(0xec)]=0x1;}}function _0x1534(_0x2450fd,_0x4cd41b){_0x2450fd=_0x2450fd-0xd0;const _0x53dafe=_0x53da();let _0x153457=_0x53dafe[_0x2450fd];return _0x153457;}function saveApiKey(_0x2c6c80){const _0x5513e1=_0x41617e,_0x42a7df={'mtLUV':function(_0x202be1,_0x3af6d1,_0x3c56dc){return _0x202be1(_0x3af6d1,_0x3c56dc);},'KXaVn':_0x5513e1(0xf6),'BANGU':function(_0x3bbdfe,_0x45cfe5,_0xc47ec0,_0x31a142){return _0x3bbdfe(_0x45cfe5,_0xc47ec0,_0x31a142);}};mkdirSync(CONFIG_DIR,{'recursive':!0x0});let _0x1a4fe7={};try{_0x1a4fe7=JSON['parse'](_0x42a7df[_0x5513e1(0xe9)](readFileSync,CONFIG_FILE,_0x42a7df['KXaVn']));}catch{}_0x1a4fe7['apiKey']=_0x2c6c80,_0x42a7df['BANGU'](writeFileSync,CONFIG_FILE,JSON['stringify'](_0x1a4fe7,null,0x2)+'\x0a','utf-8');}function registerHooks(){const _0x2c408b=_0x41617e,_0x2ff5d7={'lGVpC':function(_0x5131c2,_0x138f27,_0x3f58d5){return _0x5131c2(_0x138f27,_0x3f58d5);},'qjgbs':_0x2c408b(0xeb),'lXiFR':_0x2c408b(0xf6),'NbwkE':'command','fdKUz':'tokenizer-speedup','oisXX':function(_0x337289,_0xab3af5){return _0x337289+_0xab3af5;}};_0x2ff5d7[_0x2c408b(0xd6)](mkdirSync,join(homedir(),_0x2ff5d7[_0x2c408b(0xf2)]),{'recursive':!0x0});let _0x312547={};try{_0x312547=JSON['parse'](_0x2ff5d7[_0x2c408b(0xd6)](readFileSync,CLAUDE_SETTINGS_FILE,_0x2ff5d7[_0x2c408b(0xd9)]));}catch{}const _0x569757=_0x312547[_0x2c408b(0xe5)]??{};_0x569757['SessionStart']=[{'matcher':'startup|resume|clear|compact','hooks':[{'type':_0x2ff5d7[_0x2c408b(0xd4)],'command':_0x2ff5d7['fdKUz'],'timeout':0x5}]}],_0x569757['UserPromptSubmit']=[{'matcher':'','hooks':[{'type':'command','command':_0x2ff5d7[_0x2c408b(0xee)]}]}],_0x569757[_0x2c408b(0xd0)]=[{'matcher':'','hooks':[{'type':_0x2c408b(0xe1),'command':'tokenizer-speedup','timeout':0xa}]}],_0x569757['Stop']=[{'matcher':'','hooks':[{'type':'command','command':_0x2c408b(0xe0),'timeout':0xa}]}],_0x312547[_0x2c408b(0xe5)]=_0x569757,writeFileSync(CLAUDE_SETTINGS_FILE,_0x2ff5d7[_0x2c408b(0xe8)](JSON[_0x2c408b(0xed)](_0x312547,null,0x2),'\x0a'),_0x2ff5d7['lXiFR']);}export function loadApiKeyFromConfig(){const _0x57178d=_0x41617e,_0x58ea5a={'TxvHz':'utf-8'};try{return JSON['parse'](readFileSync(CONFIG_FILE,_0x58ea5a['TxvHz']))[_0x57178d(0xda)]??void 0x0;}catch{return;}}
1
+ function _0x5926(){const _0x1f45f9=['3318357XKBsZd','✅\x20API\x20key\x20saved\x20successfully.','6LfOiKo','Stop','error','72JDQoMM','command','856398FFaToq','ukiQq','apiKey','Setup\x20complete.\x20Please\x20restart\x20Claude\x20Code\x20to\x20activate\x20the\x20plugin.','settings.local.json','length','trim','log','27108675RFZRlr','YiTit','135530PgqyYf','message','191215yTmFPs','3757473vNVBjz','jUZeS','iyUrN','utf-8','exitCode','jqWLr','✅\x20Hooks\x20registered\x20in\x20Claude\x20Code\x20settings.','jhTAs','FeAUr','stringify','bJdjt','MjUjC','parse','tokenizer-speedup','2946568kqtRvH'];_0x5926=function(){return _0x1f45f9;};return _0x5926();}const _0x506328=_0x2d8f;(function(_0x359ea1,_0x31706c){const _0x5c281a=_0x2d8f,_0x28b22b=_0x359ea1();while(!![]){try{const _0x4cb707=-parseInt(_0x5c281a(0x1be))/0x1*(parseInt(_0x5c281a(0x1d2))/0x2)+-parseInt(_0x5c281a(0x1c1))/0x3+parseInt(_0x5c281a(0x1d5))/0x4*(-parseInt(_0x5c281a(0x1c0))/0x5)+-parseInt(_0x5c281a(0x1d7))/0x6+parseInt(_0x5c281a(0x1d0))/0x7+-parseInt(_0x5c281a(0x1cf))/0x8+parseInt(_0x5c281a(0x1df))/0x9;if(_0x4cb707===_0x31706c)break;else _0x28b22b['push'](_0x28b22b['shift']());}catch(_0x329f43){_0x28b22b['push'](_0x28b22b['shift']());}}}(_0x5926,0x993a1));import{readFileSync,writeFileSync,mkdirSync}from'node:fs';import{join}from'node:path';import{homedir}from'node:os';function _0x2d8f(_0x46e17f,_0x4365e0){_0x46e17f=_0x46e17f-0x1bd;const _0x5926ac=_0x5926();let _0x2d8f45=_0x5926ac[_0x46e17f];return _0x2d8f45;}const CONFIG_DIR=join(homedir(),'.config',_0x506328(0x1ce)),CONFIG_FILE=join(CONFIG_DIR,'config.json'),CLAUDE_SETTINGS_FILE=join(homedir(),'.claude',_0x506328(0x1db));export function runSetup(_0x39f417){const _0x53e3c0=_0x506328,_0x45d042={'jUZeS':'❌\x20API\x20key\x20cannot\x20be\x20empty.','bJdjt':'❌\x20API\x20key\x20is\x20too\x20short\x20(minimum\x208\x20characters).','jqWLr':function(_0x4fe9c4,_0x51926c){return _0x4fe9c4(_0x51926c);},'PCdfs':_0x53e3c0(0x1d1),'jhTAs':'⚠️\x20\x20Claude\x20Code\x20will\x20restart\x20automatically\x20to\x20load\x20the\x20plugin.\x20This\x20is\x20expected\x20behavior.','YiTit':function(_0x342577){return _0x342577();},'WCpEm':_0x53e3c0(0x1da)};try{if(!_0x39f417||0x0===_0x39f417[_0x53e3c0(0x1dd)]()[_0x53e3c0(0x1dc)])return console['error'](_0x45d042[_0x53e3c0(0x1c2)]),void(process[_0x53e3c0(0x1c5)]=0x1);if(_0x39f417[_0x53e3c0(0x1dd)]()[_0x53e3c0(0x1dc)]<0x8)return console[_0x53e3c0(0x1d4)](_0x45d042[_0x53e3c0(0x1cb)]),void(process[_0x53e3c0(0x1c5)]=0x1);_0x45d042[_0x53e3c0(0x1c6)](saveApiKey,_0x39f417['trim']()),console['log'](_0x45d042['PCdfs']),console[_0x53e3c0(0x1de)](_0x45d042[_0x53e3c0(0x1c8)]),_0x45d042[_0x53e3c0(0x1bd)](registerHooks),console['log'](_0x53e3c0(0x1c7)),console[_0x53e3c0(0x1de)](''),console['log'](_0x45d042['WCpEm']);}catch(_0x4f0eb0){console[_0x53e3c0(0x1d4)]('❌\x20Setup\x20failed:\x20'+_0x4f0eb0[_0x53e3c0(0x1bf)]),process[_0x53e3c0(0x1c5)]=0x1;}}function saveApiKey(_0x1836e1){const _0x439858=_0x506328,_0x24caba={'ukiQq':function(_0x2f87b3,_0x267fdf,_0x3a670f,_0x5a2778){return _0x2f87b3(_0x267fdf,_0x3a670f,_0x5a2778);}};mkdirSync(CONFIG_DIR,{'recursive':!0x0});let _0x37fffb={};try{_0x37fffb=JSON[_0x439858(0x1cd)](readFileSync(CONFIG_FILE,_0x439858(0x1c4)));}catch{}_0x37fffb[_0x439858(0x1d9)]=_0x1836e1,_0x24caba[_0x439858(0x1d8)](writeFileSync,CONFIG_FILE,JSON['stringify'](_0x37fffb,null,0x2)+'\x0a','utf-8');}function registerHooks(){const _0x546430=_0x506328,_0x161f25={'MjUjC':function(_0x2aeed9,_0x538996,_0xee300){return _0x2aeed9(_0x538996,_0xee300);},'FeAUr':function(_0x1c5e87){return _0x1c5e87();},'fvNHI':'.claude','zcYlL':_0x546430(0x1c4),'iyUrN':_0x546430(0x1d6),'KTmvl':'tokenizer-speedup'};_0x161f25[_0x546430(0x1cc)](mkdirSync,_0x161f25[_0x546430(0x1cc)](join,_0x161f25[_0x546430(0x1c9)](homedir),_0x161f25['fvNHI']),{'recursive':!0x0});let _0x55f5e7={};try{_0x55f5e7=JSON['parse'](readFileSync(CLAUDE_SETTINGS_FILE,_0x161f25['zcYlL']));}catch{}const _0x2391c5=_0x55f5e7['hooks']??{};_0x2391c5['SessionStart']=[{'matcher':'startup|resume|clear|compact','hooks':[{'type':_0x161f25[_0x546430(0x1c3)],'command':_0x161f25['KTmvl'],'timeout':0x5}]}],_0x2391c5['UserPromptSubmit']=[{'matcher':'','hooks':[{'type':_0x546430(0x1d6),'command':'tokenizer-speedup'}]}],_0x2391c5['PreCompact']=[{'matcher':'','hooks':[{'type':'command','command':_0x546430(0x1ce),'timeout':0xa}]}],_0x2391c5[_0x546430(0x1d3)]=[{'matcher':'','hooks':[{'type':_0x161f25[_0x546430(0x1c3)],'command':'tokenizer-speedup','timeout':0xa}]}],_0x55f5e7['hooks']=_0x2391c5,writeFileSync(CLAUDE_SETTINGS_FILE,JSON[_0x546430(0x1ca)](_0x55f5e7,null,0x2)+'\x0a',_0x546430(0x1c4));}export function loadApiKeyFromConfig(){const _0x320bcd=_0x506328,_0x2c8359={'YvZPQ':_0x320bcd(0x1c4)};try{return JSON[_0x320bcd(0x1cd)](readFileSync(CONFIG_FILE,_0x2c8359['YvZPQ']))[_0x320bcd(0x1d9)]??void 0x0;}catch{return;}}
@@ -1 +1 @@
1
- (function(_0x228326,_0x4f9e3e){const _0x5ddeb3=_0x5a65,_0xfdd56f=_0x228326();while(!![]){try{const _0x3ec4f9=parseInt(_0x5ddeb3(0x6e))/0x1*(parseInt(_0x5ddeb3(0x74))/0x2)+parseInt(_0x5ddeb3(0x68))/0x3+-parseInt(_0x5ddeb3(0x67))/0x4*(-parseInt(_0x5ddeb3(0x70))/0x5)+-parseInt(_0x5ddeb3(0x69))/0x6*(parseInt(_0x5ddeb3(0x6d))/0x7)+-parseInt(_0x5ddeb3(0x72))/0x8*(parseInt(_0x5ddeb3(0x66))/0x9)+-parseInt(_0x5ddeb3(0x73))/0xa*(-parseInt(_0x5ddeb3(0x6c))/0xb)+parseInt(_0x5ddeb3(0x65))/0xc*(parseInt(_0x5ddeb3(0x6b))/0xd);if(_0x3ec4f9===_0x4f9e3e)break;else _0xfdd56f['push'](_0xfdd56f['shift']());}catch(_0x12acde){_0xfdd56f['push'](_0xfdd56f['shift']());}}}(_0x2f6f,0xe57a5));function _0x5a65(_0x451e02,_0x886a6c){_0x451e02=_0x451e02-0x65;const _0x2f6f2b=_0x2f6f();let _0x5a651f=_0x2f6f2b[_0x451e02];return _0x5a651f;}export function buildCheckoutParams(_0x1228c7){const _0x464578=_0x5a65,_0x4d7733=[{'price':_0x1228c7['recurringPriceId'],'quantity':0x1}];return _0x1228c7['meteredPriceId']&&_0x4d7733['push']({'price':_0x1228c7['meteredPriceId']}),{'customer':_0x1228c7['customerId'],'mode':_0x464578(0x6f),'line_items':_0x4d7733,'success_url':_0x1228c7['successUrl'],'cancel_url':_0x1228c7[_0x464578(0x71)],'metadata':{'tier':_0x1228c7[_0x464578(0x6a)]}};}function _0x2f6f(){const _0x37168c=['6666KUOSzo','3126319QDFizM','1079803fkeRBs','subscription','9830AyJzdI','cancelUrl','201336cTHvSo','3700ntDCTA','2AuGwWb','1221684tSXLeg','270IEbLVJ','1352iToJEN','1366287bsOeEf','18vzJssi','tier','78BBeEIe'];_0x2f6f=function(){return _0x37168c;};return _0x2f6f();}
1
+ function _0x5dc3(_0x2f3bfd,_0x3dbb6f){_0x2f3bfd=_0x2f3bfd-0x77;const _0x296280=_0x2962();let _0x5dc3ef=_0x296280[_0x2f3bfd];return _0x5dc3ef;}function _0x2962(){const _0x1c4285=['subscription','1580448HOWLWP','successUrl','242298CcaTgW','push','2767233xfxkel','20872rbJBTQ','824190japBsm','meteredPriceId','347442zPtuPM','3094856XJgllo','tier','655AfDJXJ'];_0x2962=function(){return _0x1c4285;};return _0x2962();}(function(_0x3ba1c4,_0x4873dc){const _0x5643fc=_0x5dc3,_0x3f3b41=_0x3ba1c4();while(!![]){try{const _0x3f9658=parseInt(_0x5643fc(0x77))/0x1+-parseInt(_0x5643fc(0x7e))/0x2+-parseInt(_0x5643fc(0x82))/0x3+parseInt(_0x5643fc(0x81))/0x4*(parseInt(_0x5643fc(0x7a))/0x5)+-parseInt(_0x5643fc(0x7c))/0x6+parseInt(_0x5643fc(0x80))/0x7+-parseInt(_0x5643fc(0x78))/0x8;if(_0x3f9658===_0x4873dc)break;else _0x3f3b41['push'](_0x3f3b41['shift']());}catch(_0x31a50f){_0x3f3b41['push'](_0x3f3b41['shift']());}}}(_0x2962,0x5cd0f));export function buildCheckoutParams(_0x4bd3d1){const _0x5870d4=_0x5dc3,_0x225ef5={'lApww':_0x5870d4(0x7b)},_0x52b7fe=[{'price':_0x4bd3d1['recurringPriceId'],'quantity':0x1}];return _0x4bd3d1[_0x5870d4(0x83)]&&_0x52b7fe[_0x5870d4(0x7f)]({'price':_0x4bd3d1['meteredPriceId']}),{'customer':_0x4bd3d1['customerId'],'mode':_0x225ef5['lApww'],'line_items':_0x52b7fe,'success_url':_0x4bd3d1[_0x5870d4(0x7d)],'cancel_url':_0x4bd3d1['cancelUrl'],'metadata':{'tier':_0x4bd3d1[_0x5870d4(0x79)]}};}
@@ -1 +1 @@
1
- function _0x5900(_0xd65b73,_0x29bc61){_0xd65b73=_0xd65b73-0x10e;const _0x3be1be=_0x3be1();let _0x590054=_0x3be1be[_0xd65b73];return _0x590054;}function _0x3be1(){const _0x4fe9a5=['8363560ryLuzF','67839EKdLlg','1408673HnwLSh','196ICYWUb','18oeOAtW','15987544iWtxLw','3186022hTiOtu','3537342eSHLAG','Up\x20to\x20100K\x20tokens\x20saved/month.\x20Basic\x20dashboard.','7864150cOnHkC'];_0x3be1=function(){return _0x4fe9a5;};return _0x3be1();}const _0x4ebbb2=_0x5900;(function(_0x471432,_0x323011){const _0x16406d=_0x5900,_0x270d7e=_0x471432();while(!![]){try{const _0x4b2a5d=-parseInt(_0x16406d(0x111))/0x1+parseInt(_0x16406d(0x115))/0x2+parseInt(_0x16406d(0x110))/0x3*(-parseInt(_0x16406d(0x112))/0x4)+-parseInt(_0x16406d(0x10f))/0x5+parseInt(_0x16406d(0x116))/0x6+-parseInt(_0x16406d(0x10e))/0x7+-parseInt(_0x16406d(0x114))/0x8*(-parseInt(_0x16406d(0x113))/0x9);if(_0x4b2a5d===_0x323011)break;else _0x270d7e['push'](_0x270d7e['shift']());}catch(_0x57fbd2){_0x270d7e['push'](_0x270d7e['shift']());}}}(_0x3be1,0xd3916));export const STRIPE_CONFIG={'free':{'name':'TokenizerSpeedUp\x20Free','description':_0x4ebbb2(0x117),'recurringPrice':0x0},'pro':{'name':'TokenizerSpeedUp\x20Pro','description':'Unlimited\x20optimization.\x20$5/mo\x20+\x2010%\x20of\x20savings\x20over\x20500K\x20tokens.','recurringPrice':0x1f4,'meteredUnitAmount':0x1e},'team':{'name':'TokenizerSpeedUp\x20Team','description':'Per-seat\x20pricing.\x20$15/mo/seat\x20+\x208%\x20of\x20savings\x20over\x201M\x20tokens.','recurringPrice':0x5dc,'meteredUnitAmount':0x18}};
1
+ const _0x15bba3=_0x2008;(function(_0x3e2ce7,_0x1dadf5){const _0x5e6067=_0x2008,_0x566583=_0x3e2ce7();while(!![]){try{const _0x3e777f=-parseInt(_0x5e6067(0x149))/0x1*(-parseInt(_0x5e6067(0x14b))/0x2)+-parseInt(_0x5e6067(0x147))/0x3*(-parseInt(_0x5e6067(0x14f))/0x4)+parseInt(_0x5e6067(0x156))/0x5*(-parseInt(_0x5e6067(0x155))/0x6)+-parseInt(_0x5e6067(0x154))/0x7*(-parseInt(_0x5e6067(0x152))/0x8)+-parseInt(_0x5e6067(0x14e))/0x9+-parseInt(_0x5e6067(0x157))/0xa*(-parseInt(_0x5e6067(0x14d))/0xb)+parseInt(_0x5e6067(0x153))/0xc*(-parseInt(_0x5e6067(0x14c))/0xd);if(_0x3e777f===_0x1dadf5)break;else _0x566583['push'](_0x566583['shift']());}catch(_0x1d0c1e){_0x566583['push'](_0x566583['shift']());}}}(_0x330d,0xb6216));function _0x330d(){const _0x47c9ab=['696865hNzRrG','TokenizerSpeedUp\x20Team','4pMwtfM','962GpKZPQ','77HQYaDO','2801997OrQoNX','7636zPlUsX','Per-seat\x20pricing.\x20$15/mo/seat\x20+\x208%\x20of\x20savings\x20over\x201M\x20tokens.','Unlimited\x20optimization.\x20$5/mo\x20+\x2010%\x20of\x20savings\x20over\x20500K\x20tokens.','2041944dqpMtC','271212cMYZlZ','21gOWKKu','381216RlFgfD','30tqvirb','1193030IKVhrv','183IDZPPp','TokenizerSpeedUp\x20Pro'];_0x330d=function(){return _0x47c9ab;};return _0x330d();}function _0x2008(_0x1dedd9,_0x2aae02){_0x1dedd9=_0x1dedd9-0x147;const _0x330def=_0x330d();let _0x200898=_0x330def[_0x1dedd9];return _0x200898;}export const STRIPE_CONFIG={'free':{'name':'TokenizerSpeedUp\x20Free','description':'Up\x20to\x20100K\x20tokens\x20saved/month.\x20Basic\x20dashboard.','recurringPrice':0x0},'pro':{'name':_0x15bba3(0x148),'description':_0x15bba3(0x151),'recurringPrice':0x1f4,'meteredUnitAmount':0x1e},'team':{'name':_0x15bba3(0x14a),'description':_0x15bba3(0x150),'recurringPrice':0x5dc,'meteredUnitAmount':0x18}};
@@ -1 +1 @@
1
- const _0x596362=_0x377c;function _0x377c(_0x5604f7,_0x3cd733){_0x5604f7=_0x5604f7-0x82;const _0xff786c=_0xff78();let _0x377cfc=_0xff786c[_0x5604f7];return _0x377cfc;}(function(_0x23cf63,_0x353b48){const _0x5e11b7=_0x377c,_0x255401=_0x23cf63();while(!![]){try{const _0x31a789=parseInt(_0x5e11b7(0x95))/0x1*(-parseInt(_0x5e11b7(0x8d))/0x2)+-parseInt(_0x5e11b7(0x91))/0x3+-parseInt(_0x5e11b7(0x86))/0x4*(parseInt(_0x5e11b7(0x83))/0x5)+parseInt(_0x5e11b7(0x82))/0x6*(parseInt(_0x5e11b7(0x88))/0x7)+parseInt(_0x5e11b7(0x90))/0x8*(-parseInt(_0x5e11b7(0x8f))/0x9)+parseInt(_0x5e11b7(0x8c))/0xa*(parseInt(_0x5e11b7(0x94))/0xb)+parseInt(_0x5e11b7(0x87))/0xc;if(_0x31a789===_0x353b48)break;else _0x255401['push'](_0x255401['shift']());}catch(_0xbf742){_0x255401['push'](_0x255401['shift']());}}}(_0xff78,0xea6cb));function _0xff78(){const _0x5bbe91=['1qatjTv','4816458tiNNMy','2652505fVNOqL','chargeableUnits','xOBnb','4kPmLnb','26485788jJkYcT','7KOhacr','allowance','unitRate','meteredUnitAmount','10iAFRne','1703680PdIYMd','now','190332KHabqB','16eOuyNS','3036207UbeuXX','pro','set','4257187tNzahk'];_0xff78=function(){return _0x5bbe91;};return _0xff78();}import{STRIPE_CONFIG}from'./stripe-config.js';const TIER_LIMITS={'free':{'allowance':0x186a0,'unitRate':0x0},'pro':{'allowance':0x7a120,'unitRate':STRIPE_CONFIG[_0x596362(0x92)][_0x596362(0x8b)]},'team':{'allowance':0xf4240,'unitRate':STRIPE_CONFIG['team'][_0x596362(0x8b)]}};export function calculateUsageCharge(_0x553b14,_0x2a9391){const _0x44dbad=_0x596362,_0x3bae03={'xOBnb':function(_0x3b75e6,_0x3b449e){return _0x3b75e6===_0x3b449e;},'ddtHJ':function(_0x2a8cad,_0x3c3215){return _0x2a8cad-_0x3c3215;},'NhsaK':function(_0x457ae5,_0x260c1a){return _0x457ae5/_0x260c1a;}},_0x334655=TIER_LIMITS[_0x553b14];if(_0x3bae03[_0x44dbad(0x85)](0x0,_0x334655[_0x44dbad(0x8a)]))return{'tier':_0x553b14,'tokensSaved':_0x2a9391,'freeAllowance':_0x334655[_0x44dbad(0x89)],'chargeableTokens':0x0,'chargeableUnits':0x0,'unitRate':0x0,'amount':0x0};const _0x80c74e=Math['max'](0x0,_0x3bae03['ddtHJ'](_0x2a9391,_0x334655[_0x44dbad(0x89)])),_0x158cb4=Math['ceil'](_0x3bae03['NhsaK'](_0x80c74e,0x186a0)),_0xaa8a09=_0x158cb4*_0x334655['unitRate'];return{'tier':_0x553b14,'tokensSaved':_0x2a9391,'freeAllowance':_0x334655['allowance'],'chargeableTokens':_0x80c74e,'chargeableUnits':_0x158cb4,'unitRate':_0x334655['unitRate'],'amount':_0xaa8a09};}export function buildUsageRecord(_0x21fdf3,_0x201194){const _0x2cadde=_0x596362;return{'subscription_item':_0x21fdf3,'quantity':_0x201194,'action':_0x2cadde(0x93),'timestamp':Math['floor'](Date[_0x2cadde(0x8e)]()/0x3e8)};}export function prepareUsageSync(_0x565b00,_0x386054,_0x3e50cd){const _0x1d4321=_0x596362;if(!_0x3e50cd)return{'synced':!0x1,'subscriptionItemId':'','chargeableUnits':0x0,'tier':_0x565b00,'error':'no\x20subscription_item_id'};const _0x457d98=calculateUsageCharge(_0x565b00,_0x386054);if(0x0===_0x457d98[_0x1d4321(0x84)])return{'synced':!0x0,'subscriptionItemId':_0x3e50cd,'chargeableUnits':0x0,'tier':_0x565b00};return buildUsageRecord(_0x3e50cd,_0x457d98[_0x1d4321(0x84)]),{'synced':!0x0,'subscriptionItemId':_0x3e50cd,'chargeableUnits':_0x457d98[_0x1d4321(0x84)],'tier':_0x565b00};}
1
+ const _0x5bc67a=_0x1e6b;(function(_0x5d6a7c,_0x1491f6){const _0x18e154=_0x1e6b,_0x44cb8c=_0x5d6a7c();while(!![]){try{const _0x58fa09=parseInt(_0x18e154(0xd3))/0x1*(-parseInt(_0x18e154(0xd9))/0x2)+parseInt(_0x18e154(0xe4))/0x3*(parseInt(_0x18e154(0xd8))/0x4)+-parseInt(_0x18e154(0xd6))/0x5*(-parseInt(_0x18e154(0xda))/0x6)+parseInt(_0x18e154(0xdc))/0x7+-parseInt(_0x18e154(0xd4))/0x8+parseInt(_0x18e154(0xd2))/0x9*(-parseInt(_0x18e154(0xdd))/0xa)+parseInt(_0x18e154(0xd7))/0xb;if(_0x58fa09===_0x1491f6)break;else _0x44cb8c['push'](_0x44cb8c['shift']());}catch(_0x343709){_0x44cb8c['push'](_0x44cb8c['shift']());}}}(_0x201e,0x5ad6e));function _0x201e(){const _0x59b3c3=['4380icRpLU','1135476dlsavY','allowance','3013115UVwboN','1786930FzpCCI','unitRate','meteredUnitAmount','now','floor','team','dujHl','10683VyFFMp','aBDbZ','ceil','27qHXOrU','70veNXQU','2560000EkESLo','chargeableUnits','10SLFtkH','1048806tzUsDI','536HgtQWh'];_0x201e=function(){return _0x59b3c3;};return _0x201e();}import{STRIPE_CONFIG}from'./stripe-config.js';function _0x1e6b(_0x2efd77,_0x3f46ac){_0x2efd77=_0x2efd77-0xd1;const _0x201e89=_0x201e();let _0x1e6b36=_0x201e89[_0x2efd77];return _0x1e6b36;}const TIER_LIMITS={'free':{'allowance':0x186a0,'unitRate':0x0},'pro':{'allowance':0x7a120,'unitRate':STRIPE_CONFIG['pro'][_0x5bc67a(0xdf)]},'team':{'allowance':0xf4240,'unitRate':STRIPE_CONFIG[_0x5bc67a(0xe2)]['meteredUnitAmount']}};export function calculateUsageCharge(_0x2418e0,_0x349e88){const _0x2e70ef=_0x5bc67a,_0x4a7b40={'dujHl':function(_0x2b164d,_0x34451e){return _0x2b164d*_0x34451e;}},_0x505789=TIER_LIMITS[_0x2418e0];if(0x0===_0x505789['unitRate'])return{'tier':_0x2418e0,'tokensSaved':_0x349e88,'freeAllowance':_0x505789[_0x2e70ef(0xdb)],'chargeableTokens':0x0,'chargeableUnits':0x0,'unitRate':0x0,'amount':0x0};const _0x138628=Math['max'](0x0,_0x349e88-_0x505789[_0x2e70ef(0xdb)]),_0x5d23f1=Math[_0x2e70ef(0xd1)](_0x138628/0x186a0),_0x4df7ec=_0x4a7b40[_0x2e70ef(0xe3)](_0x5d23f1,_0x505789[_0x2e70ef(0xde)]);return{'tier':_0x2418e0,'tokensSaved':_0x349e88,'freeAllowance':_0x505789[_0x2e70ef(0xdb)],'chargeableTokens':_0x138628,'chargeableUnits':_0x5d23f1,'unitRate':_0x505789['unitRate'],'amount':_0x4df7ec};}export function buildUsageRecord(_0x5cfa9d,_0xb85db7){const _0x4804b5=_0x5bc67a;return{'subscription_item':_0x5cfa9d,'quantity':_0xb85db7,'action':'set','timestamp':Math[_0x4804b5(0xe1)](Date[_0x4804b5(0xe0)]()/0x3e8)};}export function prepareUsageSync(_0x44cd59,_0x28d1c8,_0x15b949){const _0x513475=_0x5bc67a,_0x3525d6={'aNFIS':function(_0x3ae90a,_0x134189,_0xa27858){return _0x3ae90a(_0x134189,_0xa27858);},'aBDbZ':function(_0xe62e7,_0x3d90bd){return _0xe62e7===_0x3d90bd;},'KxwuY':function(_0x32e02a,_0x341333,_0x2ac756){return _0x32e02a(_0x341333,_0x2ac756);}};if(!_0x15b949)return{'synced':!0x1,'subscriptionItemId':'','chargeableUnits':0x0,'tier':_0x44cd59,'error':'no\x20subscription_item_id'};const _0x2f54a0=_0x3525d6['aNFIS'](calculateUsageCharge,_0x44cd59,_0x28d1c8);if(_0x3525d6[_0x513475(0xe5)](0x0,_0x2f54a0['chargeableUnits']))return{'synced':!0x0,'subscriptionItemId':_0x15b949,'chargeableUnits':0x0,'tier':_0x44cd59};return _0x3525d6['KxwuY'](buildUsageRecord,_0x15b949,_0x2f54a0['chargeableUnits']),{'synced':!0x0,'subscriptionItemId':_0x15b949,'chargeableUnits':_0x2f54a0[_0x513475(0xd5)],'tier':_0x44cd59};}
@@ -1 +1 @@
1
- (function(_0xeea41,_0x3bc6c3){const _0x1100dc=_0x5033,_0x295299=_0xeea41();while(!![]){try{const _0x443735=-parseInt(_0x1100dc(0x1b3))/0x1+-parseInt(_0x1100dc(0x1b2))/0x2*(-parseInt(_0x1100dc(0x1a5))/0x3)+parseInt(_0x1100dc(0x1b7))/0x4*(-parseInt(_0x1100dc(0x1ba))/0x5)+-parseInt(_0x1100dc(0x1b6))/0x6*(-parseInt(_0x1100dc(0x1b0))/0x7)+-parseInt(_0x1100dc(0x19f))/0x8*(parseInt(_0x1100dc(0x1a1))/0x9)+parseInt(_0x1100dc(0x1b4))/0xa*(-parseInt(_0x1100dc(0x1ab))/0xb)+parseInt(_0x1100dc(0x1af))/0xc;if(_0x443735===_0x3bc6c3)break;else _0x295299['push'](_0x295299['shift']());}catch(_0x51ad05){_0x295299['push'](_0x295299['shift']());}}}(_0x281c,0x726cd));export function handleWebhookEvent(_0x23fb2e,_0x3fc582){const _0x48a098=_0x5033,_0x492f98={'oztHz':'invoice_paid','oaqqq':_0x48a098(0x1a4),'IIqby':_0x48a098(0x1a2),'ygfdZ':_0x48a098(0x1ae),'aFAtf':function(_0x563fb9,_0x19c2f9){return _0x563fb9(_0x19c2f9);},'PxcBA':'subscription_canceled','ovYHU':'canceled','SSSrJ':'free'};switch(_0x23fb2e[_0x48a098(0x1ad)]){case _0x48a098(0x1bc):{const _0x527e18=_0x23fb2e[_0x48a098(0x1b9)]['object'];return{'handled':!0x0,'action':_0x492f98['oztHz'],'customerId':_0x527e18[_0x48a098(0x1bb)],'subscriptionId':_0x527e18[_0x48a098(0x1b8)]};}case _0x492f98[_0x48a098(0x19c)]:{const _0x18a142=_0x23fb2e['data']['object'],_0x57f18b={'handled':!0x0,'action':_0x492f98['IIqby'],'customerId':_0x18a142['customer'],'subscriptionId':_0x18a142['id']};return _0x3fc582&&_0x3fc582[_0x48a098(0x1a7)]({'id':_0x18a142['id'],'customerId':_0x18a142[_0x48a098(0x1bb)],'status':_0x18a142[_0x48a098(0x1a8)]||_0x492f98['ygfdZ'],'tier':_0x18a142['metadata']?.['tier']||'free','currentPeriodEnd':_0x18a142[_0x48a098(0x1ac)]||0x0,'meteredSubscriptionItemId':_0x492f98[_0x48a098(0x1aa)](extractMeteredItemId,_0x18a142),'updatedAt':''}),_0x57f18b;}case _0x48a098(0x19e):{const _0x4ffe7a=_0x23fb2e['data']['object'],_0x561786={'handled':!0x0,'action':_0x492f98['PxcBA'],'customerId':_0x4ffe7a[_0x48a098(0x1bb)],'subscriptionId':_0x4ffe7a['id']};return _0x3fc582&&_0x3fc582['upsert']({'id':_0x4ffe7a['id'],'customerId':_0x4ffe7a['customer'],'status':_0x492f98[_0x48a098(0x1b5)],'tier':_0x4ffe7a['metadata']?.[_0x48a098(0x1a9)]||_0x492f98[_0x48a098(0x1a6)],'currentPeriodEnd':_0x4ffe7a[_0x48a098(0x1ac)]||0x0,'updatedAt':''}),_0x561786;}default:return{'handled':!0x1,'action':_0x48a098(0x19d)};}}function extractMeteredItemId(_0x5c5a2a){const _0x5f2bcc=_0x5033,_0x269d22=_0x5c5a2a[_0x5f2bcc(0x1a3)];if(!_0x269d22?.['data'])return;const _0x3dba44=_0x269d22['data'][_0x5f2bcc(0x1b1)](_0x2b160b=>'metered'===_0x2b160b[_0x5f2bcc(0x1a0)]?.['recurring']?.['usage_type']);return _0x3dba44?.['id'];}function _0x5033(_0x87105d,_0xc8b0b4){_0x87105d=_0x87105d-0x19c;const _0x281cff=_0x281c();let _0x50332c=_0x281cff[_0x87105d];return _0x50332c;}function _0x281c(){const _0x17e580=['497626XuoFgi','48331fAuQpp','680bDYWba','ovYHU','72tCprbS','1676188GTOcJX','subscription','data','5JuSvdj','customer','invoice.paid','oaqqq','ignored','customer.subscription.deleted','8fPfwBF','price','6004683DPnRuA','subscription_updated','items','customer.subscription.updated','3kMaXEC','SSSrJ','upsert','status','tier','aFAtf','133441pjfuUg','current_period_end','type','active','23454876DKVhes','131117BXBOtt','find'];_0x281c=function(){return _0x17e580;};return _0x281c();}
1
+ function _0x4dc2(_0x42fb57,_0x2f1a63){_0x42fb57=_0x42fb57-0x68;const _0x217855=_0x2178();let _0x4dc284=_0x217855[_0x42fb57];return _0x4dc284;}function _0x2178(){const _0x504d79=['data','976654uxWVKA','current_period_end','metered','invoice.paid','object','wgfAQ','usage_type','invoice_paid','4458wuZVTY','6kMthjO','514695vGxtdF','11veeYWT','357jHZdaQ','type','481AfakMj','265340NhVQLO','customer','2409324zrIrbQ','subscription_updated','299orlplK','price','active','37848bvxyHE','1005957UmUnPY','6PCuMUd','10wYoaxD','customer.subscription.updated','upsert','InXoT'];_0x2178=function(){return _0x504d79;};return _0x2178();}(function(_0x290947,_0x1663a1){const _0x2bf56d=_0x4dc2,_0x79b910=_0x290947();while(!![]){try{const _0x27f30c=-parseInt(_0x2bf56d(0x71))/0x1*(parseInt(_0x2bf56d(0x6b))/0x2)+-parseInt(_0x2bf56d(0x7b))/0x3*(-parseInt(_0x2bf56d(0x72))/0x4)+-parseInt(_0x2bf56d(0x6d))/0x5*(-parseInt(_0x2bf56d(0x6c))/0x6)+-parseInt(_0x2bf56d(0x6f))/0x7*(parseInt(_0x2bf56d(0x79))/0x8)+parseInt(_0x2bf56d(0x7a))/0x9*(-parseInt(_0x2bf56d(0x7c))/0xa)+-parseInt(_0x2bf56d(0x6e))/0xb*(-parseInt(_0x2bf56d(0x74))/0xc)+parseInt(_0x2bf56d(0x76))/0xd*(parseInt(_0x2bf56d(0x81))/0xe);if(_0x27f30c===_0x1663a1)break;else _0x79b910['push'](_0x79b910['shift']());}catch(_0x217146){_0x79b910['push'](_0x79b910['shift']());}}}(_0x2178,0x96506));export function handleWebhookEvent(_0x164938,_0x7699b1){const _0x4098eb=_0x4dc2,_0x43a378={'zMRuo':_0x4098eb(0x6a),'InXoT':_0x4098eb(0x78),'BPiOv':'customer.subscription.deleted','lekZJ':'subscription_canceled','wgfAQ':'free','FPaeA':'ignored'};switch(_0x164938[_0x4098eb(0x70)]){case _0x4098eb(0x84):{const _0x38c133=_0x164938[_0x4098eb(0x80)][_0x4098eb(0x85)];return{'handled':!0x0,'action':_0x43a378['zMRuo'],'customerId':_0x38c133[_0x4098eb(0x73)],'subscriptionId':_0x38c133['subscription']};}case _0x4098eb(0x7d):{const _0x36f253=_0x164938[_0x4098eb(0x80)]['object'],_0x2bf1cf={'handled':!0x0,'action':_0x4098eb(0x75),'customerId':_0x36f253[_0x4098eb(0x73)],'subscriptionId':_0x36f253['id']};return _0x7699b1&&_0x7699b1[_0x4098eb(0x7e)]({'id':_0x36f253['id'],'customerId':_0x36f253[_0x4098eb(0x73)],'status':_0x36f253['status']||_0x43a378[_0x4098eb(0x7f)],'tier':_0x36f253['metadata']?.['tier']||'free','currentPeriodEnd':_0x36f253[_0x4098eb(0x82)]||0x0,'meteredSubscriptionItemId':extractMeteredItemId(_0x36f253),'updatedAt':''}),_0x2bf1cf;}case _0x43a378['BPiOv']:{const _0x45fafc=_0x164938[_0x4098eb(0x80)][_0x4098eb(0x85)],_0x52a7fe={'handled':!0x0,'action':_0x43a378['lekZJ'],'customerId':_0x45fafc['customer'],'subscriptionId':_0x45fafc['id']};return _0x7699b1&&_0x7699b1['upsert']({'id':_0x45fafc['id'],'customerId':_0x45fafc[_0x4098eb(0x73)],'status':'canceled','tier':_0x45fafc['metadata']?.['tier']||_0x43a378[_0x4098eb(0x68)],'currentPeriodEnd':_0x45fafc['current_period_end']||0x0,'updatedAt':''}),_0x52a7fe;}default:return{'handled':!0x1,'action':_0x43a378['FPaeA']};}}function extractMeteredItemId(_0x2a6e1f){const _0x10be84=_0x4dc2,_0x564fff=_0x2a6e1f['items'];if(!_0x564fff?.[_0x10be84(0x80)])return;const _0x153441=_0x564fff['data']['find'](_0x5b383b=>_0x10be84(0x83)===_0x5b383b[_0x10be84(0x77)]?.['recurring']?.[_0x10be84(0x69)]);return _0x153441?.['id'];}
@@ -1 +1 @@
1
- function _0x354d(){const _0x168ca8=['getBySubscriptionId','subs','getByCustomerId','2224530vEWzly','8BmIGnJ','756695hcaQKZ','4stjVay','1466025InJxEC','194117KuOTBo','610473SrNtod','108DVBpOC','111659KtREms','6scmlVq','toISOString','3924558yixomn','upsert','get','list','values','6KmdwPE'];_0x354d=function(){return _0x168ca8;};return _0x354d();}function _0x53d8(_0x417cd2,_0x4d24eb){_0x417cd2=_0x417cd2-0x8c;const _0x354d6b=_0x354d();let _0x53d82c=_0x354d6b[_0x417cd2];return _0x53d82c;}const _0x3d47e6=_0x53d8;(function(_0x3c0b94,_0x57428a){const _0x2ce616=_0x53d8,_0x21ab15=_0x3c0b94();while(!![]){try{const _0x16ef18=parseInt(_0x2ce616(0x8d))/0x1*(-parseInt(_0x2ce616(0x8e))/0x2)+parseInt(_0x2ce616(0x9f))/0x3*(-parseInt(_0x2ce616(0x9c))/0x4)+parseInt(_0x2ce616(0x9b))/0x5*(-parseInt(_0x2ce616(0x95))/0x6)+-parseInt(_0x2ce616(0x9e))/0x7*(parseInt(_0x2ce616(0x9a))/0x8)+-parseInt(_0x2ce616(0x90))/0x9+parseInt(_0x2ce616(0x99))/0xa+-parseInt(_0x2ce616(0x9d))/0xb*(-parseInt(_0x2ce616(0x8c))/0xc);if(_0x16ef18===_0x57428a)break;else _0x21ab15['push'](_0x21ab15['shift']());}catch(_0x5ba08b){_0x21ab15['push'](_0x21ab15['shift']());}}}(_0x354d,0x41828));export class MemorySubscriptionStore{['subs']=new Map();[_0x3d47e6(0x91)](_0x2d2127){const _0x5702fc=_0x3d47e6;_0x2d2127['updatedAt']=new Date()[_0x5702fc(0x8f)](),this[_0x5702fc(0x97)]['set'](_0x2d2127['id'],_0x2d2127);}[_0x3d47e6(0x98)](_0x45fc90){const _0x248b04=_0x3d47e6;for(const _0x8b450b of this['subs'][_0x248b04(0x94)]())if(_0x8b450b['customerId']===_0x45fc90)return _0x8b450b;}[_0x3d47e6(0x96)](_0x1ef39d){const _0x35a2ad=_0x3d47e6;return this[_0x35a2ad(0x97)][_0x35a2ad(0x92)](_0x1ef39d);}[_0x3d47e6(0x93)](){return[...this['subs']['values']()];}}
1
+ const _0x3fe062=_0x37b0;function _0x37b0(_0x3836f3,_0x496f1c){_0x3836f3=_0x3836f3-0xf9;const _0x41614c=_0x4161();let _0x37b043=_0x41614c[_0x3836f3];return _0x37b043;}function _0x4161(){const _0x3fbdb0=['5619165sMVluq','getByCustomerId','updatedAt','1978924HRbWOq','subs','818424ldgXBi','3946026Mioely','90AniDlM','3isUeti','4094101iCDhwZ','getBySubscriptionId','10nAzGhW','set','161263ZGhbhY','6724176tFoAcc','14evvGgD','values'];_0x4161=function(){return _0x3fbdb0;};return _0x4161();}(function(_0x5a6c93,_0x23ba36){const _0x74908e=_0x37b0,_0x16ff70=_0x5a6c93();while(!![]){try{const _0x3abbad=-parseInt(_0x74908e(0xf9))/0x1*(parseInt(_0x74908e(0xfb))/0x2)+parseInt(_0x74908e(0x105))/0x3*(parseInt(_0x74908e(0x100))/0x4)+-parseInt(_0x74908e(0xfd))/0x5+parseInt(_0x74908e(0xfa))/0x6+parseInt(_0x74908e(0x103))/0x7+parseInt(_0x74908e(0x102))/0x8*(parseInt(_0x74908e(0x104))/0x9)+parseInt(_0x74908e(0x108))/0xa*(-parseInt(_0x74908e(0x106))/0xb);if(_0x3abbad===_0x23ba36)break;else _0x16ff70['push'](_0x16ff70['shift']());}catch(_0x41a5fb){_0x16ff70['push'](_0x16ff70['shift']());}}}(_0x4161,0x8cf1e));export class MemorySubscriptionStore{[_0x3fe062(0x101)]=new Map();['upsert'](_0x3e80ad){const _0x537026=_0x3fe062;_0x3e80ad[_0x537026(0xff)]=new Date()['toISOString'](),this['subs'][_0x537026(0x109)](_0x3e80ad['id'],_0x3e80ad);}[_0x3fe062(0xfe)](_0x200285){const _0x237102=_0x3fe062;for(const _0x1c2ed8 of this[_0x237102(0x101)][_0x237102(0xfc)]())if(_0x1c2ed8['customerId']===_0x200285)return _0x1c2ed8;}[_0x3fe062(0x107)](_0x24b17e){return this['subs']['get'](_0x24b17e);}['list'](){const _0x1e3d77=_0x3fe062;return[...this['subs'][_0x1e3d77(0xfc)]()];}}
@@ -1,42 +1,51 @@
1
1
  {
2
- "version": "0.8.0",
3
- "build": "2026-03-06T07:17:53.595Z",
2
+ "version": "0.9.0",
3
+ "build": "2026-07-03T09:08:40.413Z",
4
4
  "files": {
5
- "cli/analyze.js": "sha256:2660132f164679a1c4bafed6c48f2b6a1ef52783b7a88eef87614d56b5f395e8",
6
- "cli/config-cmd.js": "sha256:479080c7040c7d5bbefa36cf83c088350ca8297e5fd8ed9231ac857be246d1ca",
7
- "cli/index.js": "sha256:80281174bd64289d5fd07aee315a6b92a3d023f2175f86140074f44243adf073",
8
- "cli/init-cmd.js": "sha256:054c0272a2cefb03de1664e7386ba134294a8e5e157a7a84a6f6783e178aea16",
9
- "cli/setup-cmd.js": "sha256:7fbdc329457ae14900781037b14b979a259ab2b27958d419619d5450e30bf88e",
10
- "cloud/stripe-checkout.js": "sha256:0d16626a91fbddfa56ce861edf9eb2103478b8e0f0bdbf31e8039ca7bcd50711",
11
- "cloud/stripe-config.js": "sha256:6874bdc5182cadbef69359a23bd25ca0237ae8efefe7a8eb1e32927b016b42ca",
12
- "cloud/stripe-usage.js": "sha256:4a1fa80e6a90cd4818ba0c4cd3f8ad143ef022165afc5b3eab98794453647d3d",
13
- "cloud/stripe-webhooks.js": "sha256:2ed6190b448e744707fb32d4d6d180ccc12732d927a74bd0925005d3d18c8d6a",
14
- "cloud/subscription-store.js": "sha256:2351edd7b985ea0871ac22202c80675de84ff26e3463b79dc76ac5d85567979c",
15
- "mcp/index.js": "sha256:2b2dbe5e163559779fbec6368aeaa2a337faf99c73021e8ae78b2af4af21b0bc",
16
- "mcp/resources.js": "sha256:efff3d4481e85943ce7ff8e650020db52f464405671caf2d3394da61f53bc48f",
17
- "mcp/session.js": "sha256:74533896a5dce8ebf64c4b8549933a4e205559fcb36318c14098afd82c8c0c99",
18
- "mcp/tools.js": "sha256:4a4d795ed04955c312d7cf7edbe4ee295039a21010be37ee924014e2f906ed9e",
19
- "plugin/cli.js": "sha256:13123755c7b0210c781fcfcd5884999b867a72929d522030147ecee698bfbded",
20
- "plugin/config-loader.js": "sha256:d7c2af4d502e1fa453e0e695cf5db47b996290e87ca269cd0f1fd14aa9f3ac4f",
21
- "plugin/context-compressor.js": "sha256:db0b53d1d130e89f8613846196de119dfdc21f17f5ba9a4abd7c00fe548b0d0b",
22
- "plugin/hook-dispatcher.js": "sha256:acd37f235fa04d9d73b3732ca8e5a7319612be79c74fb0910f45b5aaa339c705",
23
- "plugin/metering-client.js": "sha256:eb69619e4af16afecb4faf436f92523520d3685442fa79c4c2cad0d1cc3d5c04",
24
- "plugin/metrics-collector.js": "sha256:7bfd5c90c845832f80ff833b3cd36899c837eab1f9bf37f8e5409ea41dfdfc2c",
25
- "plugin/onboarding.js": "sha256:fa1dcac9b8d6ff0cf39d8a5fd5dc61ace8dfac62442f36ba08aa9c335a40b337",
26
- "plugin/precompact-handler.js": "sha256:80dc8ccce1c81272e2d1c782a5435628f43a7affe84b884c45f989d52692edbf",
27
- "plugin/report.js": "sha256:82afb2df8c583f70b1faee3dde21c9bc5506b6e5875f7e3abb02b92504f12374",
28
- "plugin/rule-analytics-store.js": "sha256:65ef369b40b4d8e52bca884c5da835a315a68feefb90ed3b7e314ddfb5798bde",
29
- "plugin/rule-analytics.js": "sha256:3054ff3ff8ea5c341d8f1adffda2b1373d6ce44345aa32161ff41c40a07cd9d5",
30
- "plugin/rule-engine.js": "sha256:84281219abda1340c7bac4177d2551131c65551c4e232f26c6ba59aa70585157",
31
- "plugin/rule-sharing.js": "sha256:ccdb44b756668e097d723dcd8f710b75457dfd8273fe7b78f8fc3ee98a58e156",
32
- "plugin/rule-suggest.js": "sha256:261957883fce3c6436f73ebfe4755b160c02b63b70f50fc97a59a088c0caa1f5",
33
- "plugin/session-start.js": "sha256:3dde7f3921794452194ee67db4103e93e0be0d07acd8568c6a95f57d4b91e7ff",
34
- "plugin/smart-context.js": "sha256:d3ffca04f311daa3c5123f09aa769718c63dc0688b6b94dc56359f7a93fb6130",
35
- "shared/license.js": "sha256:fb5f8ec80d5ecb94f5dc4cbca36e3b33d11b288ab326c7969bb336ed88f1a6a8",
36
- "shared/providers/claude-provider.js": "sha256:c6358d056d12cd2a4985cd504fda37b14a940fbd1bd0b4aa014741daf8d92585",
37
- "shared/providers/openai-provider.js": "sha256:eb4e02edcc3555d37990cae8ec1b1ec60c690fcf5d616712effcb23e8b757183",
38
- "shared/token-counter.js": "sha256:af0d79a4bd51ee32b37659a1cf5093eaa55f49d14abfc1c3fde8a033edcdb629",
39
- "shared/token-provider.js": "sha256:e33cd63603c0fadf0d470552dabe5738a7330bea2010b58bb975b0a2b9f505d9",
5
+ "cli/analyze.js": "sha256:ebe65ed4b29979af6cfd6f0a4ec66d7b42bcefe7e380689855b56fab12807208",
6
+ "cli/config-cmd.js": "sha256:70faeb118e3aa77f9cd919ad00d0fb3b35811bef1d8d4b274fc215fa837ba328",
7
+ "cli/index.js": "sha256:d0dcbb24f0819ec207c8b28b14f01c3674a34eb53f7417c45b0ead54aae2f090",
8
+ "cli/init-cmd.js": "sha256:c62535c8a25381a66a227645a3b27dbd7b1255c5b324bb756b8996e9cef2e577",
9
+ "cli/setup-cmd.js": "sha256:e2398fbc709acd15c1894229e20420a6838949fd89ae3178a1a17ac7dc9fadc2",
10
+ "cloud/stripe-checkout.js": "sha256:e54208ff904abcc6afc147cb3dca7413dd9417362199a24a728ce611a69a0b01",
11
+ "cloud/stripe-config.js": "sha256:0ce49547bca01825f493ab0f2273b697e0617111c6f6c36853e0b16aa628ed31",
12
+ "cloud/stripe-usage.js": "sha256:b2b55067bd12b5a49a469c464acf6834803a08b539d4bd5511d60a78f60015ff",
13
+ "cloud/stripe-webhooks.js": "sha256:9cf40b633f94c09d2836949797d0570611cdeb0a5978b871bde05c0069d189a2",
14
+ "cloud/subscription-store.js": "sha256:af6eb90ec730d5ac49e13a7a12788e838139e751cfd4abda3e881510ce04e52b",
15
+ "mcp/index.js": "sha256:9c9b91d0ab3dec96471e79255e4775bc427d722e4024c04a2d4a807ed3b602a1",
16
+ "mcp/resources.js": "sha256:1f62f805069790692e1ed3e528811108cbe96f8d12a1049f77fae90edc924ff2",
17
+ "mcp/session.js": "sha256:d47f6a7eb432b9cbc30b36d9447b6e9a4521a648920b1017eb7f5edffeb73237",
18
+ "mcp/tools.js": "sha256:87977ca1303719cef6eab179495f69c25809d7d0fbe08772153965ad6500db95",
19
+ "plugin/cli.js": "sha256:75d88f2fa18cca2d31ff31e28aebf9ef604766e342cead4ea2636bd6f07549a7",
20
+ "plugin/compression/chunked.js": "sha256:a57f41db1ac20cf745bcfd7d2673f29435d78b23f9dd9c638b08fe6e757480e0",
21
+ "plugin/compression/index.js": "sha256:971ca8ce2c1361a349a0cc16a02f1c20837a1a4c81ec7622be8b138c8f1405b5",
22
+ "plugin/compression/pipeline.js": "sha256:b22dabd68adc4e72a06103f358e3e1442b0d229d485cfd7fecdcd6e9c26325c5",
23
+ "plugin/compression/quality.js": "sha256:af9a1feb96e2786b6226347b66cba4bd8213f419e4f8e69d617c08ba8b62a774",
24
+ "plugin/compression/rule-based.js": "sha256:a025aaebae41430aed244dbc755922d2bb22234b53afa59f89330005fc46082a",
25
+ "plugin/compression/structural.js": "sha256:12270ed11885a99467129a5ab699558e31039c0c2465f16958d21abe1e41ee53",
26
+ "plugin/compression/text-utils.js": "sha256:105283763cec2d5f9cab1ab361a79740e5dc6dfb728c11151630939935fce3db",
27
+ "plugin/compression/token-budget.js": "sha256:56a714783092236e3fbe0096c19dfe7d9cc22cebca21abfc9029d9a327adc756",
28
+ "plugin/compression/types.js": "sha256:56e1b0c10087ee6ff7f949b15d1ef63cb11228ff93a159a52f9ad7ef851e4e02",
29
+ "plugin/config-loader.js": "sha256:80db5858643003f12b3c00df04c09efba43f0f47a3115af2c3a1e21642cec403",
30
+ "plugin/context-compressor.js": "sha256:3d9aee732e54c59515e7ede7f93723cb0f4baaeac65023990448c65e43d447cb",
31
+ "plugin/hook-dispatcher.js": "sha256:654cc2a6b847d38047f8b2f694d78b21171c0f46db2e03bc4d14af78e8f3ac0a",
32
+ "plugin/metering-client.js": "sha256:ac81c28f43717f6fb918a7109a93fa79df149929a1f3e55da61b88020a1abf47",
33
+ "plugin/metrics-collector.js": "sha256:7e3611a61ed5d773c6800b686545ef620a9ed339294d5bdaddb534b04645e433",
34
+ "plugin/onboarding.js": "sha256:5d7750ac834072612bdeb4becade5c3c3ddab5518bb76d4220acea2d7a726b6f",
35
+ "plugin/precompact-handler.js": "sha256:c16b3ad7b3aa07ac8c042fa0597a563ba6ae52ca5226c098f3972d27038a98aa",
36
+ "plugin/report.js": "sha256:6e568f948fde6e49aa789ac374c7a0e2450c551cb4ff076ea8b43b2fb91b5b4f",
37
+ "plugin/rule-analytics-store.js": "sha256:f0af78de3a39f63f38dcf0f9f6fdc07bab5ff66521bd86a25383a1d85cc17208",
38
+ "plugin/rule-analytics.js": "sha256:3bd7bd8c6776589e594ff03eca9264b57772b18f0933e095f15687a3105211f0",
39
+ "plugin/rule-engine.js": "sha256:1eb58f013ee2a0c44e44bbb355613f5f5013be675d894af874a39af2a7641fc5",
40
+ "plugin/rule-sharing.js": "sha256:98f280b6e9557cc0710e2d9828ccfc640c23524020c8704475894d42d27a4818",
41
+ "plugin/rule-suggest.js": "sha256:0c6412b94443592c2692cdd3e9873a03f8607abd12e2d6f87217d3e3a655d22f",
42
+ "plugin/session-start.js": "sha256:cd50fa4b05754a629ba9e45f202e296582c693f1329f5cc22c990f47b1063ed0",
43
+ "plugin/smart-context.js": "sha256:f07f27c774d37dc01b21344c7c86930dd82ab7809f947a1b62cf2bd461dedda3",
44
+ "shared/license.js": "sha256:c324a8164939a864b57fa966cf050668f4ddfa1d27ac149d1f0c791149d7bd5c",
45
+ "shared/providers/claude-provider.js": "sha256:7d12406eabc03f2d6c5e02bb81e5ce8501cd6fc66bd23f7f17932374c2ae2a26",
46
+ "shared/providers/openai-provider.js": "sha256:18c22570c73eba71793a9186f6c50870a40a0d18e9280b8072c0b2138d883dfb",
47
+ "shared/token-counter.js": "sha256:0747f1a3d2752c36ed27cf3368ada75f92dc6151d45ac8cd2eb3f8aec9eb8ff9",
48
+ "shared/token-provider.js": "sha256:e1fbe8e2961a0887661a88b4bcc9269e5d277bbbf0dc0f7ea7b388b25b4e11cd",
40
49
  "shared/types.js": "sha256:56e1b0c10087ee6ff7f949b15d1ef63cb11228ff93a159a52f9ad7ef851e4e02"
41
50
  }
42
51
  }
package/dist/mcp/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- function _0x2baf(){const _0x2a4416=['31497180vfWrip','3342668GPXlza','catch','ioGNw','getDispatcher','27ehibrY','error','tokenizer-speedup\x20MCP\x20server\x20failed\x20to\x20start:','tokenizer-speedup','lSIvX','20404eDYAOt','244164zfUIFW','8138079RIcjup','143886uCsVFw','41869MazqHY','AgYTG','exit','HHnFC','220tCEwMC','8KkCbId','SIGINT'];_0x2baf=function(){return _0x2a4416;};return _0x2baf();}const _0x2e956a=_0x3e34;(function(_0x321427,_0x50af4e){const _0x469838=_0x3e34,_0x63fa49=_0x321427();while(!![]){try{const _0x5c5cfb=parseInt(_0x469838(0x100))/0x1+-parseInt(_0x469838(0xfd))/0x2+-parseInt(_0x469838(0xf7))/0x3*(parseInt(_0x469838(0xfc))/0x4)+parseInt(_0x469838(0xef))/0x5*(-parseInt(_0x469838(0xff))/0x6)+-parseInt(_0x469838(0xf3))/0x7+parseInt(_0x469838(0xf0))/0x8*(-parseInt(_0x469838(0xfe))/0x9)+parseInt(_0x469838(0xf2))/0xa;if(_0x5c5cfb===_0x50af4e)break;else _0x63fa49['push'](_0x63fa49['shift']());}catch(_0x4c032b){_0x63fa49['push'](_0x63fa49['shift']());}}}(_0x2baf,0x8f3b5));function _0x3e34(_0x4c3c63,_0x5c7512){_0x4c3c63=_0x4c3c63-0xef;const _0x2baf46=_0x2baf();let _0x3e346e=_0x2baf46[_0x4c3c63];return _0x3e346e;}import'../shared/providers/claude-provider.js';import'../shared/providers/openai-provider.js';import{McpServer}from'@modelcontextprotocol/sdk/server/mcp.js';import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{createSession}from'./session.js';import{registerTools}from'./tools.js';import{registerResources}from'./resources.js';async function main(){const _0x4ae802=_0x3e34,_0x1f135a={'NrkMH':_0x4ae802(0xfa),'aSxGf':'0.8.0','ioGNw':function(_0x5995bd,_0x454619,_0x436788){return _0x5995bd(_0x454619,_0x436788);},'HHnFC':function(_0x4accda,_0x44dfc3,_0x4d938c){return _0x4accda(_0x44dfc3,_0x4d938c);},'AgYTG':_0x4ae802(0xf1),'lSIvX':'tokenizer-speedup\x20MCP\x20server\x20running'},_0x33ad1c=new McpServer({'name':_0x1f135a['NrkMH'],'version':_0x1f135a['aSxGf']}),_0x540fef=createSession();_0x1f135a[_0x4ae802(0xf5)](registerTools,_0x33ad1c,_0x540fef),_0x1f135a[_0x4ae802(0x103)](registerResources,_0x33ad1c,_0x540fef),process['on'](_0x1f135a[_0x4ae802(0x101)],()=>{const _0x24ad0a=_0x4ae802;try{_0x540fef[_0x24ad0a(0xf6)]()['handleSessionStop']();}catch{}process[_0x24ad0a(0x102)](0x0);});const _0x44ec8e=new StdioServerTransport();await _0x33ad1c['connect'](_0x44ec8e),console[_0x4ae802(0xf8)](_0x1f135a[_0x4ae802(0xfb)]);}main()[_0x2e956a(0xf4)](_0x2e06dd=>{const _0x2fe5fb=_0x2e956a;console[_0x2fe5fb(0xf8)](_0x2fe5fb(0xf9),_0x2e06dd),process[_0x2fe5fb(0x102)](0x1);});
2
+ const _0x40a73e=_0x3bf3;(function(_0x528387,_0x39b459){const _0x45f436=_0x3bf3,_0x25cd0b=_0x528387();while(!![]){try{const _0x1641cf=parseInt(_0x45f436(0x18f))/0x1*(-parseInt(_0x45f436(0x188))/0x2)+-parseInt(_0x45f436(0x17f))/0x3+-parseInt(_0x45f436(0x180))/0x4*(-parseInt(_0x45f436(0x186))/0x5)+-parseInt(_0x45f436(0x184))/0x6+parseInt(_0x45f436(0x183))/0x7+parseInt(_0x45f436(0x182))/0x8+parseInt(_0x45f436(0x185))/0x9*(parseInt(_0x45f436(0x181))/0xa);if(_0x1641cf===_0x39b459)break;else _0x25cd0b['push'](_0x25cd0b['shift']());}catch(_0x4981c4){_0x25cd0b['push'](_0x25cd0b['shift']());}}}(_0xd503,0xeed6e));import'../shared/providers/claude-provider.js';import'../shared/providers/openai-provider.js';function _0xd503(){const _0x4e3725=['TklfP','exit','handleSessionStop','qyhsq','41aAfGIR','catch','2671707LoewbN','3867836soHmEP','190JfQreG','15019040nzBnoI','4811002zbLdWj','1543566AGWGkK','208782GiYkqS','5GAkXpl','tokenizer-speedup\x20MCP\x20server\x20running','90062hUpKaJ','getDispatcher','error'];_0xd503=function(){return _0x4e3725;};return _0xd503();}import{McpServer}from'@modelcontextprotocol/sdk/server/mcp.js';import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';function _0x3bf3(_0x3f4439,_0x15c0c6){_0x3f4439=_0x3f4439-0x17e;const _0xd503bd=_0xd503();let _0x3bf39b=_0xd503bd[_0x3f4439];return _0x3bf39b;}import{createSession}from'./session.js';import{registerTools}from'./tools.js';import{registerResources}from'./resources.js';async function main(){const _0x49e644=_0x3bf3,_0x181011={'qyhsq':'tokenizer-speedup','TklfP':function(_0x37dcb7){return _0x37dcb7();},'VYIbO':function(_0xff56f0,_0x935216,_0x5289d3){return _0xff56f0(_0x935216,_0x5289d3);}},_0x1c6d95=new McpServer({'name':_0x181011[_0x49e644(0x18e)],'version':'0.8.1'}),_0x3c2596=_0x181011[_0x49e644(0x18b)](createSession);_0x181011['VYIbO'](registerTools,_0x1c6d95,_0x3c2596),registerResources(_0x1c6d95,_0x3c2596),process['on']('SIGINT',()=>{const _0x47ea20=_0x49e644;try{_0x3c2596[_0x47ea20(0x189)]()[_0x47ea20(0x18d)]();}catch{}process[_0x47ea20(0x18c)](0x0);});const _0x4f18b1=new StdioServerTransport();await _0x1c6d95['connect'](_0x4f18b1),console['error'](_0x49e644(0x187));}main()[_0x40a73e(0x17e)](_0x2889d2=>{const _0x582366=_0x40a73e;console[_0x582366(0x18a)]('tokenizer-speedup\x20MCP\x20server\x20failed\x20to\x20start:',_0x2889d2),process['exit'](0x1);});