@simosphere/tokenizer-speedup 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.de.md +173 -0
  3. package/README.md +173 -0
  4. package/dist/cli/analyze.js +1 -1
  5. package/dist/cli/config-cmd.js +1 -1
  6. package/dist/cli/index.js +1 -1
  7. package/dist/cli/index.js.map +1 -1
  8. package/dist/cli/setup-cmd.js +1 -1
  9. package/dist/cli/setup-cmd.js.map +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 +32 -32
  16. package/dist/plugin/cli.js +1 -1
  17. package/dist/plugin/config-loader.js +1 -1
  18. package/dist/plugin/context-compressor.js +1 -1
  19. package/dist/plugin/hook-dispatcher.js +1 -1
  20. package/dist/plugin/metering-client.js +1 -1
  21. package/dist/plugin/metrics-collector.js +1 -1
  22. package/dist/plugin/onboarding.js +1 -1
  23. package/dist/plugin/precompact-handler.js +1 -1
  24. package/dist/plugin/report.js +1 -1
  25. package/dist/plugin/rule-analytics-store.js +1 -1
  26. package/dist/plugin/rule-analytics.js +1 -1
  27. package/dist/plugin/rule-engine.js +1 -1
  28. package/dist/plugin/rule-sharing.js +1 -1
  29. package/dist/plugin/rule-suggest.js +1 -1
  30. package/dist/plugin/session-start.js +1 -1
  31. package/dist/plugin/smart-context.js +1 -1
  32. package/dist/shared/license.js +1 -1
  33. package/dist/shared/providers/claude-provider.js +1 -1
  34. package/dist/shared/providers/openai-provider.js +1 -1
  35. package/dist/shared/token-counter.js +1 -1
  36. package/dist/shared/token-provider.js +1 -1
  37. package/package.json +25 -2
@@ -1,67 +1,67 @@
1
1
  {
2
- "version": "0.7.0",
3
- "build": "2026-03-04T07:34:45.236Z",
2
+ "version": "0.7.1",
3
+ "build": "2026-03-05T05:59:45.813Z",
4
4
  "files": {
5
5
  "cli/analyze.d.ts": "sha256:520ab064dfdf8a4fa95f73d74d4f96add4d60d8a22a32f622f68c4ffbf8e9785",
6
- "cli/analyze.js": "sha256:52abd3a4e4542989481daa3cc9ca24aed33cb8620c18178e365ec9cbb9b0687d",
6
+ "cli/analyze.js": "sha256:2689fa7fa09a492ebae2b31fffb8f499fe2149ddb7ef7912b71e5e2d94259070",
7
7
  "cli/config-cmd.d.ts": "sha256:eeae10f481e1ef2f3c6573d52bbbe1bc6994895a34c5dfc9a7c4e9f89db3460d",
8
- "cli/config-cmd.js": "sha256:79f46c14827d0eac4f52cf9afe7420e6cd483a74020210934b42d7bb3d629cd3",
8
+ "cli/config-cmd.js": "sha256:8d830ed297ab3ff2307d44e88427f5b55b8a63a9922dcf1ab0b74d86682552da",
9
9
  "cli/index.d.ts": "sha256:2f026c68dce905b6217e5f7fab5bfed185feeed431944a8dc60c178052f24f7d",
10
- "cli/index.js": "sha256:2b4f7b940e0dfeed23d303da45f64155a65b835b2544b67d967e0d1b0541eefb",
10
+ "cli/index.js": "sha256:1f806b7eadd3802cedd3bfb4420cd3ae2da1462241e68a8067ec030b67075bbc",
11
11
  "cli/setup-cmd.d.ts": "sha256:5fb0b00fd2b57e681e590153ad8ec33b9619179bfbed635c5ed01c94b232852d",
12
- "cli/setup-cmd.js": "sha256:4530ba995c12285fd46096db61c09014ea0bb6eb849cd1e7e7b11dc55b4618cf",
12
+ "cli/setup-cmd.js": "sha256:347fc66c2cdaba114b11039d4f049cb8a8efbc09c1ec9f8b1c9df53ce5be162d",
13
13
  "cloud/stripe-checkout.d.ts": "sha256:ce58292aa395baf9068d819c4feb5cd29781a05a5f6977024f27b8ac0c839d1e",
14
- "cloud/stripe-checkout.js": "sha256:030145b51b34a4255ec32d51b9eb03589f2b49ef3cc47f612497e6756555f665",
14
+ "cloud/stripe-checkout.js": "sha256:5b8c6885b9ef3523a662ad73ee4d6cb338aeda988b8604fe94204e94cb3fd153",
15
15
  "cloud/stripe-config.d.ts": "sha256:b5e4ef4c8d722b239ef13008bd216d3c56291e12ff82e3e9b9c494cd2303d656",
16
- "cloud/stripe-config.js": "sha256:3337771d6fba33ed3f28b4691aef1bdedb7bf60c9cf33c7ac4d549cb6af487a3",
16
+ "cloud/stripe-config.js": "sha256:f65b30ac6c5bb25d51eb4d67f93fe65fa2a0fc39e086861261a6859ced6c50f7",
17
17
  "cloud/stripe-usage.d.ts": "sha256:134415ce475007c2ed196305ab91489b688d852dda3cbf2f240d1d860d24bd2c",
18
- "cloud/stripe-usage.js": "sha256:e532428e4958e55be40941672b95b743c7af96d0381a66b393ce3ae720e8cc88",
18
+ "cloud/stripe-usage.js": "sha256:74497151a49d65d163943826dd61beb3bb394cf376a46eef1baa5fdc695364a9",
19
19
  "cloud/stripe-webhooks.d.ts": "sha256:cca005cebcc8f1e916e975d6adef5ad15d09df4249facbb718cbc3f831ff84ab",
20
- "cloud/stripe-webhooks.js": "sha256:0a77ab225adbe0b7521ade7c9c8207790b8bc8d1b8a7a4eed35654764c2ef098",
20
+ "cloud/stripe-webhooks.js": "sha256:c57c6616b68e93b9d2e6aae34596714fda54b7217a4112fa5e2d43f1bb7932e3",
21
21
  "cloud/subscription-store.d.ts": "sha256:6e6ba1b28d7b58131aeebd96051dae42a1e9fb5069e48a7e5d042268d5b417ec",
22
- "cloud/subscription-store.js": "sha256:9f63b8310cfdc9036341a82e8f4ffb4824d8dd2ae73331f89c00bcd2925fa68b",
22
+ "cloud/subscription-store.js": "sha256:ed52c08a4825d00bd8a4b89877a8906cc40f03054cab07e23a73d41487376080",
23
23
  "plugin/cli.d.ts": "sha256:8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
24
- "plugin/cli.js": "sha256:15a0e5c84452bbeeaa431b4c2cc1d89a0c5db1aaa4f55720b449e9baed46586d",
24
+ "plugin/cli.js": "sha256:f74a860db98d22afe321b7fd7c1171171a8220b24fb960b527f3065038552f83",
25
25
  "plugin/config-loader.d.ts": "sha256:d55c9c53c9df25188abd6af71c217bb4a3feee89960ea411e174b10c456177da",
26
- "plugin/config-loader.js": "sha256:734fcbb6a56eb473196da95c6d9b35ac315a25542d0627eab3a50641e8489a2c",
26
+ "plugin/config-loader.js": "sha256:2bef82229673cb359ded78dcb8c997f81bf82ea90ba7ef2d4f00810837623893",
27
27
  "plugin/context-compressor.d.ts": "sha256:c14912ec73df27f3c49abc84edc510edee126956eb197c446863309348a03412",
28
- "plugin/context-compressor.js": "sha256:8287a64a06e13c9ce9f5e3588daf15a7ede14e5e4664014def524f698795ed6a",
28
+ "plugin/context-compressor.js": "sha256:774a9d0ba9ba3c1f8f3603b58cefdd97da9a2146070151f95dd234863cbfbe91",
29
29
  "plugin/hook-dispatcher.d.ts": "sha256:ee5a5e5ac92dd5ca872b76611a4531fa074cb077e417f8bc9f97cf750e87aced",
30
- "plugin/hook-dispatcher.js": "sha256:4203fe439f91b8dea1893d79691d558ed6ae6dca2b3609ed1550eb1a1e7f5a3c",
30
+ "plugin/hook-dispatcher.js": "sha256:149bb09835317a0416662bc9cfcddde018861c1296f722b4f4bf0be9e6d721a7",
31
31
  "plugin/metering-client.d.ts": "sha256:f0be7100119afdfdb557fdfd4bab872e53d2d472205d8f85fa7241e457c59c19",
32
- "plugin/metering-client.js": "sha256:823f3e4a885a174fbe0dcb0e1fceb949bee3bfbcc8abcb1d4b7899784f9c092b",
32
+ "plugin/metering-client.js": "sha256:fac4898ab301730ea007d58801a87eec85fbb507b8fb17ca6291dc8303c779f6",
33
33
  "plugin/metrics-collector.d.ts": "sha256:91a0b593ff1f9dfbc7f02473ac250e2e875c5ac774000811490c1c1e46987c09",
34
- "plugin/metrics-collector.js": "sha256:8f53371a2e84bb3140a1aef0c779d43995135cff50097a69df9d3927ff97a8ab",
34
+ "plugin/metrics-collector.js": "sha256:0dad1f3ad3031a16e064b5c5b9e4903b3251e7e8743a8b1dd008822c2856166f",
35
35
  "plugin/onboarding.d.ts": "sha256:b907ca6fc63a732f28a3c173c4a79e42e84971a0efe7cde39c2d9767376a97b6",
36
- "plugin/onboarding.js": "sha256:d2d57223137febd4650fd862f338fff7c39837649ebd69d6e8f5721911c5515b",
36
+ "plugin/onboarding.js": "sha256:ddbab1a3a11d8f0d0fba53ef345106147507d3c22c16279cc43c98d62349e9aa",
37
37
  "plugin/precompact-handler.d.ts": "sha256:52b1570601955ed1aa26541f651e3f45fde21ec6ce8042001dd0ac2fab253ccd",
38
- "plugin/precompact-handler.js": "sha256:f08c247c92ec21acd4d43b6749392dae7c21ce2b1b7cf6f9009781b013f776c3",
38
+ "plugin/precompact-handler.js": "sha256:00fa426467da1c0a2589934ceb97592cdfdb4a11a0dea033bddb4399f17f5b48",
39
39
  "plugin/report.d.ts": "sha256:8027321ede260c9302dfd19c73cf48e334595350fee14485475e50008f74645f",
40
- "plugin/report.js": "sha256:e54404cf775f2e4d1f559318110ba3ba9e9b67c077ddc28035521526c6e0c26b",
40
+ "plugin/report.js": "sha256:b50d8d5e549f860c05208fe1599019ac6e2644e40a754e67ece8de3328576b9e",
41
41
  "plugin/rule-analytics-store.d.ts": "sha256:710a52c82dc6e4b2998cdd10a51083be8103b39b15b6d6d37ac8272a58e854ec",
42
- "plugin/rule-analytics-store.js": "sha256:37ec03bfaac8dcaa4ab6ef7033e73568e813d7d3ca17113adac0a1f08b37eb2c",
42
+ "plugin/rule-analytics-store.js": "sha256:a5dd25d56103d01734139787393490f87f0a7d4d80c6605f4e131d6aea7b07cd",
43
43
  "plugin/rule-analytics.d.ts": "sha256:cdeffbbc424b5452f57ca697b9c5e5ed0264efc0d56342ce476bd591b564aff3",
44
- "plugin/rule-analytics.js": "sha256:dd369fd119425f648778854c57149df9fdaa08178c7e75a2d4ce19c9d2840985",
44
+ "plugin/rule-analytics.js": "sha256:35617eca56579e44f062e4568a1cfa2c45811b7c480545770cce60c6adc86b0b",
45
45
  "plugin/rule-engine.d.ts": "sha256:e9e9e0c8af47ecf1c039a6db15a656ef3cd28e4a7521204d4eaf076a15ee2cc8",
46
- "plugin/rule-engine.js": "sha256:9a0848e27c0882ba858f83538327ec17b754d3259345e7a58243fea7cc838ff6",
46
+ "plugin/rule-engine.js": "sha256:d7bb1a3474cefb1c8d28b1d3e47014abdf5f30684922ecd6f1ce444184b4f84d",
47
47
  "plugin/rule-sharing.d.ts": "sha256:8fc87926ec3752c2e0d21274c98ef3bb21f2a10665eb5536b726ea8d94479a79",
48
- "plugin/rule-sharing.js": "sha256:6ac96825b9bfc2d8bf42305b4c0f2ab4c1f765df5315377365af0dd95b384878",
48
+ "plugin/rule-sharing.js": "sha256:498d1721c0160de89370d94adbfef216ee8b1dd7211e050a215221edaeb19fbc",
49
49
  "plugin/rule-suggest.d.ts": "sha256:4d12dac9df44bb3adf5b5e9456e683a42625e8b28712c80aa62292a5b3d40be9",
50
- "plugin/rule-suggest.js": "sha256:2d19e4b45d8f82f28e1bfaf0b7b557cf5dd24044128972f58e542553694238b3",
50
+ "plugin/rule-suggest.js": "sha256:12964fa36b0a393008821091c63fa89f5d70e850befbc9f536790532972faefa",
51
51
  "plugin/session-start.d.ts": "sha256:36cb2cc2a7e09195e650aa7a96b8ae420b612c23907fa35723501d27600d4ff1",
52
- "plugin/session-start.js": "sha256:7f1ff0362cf41fc7424253d0e3e48f65aad495692fcd56a39d6f9c8521a6da55",
52
+ "plugin/session-start.js": "sha256:0be1cd0a532edaa46e0eea9f8fc929913470cb84c277f8ca80421c17c6c372ac",
53
53
  "plugin/smart-context.d.ts": "sha256:cace6c764ef3cf1a18f87f09ad4650abe69322b7629cd8383a7cc775f7f81be1",
54
- "plugin/smart-context.js": "sha256:8a4ae74425122fdc9c37c6fa5b68560bc8a4a0838a7bb0c03c77399e95522b1d",
54
+ "plugin/smart-context.js": "sha256:96601f7bced8f7b11c7175475d27b175140fd8f134dfbe46b2f42aeecea80e18",
55
55
  "shared/license.d.ts": "sha256:4778f87bbd80b5033479e03556a7e755aa7787707f3b875aa8795c4f1e97ee96",
56
- "shared/license.js": "sha256:07edab0be9ad43b0df823261df9d9b39ead2584dd85ade33f3f0622621cf4d04",
56
+ "shared/license.js": "sha256:607c3dbea08df40178a072caa40298b0feb038fbf6b13b7eb92e73e1152c63f9",
57
57
  "shared/providers/claude-provider.d.ts": "sha256:58d95cac3a61871425760a3ad7cd4b7749737841d49f84f70e933c52ed297f32",
58
- "shared/providers/claude-provider.js": "sha256:aa21801b1ce3b31cb06e6a6a6a784165e86bdf152b3633a1086342de3b020e78",
58
+ "shared/providers/claude-provider.js": "sha256:de9fefa267f01fc907e4971ce46754f6909e4ea91e07d8a61b7f62665661bcc5",
59
59
  "shared/providers/openai-provider.d.ts": "sha256:2114b5a1dcc4c03c5c26094d941189ffe4d6cb26a9ecc7e102830eb8bcab3cf7",
60
- "shared/providers/openai-provider.js": "sha256:4c12cb140df8069dce4b063214d94a64d244da40eef6b5cb80f23a99e14ee925",
60
+ "shared/providers/openai-provider.js": "sha256:3116150a878a22cf324feba6f99025a7d63de8397d108f570a16593538bfa56b",
61
61
  "shared/token-counter.d.ts": "sha256:d7e1bfe11fb4893dd936057db98fb4c9e1ee95c3d13b2bc24309fc471512f3b5",
62
- "shared/token-counter.js": "sha256:34c0fee949afe36d58bce478e5a4ce5ba91ec3dcafc9f994010a9defea390886",
62
+ "shared/token-counter.js": "sha256:f589a69d2b056040711d1c5c127b0daf96ce75e14531ab29ff36a5cb3d54916b",
63
63
  "shared/token-provider.d.ts": "sha256:f3728d375158e79fef3055f56dc247395101ecee4c21911997668de3607aea0e",
64
- "shared/token-provider.js": "sha256:5c3471e0a45794b47b15c794176a74f3c9b9d696fed40e45c9b24b1f9f5aa7a9",
64
+ "shared/token-provider.js": "sha256:9d9ee04ad1e4dd874dd0c7b304dd5e6c83046f8ba9cd56d2a8a005d60ca6f1e5",
65
65
  "shared/types.d.ts": "sha256:20600b79ba665bdd2200ab8390784c37a508f29b23f1967a4662b86de8baa122",
66
66
  "shared/types.js": "sha256:56e1b0c10087ee6ff7f949b15d1ef63cb11228ff93a159a52f9ad7ef851e4e02"
67
67
  }
@@ -1 +1 @@
1
- const _0x26c233=_0x132f;(function(_0x46ea33,_0x2c85a0){const _0x206b3f=_0x132f,_0x77fb9d=_0x46ea33();while(!![]){try{const _0x5e8521=-parseInt(_0x206b3f(0x11f))/0x1+-parseInt(_0x206b3f(0x106))/0x2*(parseInt(_0x206b3f(0x121))/0x3)+parseInt(_0x206b3f(0x124))/0x4*(-parseInt(_0x206b3f(0x10e))/0x5)+-parseInt(_0x206b3f(0x125))/0x6*(parseInt(_0x206b3f(0x11c))/0x7)+-parseInt(_0x206b3f(0x112))/0x8*(-parseInt(_0x206b3f(0x11e))/0x9)+-parseInt(_0x206b3f(0x118))/0xa+parseInt(_0x206b3f(0x11b))/0xb;if(_0x5e8521===_0x2c85a0)break;else _0x77fb9d['push'](_0x77fb9d['shift']());}catch(_0xc0e8ed){_0x77fb9d['push'](_0x77fb9d['shift']());}}}(_0x2adf,0xddcaa));import{resolve}from'node:path';import{loadConfig}from'./config-loader.js';import{HookDispatcher}from'./hook-dispatcher.js';import{buildSessionStartContext}from'./session-start.js';import{buildSmartContext}from'./smart-context.js';import{MeteringClient,buildMeterPayload}from'./metering-client.js';function _0x2adf(){const _0x338399=['join','niujC','6413276dTSFsN','30882meoqmj','1094MvufDx','hook_event_name','metering','DcYFD','push','SessionStart','cwd','IJPCS','5wVRMfd','toString','concat','handleSessionStop','8JpQNyV','lSssn','endpoint','handlePreCompact','model','catch','4599880cfGqij','exit','xmBET','73039659eJFQEP','1372bJfgug','additionalContext','4777155DAYHZI','1725868SJzUBM','pcRgv','8031HzMMIQ'];_0x2adf=function(){return _0x338399;};return _0x2adf();}import{loadApiKeyFromConfig}from'../cli/setup-cmd.js';if(!process.env.TOKENIZER_API_KEY){const t=loadApiKeyFromConfig();t&&(process.env.TOKENIZER_API_KEY=t);}function _0x132f(_0x5f04bd,_0x1d7b22){_0x5f04bd=_0x5f04bd-0x106;const _0x2adf74=_0x2adf();let _0x132fb0=_0x2adf74[_0x5f04bd];return _0x132fb0;}async function main(){const _0x13a15f=_0x132f,_0x4c15c1={'IJPCS':function(_0x114ee8,_0x5a75d4){return _0x114ee8(_0x5a75d4);},'dVRwg':function(_0x149f57,_0x55c498,_0x42d372){return _0x149f57(_0x55c498,_0x42d372);},'DcYFD':function(_0x2579e7,_0x35f274){return _0x2579e7(_0x35f274);},'pcRgv':function(_0x1d58a9,_0xcb20b9){return _0x1d58a9(_0xcb20b9);},'xmBET':'UserPromptSubmit','lSssn':function(_0x17cced,_0x5312a8){return _0x17cced>_0x5312a8;},'niujC':'PreCompact','MsjZp':'Stop','CPWNQ':function(_0x5c0c95,_0xd1a17c,_0x1582f4){return _0x5c0c95(_0xd1a17c,_0x1582f4);}},_0x23a95d=[];for await(const _0x22f0c8 of process['stdin'])_0x23a95d[_0x13a15f(0x10a)](_0x22f0c8);const _0x372c16=Buffer[_0x13a15f(0x110)](_0x23a95d)[_0x13a15f(0x10f)]('utf-8');let _0x13ba69;try{_0x13ba69=JSON['parse'](_0x372c16);}catch{process[_0x13a15f(0x119)](0x0);}const _0xba9ab2=_0x13ba69['cwd']||process[_0x13a15f(0x10c)](),_0x48d8cc=_0x13ba69[_0x13a15f(0x107)];let _0xaed0e1;try{_0xaed0e1=_0x4c15c1[_0x13a15f(0x10d)](loadConfig,_0xba9ab2);}catch{const _0x3a393e=process.env.CLAUDE_PLUGIN_ROOT||_0x4c15c1['dVRwg'](resolve,import.meta.dirname,'../..');_0xaed0e1=_0x4c15c1[_0x13a15f(0x109)](loadConfig,_0x3a393e);}const _0x2301e7=new HookDispatcher(_0xaed0e1,_0xba9ab2,_0x13ba69['session_id']);let _0x119930={};switch(_0x48d8cc){case _0x13a15f(0x10b):_0x119930=_0x4c15c1[_0x13a15f(0x120)](buildSessionStartContext,{'cwd':_0xba9ab2});break;case _0x4c15c1[_0x13a15f(0x11a)]:{const _0x5118d7=_0x2301e7['handleUserPromptSubmit'](_0x13ba69),_0x595f9c=buildSmartContext({'prompt':_0x13ba69['prompt']||'','cwd':_0xba9ab2}),_0x46e7e4=[_0x5118d7['additionalContext'],_0x595f9c[_0x13a15f(0x11d)]]['filter'](Boolean);_0x119930=_0x4c15c1[_0x13a15f(0x113)](_0x46e7e4['length'],0x0)?{'additionalContext':_0x46e7e4[_0x13a15f(0x122)]('\x0a')}:{};break;}case _0x4c15c1[_0x13a15f(0x123)]:_0x119930=_0x2301e7[_0x13a15f(0x115)](_0x13ba69);break;case _0x4c15c1['MsjZp']:{const _0x185bcc=_0x2301e7[_0x13a15f(0x111)](),_0x5478c9=new MeteringClient(_0xaed0e1[_0x13a15f(0x108)][_0x13a15f(0x114)]),_0x20e1ea=_0x4c15c1['CPWNQ'](buildMeterPayload,_0x185bcc,{'provider':_0xaed0e1['provider'],'model':_0xaed0e1[_0x13a15f(0x116)]});await _0x5478c9['send'](_0x20e1ea);break;}}process['stdout']['write'](JSON['stringify'](_0x119930)),process[_0x13a15f(0x119)](0x0);}main()[_0x26c233(0x117)](()=>process['exit'](0x0));
1
+ const _0x1b2ce2=_0x40f6;(function(_0x3e08a9,_0x4a2dc2){const _0x85b919=_0x40f6,_0x1f40d=_0x3e08a9();while(!![]){try{const _0x3495b3=-parseInt(_0x85b919(0x1c5))/0x1*(parseInt(_0x85b919(0x1bb))/0x2)+-parseInt(_0x85b919(0x1b0))/0x3*(parseInt(_0x85b919(0x1ae))/0x4)+parseInt(_0x85b919(0x1c6))/0x5*(parseInt(_0x85b919(0x1bd))/0x6)+-parseInt(_0x85b919(0x1cc))/0x7*(parseInt(_0x85b919(0x1cd))/0x8)+-parseInt(_0x85b919(0x1af))/0x9+parseInt(_0x85b919(0x1ca))/0xa*(parseInt(_0x85b919(0x1ce))/0xb)+-parseInt(_0x85b919(0x1b8))/0xc*(-parseInt(_0x85b919(0x1b6))/0xd);if(_0x3495b3===_0x4a2dc2)break;else _0x1f40d['push'](_0x1f40d['shift']());}catch(_0x8345b0){_0x1f40d['push'](_0x1f40d['shift']());}}}(_0x510d,0x5685f));import{resolve}from'node:path';import{loadConfig}from'./config-loader.js';import{HookDispatcher}from'./hook-dispatcher.js';import{buildSessionStartContext}from'./session-start.js';import{buildSmartContext}from'./smart-context.js';function _0x510d(){const _0x51b807=['../..','230587lngFov','8gWlYxb','8734qKgWQi','parse','1776340TWpfEK','3371778sanliV','3yLgXZy','handleSessionStop','exit','PreCompact','endpoint','pylVv','151450MxDaqZ','push','1236NeGhMi','additionalContext','prompt','6QznyJG','tiQCm','12UZurWI','utf-8','SessionStart','cwd','Stop','handlePreCompact','concat','stringify','165601zqzPqt','981385tdPrTh','MSLJM','session_id','model','1390GysTxh'];_0x510d=function(){return _0x51b807;};return _0x510d();}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 _0x5938aa=_0x40f6,_0x42f5cb={'WZWMr':_0x5938aa(0x1be),'ZupUL':function(_0x21a67c,_0x49a520){return _0x21a67c(_0x49a520);},'MSLJM':_0x5938aa(0x1bf),'pylVv':_0x5938aa(0x1b3),'tiQCm':_0x5938aa(0x1c1)},_0x482501=[];for await(const _0x1209db of process['stdin'])_0x482501[_0x5938aa(0x1b7)](_0x1209db);const _0xf40ba=Buffer[_0x5938aa(0x1c3)](_0x482501)['toString'](_0x42f5cb['WZWMr']);let _0x27d223;try{_0x27d223=JSON[_0x5938aa(0x1cf)](_0xf40ba);}catch{process['exit'](0x0);}const _0x32d86d=_0x27d223['cwd']||process[_0x5938aa(0x1c0)](),_0x28b834=_0x27d223['hook_event_name'];let _0x3e2e32;try{_0x3e2e32=loadConfig(_0x32d86d);}catch{const _0x67039=process.env.CLAUDE_PLUGIN_ROOT||resolve(import.meta.dirname,_0x5938aa(0x1cb));_0x3e2e32=_0x42f5cb['ZupUL'](loadConfig,_0x67039);}const _0x4428fb=new HookDispatcher(_0x3e2e32,_0x32d86d,_0x27d223[_0x5938aa(0x1c8)]);let _0x52d769={};switch(_0x28b834){case _0x42f5cb[_0x5938aa(0x1c7)]:_0x52d769=buildSessionStartContext({'cwd':_0x32d86d});break;case'UserPromptSubmit':{const _0x59ccc5=_0x4428fb['handleUserPromptSubmit'](_0x27d223),_0x163bc0=buildSmartContext({'prompt':_0x27d223[_0x5938aa(0x1ba)]||'','cwd':_0x32d86d}),_0x10b6dd=[_0x59ccc5['additionalContext'],_0x163bc0[_0x5938aa(0x1b9)]]['filter'](Boolean);_0x52d769=_0x10b6dd['length']>0x0?{'additionalContext':_0x10b6dd['join']('\x0a')}:{};break;}case _0x42f5cb[_0x5938aa(0x1b5)]:_0x52d769=_0x4428fb[_0x5938aa(0x1c2)](_0x27d223);break;case _0x42f5cb[_0x5938aa(0x1bc)]:{const _0x4ed2f9=_0x4428fb[_0x5938aa(0x1b1)](),_0x217185=new MeteringClient(_0x3e2e32['metering'][_0x5938aa(0x1b4)]),_0x1df582=buildMeterPayload(_0x4ed2f9,{'provider':_0x3e2e32['provider'],'model':_0x3e2e32[_0x5938aa(0x1c9)]});await _0x217185['send'](_0x1df582);break;}}process['stdout']['write'](JSON[_0x5938aa(0x1c4)](_0x52d769)),process[_0x5938aa(0x1b2)](0x0);}function _0x40f6(_0x3ca995,_0x189c7f){_0x3ca995=_0x3ca995-0x1ae;const _0x510dfd=_0x510d();let _0x40f65e=_0x510dfd[_0x3ca995];return _0x40f65e;}main()['catch'](()=>process[_0x1b2ce2(0x1b2)](0x0));
@@ -1 +1 @@
1
- function _0xfc32(){const _0x1a2016=['metering','56oVqzUW','model','.\x20Known:\x20','403446HwjLGi','number','228916PjLEqK','6849864WVDsvy','lHpbZ','Qvgjm','version','525HAwalW','claude','mCGqz','9440eNmxHN','claude-sonnet-4-20250514','Zonkv','join','3372276HhwWAk','rules','load','Invalid\x20config:\x20missing\x20or\x20invalid\x20\x22version\x22\x20field','1191369mirqOo','16145OGfACf'];_0xfc32=function(){return _0x1a2016;};return _0xfc32();}(function(_0x3ce92a,_0x1f7de7){const _0x4bde3b=_0x5e24,_0x4b7787=_0x3ce92a();while(!![]){try{const _0x5b8977=-parseInt(_0x4bde3b(0x1bc))/0x1+-parseInt(_0x4bde3b(0x1ba))/0x2+parseInt(_0x4bde3b(0x1b4))/0x3+-parseInt(_0x4bde3b(0x1b7))/0x4*(-parseInt(_0x4bde3b(0x1b5))/0x5)+-parseInt(_0x4bde3b(0x1c8))/0x6+-parseInt(_0x4bde3b(0x1c1))/0x7*(-parseInt(_0x4bde3b(0x1c4))/0x8)+parseInt(_0x4bde3b(0x1bd))/0x9;if(_0x5b8977===_0x1f7de7)break;else _0x4b7787['push'](_0x4b7787['shift']());}catch(_0x358ec9){_0x4b7787['push'](_0x4b7787['shift']());}}}(_0xfc32,0x490e8));function _0x5e24(_0x294752,_0x4870d3){_0x294752=_0x294752-0x1b3;const _0xfc32b=_0xfc32();let _0x5e24ff=_0xfc32b[_0x294752];return _0x5e24ff;}import{readFileSync}from'node:fs';import{join}from'node:path';import _0xd8ebd5 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};export function parseConfig(_0x51789c){const _0x58238d=_0x5e24,_0x40757d={'Qvgjm':function(_0xf35c7a,_0x378631){return _0xf35c7a!=_0x378631;},'Zonkv':_0x58238d(0x1c2)},_0x5902ff=_0xd8ebd5[_0x58238d(0x1ca)](_0x51789c);if(!_0x5902ff||_0x40757d[_0x58238d(0x1bf)](_0x58238d(0x1bb),typeof _0x5902ff['version']))throw new Error(_0x58238d(0x1b3));const _0x3e4774=_0x5902ff['provider']??'claude',_0x3ef517=_0x5902ff[_0x58238d(0x1b8)]??(_0x40757d[_0x58238d(0x1c6)]===_0x3e4774?_0x58238d(0x1c5):'gpt-4o'),_0x215d38=listProviders();if(!_0x215d38['includes'](_0x3e4774))throw new Error('Unknown\x20provider:\x20'+_0x3e4774+_0x58238d(0x1b9)+_0x215d38[_0x58238d(0x1c7)](',\x20'));const _0x5992be=Array['isArray'](_0x5902ff[_0x58238d(0x1c9)])?_0x5902ff[_0x58238d(0x1c9)]:[],_0x450570=_0x5902ff['context_limits']??DEFAULT_LIMITS,_0xf9fbac=_0x5902ff[_0x58238d(0x1b6)]??DEFAULT_METERING;return{'version':_0x5902ff[_0x58238d(0x1c0)],'provider':_0x3e4774,'model':_0x3ef517,'rules':_0x5992be,'context_limits':_0x450570,'metering':_0xf9fbac};}export function loadConfigFromString(_0x4d3b49){return parseConfig(_0x4d3b49);}export function loadConfig(_0x2c1ce9){const _0x221831=_0x5e24,_0x1dd5c4={'mCGqz':function(_0x1f45d6,_0x1bfedc,_0x2f2de0){return _0x1f45d6(_0x1bfedc,_0x2f2de0);},'EvpbF':function(_0x222b40,_0x5a2ef3){return _0x222b40(_0x5a2ef3);},'lHpbZ':'utf-8'},_0x33f3a1=_0x1dd5c4[_0x221831(0x1c3)](join,_0x2c1ce9,CONFIG_FILENAME);return _0x1dd5c4['EvpbF'](parseConfig,readFileSync(_0x33f3a1,_0x1dd5c4[_0x221831(0x1be)]));}
1
+ const _0x22bef3=_0xa903;(function(_0x563fa8,_0x5407df){const _0x11e53e=_0xa903,_0x39b5a4=_0x563fa8();while(!![]){try{const _0x190aff=parseInt(_0x11e53e(0x1c4))/0x1+parseInt(_0x11e53e(0x1b3))/0x2+-parseInt(_0x11e53e(0x1b6))/0x3*(-parseInt(_0x11e53e(0x1bd))/0x4)+-parseInt(_0x11e53e(0x1bc))/0x5*(-parseInt(_0x11e53e(0x1b5))/0x6)+parseInt(_0x11e53e(0x1c7))/0x7+parseInt(_0x11e53e(0x1c2))/0x8+-parseInt(_0x11e53e(0x1b4))/0x9;if(_0x190aff===_0x5407df)break;else _0x39b5a4['push'](_0x39b5a4['shift']());}catch(_0x28e17b){_0x39b5a4['push'](_0x39b5a4['shift']());}}}(_0x59cc,0xe35f7));import{readFileSync}from'node:fs';import{join}from'node:path';import _0x10d43a from'js-yaml';import'../shared/providers/claude-provider.js';import'../shared/providers/openai-provider.js';function _0xa903(_0xf3cff0,_0x545390){_0xf3cff0=_0xf3cff0-0x1b3;const _0x59ccfe=_0x59cc();let _0xa903a0=_0x59ccfe[_0xf3cff0];return _0xa903a0;}function _0x59cc(){const _0x540726=['998794EYPfgK','context_limits','claude','1671005kAqjJs','1734966ziRDRL','34848675YjYhrc','7782jOWqVy','223527kLEuZm','tokenizer-speedup.yaml','provider','version','.\x20Known:\x20','join','590pBtqEL','56ynsevi','includes','https://api.simosphere.ai/v1/meter','number','ituvw','12017840Oyfyvt','isArray'];_0x59cc=function(){return _0x540726;};return _0x59cc();}import{listProviders}from'../shared/token-provider.js';const CONFIG_FILENAME=_0x22bef3(0x1b7),DEFAULT_LIMITS={'max_injected_tokens':0xfa0,'max_file_tokens':0x5dc,'compress_above':0x320},DEFAULT_METERING={'endpoint':_0x22bef3(0x1bf),'batch_interval':0x3c,'send_content':!0x1};export function parseConfig(_0x56e7a8){const _0xf7a3ba=_0x22bef3,_0x4956b1={'OChit':function(_0x56b163,_0x253c96){return _0x56b163!=_0x253c96;},'ituvw':'Invalid\x20config:\x20missing\x20or\x20invalid\x20\x22version\x22\x20field','xBiFk':_0xf7a3ba(0x1c6)},_0x159dca=_0x10d43a['load'](_0x56e7a8);if(!_0x159dca||_0x4956b1['OChit'](_0xf7a3ba(0x1c0),typeof _0x159dca['version']))throw new Error(_0x4956b1[_0xf7a3ba(0x1c1)]);const _0x437659=_0x159dca[_0xf7a3ba(0x1b8)]??_0xf7a3ba(0x1c6),_0x15b083=_0x159dca['model']??(_0x4956b1['xBiFk']===_0x437659?'claude-sonnet-4-20250514':'gpt-4o'),_0x41995f=listProviders();if(!_0x41995f[_0xf7a3ba(0x1be)](_0x437659))throw new Error('Unknown\x20provider:\x20'+_0x437659+_0xf7a3ba(0x1ba)+_0x41995f[_0xf7a3ba(0x1bb)](',\x20'));const _0x521250=Array[_0xf7a3ba(0x1c3)](_0x159dca['rules'])?_0x159dca['rules']:[],_0x5d867a=_0x159dca[_0xf7a3ba(0x1c5)]??DEFAULT_LIMITS,_0x58fbb2=_0x159dca['metering']??DEFAULT_METERING;return{'version':_0x159dca[_0xf7a3ba(0x1b9)],'provider':_0x437659,'model':_0x15b083,'rules':_0x521250,'context_limits':_0x5d867a,'metering':_0x58fbb2};}export function loadConfigFromString(_0x258b39){const _0x19fa97={'aEhps':function(_0x5cf279,_0x3610e1){return _0x5cf279(_0x3610e1);}};return _0x19fa97['aEhps'](parseConfig,_0x258b39);}export function loadConfig(_0x2c5a88){const _0x34b46b=join(_0x2c5a88,CONFIG_FILENAME);return parseConfig(readFileSync(_0x34b46b,'utf-8'));}
@@ -1 +1 @@
1
- function _0x3502(_0x2b3fbc,_0x3508f7){_0x2b3fbc=_0x2b3fbc-0x19d;const _0xaae2e8=_0xaae2();let _0x350260=_0xaae2e8[_0x2b3fbc];return _0x350260;}(function(_0x4dd84b,_0x2a16b3){const _0x3a68d1=_0x3502,_0x5321aa=_0x4dd84b();while(!![]){try{const _0x55be1f=parseInt(_0x3a68d1(0x1ab))/0x1*(parseInt(_0x3a68d1(0x1a4))/0x2)+parseInt(_0x3a68d1(0x1af))/0x3*(-parseInt(_0x3a68d1(0x1a5))/0x4)+parseInt(_0x3a68d1(0x1b3))/0x5*(-parseInt(_0x3a68d1(0x1a2))/0x6)+-parseInt(_0x3a68d1(0x1a7))/0x7*(parseInt(_0x3a68d1(0x1b1))/0x8)+parseInt(_0x3a68d1(0x1a0))/0x9+-parseInt(_0x3a68d1(0x1aa))/0xa*(-parseInt(_0x3a68d1(0x1b4))/0xb)+parseInt(_0x3a68d1(0x1a9))/0xc*(parseInt(_0x3a68d1(0x1ae))/0xd);if(_0x55be1f===_0x2a16b3)break;else _0x5321aa['push'](_0x5321aa['shift']());}catch(_0x748e21){_0x5321aa['push'](_0x5321aa['shift']());}}}(_0xaae2,0x5c7ba));import{countTokens}from'../shared/token-counter.js';function _0xaae2(){const _0x330bbc=['354441sbiDVh','map','352zDiIkY','\x20Token]','5VmcKtY','22QgSSdP','wIGEu','length','LtVVd','floor','2541726fGDivA','Lvied','1610814cHftlE','\x20→\x20','7322AlqfgB','20Tmpxjk','oSrWC','10654EpPnKr','IyHtY','204ppPuwh','2490470BTVRgj','55StyetL','split','\x0a\x0a[...\x20gekuerzt,\x20','247091QwShtP'];_0xaae2=function(){return _0x330bbc;};return _0xaae2();}export function compressContext(_0x18cff0,_0x4da674){const _0x24fb46=_0x3502,_0x3f9fa1={'IyHtY':function(_0x2784df,_0x3845f5){return _0x2784df+_0x3845f5;},'Lvied':function(_0x41d79b,_0x33ef58){return _0x41d79b(_0x33ef58);},'NMLMp':function(_0x21808d,_0x40ca0e){return _0x21808d>_0x40ca0e;},'qPgZb':function(_0x22dff4,_0x4c8add){return _0x22dff4-_0x4c8add;},'LtVVd':function(_0x118bfc,_0x530dbd){return _0x118bfc+_0x530dbd;},'wIGEu':_0x24fb46(0x1ad),'oSrWC':_0x24fb46(0x1a3),'AqyRA':_0x24fb46(0x1b2)};if(!_0x18cff0)return{'text':'','originalTokens':0x0,'compressedTokens':0x0,'wasTruncated':!0x1};const _0x512f2d=countTokens(_0x18cff0);if(_0x512f2d<=_0x4da674)return{'text':_0x18cff0,'originalTokens':_0x512f2d,'compressedTokens':_0x512f2d,'wasTruncated':!0x1};const _0x2a50b6=_0x18cff0[_0x24fb46(0x1ac)]('\x0a\x0a');let _0x254d4f='',_0x272026=0x0;for(const _0x3f7db8 of _0x2a50b6){const _0x21d484=_0x254d4f?_0x3f9fa1['IyHtY'](_0x254d4f+'\x0a\x0a',_0x3f7db8):_0x3f7db8,_0x282ae0=_0x3f9fa1[_0x24fb46(0x1a1)](countTokens,_0x21d484);if(_0x282ae0>_0x4da674)break;_0x254d4f=_0x21d484,_0x272026=_0x282ae0;}if(!_0x254d4f&&_0x2a50b6['length']>0x0){const _0x2ad82b=_0x2a50b6[0x0][_0x24fb46(0x1ac)](/\s+/);let _0x14782d='';for(const _0x52f952 of _0x2ad82b){const _0x3f519e=_0x14782d?_0x3f9fa1['IyHtY'](_0x3f9fa1['IyHtY'](_0x14782d,'\x20'),_0x52f952):_0x52f952;if(_0x3f9fa1['NMLMp'](_0x3f9fa1['Lvied'](countTokens,_0x3f519e),_0x3f9fa1['qPgZb'](_0x4da674,0x5)))break;_0x14782d=_0x3f519e;}_0x254d4f=_0x14782d,_0x272026=countTokens(_0x254d4f);}const _0x449d37=_0x3f9fa1[_0x24fb46(0x1a8)](_0x3f9fa1[_0x24fb46(0x19e)](_0x254d4f+_0x3f9fa1[_0x24fb46(0x1b5)],_0x512f2d),_0x3f9fa1[_0x24fb46(0x1a6)])+_0x272026+_0x3f9fa1['AqyRA'];return{'text':_0x449d37,'originalTokens':_0x512f2d,'compressedTokens':_0x3f9fa1['Lvied'](countTokens,_0x449d37),'wasTruncated':!0x0};}export function compressContextBudget(_0x298a99,_0x5f26be){const _0x29cd59=_0x3502,_0x2bb520=Math[_0x29cd59(0x19f)](_0x5f26be/Math['max'](_0x298a99[_0x29cd59(0x19d)],0x1));return _0x298a99[_0x29cd59(0x1b0)](({label:_0x1b850d,text:_0x292d28})=>({'label':_0x1b850d,'result':compressContext(_0x292d28,_0x2bb520)}));}
1
+ (function(_0x588d2c,_0x1ed24c){const _0x3efbc8=_0x2656,_0x367061=_0x588d2c();while(!![]){try{const _0x4ffcf6=-parseInt(_0x3efbc8(0x130))/0x1*(parseInt(_0x3efbc8(0x136))/0x2)+-parseInt(_0x3efbc8(0x139))/0x3*(-parseInt(_0x3efbc8(0x12d))/0x4)+parseInt(_0x3efbc8(0x13c))/0x5+parseInt(_0x3efbc8(0x13a))/0x6+parseInt(_0x3efbc8(0x137))/0x7+-parseInt(_0x3efbc8(0x131))/0x8+parseInt(_0x3efbc8(0x12c))/0x9*(-parseInt(_0x3efbc8(0x13b))/0xa);if(_0x4ffcf6===_0x1ed24c)break;else _0x367061['push'](_0x367061['shift']());}catch(_0x27923c){_0x367061['push'](_0x367061['shift']());}}}(_0x447f,0x27dea));import{countTokens}from'../shared/token-counter.js';export function compressContext(_0xe76b53,_0x328905){const _0x57c2be=_0x2656,_0x9b1d02={'zSRUw':function(_0x4b627a,_0x56fe7f){return _0x4b627a(_0x56fe7f);},'rIVXA':function(_0x3aa8ef,_0x23b32d){return _0x3aa8ef<=_0x23b32d;},'MCnCC':function(_0x296df0,_0x5f3f33){return _0x296df0+_0x5f3f33;},'bMSVs':function(_0x4962a6,_0x372733){return _0x4962a6>_0x372733;},'pGAdV':function(_0x57feaa,_0x334978){return _0x57feaa+_0x334978;},'GXpvX':'\x20→\x20','VzYuU':function(_0x295cd8,_0x55f443){return _0x295cd8(_0x55f443);}};if(!_0xe76b53)return{'text':'','originalTokens':0x0,'compressedTokens':0x0,'wasTruncated':!0x1};const _0x4dc4ff=_0x9b1d02[_0x57c2be(0x134)](countTokens,_0xe76b53);if(_0x9b1d02['rIVXA'](_0x4dc4ff,_0x328905))return{'text':_0xe76b53,'originalTokens':_0x4dc4ff,'compressedTokens':_0x4dc4ff,'wasTruncated':!0x1};const _0x46930b=_0xe76b53['split']('\x0a\x0a');let _0x264b79='',_0x3d525f=0x0;for(const _0x26f17a of _0x46930b){const _0x14a074=_0x264b79?_0x9b1d02['MCnCC'](_0x264b79,'\x0a\x0a')+_0x26f17a:_0x26f17a,_0x49a029=countTokens(_0x14a074);if(_0x49a029>_0x328905)break;_0x264b79=_0x14a074,_0x3d525f=_0x49a029;}if(!_0x264b79&&_0x9b1d02['bMSVs'](_0x46930b[_0x57c2be(0x132)],0x0)){const _0x3c14e6=_0x46930b[0x0][_0x57c2be(0x135)](/\s+/);let _0x3f3425='';for(const _0x3fa3e3 of _0x3c14e6){const _0x47fd66=_0x3f3425?_0x9b1d02[_0x57c2be(0x138)](_0x9b1d02[_0x57c2be(0x138)](_0x3f3425,'\x20'),_0x3fa3e3):_0x3fa3e3;if(countTokens(_0x47fd66)>_0x328905-0x5)break;_0x3f3425=_0x47fd66;}_0x264b79=_0x3f3425,_0x3d525f=countTokens(_0x264b79);}const _0x1191c7=_0x9b1d02[_0x57c2be(0x138)](_0x9b1d02['MCnCC'](_0x9b1d02[_0x57c2be(0x138)](_0x9b1d02[_0x57c2be(0x12f)](_0x264b79,_0x57c2be(0x12e)),_0x4dc4ff)+_0x9b1d02[_0x57c2be(0x133)],_0x3d525f),'\x20Token]');return{'text':_0x1191c7,'originalTokens':_0x4dc4ff,'compressedTokens':_0x9b1d02['VzYuU'](countTokens,_0x1191c7),'wasTruncated':!0x0};}function _0x2656(_0x1bf555,_0x226734){_0x1bf555=_0x1bf555-0x12a;const _0x447fff=_0x447f();let _0x265696=_0x447fff[_0x1bf555];return _0x265696;}function _0x447f(){const _0x3f8e18=['length','GXpvX','zSRUw','split','30162dhgvom','1301587rnTpbJ','MCnCC','50433wXelTx','1733244uINSKQ','1850270hkvlYC','714880HGYxGd','map','floor','9HXErrE','28NmDtGN','\x0a\x0a[...\x20gekuerzt,\x20','pGAdV','10zlGUTt','1890600qzEGpP'];_0x447f=function(){return _0x3f8e18;};return _0x447f();}export function compressContextBudget(_0x125162,_0x57e4bb){const _0x4f193e=_0x2656,_0x3c6659={'CeKnO':function(_0x168c9c,_0x89d533){return _0x168c9c/_0x89d533;}},_0x20fbe5=Math[_0x4f193e(0x12b)](_0x3c6659['CeKnO'](_0x57e4bb,Math['max'](_0x125162[_0x4f193e(0x132)],0x1)));return _0x125162[_0x4f193e(0x12a)](({label:_0x2e63f1,text:_0x3f7c69})=>({'label':_0x2e63f1,'result':compressContext(_0x3f7c69,_0x20fbe5)}));}
@@ -1 +1 @@
1
- const _0x578dec=_0x469e;function _0x5bae(){const _0x3983b9=['1356330AVOQEY','24WgAyGW','7RwcaBv','\x20(max\x20','prioritized','map','SwcWT','engine','length','112606qsIWbc','179080jalgwS','prompt','max_tokens','4BOwimz','max_file_tokens','compress_above','text',']\x20Relevanter\x20Kontext:\x20','136850KAHKfI','push','content','\x20laden.','join','117nqFDKJ','collector','944984nNYuyS','totalOriginalTokens','hook_event_name','12FxdENG','load','3640428AkDbro','handleSessionStop','limits','773868oGBRdI','projectRoot','handlePreCompact','record','min','trigger'];_0x5bae=function(){return _0x3983b9;};return _0x5bae();}(function(_0xb7c967,_0x38feaa){const _0x4ccae5=_0x469e,_0x1fdc15=_0xb7c967();while(!![]){try{const _0x4f256b=parseInt(_0x4ccae5(0xd4))/0x1+-parseInt(_0x4ccae5(0xd3))/0x2*(-parseInt(_0x4ccae5(0xe6))/0x3)+parseInt(_0x4ccae5(0xd7))/0x4*(parseInt(_0x4ccae5(0xf1))/0x5)+parseInt(_0x4ccae5(0xeb))/0x6+parseInt(_0x4ccae5(0xf3))/0x7*(-parseInt(_0x4ccae5(0xe3))/0x8)+-parseInt(_0x4ccae5(0xe1))/0x9*(-parseInt(_0x4ccae5(0xdc))/0xa)+parseInt(_0x4ccae5(0xe8))/0xb*(-parseInt(_0x4ccae5(0xf2))/0xc);if(_0x4f256b===_0x38feaa)break;else _0x1fdc15['push'](_0x1fdc15['shift']());}catch(_0x2173c1){_0x1fdc15['push'](_0x1fdc15['shift']());}}}(_0x5bae,0x316b6));import{RuleEngine}from'./rule-engine.js';function _0x469e(_0x5c385f,_0x288b36){_0x5c385f=_0x5c385f-0xcd;const _0x5baecd=_0x5bae();let _0x469e27=_0x5baecd[_0x5c385f];return _0x469e27;}import{MetricsCollector}from'./metrics-collector.js';import{compressContext}from'./context-compressor.js';import{prioritizeContext}from'./precompact-handler.js';import{countTokens}from'../shared/token-counter.js';export class HookDispatcher{['engine'];['collector'];[_0x578dec(0xec)];constructor(_0x4c0494,_0x4665c6,_0x324807){const _0x693592=_0x578dec;this['engine']=new RuleEngine(_0x4c0494),this[_0x693592(0xec)]=_0x4665c6,this['collector']=new MetricsCollector(_0x4665c6,_0x324807||'session-'+Date['now']());}['handleUserPromptSubmit'](_0xaba273){const _0x58f3bc=_0x578dec,_0x1c6fc2={'FSatV':function(_0xfd57b,_0x1388fc,_0x238d34){return _0xfd57b(_0x1388fc,_0x238d34);},'SwcWT':function(_0x5468f0,_0x2e600c){return _0x5468f0(_0x2e600c);},'klusM':function(_0x5c8635,_0x3f6c7a){return _0x5c8635+_0x3f6c7a;}},_0x47ad9e=_0xaba273['prompt']||'',_0x4cca37=this['engine']['match'](_0x47ad9e);if(0x0===_0x4cca37[_0x58f3bc(0xd2)]){const _0x13a4b3=countTokens(_0x47ad9e);return this[_0x58f3bc(0xe2)]['record']({'hook_event':_0xaba273[_0x58f3bc(0xe5)],'baseline_tokens':_0x13a4b3,'optimized_tokens':_0x13a4b3,'rule_matched':null}),{};}const _0x37ff3f=[],_0x498279=[];for(const _0x2779b7 of _0x4cca37)_0x498279[_0x58f3bc(0xdd)](_0x2779b7['trigger'][0x0]),_0x2779b7['summary_only']?_0x37ff3f['push']('['+_0x2779b7['trigger'][0x0]+']\x20Fuer\x20Details:\x20'+_0x2779b7[_0x58f3bc(0xe7)]+_0x58f3bc(0xdf)):_0x37ff3f[_0x58f3bc(0xdd)]('['+_0x2779b7[_0x58f3bc(0xf0)][0x0]+_0x58f3bc(0xdb)+_0x2779b7[_0x58f3bc(0xe7)]+_0x58f3bc(0xcd)+(_0x2779b7[_0x58f3bc(0xd6)]||this['engine']['limits'][_0x58f3bc(0xd8)])+'\x20Token)');let _0xb16b5=_0x37ff3f['join']('\x0a');const _0x29c050=this[_0x58f3bc(0xd1)]['limits'][_0x58f3bc(0xd9)];_0x29c050>0x0&&(_0xb16b5=_0x1c6fc2['FSatV'](compressContext,_0xb16b5,_0x29c050)[_0x58f3bc(0xda)]);const _0x960b5b=_0x1c6fc2[_0x58f3bc(0xd0)](countTokens,_0x47ad9e),_0x4316df=countTokens(_0xb16b5),_0x296db2=_0x960b5b+this[_0x58f3bc(0xd1)][_0x58f3bc(0xea)]['max_injected_tokens'],_0x5e48bf=_0x1c6fc2['klusM'](_0x960b5b,Math[_0x58f3bc(0xef)](_0x4316df,this[_0x58f3bc(0xd1)]['limits']['max_injected_tokens']));return this[_0x58f3bc(0xe2)]['record']({'hook_event':_0xaba273['hook_event_name'],'baseline_tokens':_0x296db2,'optimized_tokens':_0x5e48bf,'rule_matched':_0x498279[_0x58f3bc(0xe0)]('+')}),{'additionalContext':_0xb16b5};}[_0x578dec(0xed)](_0x5b0193){const _0x262fa0=_0x578dec,_0x322be9={'kXXbU':function(_0x14e18a,_0x4001e1){return _0x14e18a===_0x4001e1;}},_0x5d9101=[];if(_0x5b0193['prompt']&&_0x5d9101[_0x262fa0(0xdd)]({'role':'user','content':_0x5b0193[_0x262fa0(0xd5)],'turnIndex':0x0}),_0x322be9['kXXbU'](0x0,_0x5d9101['length']))return{};const _0x351b48=prioritizeContext(_0x5d9101,this[_0x262fa0(0xd1)]['limits']),_0x35a974=_0x351b48[_0x262fa0(0xce)][_0x262fa0(0xcf)](_0x4055df=>_0x4055df[_0x262fa0(0xde)])['join']('\x0a\x0a');return this['collector'][_0x262fa0(0xee)]({'hook_event':_0x5b0193['hook_event_name'],'baseline_tokens':_0x351b48[_0x262fa0(0xe4)],'optimized_tokens':_0x351b48['totalCompressedTokens'],'rule_matched':null}),{'additionalContext':_0x35a974};}[_0x578dec(0xe9)](){const _0x4cbe8c=_0x578dec;return this[_0x4cbe8c(0xe2)]['flush'](),this[_0x4cbe8c(0xe2)]['getSummary']();}['getSessionSummary'](){const _0x11b409=_0x578dec;return this[_0x11b409(0xe2)]['getSummary']();}}
1
+ function _0x44d7(_0x3ada54,_0x2a14fd){_0x3ada54=_0x3ada54-0x79;const _0x71af5b=_0x71af();let _0x44d759=_0x71af5b[_0x3ada54];return _0x44d759;}function _0x71af(){const _0x3f93bc=['COZlw','6249324vewTAF','user','handlePreCompact','3041973auCQAM','push','record',']\x20Fuer\x20Details:\x20','engine','trigger','handleSessionStop',']\x20Relevanter\x20Kontext:\x20','\x20laden.','summary_only','prompt','xIeoT','448672Zwwods','VPUdU','session-','5PtBssT','collector','8101824XoccZn','max_file_tokens','hook_event_name','84729ZqOoTp','\x20Token)','handleUserPromptSubmit','limits','totalOriginalTokens','4iyRQcb','580599sqYHch','compress_above','content','84LdbrCa','min','prioritized','23451600MdYhYs'];_0x71af=function(){return _0x3f93bc;};return _0x71af();}const _0xaf21b7=_0x44d7;(function(_0x18541c,_0x2757c0){const _0x3b2b7d=_0x44d7,_0x2127c7=_0x18541c();while(!![]){try{const _0x91c037=-parseInt(_0x3b2b7d(0x82))/0x1+-parseInt(_0x3b2b7d(0x81))/0x2*(parseInt(_0x3b2b7d(0x7c))/0x3)+-parseInt(_0x3b2b7d(0x8a))/0x4*(-parseInt(_0x3b2b7d(0x9c))/0x5)+-parseInt(_0x3b2b7d(0x85))/0x6*(-parseInt(_0x3b2b7d(0x99))/0x7)+parseInt(_0x3b2b7d(0x79))/0x8+parseInt(_0x3b2b7d(0x8d))/0x9+-parseInt(_0x3b2b7d(0x88))/0xa;if(_0x91c037===_0x2757c0)break;else _0x2127c7['push'](_0x2127c7['shift']());}catch(_0xdcd4dd){_0x2127c7['push'](_0x2127c7['shift']());}}}(_0x71af,0xca2fb));import{RuleEngine}from'./rule-engine.js';import{MetricsCollector}from'./metrics-collector.js';import{compressContext}from'./context-compressor.js';import{prioritizeContext}from'./precompact-handler.js';import{countTokens}from'../shared/token-counter.js';export class HookDispatcher{[_0xaf21b7(0x91)];[_0xaf21b7(0x9d)];['projectRoot'];constructor(_0x354aeb,_0xa0e634,_0x14cf9e){const _0x29e883=_0xaf21b7;this[_0x29e883(0x91)]=new RuleEngine(_0x354aeb),this['projectRoot']=_0xa0e634,this['collector']=new MetricsCollector(_0xa0e634,_0x14cf9e||_0x29e883(0x9b)+Date['now']());}[_0xaf21b7(0x7e)](_0x1107f3){const _0x433341=_0xaf21b7,_0x2a06aa={'MXRAR':function(_0x48ed73,_0x3dc7fe){return _0x48ed73>_0x3dc7fe;},'VPUdU':function(_0x1d3ad7,_0x5099fa,_0x53d02a){return _0x1d3ad7(_0x5099fa,_0x53d02a);},'XEhLT':function(_0x357a32,_0x346371){return _0x357a32(_0x346371);}},_0x4e4d45=_0x1107f3['prompt']||'',_0x4b184c=this[_0x433341(0x91)]['match'](_0x4e4d45);if(0x0===_0x4b184c['length']){const _0x1af2e4=countTokens(_0x4e4d45);return this['collector']['record']({'hook_event':_0x1107f3[_0x433341(0x7b)],'baseline_tokens':_0x1af2e4,'optimized_tokens':_0x1af2e4,'rule_matched':null}),{};}const _0x382533=[],_0x380f50=[];for(const _0x3db899 of _0x4b184c)_0x380f50[_0x433341(0x8e)](_0x3db899['trigger'][0x0]),_0x3db899[_0x433341(0x96)]?_0x382533['push']('['+_0x3db899[_0x433341(0x92)][0x0]+_0x433341(0x90)+_0x3db899['load']+_0x433341(0x95)):_0x382533['push']('['+_0x3db899['trigger'][0x0]+_0x433341(0x94)+_0x3db899['load']+'\x20(max\x20'+(_0x3db899['max_tokens']||this['engine']['limits'][_0x433341(0x7a)])+_0x433341(0x7d));let _0x1d215a=_0x382533['join']('\x0a');const _0x2500e9=this['engine']['limits'][_0x433341(0x83)];_0x2a06aa['MXRAR'](_0x2500e9,0x0)&&(_0x1d215a=_0x2a06aa[_0x433341(0x9a)](compressContext,_0x1d215a,_0x2500e9)['text']);const _0x327964=countTokens(_0x4e4d45),_0x290149=_0x2a06aa['XEhLT'](countTokens,_0x1d215a),_0x45f8bd=_0x327964+this['engine']['limits']['max_injected_tokens'],_0x452f68=_0x327964+Math[_0x433341(0x86)](_0x290149,this[_0x433341(0x91)][_0x433341(0x7f)]['max_injected_tokens']);return this[_0x433341(0x9d)]['record']({'hook_event':_0x1107f3['hook_event_name'],'baseline_tokens':_0x45f8bd,'optimized_tokens':_0x452f68,'rule_matched':_0x380f50['join']('+')}),{'additionalContext':_0x1d215a};}[_0xaf21b7(0x8c)](_0x218f8a){const _0x1e1bae=_0xaf21b7,_0x27dadd={'COZlw':_0x1e1bae(0x8b),'xIeoT':function(_0x331b53,_0x403556,_0x21be15){return _0x331b53(_0x403556,_0x21be15);}},_0x4e1737=[];if(_0x218f8a[_0x1e1bae(0x97)]&&_0x4e1737['push']({'role':_0x27dadd[_0x1e1bae(0x89)],'content':_0x218f8a[_0x1e1bae(0x97)],'turnIndex':0x0}),0x0===_0x4e1737['length'])return{};const _0xa92ea8=_0x27dadd[_0x1e1bae(0x98)](prioritizeContext,_0x4e1737,this[_0x1e1bae(0x91)][_0x1e1bae(0x7f)]),_0x245b9b=_0xa92ea8[_0x1e1bae(0x87)]['map'](_0x5cdb03=>_0x5cdb03[_0x1e1bae(0x84)])['join']('\x0a\x0a');return this['collector'][_0x1e1bae(0x8f)]({'hook_event':_0x218f8a['hook_event_name'],'baseline_tokens':_0xa92ea8[_0x1e1bae(0x80)],'optimized_tokens':_0xa92ea8['totalCompressedTokens'],'rule_matched':null}),{'additionalContext':_0x245b9b};}[_0xaf21b7(0x93)](){const _0x94ff5c=_0xaf21b7;return this[_0x94ff5c(0x9d)]['flush'](),this[_0x94ff5c(0x9d)]['getSummary']();}['getSessionSummary'](){return this['collector']['getSummary']();}}
@@ -1 +1 @@
1
- const _0x3aeca2=_0x42dc;(function(_0x2fb59f,_0x530935){const _0x437d34=_0x42dc,_0x42069a=_0x2fb59f();while(!![]){try{const _0x5cf7d8=-parseInt(_0x437d34(0x95))/0x1*(parseInt(_0x437d34(0x97))/0x2)+-parseInt(_0x437d34(0x9e))/0x3+parseInt(_0x437d34(0x91))/0x4+parseInt(_0x437d34(0x94))/0x5*(-parseInt(_0x437d34(0x9b))/0x6)+-parseInt(_0x437d34(0xa2))/0x7*(parseInt(_0x437d34(0x9a))/0x8)+parseInt(_0x437d34(0x93))/0x9+parseInt(_0x437d34(0x96))/0xa;if(_0x5cf7d8===_0x530935)break;else _0x42069a['push'](_0x42069a['shift']());}catch(_0x4ae382){_0x42069a['push'](_0x42069a['shift']());}}}(_0x4c3e,0xcf8bf));function _0x4c3e(){const _0x1537a2=['36YrYQhB','endpoint','status','1231422NBmlcK','team_id','total_optimized','POST','3272311krEUbk','2750616RYTYTb','timeout','9470448OroSSU','1065595CviSJf','8443xEiPjn','29470030QJjWSt','398dcObTg','stringify','http_','8VdFCrs'];_0x4c3e=function(){return _0x1537a2;};return _0x4c3e();}function _0x42dc(_0x57d7dd,_0x5e0ad6){_0x57d7dd=_0x57d7dd-0x91;const _0x4c3ec6=_0x4c3e();let _0x42dc59=_0x4c3ec6[_0x57d7dd];return _0x42dc59;}export function buildMeterPayload(_0x16ab93,_0x48f009){const _0x255dbb=_0x42dc;return{'session_id':_0x16ab93['session_id'],'tokens_saved':_0x16ab93['total_delta'],'baseline_tokens':_0x16ab93['total_baseline'],'optimized_tokens':_0x16ab93[_0x255dbb(0xa0)],'hook_event':'Stop','provider':_0x48f009['provider'],'model':_0x48f009['model'],'team_id':_0x48f009[_0x255dbb(0x9f)]??''};}export class MeteringClient{[_0x3aeca2(0x9c)];constructor(_0x48068f){this['endpoint']=_0x48068f;}async['send'](_0x3de4e1){const _0x598057=_0x3aeca2,_0x9ff76d={'jgbLb':_0x598057(0xa1),'xaTJV':'application/json'};if(!this['endpoint'])return{'sent':!0x1,'reason':'no_endpoint'};try{const _0x84af62=await fetch(this[_0x598057(0x9c)],{'method':_0x9ff76d['jgbLb'],'headers':{'Content-Type':_0x9ff76d['xaTJV'],'Authorization':'Bearer\x20'+(process.env.TOKENIZER_API_KEY||'')},'body':JSON[_0x598057(0x98)](_0x3de4e1),'signal':AbortSignal[_0x598057(0x92)](0x1388)});return _0x84af62['ok']?{'sent':!0x0}:{'sent':!0x1,'reason':_0x598057(0x99)+_0x84af62[_0x598057(0x9d)]};}catch{return{'sent':!0x1,'reason':'network_error'};}}}
1
+ const _0x22d64e=_0x4c32;(function(_0x45a1fa,_0x31cd83){const _0x42fc8e=_0x4c32,_0x50ba17=_0x45a1fa();while(!![]){try{const _0x4df140=-parseInt(_0x42fc8e(0x19d))/0x1*(-parseInt(_0x42fc8e(0x1a3))/0x2)+parseInt(_0x42fc8e(0x19a))/0x3+parseInt(_0x42fc8e(0x1a2))/0x4+-parseInt(_0x42fc8e(0x19f))/0x5*(-parseInt(_0x42fc8e(0x1a0))/0x6)+-parseInt(_0x42fc8e(0x198))/0x7*(-parseInt(_0x42fc8e(0x1aa))/0x8)+parseInt(_0x42fc8e(0x1ab))/0x9+-parseInt(_0x42fc8e(0x19b))/0xa;if(_0x4df140===_0x31cd83)break;else _0x50ba17['push'](_0x50ba17['shift']());}catch(_0xb29c5b){_0x50ba17['push'](_0x50ba17['shift']());}}}(_0x1c53,0x252b1));export function buildMeterPayload(_0x445041,_0xee6c6){const _0x4dd481=_0x4c32;return{'session_id':_0x445041[_0x4dd481(0x1a4)],'tokens_saved':_0x445041['total_delta'],'baseline_tokens':_0x445041[_0x4dd481(0x1a7)],'optimized_tokens':_0x445041[_0x4dd481(0x1a1)],'hook_event':_0x4dd481(0x1ac),'provider':_0xee6c6[_0x4dd481(0x1a5)],'model':_0xee6c6['model'],'team_id':_0xee6c6['team_id']??''};}function _0x4c32(_0x4eb378,_0x123319){_0x4eb378=_0x4eb378-0x198;const _0x1c53a7=_0x1c53();let _0x4c32e0=_0x1c53a7[_0x4eb378];return _0x4c32e0;}function _0x1c53(){const _0x2dfd21=['endpoint','34329sjUCWb','6510640LsEjHG','wUAee','68441SmjNwg','Bearer\x20','512915IywTRP','12UzsMnn','total_optimized','369572bPTRhk','2bISeXt','session_id','provider','status','total_baseline','application/json','http_','40VcFNnw','2066373tvoICk','Stop','timeout','stringify','274771ZcbtAZ'];_0x1c53=function(){return _0x2dfd21;};return _0x1c53();}export class MeteringClient{[_0x22d64e(0x199)];constructor(_0x10396c){this['endpoint']=_0x10396c;}async['send'](_0x23bd4f){const _0x2666ee=_0x22d64e,_0xdb62ed={'sYGYa':'no_endpoint','wUAee':'POST','KCOPh':'network_error'};if(!this[_0x2666ee(0x199)])return{'sent':!0x1,'reason':_0xdb62ed['sYGYa']};try{const _0x8e5752=await fetch(this['endpoint'],{'method':_0xdb62ed[_0x2666ee(0x19c)],'headers':{'Content-Type':_0x2666ee(0x1a8),'Authorization':_0x2666ee(0x19e)+(process.env.TOKENIZER_API_KEY||'')},'body':JSON[_0x2666ee(0x1ae)](_0x23bd4f),'signal':AbortSignal[_0x2666ee(0x1ad)](0x1388)});return _0x8e5752['ok']?{'sent':!0x0}:{'sent':!0x1,'reason':_0x2666ee(0x1a9)+_0x8e5752[_0x2666ee(0x1a6)]};}catch{return{'sent':!0x1,'reason':_0xdb62ed['KCOPh']};}}}
@@ -1 +1 @@
1
- const _0x20fc97=_0x3f8c;(function(_0x5d2585,_0x5d4802){const _0x34948b=_0x3f8c,_0x1894e4=_0x5d2585();while(!![]){try{const _0x1b995d=parseInt(_0x34948b(0x1f5))/0x1*(-parseInt(_0x34948b(0x1e2))/0x2)+parseInt(_0x34948b(0x1ea))/0x3+parseInt(_0x34948b(0x1f0))/0x4+parseInt(_0x34948b(0x1ee))/0x5+parseInt(_0x34948b(0x1e0))/0x6*(-parseInt(_0x34948b(0x1f2))/0x7)+-parseInt(_0x34948b(0x1ed))/0x8*(parseInt(_0x34948b(0x1eb))/0x9)+parseInt(_0x34948b(0x1e4))/0xa;if(_0x1b995d===_0x5d4802)break;else _0x1894e4['push'](_0x1894e4['shift']());}catch(_0xfb1d4e){_0x1894e4['push'](_0x1894e4['shift']());}}}(_0x17c6,0xd52c0));import{mkdirSync,writeFileSync}from'node:fs';function _0x3f8c(_0x41b55e,_0x5cd147){_0x41b55e=_0x41b55e-0x1dc;const _0x17c61e=_0x17c6();let _0x3f8c72=_0x17c61e[_0x41b55e];return _0x3f8c72;}import{join}from'node:path';const METRICS_DIR=_0x20fc97(0x1e7);export class MetricsCollector{['metrics']=[];['sessionId'];['projectRoot'];['startedAt'];constructor(_0x2781d0,_0x1b4074){const _0x4bc85f=_0x20fc97;this['projectRoot']=_0x2781d0,this[_0x4bc85f(0x1dc)]=_0x1b4074,this[_0x4bc85f(0x1f7)]=new Date()['toISOString']();}['record'](_0xc04ace){const _0x3b097f=_0x20fc97;this[_0x3b097f(0x1ec)][_0x3b097f(0x1e6)]({'session_id':this['sessionId'],'timestamp':new Date()[_0x3b097f(0x1e3)](),'hook_event':_0xc04ace['hook_event'],'baseline_tokens':_0xc04ace[_0x3b097f(0x1e5)],'optimized_tokens':_0xc04ace['optimized_tokens'],'delta':_0xc04ace['baseline_tokens']-_0xc04ace['optimized_tokens'],'rule_matched':_0xc04ace['rule_matched']});}['getMetrics'](){const _0x489852=_0x20fc97;return[...this[_0x489852(0x1ec)]];}[_0x20fc97(0x1dd)](){const _0x1d6bf9=_0x20fc97,_0x4a52a7={'bsxJZ':function(_0x3452f6,_0x166ea3){return _0x3452f6-_0x166ea3;},'bPCOv':function(_0xa28faa,_0x53c63f){return _0xa28faa+_0x53c63f;}},_0x5ce1c7=this['metrics']['reduce']((_0x25e5b0,_0x6249f8)=>_0x25e5b0+_0x6249f8['baseline_tokens'],0x0),_0x514cc3=this[_0x1d6bf9(0x1ec)]['reduce']((_0x54f452,_0x309db5)=>_0x54f452+_0x309db5[_0x1d6bf9(0x1f3)],0x0),_0x2eba6c=_0x4a52a7[_0x1d6bf9(0x1f4)](_0x5ce1c7,_0x514cc3),_0x1514b0={};for(const _0x11b30f of this[_0x1d6bf9(0x1ec)])_0x11b30f['rule_matched']&&(_0x1514b0[_0x11b30f['rule_matched']]=_0x4a52a7[_0x1d6bf9(0x1f6)](_0x1514b0[_0x11b30f[_0x1d6bf9(0x1e8)]]||0x0,0x1));return{'session_id':this['sessionId'],'started_at':this['startedAt'],'ended_at':new Date()[_0x1d6bf9(0x1e3)](),'total_baseline':_0x5ce1c7,'total_optimized':_0x514cc3,'total_delta':_0x2eba6c,'savings_percent':_0x5ce1c7>0x0?_0x2eba6c/_0x5ce1c7*0x64:0x0,'prompts_count':this[_0x1d6bf9(0x1ec)][_0x1d6bf9(0x1df)],'rules_triggered':_0x1514b0};}[_0x20fc97(0x1e9)](){const _0x35f72e=_0x20fc97,_0x3ba10e={'LoeDD':function(_0x14dcdd,_0x3c237a,_0x5b0ebf){return _0x14dcdd(_0x3c237a,_0x5b0ebf);}},_0x347de1=_0x3ba10e[_0x35f72e(0x1de)](join,this[_0x35f72e(0x1e1)],METRICS_DIR);mkdirSync(_0x347de1,{'recursive':!0x0});const _0x2b7ea5={'metrics':this['metrics'],'summary':this[_0x35f72e(0x1dd)]()};writeFileSync(join(_0x347de1,this['sessionId']+_0x35f72e(0x1f1)),JSON[_0x35f72e(0x1ef)](_0x2b7ea5,null,0x2),'utf-8');}}function _0x17c6(){const _0x22a89e=['length','6XGfBUw','projectRoot','146zQHkXi','toISOString','6278830lzBNoe','baseline_tokens','push','.tokenizer-speedup','rule_matched','flush','2382519dgzwQI','27pzQxOB','metrics','2848464DrAHNM','4200550QXkfEC','stringify','5483752ZoTSAT','.json','863611JyHpWf','optimized_tokens','bsxJZ','21485IqFJme','bPCOv','startedAt','sessionId','getSummary','LoeDD'];_0x17c6=function(){return _0x22a89e;};return _0x17c6();}
1
+ const _0x48cae1=_0x3518;(function(_0x3b5576,_0x3e3e14){const _0x3f0fb5=_0x3518,_0x16e71e=_0x3b5576();while(!![]){try{const _0x4812bd=-parseInt(_0x3f0fb5(0x75))/0x1+-parseInt(_0x3f0fb5(0x84))/0x2+parseInt(_0x3f0fb5(0x72))/0x3+-parseInt(_0x3f0fb5(0x7f))/0x4+-parseInt(_0x3f0fb5(0x73))/0x5+-parseInt(_0x3f0fb5(0x70))/0x6*(-parseInt(_0x3f0fb5(0x74))/0x7)+parseInt(_0x3f0fb5(0x87))/0x8*(parseInt(_0x3f0fb5(0x7d))/0x9);if(_0x4812bd===_0x3e3e14)break;else _0x16e71e['push'](_0x16e71e['shift']());}catch(_0x3a66f3){_0x16e71e['push'](_0x16e71e['shift']());}}}(_0x2e62,0xc32d7));import{mkdirSync,writeFileSync}from'node:fs';function _0x2e62(){const _0x270e40=['317802VCILVJ','.tokenizer-speedup','1219731seVTrW','415820UQxrjV','203nURELa','1112798XULKNu','push','projectRoot','optimized_tokens','baseline_tokens','.json','metrics','length','2395746oRLMlJ','hook_event','3655320WPgyrf','stringify','rule_matched','startedAt','EGSpU','728702SIyMpx','reduce','DktBI','40eHCEDv','toISOString'];_0x2e62=function(){return _0x270e40;};return _0x2e62();}function _0x3518(_0x471e7f,_0x425433){_0x471e7f=_0x471e7f-0x70;const _0x2e62f4=_0x2e62();let _0x351814=_0x2e62f4[_0x471e7f];return _0x351814;}import{join}from'node:path';const METRICS_DIR=_0x48cae1(0x71);export class MetricsCollector{[_0x48cae1(0x7b)]=[];['sessionId'];[_0x48cae1(0x77)];['startedAt'];constructor(_0x5748b9,_0x56fba1){const _0x243c2f=_0x48cae1;this['projectRoot']=_0x5748b9,this['sessionId']=_0x56fba1,this[_0x243c2f(0x82)]=new Date()[_0x243c2f(0x88)]();}['record'](_0x2af63e){const _0x4f901b=_0x48cae1;this[_0x4f901b(0x7b)][_0x4f901b(0x76)]({'session_id':this['sessionId'],'timestamp':new Date()[_0x4f901b(0x88)](),'hook_event':_0x2af63e[_0x4f901b(0x7e)],'baseline_tokens':_0x2af63e[_0x4f901b(0x79)],'optimized_tokens':_0x2af63e['optimized_tokens'],'delta':_0x2af63e[_0x4f901b(0x79)]-_0x2af63e[_0x4f901b(0x78)],'rule_matched':_0x2af63e[_0x4f901b(0x81)]});}['getMetrics'](){return[...this['metrics']];}['getSummary'](){const _0x19460d=_0x48cae1,_0x40264d={'mLEkp':function(_0x4ae38f,_0x4457e2){return _0x4ae38f*_0x4457e2;},'VyhwJ':function(_0x101899,_0x262e38){return _0x101899/_0x262e38;}},_0x51cdde=this[_0x19460d(0x7b)]['reduce']((_0x476d98,_0x436a23)=>_0x476d98+_0x436a23['baseline_tokens'],0x0),_0x224607=this[_0x19460d(0x7b)][_0x19460d(0x85)]((_0x24d1bb,_0x35af17)=>_0x24d1bb+_0x35af17['optimized_tokens'],0x0),_0x53fda8=_0x51cdde-_0x224607,_0x3b8831={};for(const _0x796e6f of this[_0x19460d(0x7b)])_0x796e6f[_0x19460d(0x81)]&&(_0x3b8831[_0x796e6f[_0x19460d(0x81)]]=(_0x3b8831[_0x796e6f[_0x19460d(0x81)]]||0x0)+0x1);return{'session_id':this['sessionId'],'started_at':this[_0x19460d(0x82)],'ended_at':new Date()[_0x19460d(0x88)](),'total_baseline':_0x51cdde,'total_optimized':_0x224607,'total_delta':_0x53fda8,'savings_percent':_0x51cdde>0x0?_0x40264d['mLEkp'](_0x40264d['VyhwJ'](_0x53fda8,_0x51cdde),0x64):0x0,'prompts_count':this['metrics'][_0x19460d(0x7c)],'rules_triggered':_0x3b8831};}['flush'](){const _0x294be7=_0x48cae1,_0x4cd792={'MUsqX':function(_0x135a78,_0x27008f,_0x33f2df){return _0x135a78(_0x27008f,_0x33f2df);},'EGSpU':function(_0x4e7420,_0x389709,_0xc3f316,_0x249457){return _0x4e7420(_0x389709,_0xc3f316,_0x249457);},'DktBI':function(_0x917c0e,_0x22de49,_0x1fdf45){return _0x917c0e(_0x22de49,_0x1fdf45);}},_0xaf65c7=_0x4cd792['MUsqX'](join,this[_0x294be7(0x77)],METRICS_DIR);_0x4cd792['MUsqX'](mkdirSync,_0xaf65c7,{'recursive':!0x0});const _0x110b28={'metrics':this[_0x294be7(0x7b)],'summary':this['getSummary']()};_0x4cd792[_0x294be7(0x83)](writeFileSync,_0x4cd792[_0x294be7(0x86)](join,_0xaf65c7,this['sessionId']+_0x294be7(0x7a)),JSON[_0x294be7(0x80)](_0x110b28,null,0x2),'utf-8');}}
@@ -1 +1 @@
1
- function _0x202c(){const _0x519ff2=['1720566BzYcVq','354fLvnyK','QBLWf','requirement','MSGJO','https://api.simosphereai.com/v1/meter','docs/lessons-learned','fix','23441ECEoIa','spec','169XAsqKF','features/*.md','bug','CLAUDE.md','2358yIqVsz','problem','660EgxEqT','498778HDrTmI','decisions/*.md','6208IijLze','44755AGRFMk','lessons-learned/*.md','architecture','27410HkpIHP','7441rewfja','9008xeDjUU','isDirectory','AuuOj','dump','name','error','docs','ECUbV','design','1539utQZcx','1TzkEux','ryzFG','docsDir'];_0x202c=function(){return _0x519ff2;};return _0x202c();}(function(_0x33e402,_0x301906){const _0x367cc1=_0x404a,_0x5524b4=_0x33e402();while(!![]){try{const _0x1b5ac8=-parseInt(_0x367cc1(0x1a8))/0x1*(parseInt(_0x367cc1(0x185))/0x2)+-parseInt(_0x367cc1(0x1a7))/0x3*(-parseInt(_0x367cc1(0x198))/0x4)+parseInt(_0x367cc1(0x199))/0x5*(-parseInt(_0x367cc1(0x186))/0x6)+-parseInt(_0x367cc1(0x19d))/0x7*(-parseInt(_0x367cc1(0x19e))/0x8)+-parseInt(_0x367cc1(0x193))/0x9*(-parseInt(_0x367cc1(0x19c))/0xa)+parseInt(_0x367cc1(0x18d))/0xb*(-parseInt(_0x367cc1(0x195))/0xc)+-parseInt(_0x367cc1(0x18f))/0xd*(parseInt(_0x367cc1(0x196))/0xe);if(_0x1b5ac8===_0x301906)break;else _0x5524b4['push'](_0x5524b4['shift']());}catch(_0x1453c8){_0x5524b4['push'](_0x5524b4['shift']());}}}(_0x202c,0xb546c));import{existsSync,readdirSync}from'node:fs';import{join}from'node:path';import _0x237906 from'js-yaml';function _0x404a(_0x2d3ae4,_0x33eb23){_0x2d3ae4=_0x2d3ae4-0x185;const _0x202ce5=_0x202c();let _0x404afc=_0x202ce5[_0x2d3ae4];return _0x404afc;}export function detectProjectDocs(_0x2d80fe){const _0x1597f5=_0x404a,_0x4ac988={'mduXk':function(_0x247ce9,_0x51468c,_0x34a4f3){return _0x247ce9(_0x51468c,_0x34a4f3);},'QBLWf':function(_0x111a5e,_0x438f30){return _0x111a5e(_0x438f30);},'vsuGZ':function(_0x9ac12,_0x12c65b,_0x5e45a9){return _0x9ac12(_0x12c65b,_0x5e45a9);},'ryzFG':_0x1597f5(0x18b)},_0xe03319=_0x4ac988['mduXk'](join,_0x2d80fe,_0x1597f5(0x1a4)),_0x470123=_0x4ac988[_0x1597f5(0x187)](existsSync,_0xe03319),_0x20f75a=existsSync(_0x4ac988['vsuGZ'](join,_0x2d80fe,_0x1597f5(0x192))),_0xb2d02c=existsSync(join(_0x2d80fe,_0x4ac988[_0x1597f5(0x1a9)]));let _0x5071c2=[];if(_0x470123)try{_0x5071c2=readdirSync(_0xe03319,{'withFileTypes':!0x0})['filter'](_0x42e75f=>_0x42e75f[_0x1597f5(0x19f)]())['map'](_0x13c032=>_0x13c032[_0x1597f5(0x1a2)]);}catch{}return{'hasDocsDir':_0x470123,'hasClaudeMd':_0x20f75a,'hasLessonsLearned':_0xb2d02c,'docSubdirs':_0x5071c2};}export function generateDefaultConfig(_0x2759e3){const _0x50b3=_0x404a,_0x4a84dd={'MSGJO':_0x50b3(0x1a3),'TOtaO':_0x50b3(0x194),'ECUbV':_0x50b3(0x1a6),'TiQOQ':_0x50b3(0x19b),'ZruBx':'refactor','AuuOj':_0x50b3(0x18e)},_0x4a3ff2={'version':0x1,'rules':[{'trigger':[_0x50b3(0x18c),_0x50b3(0x191),_0x4a84dd[_0x50b3(0x189)],_0x4a84dd['TOtaO']],'load':_0x2759e3[_0x50b3(0x1aa)]+_0x50b3(0x19a),'max_tokens':0x7d0,'summary_only':!0x1},{'trigger':[_0x4a84dd[_0x50b3(0x1a5)],_0x4a84dd['TiQOQ'],_0x4a84dd['ZruBx']],'load':_0x2759e3['docsDir']+_0x50b3(0x197),'max_tokens':0xbb8,'summary_only':!0x0},{'trigger':['feature',_0x4a84dd[_0x50b3(0x1a0)],_0x50b3(0x188)],'load':_0x2759e3['docsDir']+_0x50b3(0x190),'max_tokens':0xbb8,'summary_only':!0x0}],'context_limits':{'max_injected_tokens':0x1f40,'max_file_tokens':0xfa0,'compress_above':0xbb8},'metering':{'endpoint':_0x50b3(0x18a),'batch_interval':0x3c,'send_content':!0x1}};return _0x237906[_0x50b3(0x1a1)](_0x4a3ff2,{'lineWidth':0x78});}
1
+ (function(_0xb9c682,_0x1f69e0){const _0x440248=_0x50d8,_0x2b8dc1=_0xb9c682();while(!![]){try{const _0xa3f58e=-parseInt(_0x440248(0x12c))/0x1*(parseInt(_0x440248(0x12e))/0x2)+-parseInt(_0x440248(0x11a))/0x3*(-parseInt(_0x440248(0x128))/0x4)+parseInt(_0x440248(0x131))/0x5+-parseInt(_0x440248(0x129))/0x6+parseInt(_0x440248(0x12d))/0x7*(-parseInt(_0x440248(0x12b))/0x8)+parseInt(_0x440248(0x120))/0x9*(-parseInt(_0x440248(0x134))/0xa)+parseInt(_0x440248(0x126))/0xb;if(_0xa3f58e===_0x1f69e0)break;else _0x2b8dc1['push'](_0x2b8dc1['shift']());}catch(_0x427943){_0x2b8dc1['push'](_0x2b8dc1['shift']());}}}(_0x237d,0xe7b17));function _0x237d(){const _0x30cbfa=['292bdgAFW','4632540ZZcxWe','isDirectory','9627032rLGDdW','26701zIglSA','7EvAgLn','2awstdc','error','docs/lessons-learned','4778955DXCfYL','features/*.md','architecture','20TzLDru','25791FagDuw','feature','design','ILqSO','decisions/*.md','vwzgm','736083PhVZue','docsDir','jPmNZ','docs','XiIFD','problem','16845257XkUlzy','refactor'];_0x237d=function(){return _0x30cbfa;};return _0x237d();}import{existsSync,readdirSync}from'node:fs';import{join}from'node:path';function _0x50d8(_0x2938ce,_0x406586){_0x2938ce=_0x2938ce-0x11a;const _0x237de5=_0x237d();let _0x50d8ed=_0x237de5[_0x2938ce];return _0x50d8ed;}import _0x15d121 from'js-yaml';export function detectProjectDocs(_0x7b4561){const _0xa678a0=_0x50d8,_0x151698={'fhKFq':function(_0x500226,_0x418ae0,_0x7b72cd){return _0x500226(_0x418ae0,_0x7b72cd);},'XiIFD':function(_0x366c02,_0x20d5ee){return _0x366c02(_0x20d5ee);},'dOOSE':function(_0x42f67e,_0x3ccd07){return _0x42f67e(_0x3ccd07);},'Wrina':function(_0x22b4df,_0x300a13,_0xb0a656){return _0x22b4df(_0x300a13,_0xb0a656);},'ILqSO':'CLAUDE.md'},_0xeeedeb=_0x151698['fhKFq'](join,_0x7b4561,_0xa678a0(0x123)),_0x2e7888=_0x151698[_0xa678a0(0x124)](existsSync,_0xeeedeb),_0x1fd4d4=_0x151698['dOOSE'](existsSync,_0x151698['Wrina'](join,_0x7b4561,_0x151698[_0xa678a0(0x11d)])),_0x1e9efc=existsSync(_0x151698['fhKFq'](join,_0x7b4561,_0xa678a0(0x130)));let _0x2419eb=[];if(_0x2e7888)try{_0x2419eb=_0x151698['Wrina'](readdirSync,_0xeeedeb,{'withFileTypes':!0x0})['filter'](_0x529aa5=>_0x529aa5[_0xa678a0(0x12a)]())['map'](_0x356b6c=>_0x356b6c['name']);}catch{}return{'hasDocsDir':_0x2e7888,'hasClaudeMd':_0x1fd4d4,'hasLessonsLearned':_0x1e9efc,'docSubdirs':_0x2419eb};}export function generateDefaultConfig(_0x8da5c1){const _0x34ac9b=_0x50d8,_0x2b3431={'vwzgm':'fix','BzIzU':'bug','WVFhC':_0x34ac9b(0x12f),'jPmNZ':_0x34ac9b(0x11c),'QmBul':'requirement','AlZne':'https://api.simosphereai.com/v1/meter'},_0x4fd36f={'version':0x1,'rules':[{'trigger':[_0x2b3431[_0x34ac9b(0x11f)],_0x2b3431['BzIzU'],_0x2b3431['WVFhC'],_0x34ac9b(0x125)],'load':_0x8da5c1['docsDir']+'lessons-learned/*.md','max_tokens':0x7d0,'summary_only':!0x1},{'trigger':[_0x2b3431[_0x34ac9b(0x122)],_0x34ac9b(0x133),_0x34ac9b(0x127)],'load':_0x8da5c1[_0x34ac9b(0x121)]+_0x34ac9b(0x11e),'max_tokens':0xbb8,'summary_only':!0x0},{'trigger':[_0x34ac9b(0x11b),'spec',_0x2b3431['QmBul']],'load':_0x8da5c1[_0x34ac9b(0x121)]+_0x34ac9b(0x132),'max_tokens':0xbb8,'summary_only':!0x0}],'context_limits':{'max_injected_tokens':0x1f40,'max_file_tokens':0xfa0,'compress_above':0xbb8},'metering':{'endpoint':_0x2b3431['AlZne'],'batch_interval':0x3c,'send_content':!0x1}};return _0x15d121['dump'](_0x4fd36f,{'lineWidth':0x78});}
@@ -1 +1 @@
1
- (function(_0x4226a2,_0x5840e9){const _0x187e34=_0x1541,_0x1c3a9c=_0x4226a2();while(!![]){try{const _0x2fba5a=-parseInt(_0x187e34(0xbe))/0x1+-parseInt(_0x187e34(0xcc))/0x2+parseInt(_0x187e34(0xc3))/0x3*(-parseInt(_0x187e34(0xcf))/0x4)+-parseInt(_0x187e34(0xc0))/0x5+parseInt(_0x187e34(0xce))/0x6+-parseInt(_0x187e34(0xcd))/0x7*(parseInt(_0x187e34(0xc5))/0x8)+parseInt(_0x187e34(0xc6))/0x9;if(_0x2fba5a===_0x5840e9)break;else _0x1c3a9c['push'](_0x1c3a9c['shift']());}catch(_0x5276a0){_0x1c3a9c['push'](_0x1c3a9c['shift']());}}}(_0x3813,0x749d1));function _0x1541(_0x3e708b,_0x24cead){_0x3e708b=_0x3e708b-0xb9;const _0x381312=_0x3813();let _0x15412d=_0x381312[_0x3e708b];return _0x15412d;}import{compressContextBudget}from'./context-compressor.js';import{countTokens}from'../shared/token-counter.js';function _0x3813(){const _0x4ebac4=['26583939bduYGV','map','result','role','push','filter','910302GwnkbR','413PeVYot','1423134jVlFSk','4fuPemg','RnZGw','compressedTokens','system','content','ovhYT','dEOFm','length','485103xzgYpy','originalTokens','3720235NuvbVW','wasTruncated','max','1030821aIZsVp','turnIndex','92936CrBvhC'];_0x3813=function(){return _0x4ebac4;};return _0x3813();}export function prioritizeContext(_0x52ffef,_0x59ac0d,_0x5565b0=0x4){const _0xd2c326=_0x1541,_0x556dde={'RnZGw':function(_0x96379b,_0x596189){return _0x96379b-_0x596189;},'ovhYT':function(_0x4d39da,_0x3a2b83){return _0x4d39da(_0x3a2b83);},'oJQVq':function(_0x40ac77,_0x3b8753){return _0x40ac77>_0x3b8753;},'uYgMN':function(_0xed2992,_0x2bc21d){return _0xed2992-_0x2bc21d;},'boXIO':function(_0x3ac08b,_0x3242bf){return _0x3ac08b>_0x3242bf;},'dEOFm':function(_0x3483c0,_0x3ff0cc){return _0x3483c0>_0x3ff0cc;}};if(0x0===_0x52ffef[_0xd2c326(0xbd)])return{'prioritized':[],'totalOriginalTokens':0x0,'totalCompressedTokens':0x0,'segmentsDropped':0x0};const _0x1878ff=_0x59ac0d['max_injected_tokens'],_0x4a6667=_0x52ffef[_0xd2c326(0xcb)](_0x3826f8=>'system'===_0x3826f8['role']),_0x406352=_0x52ffef[_0xd2c326(0xcb)](_0x2ea069=>_0xd2c326(0xb9)!==_0x2ea069['role']),_0x336a70=Math[_0xd2c326(0xc2)](0x0,_0x556dde[_0xd2c326(0xd0)](_0x406352[_0xd2c326(0xbd)],_0x5565b0)),_0x2cc90e=_0x406352['slice'](_0x336a70),_0x161218=_0x406352['slice'](0x0,_0x336a70),_0x241b52=[];let _0x123acd=0x0,_0x44c2fb=0x0,_0x30450c=0x0;for(const _0x5ed75e of _0x4a6667){const _0x53143f=_0x556dde[_0xd2c326(0xbb)](countTokens,_0x5ed75e[_0xd2c326(0xba)]);_0x123acd+=_0x53143f,_0x44c2fb+=_0x53143f,_0x241b52[_0xd2c326(0xca)]({'role':_0x5ed75e[_0xd2c326(0xc9)],'content':_0x5ed75e['content'],'turnIndex':_0x5ed75e[_0xd2c326(0xc4)],'compressed':!0x1});}for(const _0x256af2 of _0x2cc90e){const _0x3291a8=_0x556dde['ovhYT'](countTokens,_0x256af2['content']);_0x123acd+=_0x3291a8,_0x44c2fb+=_0x3291a8,_0x241b52['push']({'role':_0x256af2[_0xd2c326(0xc9)],'content':_0x256af2[_0xd2c326(0xba)],'turnIndex':_0x256af2['turnIndex'],'compressed':!0x1});}if(_0x556dde['oJQVq'](_0x161218[_0xd2c326(0xbd)],0x0)){const _0x38ee84=_0x44c2fb,_0xe268f6=Math[_0xd2c326(0xc2)](0x0,_0x556dde['uYgMN'](_0x1878ff,_0x38ee84));if(_0x556dde['boXIO'](_0xe268f6,0x0)){const _0x1f9e35=_0x161218[_0xd2c326(0xc7)](_0x52ac4e=>({'label':'turn-'+_0x52ac4e[_0xd2c326(0xc4)],'text':_0x52ac4e[_0xd2c326(0xba)]})),_0xa15788=compressContextBudget(_0x1f9e35,_0xe268f6);for(let _0x4d064c=0x0;_0x4d064c<_0x161218[_0xd2c326(0xbd)];_0x4d064c++){const _0x582f6d=_0x161218[_0x4d064c],_0x1712ea=_0xa15788[_0x4d064c][_0xd2c326(0xc8)];_0x123acd+=_0x1712ea[_0xd2c326(0xbf)],_0x556dde[_0xd2c326(0xbc)](_0x1712ea[_0xd2c326(0xd1)],0x0)?(_0x44c2fb+=_0x1712ea[_0xd2c326(0xd1)],_0x241b52[_0xd2c326(0xca)]({'role':_0x582f6d[_0xd2c326(0xc9)],'content':_0x1712ea['text'],'turnIndex':_0x582f6d['turnIndex'],'compressed':_0x1712ea[_0xd2c326(0xc1)]})):(_0x30450c++,_0x123acd+=0x0);}}else{for(const _0x2cf9fa of _0x161218)_0x123acd+=_0x556dde[_0xd2c326(0xbb)](countTokens,_0x2cf9fa[_0xd2c326(0xba)]),_0x30450c++;}}return _0x241b52['sort']((_0x2137fb,_0x124705)=>_0x2137fb['turnIndex']-_0x124705['turnIndex']),{'prioritized':_0x241b52,'totalOriginalTokens':_0x123acd,'totalCompressedTokens':_0x44c2fb,'segmentsDropped':_0x30450c};}
1
+ function _0x2a3d(){const _0x559ae7=['1298094veVBdA','64475389uIgVGg','role','ikjOr','turnIndex','result','sort','content','push','264036sFvhPU','126vqFhmG','map','2127094mDLsLx','filter','hlbwu','5901288XJXCAV','834360goCbOv','system','1VyvAnR','compressedTokens','wasTruncated','length','tfVlm','4396248PKZpZb','10AIDLzQ','slice','originalTokens','64UccSfc'];_0x2a3d=function(){return _0x559ae7;};return _0x2a3d();}function _0x5ef0(_0x17c018,_0x5d85ca){_0x17c018=_0x17c018-0x9a;const _0x2a3d07=_0x2a3d();let _0x5ef0ca=_0x2a3d07[_0x17c018];return _0x5ef0ca;}(function(_0x520a2e,_0x3c7ab6){const _0x4f89d5=_0x5ef0,_0x498074=_0x520a2e();while(!![]){try{const _0x540340=parseInt(_0x4f89d5(0xa2))/0x1*(parseInt(_0x4f89d5(0x9c))/0x2)+parseInt(_0x4f89d5(0xa7))/0x3+parseInt(_0x4f89d5(0x9f))/0x4+parseInt(_0x4f89d5(0xa8))/0x5*(parseInt(_0x4f89d5(0xb5))/0x6)+-parseInt(_0x4f89d5(0xac))/0x7*(-parseInt(_0x4f89d5(0xab))/0x8)+-parseInt(_0x4f89d5(0x9a))/0x9*(-parseInt(_0x4f89d5(0xa0))/0xa)+-parseInt(_0x4f89d5(0xad))/0xb;if(_0x540340===_0x3c7ab6)break;else _0x498074['push'](_0x498074['shift']());}catch(_0x434af8){_0x498074['push'](_0x498074['shift']());}}}(_0x2a3d,0xd776a));import{compressContextBudget}from'./context-compressor.js';import{countTokens}from'../shared/token-counter.js';export function prioritizeContext(_0x479ad2,_0x49ed59,_0x49acca=0x4){const _0x1b0eef=_0x5ef0,_0x3ddeb8={'ikjOr':function(_0x3d05ba,_0x5f29f9){return _0x3d05ba(_0x5f29f9);},'ezvdf':function(_0x4abcca,_0x108dee){return _0x4abcca>_0x108dee;},'IVDal':function(_0x4871d6,_0xf836c4){return _0x4871d6-_0xf836c4;},'tfVlm':function(_0x5a3ceb,_0x4986b1){return _0x5a3ceb>_0x4986b1;},'hlbwu':function(_0x34feed,_0x3fe2d3){return _0x34feed<_0x3fe2d3;},'DCisj':function(_0x2fb110,_0x4f6569){return _0x2fb110>_0x4f6569;}};if(0x0===_0x479ad2[_0x1b0eef(0xa5)])return{'prioritized':[],'totalOriginalTokens':0x0,'totalCompressedTokens':0x0,'segmentsDropped':0x0};const _0x4b6656=_0x49ed59['max_injected_tokens'],_0x214b8b=_0x479ad2[_0x1b0eef(0x9d)](_0x510f6d=>_0x1b0eef(0xa1)===_0x510f6d[_0x1b0eef(0xae)]),_0x56497c=_0x479ad2[_0x1b0eef(0x9d)](_0x5e4784=>_0x1b0eef(0xa1)!==_0x5e4784['role']),_0x199c15=Math['max'](0x0,_0x56497c['length']-_0x49acca),_0x1339f6=_0x56497c['slice'](_0x199c15),_0x314424=_0x56497c[_0x1b0eef(0xa9)](0x0,_0x199c15),_0x27a98f=[];let _0xc769f1=0x0,_0x56f405=0x0,_0x562693=0x0;for(const _0x476a23 of _0x214b8b){const _0x48cb1e=countTokens(_0x476a23['content']);_0xc769f1+=_0x48cb1e,_0x56f405+=_0x48cb1e,_0x27a98f[_0x1b0eef(0xb4)]({'role':_0x476a23[_0x1b0eef(0xae)],'content':_0x476a23[_0x1b0eef(0xb3)],'turnIndex':_0x476a23[_0x1b0eef(0xb0)],'compressed':!0x1});}for(const _0x28de95 of _0x1339f6){const _0x13128f=_0x3ddeb8[_0x1b0eef(0xaf)](countTokens,_0x28de95[_0x1b0eef(0xb3)]);_0xc769f1+=_0x13128f,_0x56f405+=_0x13128f,_0x27a98f['push']({'role':_0x28de95['role'],'content':_0x28de95[_0x1b0eef(0xb3)],'turnIndex':_0x28de95[_0x1b0eef(0xb0)],'compressed':!0x1});}if(_0x3ddeb8['ezvdf'](_0x314424[_0x1b0eef(0xa5)],0x0)){const _0x4284cc=_0x56f405,_0x3882e0=Math['max'](0x0,_0x3ddeb8['IVDal'](_0x4b6656,_0x4284cc));if(_0x3ddeb8[_0x1b0eef(0xa6)](_0x3882e0,0x0)){const _0x1aa10a=_0x314424[_0x1b0eef(0x9b)](_0x31348d=>({'label':'turn-'+_0x31348d[_0x1b0eef(0xb0)],'text':_0x31348d['content']})),_0x37b920=compressContextBudget(_0x1aa10a,_0x3882e0);for(let _0x593c96=0x0;_0x3ddeb8[_0x1b0eef(0x9e)](_0x593c96,_0x314424['length']);_0x593c96++){const _0x52f7b8=_0x314424[_0x593c96],_0x4a4e30=_0x37b920[_0x593c96][_0x1b0eef(0xb1)];_0xc769f1+=_0x4a4e30[_0x1b0eef(0xaa)],_0x3ddeb8['DCisj'](_0x4a4e30[_0x1b0eef(0xa3)],0x0)?(_0x56f405+=_0x4a4e30[_0x1b0eef(0xa3)],_0x27a98f[_0x1b0eef(0xb4)]({'role':_0x52f7b8[_0x1b0eef(0xae)],'content':_0x4a4e30['text'],'turnIndex':_0x52f7b8['turnIndex'],'compressed':_0x4a4e30[_0x1b0eef(0xa4)]})):(_0x562693++,_0xc769f1+=0x0);}}else{for(const _0x25b54c of _0x314424)_0xc769f1+=_0x3ddeb8['ikjOr'](countTokens,_0x25b54c[_0x1b0eef(0xb3)]),_0x562693++;}}return _0x27a98f[_0x1b0eef(0xb2)]((_0x211b9c,_0x19f4f0)=>_0x211b9c[_0x1b0eef(0xb0)]-_0x19f4f0[_0x1b0eef(0xb0)]),{'prioritized':_0x27a98f,'totalOriginalTokens':_0xc769f1,'totalCompressedTokens':_0x56f405,'segmentsDropped':_0x562693};}
@@ -1 +1 @@
1
- const _0xac8299=_0x25a7;(function(_0x2feab9,_0x37dbab){const _0x5c3335=_0x25a7,_0x452430=_0x2feab9();while(!![]){try{const _0x1510a8=parseInt(_0x5c3335(0x182))/0x1+-parseInt(_0x5c3335(0x17d))/0x2+parseInt(_0x5c3335(0x18f))/0x3*(parseInt(_0x5c3335(0x185))/0x4)+-parseInt(_0x5c3335(0x189))/0x5+parseInt(_0x5c3335(0x192))/0x6+parseInt(_0x5c3335(0x18e))/0x7+parseInt(_0x5c3335(0x18b))/0x8*(-parseInt(_0x5c3335(0x18a))/0x9);if(_0x1510a8===_0x37dbab)break;else _0x452430['push'](_0x452430['shift']());}catch(_0x2b99db){_0x452430['push'](_0x452430['shift']());}}}(_0x2d97,0xca90d));function _0x2d97(){const _0x1ea033=['71992EydZxP','total_optimized','xnRkh','parse','5254190tSYEgv','954hbspLp','59736aNqkXa','reduce','GsTTr','2240672CDtUYA','237yjuBeC','map','total_baseline','7889370lGXYVX','prompts_count','1262794OOndeT','.json','length','entries','started_at','246613aHWDKX','uaUAC','.tokenizer-speedup'];_0x2d97=function(){return _0x1ea033;};return _0x2d97();}import{readdirSync,readFileSync}from'node:fs';import{join}from'node:path';function _0x25a7(_0x190655,_0x326638){_0x190655=_0x190655-0x17c;const _0x2d9740=_0x2d97();let _0x25a79d=_0x2d9740[_0x190655];return _0x25a79d;}const METRICS_DIR=_0xac8299(0x184),COST_PER_MILLION_TOKENS=0x3;export function generateReport(_0x1688b6){const _0x5e600d=_0xac8299,_0x55669d={'uaUAC':function(_0x1bf197,_0x4c02d7){return _0x1bf197-_0x4c02d7;},'xnRkh':function(_0x281a0f,_0xe5cb4c){return _0x281a0f+_0xe5cb4c;},'rORNf':function(_0x17cfbb,_0x3c49d6){return _0x17cfbb>_0x3c49d6;},'GsTTr':function(_0x1cb400,_0x1b0444){return _0x1cb400*_0x1b0444;},'AgVMd':function(_0x414e4a,_0x2e60af){return _0x414e4a/_0x2e60af;}},_0x4f7b15=join(_0x1688b6,METRICS_DIR),_0x503716=readdirSync(_0x4f7b15)['filter'](_0x4298e5=>_0x4298e5['endsWith'](_0x5e600d(0x17e)))['map'](_0x380099=>JSON[_0x5e600d(0x188)](readFileSync(join(_0x4f7b15,_0x380099),'utf-8'))['summary']),_0x22c53c=_0x503716['reduce']((_0x124c41,_0x22f9aa)=>_0x124c41+_0x22f9aa[_0x5e600d(0x191)],0x0),_0x448017=_0x503716[_0x5e600d(0x18c)]((_0x3330dd,_0x34a1b1)=>_0x3330dd+_0x34a1b1[_0x5e600d(0x186)],0x0),_0x1dcd7d=_0x55669d[_0x5e600d(0x183)](_0x22c53c,_0x448017),_0x14abcf={};for(const _0x356676 of _0x503716)for(const [_0x321526,_0x6e5dc0]of Object[_0x5e600d(0x180)](_0x356676['rules_triggered']))_0x14abcf[_0x321526]=_0x55669d[_0x5e600d(0x187)](_0x14abcf[_0x321526]||0x0,_0x6e5dc0);const _0xfb73d2=_0x503716[_0x5e600d(0x190)](_0x8b523a=>_0x8b523a[_0x5e600d(0x181)])['sort']();return{'sessions_count':_0x503716[_0x5e600d(0x17f)],'total_baseline':_0x22c53c,'total_optimized':_0x448017,'total_delta':_0x1dcd7d,'savings_percent':_0x55669d['rORNf'](_0x22c53c,0x0)?_0x55669d[_0x5e600d(0x18d)](_0x1dcd7d/_0x22c53c,0x64):0x0,'total_prompts':_0x503716['reduce']((_0x1c8f56,_0x6789e8)=>_0x1c8f56+_0x6789e8[_0x5e600d(0x17c)],0x0),'rules_triggered':_0x14abcf,'estimated_cost_saved_usd':_0x55669d[_0x5e600d(0x18d)](_0x55669d['AgVMd'](_0x1dcd7d,0xf4240),0x3),'period_start':_0xfb73d2[0x0]||'','period_end':_0xfb73d2[_0xfb73d2['length']-0x1]||''};}
1
+ function _0x4516(_0x20169e,_0x2da73a){_0x20169e=_0x20169e-0x18a;const _0x46ca11=_0x46ca();let _0x451664=_0x46ca11[_0x20169e];return _0x451664;}const _0x50b736=_0x4516;(function(_0x23457c,_0x54a727){const _0x1f5b4e=_0x4516,_0x233362=_0x23457c();while(!![]){try{const _0x4f83ac=parseInt(_0x1f5b4e(0x18d))/0x1+-parseInt(_0x1f5b4e(0x18e))/0x2*(-parseInt(_0x1f5b4e(0x194))/0x3)+-parseInt(_0x1f5b4e(0x190))/0x4+-parseInt(_0x1f5b4e(0x19a))/0x5+parseInt(_0x1f5b4e(0x192))/0x6*(-parseInt(_0x1f5b4e(0x199))/0x7)+-parseInt(_0x1f5b4e(0x19c))/0x8+parseInt(_0x1f5b4e(0x193))/0x9;if(_0x4f83ac===_0x54a727)break;else _0x233362['push'](_0x233362['shift']());}catch(_0x4e6d6b){_0x233362['push'](_0x233362['shift']());}}}(_0x46ca,0xf26bd));import{readdirSync,readFileSync}from'node:fs';import{join}from'node:path';const METRICS_DIR=_0x50b736(0x191),COST_PER_MILLION_TOKENS=0x3;function _0x46ca(){const _0x17c55b=['12QaGkVs','summary','parse','reduce','sort','144557bpgrWe','1902285jKZeNy','utf-8','2777840jbgkLh','total_baseline','prompts_count','total_optimized','length','entries','1352684TATtCQ','352046fXwqQZ','map','1855128rnqDGd','.tokenizer-speedup','570XHzXXN','18805455cACtgh'];_0x46ca=function(){return _0x17c55b;};return _0x46ca();}export function generateReport(_0x540796){const _0x275002=_0x50b736,_0x9582b7={'KUErO':function(_0xa06b3b,_0x3fb743){return _0xa06b3b+_0x3fb743;},'XxSpO':function(_0x52b274,_0x4477db){return _0x52b274*_0x4477db;}},_0x27e622=join(_0x540796,METRICS_DIR),_0x10ba9a=readdirSync(_0x27e622)['filter'](_0x13f036=>_0x13f036['endsWith']('.json'))['map'](_0x4edd52=>JSON[_0x275002(0x196)](readFileSync(join(_0x27e622,_0x4edd52),_0x275002(0x19b)))[_0x275002(0x195)]),_0x56be41=_0x10ba9a['reduce']((_0x5b5f4e,_0x46f977)=>_0x5b5f4e+_0x46f977[_0x275002(0x19d)],0x0),_0x314d4f=_0x10ba9a['reduce']((_0x877e91,_0x254ebf)=>_0x877e91+_0x254ebf[_0x275002(0x18a)],0x0),_0x544fdb=_0x56be41-_0x314d4f,_0x432132={};for(const _0xee58cf of _0x10ba9a)for(const [_0x16c831,_0x2e0aa5]of Object[_0x275002(0x18c)](_0xee58cf['rules_triggered']))_0x432132[_0x16c831]=_0x9582b7['KUErO'](_0x432132[_0x16c831]||0x0,_0x2e0aa5);const _0x8cbecb=_0x10ba9a[_0x275002(0x18f)](_0x35450f=>_0x35450f['started_at'])[_0x275002(0x198)]();return{'sessions_count':_0x10ba9a[_0x275002(0x18b)],'total_baseline':_0x56be41,'total_optimized':_0x314d4f,'total_delta':_0x544fdb,'savings_percent':_0x56be41>0x0?_0x544fdb/_0x56be41*0x64:0x0,'total_prompts':_0x10ba9a[_0x275002(0x197)]((_0x47aa19,_0x536e0b)=>_0x47aa19+_0x536e0b[_0x275002(0x19e)],0x0),'rules_triggered':_0x432132,'estimated_cost_saved_usd':_0x9582b7['XxSpO'](_0x544fdb/0xf4240,0x3),'period_start':_0x8cbecb[0x0]||'','period_end':_0x8cbecb[_0x8cbecb['length']-0x1]||''};}
@@ -1 +1 @@
1
- function _0x30c8(_0x23ae80,_0x1e4032){_0x23ae80=_0x23ae80-0x19c;const _0x562684=_0x5626();let _0x30c8a6=_0x562684[_0x23ae80];return _0x30c8a6;}(function(_0x525692,_0x3c3ddf){const _0x5aa5a2=_0x30c8,_0x58c578=_0x525692();while(!![]){try{const _0x186f87=-parseInt(_0x5aa5a2(0x1a5))/0x1*(parseInt(_0x5aa5a2(0x1a3))/0x2)+parseInt(_0x5aa5a2(0x1a8))/0x3+parseInt(_0x5aa5a2(0x1a6))/0x4+parseInt(_0x5aa5a2(0x19e))/0x5+-parseInt(_0x5aa5a2(0x1a7))/0x6+-parseInt(_0x5aa5a2(0x1a2))/0x7*(-parseInt(_0x5aa5a2(0x19c))/0x8)+parseInt(_0x5aa5a2(0x1a9))/0x9*(-parseInt(_0x5aa5a2(0x19d))/0xa);if(_0x186f87===_0x3c3ddf)break;else _0x58c578['push'](_0x58c578['shift']());}catch(_0x5f5b18){_0x58c578['push'](_0x58c578['shift']());}}}(_0x5626,0xadbfb));import{RuleAnalytics}from'./rule-analytics.js';function _0x5626(){const _0x3555af=['1018797GKXsTD','41139vxJzfB','recordFire','map','8NqEOjU','1270wOFRwP','5573250ubhopH','rule','parse','totalTokensSaved','2877161itLttC','10334jxSSAc','round','81RQPkSC','2273384jPmYju','4337394qkyTJS'];_0x5626=function(){return _0x3555af;};return _0x5626();}export function serializeAnalytics(_0x4f313f){const _0x22cc74=_0x30c8,_0x213175=_0x4f313f['getRanking']()[_0x22cc74(0x1ab)](_0x2ec572=>({'rule':_0x2ec572[_0x22cc74(0x19f)],'fires':_0x2ec572['fires'],'totalTokensSaved':_0x2ec572['totalTokensSaved']}));return JSON['stringify'](_0x213175);}export function deserializeAnalytics(_0x1e5bc0){const _0xfea64=_0x30c8,_0x5d9763={'mcoGx':function(_0x52bef8,_0x186613){return _0x52bef8/_0x186613;}},_0x8f85f0=new RuleAnalytics();try{const _0x8e06bd=JSON[_0xfea64(0x1a0)](_0x1e5bc0);for(const _0x1e13c1 of _0x8e06bd){const _0x1f518d=_0x1e13c1['fires']>0x0?Math[_0xfea64(0x1a4)](_0x5d9763['mcoGx'](_0x1e13c1[_0xfea64(0x1a1)],_0x1e13c1['fires'])):0x0;for(let _0x43c38d=0x0;_0x43c38d<_0x1e13c1['fires'];_0x43c38d++)_0x8f85f0[_0xfea64(0x1aa)](_0x1e13c1[_0xfea64(0x19f)],_0x1f518d);}}catch{}return _0x8f85f0;}
1
+ (function(_0x2c7983,_0x5f230c){const _0x495683=_0x1aa0,_0x16e55c=_0x2c7983();while(!![]){try{const _0x3eb523=-parseInt(_0x495683(0x16f))/0x1+-parseInt(_0x495683(0x161))/0x2+-parseInt(_0x495683(0x163))/0x3+-parseInt(_0x495683(0x170))/0x4*(parseInt(_0x495683(0x169))/0x5)+parseInt(_0x495683(0x16a))/0x6*(parseInt(_0x495683(0x16c))/0x7)+-parseInt(_0x495683(0x168))/0x8*(-parseInt(_0x495683(0x162))/0x9)+-parseInt(_0x495683(0x164))/0xa*(-parseInt(_0x495683(0x165))/0xb);if(_0x3eb523===_0x5f230c)break;else _0x16e55c['push'](_0x16e55c['shift']());}catch(_0x1de1a9){_0x16e55c['push'](_0x16e55c['shift']());}}}(_0x590e,0xd8d57));import{RuleAnalytics}from'./rule-analytics.js';function _0x590e(){const _0x1b3edc=['PvAzT','3391714lWiUIf','9MLZRbR','3434169uARZAT','10fmTErT','41764558tcJkUR','recordFire','totalTokensSaved','9787432viulcP','7489475uOgZYp','5268cVMkJx','rule','10409wzjNja','map','round','1099167ncWNac','4SFwJxW','stringify','pDeNx','fires'];_0x590e=function(){return _0x1b3edc;};return _0x590e();}export function serializeAnalytics(_0x22657b){const _0x5b87d4=_0x1aa0,_0x7db432=_0x22657b['getRanking']()[_0x5b87d4(0x16d)](_0x4ca8f7=>({'rule':_0x4ca8f7[_0x5b87d4(0x16b)],'fires':_0x4ca8f7['fires'],'totalTokensSaved':_0x4ca8f7[_0x5b87d4(0x167)]}));return JSON[_0x5b87d4(0x171)](_0x7db432);}function _0x1aa0(_0x22ed56,_0x26d913){_0x22ed56=_0x22ed56-0x15e;const _0x590ee9=_0x590e();let _0x1aa0cd=_0x590ee9[_0x22ed56];return _0x1aa0cd;}export function deserializeAnalytics(_0x3b8b97){const _0x209b7a=_0x1aa0,_0x277be6={'OHpZV':function(_0x3286b0,_0x345240){return _0x3286b0>_0x345240;},'PvAzT':function(_0x54bbfb,_0x2a63c9){return _0x54bbfb/_0x2a63c9;},'pDeNx':function(_0xf574ee,_0x1a65a9){return _0xf574ee<_0x1a65a9;}},_0x244d1f=new RuleAnalytics();try{const _0x10bb72=JSON['parse'](_0x3b8b97);for(const _0x18432e of _0x10bb72){const _0x33bad3=_0x277be6['OHpZV'](_0x18432e[_0x209b7a(0x15f)],0x0)?Math[_0x209b7a(0x16e)](_0x277be6[_0x209b7a(0x160)](_0x18432e[_0x209b7a(0x167)],_0x18432e[_0x209b7a(0x15f)])):0x0;for(let _0x5afab3=0x0;_0x277be6[_0x209b7a(0x15e)](_0x5afab3,_0x18432e[_0x209b7a(0x15f)]);_0x5afab3++)_0x244d1f[_0x209b7a(0x166)](_0x18432e[_0x209b7a(0x16b)],_0x33bad3);}}catch{}return _0x244d1f;}
@@ -1 +1 @@
1
- const _0xc1c0e8=_0x1ffc;function _0x1ffc(_0x3f5f0d,_0x555924){_0x3f5f0d=_0x3f5f0d-0x1da;const _0x5b1582=_0x5b15();let _0x1ffc93=_0x5b1582[_0x3f5f0d];return _0x1ffc93;}(function(_0x313ac4,_0x29ed36){const _0x2b5c3b=_0x1ffc,_0x221ae2=_0x313ac4();while(!![]){try{const _0x59c441=-parseInt(_0x2b5c3b(0x1e0))/0x1*(-parseInt(_0x2b5c3b(0x1e6))/0x2)+-parseInt(_0x2b5c3b(0x1da))/0x3*(-parseInt(_0x2b5c3b(0x1e7))/0x4)+parseInt(_0x2b5c3b(0x1ec))/0x5*(parseInt(_0x2b5c3b(0x1dc))/0x6)+-parseInt(_0x2b5c3b(0x1de))/0x7*(parseInt(_0x2b5c3b(0x1e9))/0x8)+-parseInt(_0x2b5c3b(0x1e3))/0x9*(parseInt(_0x2b5c3b(0x1ed))/0xa)+-parseInt(_0x2b5c3b(0x1e8))/0xb+parseInt(_0x2b5c3b(0x1e4))/0xc;if(_0x59c441===_0x29ed36)break;else _0x221ae2['push'](_0x221ae2['shift']());}catch(_0x4c62d8){_0x221ae2['push'](_0x221ae2['shift']());}}}(_0x5b15,0xd4dea));function _0x5b15(){const _0x3f709f=['4646453kUozgu','from','18081MqbSWS','data','fires','1464138bKdZKx','6716844RiTiWH','keys','146zDtPKm','264FiqRPv','13785211ZnBctU','8FyqUIy','avgTokensSaved','set','61910RwUuOt','90zvDRFe','getStats','76926vtCCMZ','recordFire','330CyqaJv','totalTokensSaved'];_0x5b15=function(){return _0x3f709f;};return _0x5b15();}export class RuleAnalytics{[_0xc1c0e8(0x1e1)]=new Map();[_0xc1c0e8(0x1db)](_0x518293,_0x592376){const _0x22b388=_0xc1c0e8,_0x39daf9=this['data']['get'](_0x518293)??{'fires':0x0,'totalTokensSaved':0x0};_0x39daf9['fires']++,_0x39daf9['totalTokensSaved']+=_0x592376,this[_0x22b388(0x1e1)][_0x22b388(0x1eb)](_0x518293,_0x39daf9);}['getStats'](_0x11f735){const _0x3c6cec=_0xc1c0e8,_0x580b1a=this[_0x3c6cec(0x1e1)]['get'](_0x11f735);return _0x580b1a?{'rule':_0x11f735,'fires':_0x580b1a[_0x3c6cec(0x1e2)],'totalTokensSaved':_0x580b1a['totalTokensSaved'],'avgTokensSaved':Math['round'](_0x580b1a[_0x3c6cec(0x1dd)]/_0x580b1a['fires'])}:{'rule':_0x11f735,'fires':0x0,'totalTokensSaved':0x0,'avgTokensSaved':0x0};}['getRanking'](){const _0x44903b=_0xc1c0e8;return Array[_0x44903b(0x1df)](this['data'][_0x44903b(0x1e5)]())['map'](_0x1aabe4=>this[_0x44903b(0x1ee)](_0x1aabe4))['sort']((_0x521343,_0x10684f)=>_0x10684f[_0x44903b(0x1ea)]-_0x521343[_0x44903b(0x1ea)]);}}
1
+ const _0x38be36=_0x3939;function _0x3939(_0xcc6cf1,_0x4905e1){_0xcc6cf1=_0xcc6cf1-0x159;const _0x1b4eef=_0x1b4e();let _0x393950=_0x1b4eef[_0xcc6cf1];return _0x393950;}function _0x1b4e(){const _0x3db0ae=['63BEsNQz','2146463SLqGRs','22074TofOAW','getStats','keys','fires','totalTokensSaved','188ZPpavY','818710fJRNoc','getRanking','497NWCPyY','10071YWODGZ','252400nDwkiy','from','SmIpA','recordFire','data','get','146035jiVyRx','6074bwwcCN','71swBSjy','avgTokensSaved'];_0x1b4e=function(){return _0x3db0ae;};return _0x1b4e();}(function(_0xb6865e,_0x386b0e){const _0x49825c=_0x3939,_0x304a27=_0xb6865e();while(!![]){try{const _0x2c10e0=-parseInt(_0x49825c(0x163))/0x1*(-parseInt(_0x49825c(0x162))/0x2)+-parseInt(_0x49825c(0x15a))/0x3*(-parseInt(_0x49825c(0x16c))/0x4)+parseInt(_0x49825c(0x161))/0x5+parseInt(_0x49825c(0x167))/0x6*(parseInt(_0x49825c(0x159))/0x7)+-parseInt(_0x49825c(0x15b))/0x8*(parseInt(_0x49825c(0x165))/0x9)+-parseInt(_0x49825c(0x16d))/0xa+-parseInt(_0x49825c(0x166))/0xb;if(_0x2c10e0===_0x386b0e)break;else _0x304a27['push'](_0x304a27['shift']());}catch(_0x587251){_0x304a27['push'](_0x304a27['shift']());}}}(_0x1b4e,0x28850));export class RuleAnalytics{['data']=new Map();[_0x38be36(0x15e)](_0x5e1051,_0x205fa4){const _0x49f9d0=_0x38be36,_0x2d3f87=this[_0x49f9d0(0x15f)][_0x49f9d0(0x160)](_0x5e1051)??{'fires':0x0,'totalTokensSaved':0x0};_0x2d3f87[_0x49f9d0(0x16a)]++,_0x2d3f87['totalTokensSaved']+=_0x205fa4,this[_0x49f9d0(0x15f)]['set'](_0x5e1051,_0x2d3f87);}[_0x38be36(0x168)](_0x3a6373){const _0x1fad48=_0x38be36,_0x47961b={'SmIpA':function(_0x5eeef1,_0x1ec308){return _0x5eeef1/_0x1ec308;}},_0x5cc41f=this['data']['get'](_0x3a6373);return _0x5cc41f?{'rule':_0x3a6373,'fires':_0x5cc41f[_0x1fad48(0x16a)],'totalTokensSaved':_0x5cc41f[_0x1fad48(0x16b)],'avgTokensSaved':Math['round'](_0x47961b[_0x1fad48(0x15d)](_0x5cc41f[_0x1fad48(0x16b)],_0x5cc41f['fires']))}:{'rule':_0x3a6373,'fires':0x0,'totalTokensSaved':0x0,'avgTokensSaved':0x0};}[_0x38be36(0x16e)](){const _0x4e7c75=_0x38be36;return Array[_0x4e7c75(0x15c)](this[_0x4e7c75(0x15f)][_0x4e7c75(0x169)]())['map'](_0x16be9b=>this['getStats'](_0x16be9b))['sort']((_0x4e6204,_0x502972)=>_0x502972[_0x4e7c75(0x164)]-_0x4e6204['avgTokensSaved']);}}
@@ -1 +1 @@
1
- function _0xf8fb(){const _0x3a4e19=['1417660PtclHG','3228342TuEyWH','toLowerCase','context_limits','10881080IgcyYZ','meteringConfig','limits','833959cBYXEU','7FRGzBL','7258806iVbobK','config','rules','1156UBfoFs','5496ugpmYu','1043010cFNCZv','20DeNWCC','some'];_0xf8fb=function(){return _0x3a4e19;};return _0xf8fb();}const _0x18abd8=_0x111d;(function(_0x226c81,_0x4ec39e){const _0x251ac6=_0x111d,_0x44f331=_0x226c81();while(!![]){try{const _0x4e6f56=parseInt(_0x251ac6(0xd2))/0x1+-parseInt(_0x251ac6(0xd9))/0x2+parseInt(_0x251ac6(0xd8))/0x3*(parseInt(_0x251ac6(0xd7))/0x4)+parseInt(_0x251ac6(0xdc))/0x5+parseInt(_0x251ac6(0xdd))/0x6*(-parseInt(_0x251ac6(0xd3))/0x7)+-parseInt(_0x251ac6(0xcf))/0x8+-parseInt(_0x251ac6(0xd4))/0x9*(-parseInt(_0x251ac6(0xda))/0xa);if(_0x4e6f56===_0x4ec39e)break;else _0x44f331['push'](_0x44f331['shift']());}catch(_0x2c367b){_0x44f331['push'](_0x44f331['shift']());}}}(_0xf8fb,0xcd276));function _0x111d(_0x14fd32,_0x377826){_0x14fd32=_0x14fd32-0xce;const _0xf8fb30=_0xf8fb();let _0x111dfe=_0xf8fb30[_0x14fd32];return _0x111dfe;}export class RuleEngine{['rules'];[_0x18abd8(0xd1)];['config'];constructor(_0x4da832){const _0x265fd4=_0x18abd8;this[_0x265fd4(0xd5)]=_0x4da832,this['rules']=_0x4da832[_0x265fd4(0xd6)],this[_0x265fd4(0xd1)]=_0x4da832[_0x265fd4(0xce)];}['match'](_0x1f4a16){const _0x42524c=_0x18abd8,_0x4abad2=_0x1f4a16[_0x42524c(0xde)]();return this[_0x42524c(0xd6)]['filter'](_0x1b1cd8=>_0x1b1cd8['trigger'][_0x42524c(0xdb)](_0x91b54d=>_0x4abad2['includes'](_0x91b54d[_0x42524c(0xde)]())));}get[_0x18abd8(0xd0)](){const _0x3cc59b=_0x18abd8;return this[_0x3cc59b(0xd5)]['metering'];}}
1
+ const _0x27785c=_0x5531;function _0x5531(_0x201c8b,_0x5e33a4){_0x201c8b=_0x201c8b-0x1e2;const _0x339fb4=_0x339f();let _0x553126=_0x339fb4[_0x201c8b];return _0x553126;}function _0x339f(){const _0xa4a715=['1236xklmte','2568534ofJrEO','4mJADlo','3078iCfFpP','toLowerCase','metering','limits','239011ZCqYDQ','3723210suwwyh','3867672Qmilgb','config','2969855lYKRwS','match','context_limits','some','1944180kePWov','rules'];_0x339f=function(){return _0xa4a715;};return _0x339f();}(function(_0x44ad46,_0x1286fd){const _0x192a48=_0x5531,_0x2f7ff4=_0x44ad46();while(!![]){try{const _0x14fcfb=parseInt(_0x192a48(0x1e9))/0x1*(parseInt(_0x192a48(0x1e4))/0x2)+-parseInt(_0x192a48(0x1e5))/0x3*(-parseInt(_0x192a48(0x1e2))/0x4)+parseInt(_0x192a48(0x1f1))/0x5+-parseInt(_0x192a48(0x1e3))/0x6+-parseInt(_0x192a48(0x1ed))/0x7+parseInt(_0x192a48(0x1eb))/0x8+-parseInt(_0x192a48(0x1ea))/0x9;if(_0x14fcfb===_0x1286fd)break;else _0x2f7ff4['push'](_0x2f7ff4['shift']());}catch(_0x50dc26){_0x2f7ff4['push'](_0x2f7ff4['shift']());}}}(_0x339f,0x61f9b));export class RuleEngine{[_0x27785c(0x1f2)];[_0x27785c(0x1e8)];[_0x27785c(0x1ec)];constructor(_0x55d1c4){const _0x4ff17d=_0x27785c;this['config']=_0x55d1c4,this['rules']=_0x55d1c4['rules'],this[_0x4ff17d(0x1e8)]=_0x55d1c4[_0x4ff17d(0x1ef)];}[_0x27785c(0x1ee)](_0x585cfa){const _0x5743d4=_0x27785c,_0x43a8f0=_0x585cfa[_0x5743d4(0x1e6)]();return this['rules']['filter'](_0x1aeb3d=>_0x1aeb3d['trigger'][_0x5743d4(0x1f0)](_0x487a5c=>_0x43a8f0['includes'](_0x487a5c[_0x5743d4(0x1e6)]())));}get['meteringConfig'](){const _0x108fd7=_0x27785c;return this[_0x108fd7(0x1ec)][_0x108fd7(0x1e7)];}}
@@ -1 +1 @@
1
- (function(_0x49ba0a,_0x2a5183){const _0x4d9a47=_0x4e53,_0x388a71=_0x49ba0a();while(!![]){try{const _0x1c10d7=-parseInt(_0x4d9a47(0x186))/0x1+parseInt(_0x4d9a47(0x190))/0x2*(-parseInt(_0x4d9a47(0x191))/0x3)+-parseInt(_0x4d9a47(0x185))/0x4+parseInt(_0x4d9a47(0x198))/0x5*(-parseInt(_0x4d9a47(0x18b))/0x6)+parseInt(_0x4d9a47(0x194))/0x7+parseInt(_0x4d9a47(0x187))/0x8+parseInt(_0x4d9a47(0x182))/0x9*(parseInt(_0x4d9a47(0x196))/0xa);if(_0x1c10d7===_0x2a5183)break;else _0x388a71['push'](_0x388a71['shift']());}catch(_0x48b7d9){_0x388a71['push'](_0x388a71['shift']());}}}(_0x4fa0,0xaeb00));import _0x3665ec from'js-yaml';export function exportRuleBundle(_0x32d819,_0x1c848c){const _0x4edff9=_0x4e53,_0x34b8db={'BjTcF':_0x4edff9(0x183)},_0x54d72c={'name':_0x1c848c['name']??_0x34b8db[_0x4edff9(0x18c)],'author':_0x1c848c[_0x4edff9(0x189)],'description':_0x1c848c[_0x4edff9(0x195)],'rules':_0x32d819};return _0x3665ec[_0x4edff9(0x18e)](_0x54d72c,{'lineWidth':0x78});}export function importRuleBundle(_0x59685e){const _0x424ba9=_0x4e53,_0x5b53b6={'qCyYz':'imported'},_0x5e9ef7=_0x3665ec['load'](_0x59685e);return{'name':_0x5e9ef7['name']??_0x5b53b6[_0x424ba9(0x184)],'author':_0x5e9ef7[_0x424ba9(0x189)]??'unknown','description':_0x5e9ef7['description']??'','rules':(_0x5e9ef7[_0x424ba9(0x197)]??[])['map'](_0x102bd2=>({'trigger':_0x102bd2[_0x424ba9(0x188)],'load':_0x102bd2['load'],'max_tokens':_0x102bd2['max_tokens'],'summary_only':_0x102bd2[_0x424ba9(0x18f)]}))};}function _0x4fa0(){const _0x4db097=['object','LmVZN','8523662gTtHsK','description','19788310LgHxVz','rules','2021545eKJZqN','invalid\x20YAML','9VxUHki','custom-rules','qCyYz','4444024HOJqpU','136816KdDNpf','573640fcvKXF','trigger','author','wNsMW','12EdnPJE','BjTcF','length','dump','summary_only','26118WVUSfo','114ijPwRa'];_0x4fa0=function(){return _0x4db097;};return _0x4fa0();}function _0x4e53(_0x1f508e,_0x2ba1ed){_0x1f508e=_0x1f508e-0x182;const _0x4fa0bc=_0x4fa0();let _0x4e531b=_0x4fa0bc[_0x1f508e];return _0x4e531b;}export function validateRuleBundle(_0x2b6690){const _0x281911=_0x4e53,_0x3b12df={'OejRh':_0x281911(0x192),'LmVZN':'invalid\x20YAML\x20structure','lTkmU':function(_0x277b70,_0x5928fc){return _0x277b70===_0x5928fc;},'wNsMW':_0x281911(0x199)};try{const _0x422e03=_0x3665ec['load'](_0x2b6690);if(!_0x422e03||_0x3b12df['OejRh']!=typeof _0x422e03)return{'valid':!0x1,'error':_0x3b12df[_0x281911(0x193)]};if(!Array['isArray'](_0x422e03['rules'])||_0x3b12df['lTkmU'](0x0,_0x422e03['rules'][_0x281911(0x18d)]))return{'valid':!0x1,'error':'bundle\x20must\x20contain\x20rules\x20array'};for(const _0x278abd of _0x422e03['rules'])if(!Array['isArray'](_0x278abd['trigger'])||!_0x278abd['load'])return{'valid':!0x1,'error':'each\x20rule\x20must\x20have\x20trigger\x20array\x20and\x20load\x20path'};return{'valid':!0x0};}catch{return{'valid':!0x1,'error':_0x3b12df[_0x281911(0x18a)]};}}
1
+ (function(_0x122b91,_0x4207bc){const _0x57756c=_0x2816,_0x95c96e=_0x122b91();while(!![]){try{const _0x2965fb=parseInt(_0x57756c(0x1f9))/0x1+parseInt(_0x57756c(0x1fd))/0x2+parseInt(_0x57756c(0x1f4))/0x3+parseInt(_0x57756c(0x204))/0x4+parseInt(_0x57756c(0x1ff))/0x5+parseInt(_0x57756c(0x1f7))/0x6*(-parseInt(_0x57756c(0x1fc))/0x7)+-parseInt(_0x57756c(0x1fa))/0x8*(parseInt(_0x57756c(0x1f6))/0x9);if(_0x2965fb===_0x4207bc)break;else _0x95c96e['push'](_0x95c96e['shift']());}catch(_0x2fdb64){_0x95c96e['push'](_0x95c96e['shift']());}}}(_0x59b8,0x74700));function _0x2816(_0x27399f,_0x2f608f){_0x27399f=_0x27399f-0x1f4;const _0x59b87b=_0x59b8();let _0x281612=_0x59b87b[_0x27399f];return _0x281612;}function _0x59b8(){const _0x44dcf1=['350TCkAbf','611032BoMChV','trigger','4574505dyewbO','fjeKd','load','isArray','max_tokens','124680EraPJi','rules','name','bundle\x20must\x20contain\x20rules\x20array','lBoXB','2619342RyRiAK','author','13194351xyrWBw','101982sNERnf','map','668116FdDCUq','8oCJRSa','invalid\x20YAML\x20structure'];_0x59b8=function(){return _0x44dcf1;};return _0x59b8();}import _0x93ac38 from'js-yaml';export function exportRuleBundle(_0x8919,_0x4b5054){const _0x2313ca=_0x2816,_0x1575e={'fjeKd':'custom-rules'},_0x3c35d5={'name':_0x4b5054[_0x2313ca(0x206)]??_0x1575e[_0x2313ca(0x200)],'author':_0x4b5054['author'],'description':_0x4b5054['description'],'rules':_0x8919};return _0x93ac38['dump'](_0x3c35d5,{'lineWidth':0x78});}export function importRuleBundle(_0x393f8a){const _0x3c23fc=_0x2816,_0xdae1a4={'wSvBS':'unknown'},_0x53b8f9=_0x93ac38['load'](_0x393f8a);return{'name':_0x53b8f9[_0x3c23fc(0x206)]??'imported','author':_0x53b8f9[_0x3c23fc(0x1f5)]??_0xdae1a4['wSvBS'],'description':_0x53b8f9['description']??'','rules':(_0x53b8f9[_0x3c23fc(0x205)]??[])[_0x3c23fc(0x1f8)](_0x21d16b=>({'trigger':_0x21d16b['trigger'],'load':_0x21d16b[_0x3c23fc(0x201)],'max_tokens':_0x21d16b[_0x3c23fc(0x203)],'summary_only':_0x21d16b['summary_only']}))};}export function validateRuleBundle(_0x52aab3){const _0x52d42f=_0x2816,_0x134052={'lBoXB':function(_0x57e595,_0x34eb4e){return _0x57e595!=_0x34eb4e;},'bpYUF':'invalid\x20YAML'};try{const _0xc9b9df=_0x93ac38['load'](_0x52aab3);if(!_0xc9b9df||_0x134052[_0x52d42f(0x208)]('object',typeof _0xc9b9df))return{'valid':!0x1,'error':_0x52d42f(0x1fb)};if(!Array['isArray'](_0xc9b9df[_0x52d42f(0x205)])||0x0===_0xc9b9df[_0x52d42f(0x205)]['length'])return{'valid':!0x1,'error':_0x52d42f(0x207)};for(const _0x56de6b of _0xc9b9df['rules'])if(!Array[_0x52d42f(0x202)](_0x56de6b[_0x52d42f(0x1fe)])||!_0x56de6b[_0x52d42f(0x201)])return{'valid':!0x1,'error':'each\x20rule\x20must\x20have\x20trigger\x20array\x20and\x20load\x20path'};return{'valid':!0x0};}catch{return{'valid':!0x1,'error':_0x134052['bpYUF']};}}
@@ -1 +1 @@
1
- function _0x445f(_0xcfc0cd,_0x3c31b0){_0xcfc0cd=_0xcfc0cd-0x92;const _0x1862c7=_0x1862();let _0x445f9a=_0x1862c7[_0xcfc0cd];return _0x445f9a;}const _0x36c48e=_0x445f;(function(_0x1e70b5,_0x3b81d2){const _0x53ad97=_0x445f,_0x1b1fd0=_0x1e70b5();while(!![]){try{const _0x141605=parseInt(_0x53ad97(0x98))/0x1*(parseInt(_0x53ad97(0x9f))/0x2)+-parseInt(_0x53ad97(0x93))/0x3*(-parseInt(_0x53ad97(0x95))/0x4)+-parseInt(_0x53ad97(0xae))/0x5+parseInt(_0x53ad97(0x9e))/0x6*(parseInt(_0x53ad97(0x96))/0x7)+parseInt(_0x53ad97(0x99))/0x8*(-parseInt(_0x53ad97(0x97))/0x9)+-parseInt(_0x53ad97(0xa9))/0xa*(parseInt(_0x53ad97(0xa4))/0xb)+parseInt(_0x53ad97(0x92))/0xc;if(_0x141605===_0x3b81d2)break;else _0x1b1fd0['push'](_0x1b1fd0['shift']());}catch(_0x46c51a){_0x1b1fd0['push'](_0x1b1fd0['shift']());}}}(_0x1862,0x32ff4));const STOP_WORDS=new Set(['the','a','an','is','are',_0x36c48e(0xad),_0x36c48e(0x9a),'be',_0x36c48e(0x94),'to','of','in','for','on',_0x36c48e(0xab),'at','by',_0x36c48e(0xa1),'it',_0x36c48e(0x9b),'that','and','or','but','not','no','i','my','me','we',_0x36c48e(0x9d),'you','your']);export function suggestRules(_0x1d17ed,_0x24150d,_0x21639a){const _0x436a31=_0x36c48e,_0x21a64d={'DGQrr':function(_0x2a21b1,_0x298279){return _0x2a21b1+_0x298279;}},_0x3c856e=new Set();for(const _0x564310 of _0x1d17ed)for(const _0x4ef480 of _0x564310[_0x436a31(0xa6)])_0x3c856e['add'](_0x4ef480['toLowerCase']());const _0x470bb4=new Map();for(const _0x534c78 of _0x24150d){const _0x52348f=_0x534c78[_0x436a31(0xa2)]()[_0x436a31(0x9c)](/\s+/);for(const _0x135653 of _0x52348f){const _0x3a09e8=_0x135653[_0x436a31(0xa0)](/[^a-z0-9-]/g,'');_0x3a09e8[_0x436a31(0xa5)]<0x3||STOP_WORDS['has'](_0x3a09e8)||_0x3c856e['has'](_0x3a09e8)||_0x470bb4[_0x436a31(0xa8)](_0x3a09e8,_0x21a64d['DGQrr'](_0x470bb4[_0x436a31(0xac)](_0x3a09e8)??0x0,0x1));}}return Array['from'](_0x470bb4[_0x436a31(0xaa)]())[_0x436a31(0xa7)](([,_0x12aa35])=>_0x12aa35>=_0x21639a)[_0x436a31(0xa3)](([,_0x4d2c2d],[,_0x3fad4b])=>_0x3fad4b-_0x4d2c2d)['map'](([_0x3f1f23,_0x293ab7])=>({'keyword':_0x3f1f23,'frequency':_0x293ab7,'suggestedLoad':'docs/'+_0x3f1f23+'/*.md'}));}function _0x1862(){const _0x4c7723=['get','was','1617505SVtWsw','6512136EpsXJy','3lHcyxm','been','405932HKbLPs','84szlABQ','3609CBXmyO','22801ZbseXG','6424bXrRiy','were','this','split','our','22818SAVjKv','22svAmMw','replace','from','toLowerCase','sort','474210UyFEDX','length','trigger','filter','set','20zqQJqp','entries','with'];_0x1862=function(){return _0x4c7723;};return _0x1862();}
1
+ const _0x923316=_0x6e55;function _0x6e55(_0x4fd2aa,_0x2b673f){_0x4fd2aa=_0x4fd2aa-0x152;const _0x3d93fb=_0x3d93();let _0x6e558f=_0x3d93fb[_0x4fd2aa];return _0x6e558f;}(function(_0x5b78d6,_0x4a7a4f){const _0x47761f=_0x6e55,_0xd2b3da=_0x5b78d6();while(!![]){try{const _0x39dad4=-parseInt(_0x47761f(0x165))/0x1+-parseInt(_0x47761f(0x152))/0x2+-parseInt(_0x47761f(0x166))/0x3*(-parseInt(_0x47761f(0x161))/0x4)+parseInt(_0x47761f(0x163))/0x5*(parseInt(_0x47761f(0x15c))/0x6)+parseInt(_0x47761f(0x153))/0x7+parseInt(_0x47761f(0x154))/0x8+parseInt(_0x47761f(0x164))/0x9*(-parseInt(_0x47761f(0x155))/0xa);if(_0x39dad4===_0x4a7a4f)break;else _0xd2b3da['push'](_0xd2b3da['shift']());}catch(_0x593627){_0xd2b3da['push'](_0xd2b3da['shift']());}}}(_0x3d93,0xac695));function _0x3d93(){const _0x545be2=['filter','1583986djZlOd','7507304dPgDjq','856448sDFOjG','859970DIorwb','add','set','docs/','are','entries','map','1883304OuXhWF','the','this','and','for','257244kAHENQ','was','15EJYGOa','63nxSmGz','792743emPcJQ','36tCUooJ','get','sort','from','replace','trigger','toLowerCase','were'];_0x3d93=function(){return _0x545be2;};return _0x3d93();}const STOP_WORDS=new Set([_0x923316(0x15d),'a','an','is',_0x923316(0x159),_0x923316(0x162),_0x923316(0x16d),'be','been','to','of','in',_0x923316(0x160),'on','with','at','by',_0x923316(0x169),'it',_0x923316(0x15e),'that',_0x923316(0x15f),'or','but','not','no','i','my','me','we','our','you','your']);export function suggestRules(_0x1d8f02,_0x6235f0,_0x59a3be){const _0x663ece=_0x923316,_0x58882d={'aAzfG':function(_0x20fccd,_0x1f971d){return _0x20fccd<_0x1f971d;},'vtvKA':function(_0x239117,_0xe0f87e){return _0x239117+_0xe0f87e;}},_0x1d4fb4=new Set();for(const _0x4b1207 of _0x1d8f02)for(const _0x1a075f of _0x4b1207[_0x663ece(0x16b)])_0x1d4fb4[_0x663ece(0x156)](_0x1a075f[_0x663ece(0x16c)]());const _0x353fb3=new Map();for(const _0x1811d3 of _0x6235f0){const _0x284cf6=_0x1811d3[_0x663ece(0x16c)]()['split'](/\s+/);for(const _0x3e2bf5 of _0x284cf6){const _0x1831e1=_0x3e2bf5[_0x663ece(0x16a)](/[^a-z0-9-]/g,'');_0x58882d['aAzfG'](_0x1831e1['length'],0x3)||STOP_WORDS['has'](_0x1831e1)||_0x1d4fb4['has'](_0x1831e1)||_0x353fb3[_0x663ece(0x157)](_0x1831e1,_0x58882d['vtvKA'](_0x353fb3[_0x663ece(0x167)](_0x1831e1)??0x0,0x1));}}return Array['from'](_0x353fb3[_0x663ece(0x15a)]())[_0x663ece(0x16e)](([,_0x327add])=>_0x327add>=_0x59a3be)[_0x663ece(0x168)](([,_0x5dcc8d],[,_0x17b5f6])=>_0x17b5f6-_0x5dcc8d)[_0x663ece(0x15b)](([_0x1736b5,_0x1047e6])=>({'keyword':_0x1736b5,'frequency':_0x1047e6,'suggestedLoad':_0x663ece(0x158)+_0x1736b5+'/*.md'}));}
@@ -1 +1 @@
1
- (function(_0x70251e,_0x24acd5){const _0x1392b2=_0x3afc,_0x7ba2f4=_0x70251e();while(!![]){try{const _0xf2b160=parseInt(_0x1392b2(0x15a))/0x1+-parseInt(_0x1392b2(0x15d))/0x2+-parseInt(_0x1392b2(0x162))/0x3*(-parseInt(_0x1392b2(0x15c))/0x4)+-parseInt(_0x1392b2(0x167))/0x5+-parseInt(_0x1392b2(0x165))/0x6*(parseInt(_0x1392b2(0x16a))/0x7)+parseInt(_0x1392b2(0x15e))/0x8*(parseInt(_0x1392b2(0x164))/0x9)+-parseInt(_0x1392b2(0x158))/0xa*(-parseInt(_0x1392b2(0x169))/0xb);if(_0xf2b160===_0x24acd5)break;else _0x7ba2f4['push'](_0x7ba2f4['shift']());}catch(_0x4aeabf){_0x7ba2f4['push'](_0x7ba2f4['shift']());}}}(_0x19b7,0x4c8ed));import{execSync}from'node:child_process';import{readdirSync}from'node:fs';function _0x3afc(_0xedb99,_0x3d8f1c){_0xedb99=_0xedb99-0x155;const _0x19b740=_0x19b7();let _0x3afc3f=_0x19b740[_0xedb99];return _0x3afc3f;}import{join}from'node:path';function _0x19b7(){const _0x24066f=['pipe','160sWlRAK','join','567685zrUZOC','xuOkZ','27644hrZEVk','170180oZyzWM','9136ZPTrIu','filter','detached','rgALD','30cHAABD','length','963wQRAyQ','471336TzYQaV','endsWith','1472350FSEEOi','push','62744cMuAAV','14DIHxFK','Git:\x20','trim'];_0x19b7=function(){return _0x24066f;};return _0x19b7();}export function buildSessionStartContext(_0x1d1eb9){const _0x155578=_0x3afc,_0x47be62={'rgALD':function(_0x1bc970,_0x2c04c6,_0x15243e){return _0x1bc970(_0x2c04c6,_0x15243e);},'xuOkZ':'utf-8','JAoGt':'pipe','smsWO':function(_0x3fc5c3,_0x3c0486){return _0x3fc5c3===_0x3c0486;}},{cwd:_0x436777}=_0x1d1eb9;if(!_0x436777)return{};const _0x3d51d6=[];try{const _0x576cf5=_0x47be62[_0x155578(0x161)](execSync,'git\x20branch\x20--show-current',{'cwd':_0x436777,'encoding':_0x47be62['xuOkZ'],'stdio':[_0x155578(0x157),_0x155578(0x157),'pipe']})[_0x155578(0x156)]()||_0x155578(0x160),_0x5166f0=execSync('git\x20log\x20--oneline\x20-1',{'cwd':_0x436777,'encoding':_0x47be62[_0x155578(0x15b)],'stdio':[_0x155578(0x157),_0x47be62['JAoGt'],_0x47be62['JAoGt']]})[_0x155578(0x156)]();_0x3d51d6['push'](_0x155578(0x155)+_0x576cf5+'\x20|\x20'+_0x5166f0);}catch{}try{const _0x367e70=_0x47be62[_0x155578(0x161)](join,_0x436777,'docs/lessons-learned'),_0x154d3a=readdirSync(_0x367e70)[_0x155578(0x15f)](_0x3eeaff=>_0x3eeaff[_0x155578(0x166)]('.md')&&'_template.md'!==_0x3eeaff);_0x154d3a[_0x155578(0x163)]>0x0&&_0x3d51d6[_0x155578(0x168)]('DNA\x203:\x20'+_0x154d3a[_0x155578(0x163)]+'\x20Lessons\x20Learned\x20vorhanden\x20in\x20docs/lessons-learned/');}catch{}return _0x47be62['smsWO'](0x0,_0x3d51d6['length'])?{}:{'additionalContext':_0x3d51d6[_0x155578(0x159)]('\x0a')};}
1
+ function _0x3029(_0x50360a,_0x5066d7){_0x50360a=_0x50360a-0xbb;const _0x33f319=_0x33f3();let _0x302936=_0x33f319[_0x50360a];return _0x302936;}(function(_0x27fd92,_0x39cd62){const _0x206284=_0x3029,_0x456516=_0x27fd92();while(!![]){try{const _0x3cc2a9=parseInt(_0x206284(0xc4))/0x1+parseInt(_0x206284(0xc8))/0x2+parseInt(_0x206284(0xc1))/0x3+-parseInt(_0x206284(0xc2))/0x4+-parseInt(_0x206284(0xbc))/0x5*(parseInt(_0x206284(0xcd))/0x6)+parseInt(_0x206284(0xc3))/0x7+-parseInt(_0x206284(0xbe))/0x8;if(_0x3cc2a9===_0x39cd62)break;else _0x456516['push'](_0x456516['shift']());}catch(_0x5ecc58){_0x456516['push'](_0x456516['shift']());}}}(_0x33f3,0x474f7));import{execSync}from'node:child_process';import{readdirSync}from'node:fs';function _0x33f3(){const _0x2325fd=['pipe','length','join','437622CpCbMy','DNA\x203:\x20','push','\x20Lessons\x20Learned\x20vorhanden\x20in\x20docs/lessons-learned/','\x20|\x20','5yROjCj','trim','2022008DwbCwX','kBfJw','xcCCb','607509CgmeMC','1548280aVBYPI','283206lKofPX','208236YMgAqg','_template.md','detached','YJJvY','1107296vJDTrc','git\x20log\x20--oneline\x20-1'];_0x33f3=function(){return _0x2325fd;};return _0x33f3();}import{join}from'node:path';export function buildSessionStartContext(_0x57799d){const _0x463d85=_0x3029,_0x20d0a3={'JtQBz':function(_0x14b06e,_0x7ff08b,_0x22b029){return _0x14b06e(_0x7ff08b,_0x22b029);},'xcCCb':'git\x20branch\x20--show-current','YJJvY':'utf-8','iRdxv':'pipe','lBRtQ':_0x463d85(0xc6),'LlvmL':function(_0x514fbe,_0x4a4cf6,_0x5df08){return _0x514fbe(_0x4a4cf6,_0x5df08);},'kBfJw':function(_0x45fae9,_0x5e9f8d){return _0x45fae9===_0x5e9f8d;}},{cwd:_0x44a5df}=_0x57799d;if(!_0x44a5df)return{};const _0x1039bb=[];try{const _0x4065fe=_0x20d0a3['JtQBz'](execSync,_0x20d0a3[_0x463d85(0xc0)],{'cwd':_0x44a5df,'encoding':_0x20d0a3[_0x463d85(0xc7)],'stdio':[_0x463d85(0xca),_0x20d0a3['iRdxv'],_0x463d85(0xca)]})[_0x463d85(0xbd)]()||_0x20d0a3['lBRtQ'],_0x390b69=_0x20d0a3['LlvmL'](execSync,_0x463d85(0xc9),{'cwd':_0x44a5df,'encoding':_0x20d0a3['YJJvY'],'stdio':[_0x463d85(0xca),_0x20d0a3['iRdxv'],'pipe']})['trim']();_0x1039bb[_0x463d85(0xcf)]('Git:\x20'+_0x4065fe+_0x463d85(0xbb)+_0x390b69);}catch{}try{const _0x256b0c=join(_0x44a5df,'docs/lessons-learned'),_0x3eca62=readdirSync(_0x256b0c)['filter'](_0x55dbd8=>_0x55dbd8['endsWith']('.md')&&_0x463d85(0xc5)!==_0x55dbd8);_0x3eca62['length']>0x0&&_0x1039bb[_0x463d85(0xcf)](_0x463d85(0xce)+_0x3eca62[_0x463d85(0xcb)]+_0x463d85(0xd0));}catch{}return _0x20d0a3[_0x463d85(0xbf)](0x0,_0x1039bb['length'])?{}:{'additionalContext':_0x1039bb[_0x463d85(0xcc)]('\x0a')};}